Package org.wicketstuff.rest.utils.http

Examples of org.wicketstuff.rest.utils.http.HttpMethod


  @Override
  public final void respond(Attributes attributes)
  {
    AttributesWrapper attributesWrapper = new AttributesWrapper(attributes);
    WebResponse response = attributesWrapper.getWebResponse();
    HttpMethod httpMethod = attributesWrapper.getHttpMethod();

    // select the best "candidate" method to serve the request
    ScoreMethodAndExtractPathVars mappedMethod = selectMostSuitedMethod(attributesWrapper);

    if (mappedMethod != null)
View Full Code Here


   */
  private void handleMethodExecution(AttributesWrapper attributesWrapper,
    ScoreMethodAndExtractPathVars mappedMethod)
  {
    WebResponse response = attributesWrapper.getWebResponse();
    HttpMethod httpMethod = attributesWrapper.getHttpMethod();
    Attributes attributes = attributesWrapper.getOriginalAttributes();
    MethodMappingInfo methodInfo = mappedMethod.getMethodInfo();
    String outputFormat = methodInfo.getOutputFormat();

    // 1-check if user is authorized to invoke the method
View Full Code Here

      isUsingAuthAnnot = isUsingAuthAnnot || authorizeInvocation != null;

      if (methodMapped != null)
      {
        HttpMethod httpMethod = methodMapped.httpMethod();
        MethodMappingInfo methodMappingInfo = new MethodMappingInfo(methodMapped, method);

        if (!webSerialDeserial.isMimeTypeSupported(methodMappingInfo.getInputFormat()) ||
          !webSerialDeserial.isMimeTypeSupported(methodMappingInfo.getOutputFormat()))
          throw new WicketRuntimeException(
            "Mapped methods use a MIME type not supported by obj serializer/deserializer!");

        mappedMethods.addValue(
          methodMappingInfo.getSegmentsCount() + "_" + httpMethod.getMethod(),
          methodMappingInfo);
      }
    }
    // if AuthorizeInvocation has been found but no role-checker has been
    // configured, throw an exception
View Full Code Here

TOP

Related Classes of org.wicketstuff.rest.utils.http.HttpMethod

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.