Package org.cruxframework.crux.core.server.rest.spi

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


         {
            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

      {
         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

Related Classes of org.cruxframework.crux.core.server.rest.spi.RestFailure

Copyright © 2018 www.massapicom. 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.