Examples of RestFailure


Examples of org.cruxframework.crux.core.server.rest.spi.RestFailure

        simpleSegment = path.substring(start, endOfSegmentIndex);
      else
        simpleSegment = path.substring(start);
    }

    RestFailure lastFailure = null;

    SimpleSegment segment = simpleSegments.get(simpleSegment);
    if (segment != null)
    {
      try
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.spi.RestFailure

         {
            if (val != null)
            {
               float rtn = Float.valueOf(val);
               if (rtn > 1.0F)
                  throw new RestFailure("MediaType q value cannot be greater than 1.0: " + type.toString(), HttpResponseCodes.SC_BAD_REQUEST);
               return rtn;
            }
         }
         catch (NumberFormatException e)
         {
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.spi.RestFailure

      {
         if (val != null)
         {
            float rtn = Float.valueOf(val);
            if (rtn > 1.0F)
               throw new RestFailure("Accept-Language q value cannot be greater than 1.0 " + lang.toString(), HttpResponseCodes.SC_BAD_REQUEST);
            return rtn;
         }
      }
      catch (NumberFormatException e)
      {
         throw new RestFailure("MediaType q parameter must be a float: " + lang, HttpResponseCodes.SC_BAD_REQUEST);
      }
      return 1.0f;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.