Class MethodMappingInfo

java.lang.Object
org.wicketstuff.rest.resource.MethodMappingInfo
All Implemented Interfaces:
IMimeTypeResolver

public class MethodMappingInfo extends Object implements IMimeTypeResolver
This class contains the informations of a resource mapped method (i.e. a method annotated with MethodMapping). These informations are used at runtime to select the most suited method to serve the current request.
Author:
andrea del bene
  • Constructor Details

    • MethodMappingInfo

      public MethodMappingInfo(MethodMapping methodMapped, Method method, Supplier<Locale> localeSupplier)
      Class constructor.
      Parameters:
      methodMapped - the method mapped
      method - the resource's method mapped.
  • Method Details

    • getSegments

      public List<AbstractURLSegment> getSegments()
      Gets the segments of the mapped URL.
      Returns:
      the segments
    • getSegmentsCount

      public int getSegmentsCount()
      Gets the segments count.
      Returns:
      the segments count
    • getHttpMethod

      public org.wicketstuff.restutils.http.HttpMethod getHttpMethod()
      Gets the HTTP method.
      Returns:
      the HTTP method
    • getMethod

      public Method getMethod()
      Gets the relative class method.
      Returns:
      the class method
    • getRoles

      public Roles getRoles()
      Gets the optional authorization roles for this method.
      Returns:
      the roles
    • getInputFormat

      public String getInputFormat()
      Gets the mime input format.
      Specified by:
      getInputFormat in interface IMimeTypeResolver
      Returns:
      the mime input format
    • getOutputFormat

      public String getOutputFormat()
      Gets the mime output format.
      Specified by:
      getOutputFormat in interface IMimeTypeResolver
      Returns:
      the mime output format
    • getMethodParameters

      public List<MethodParameter<?>> getMethodParameters()
      Gets the method parameters.
      Returns:
      the method parameters
    • getAnnotatedMethodParameters

      public Map<Class<? extends Annotation>,List<MethodParameter<?>>> getAnnotatedMethodParameters()
      Gets the method parameters stored by annotation.
      Returns:
      the method parameters
    • getLocaleSupplier

      public Supplier<Locale> getLocaleSupplier()
      Gets the Supplier used to retrieve the Locale
      Returns:
      the Supplier used to retrieve the Locale