Package org.wicketstuff.rest.resource
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 withMethodMapping
). These informations are used at runtime to select the most suited method to serve the current request.- Author:
- andrea del bene
-
-
Constructor Summary
Constructors Constructor Description MethodMappingInfo(MethodMapping methodMapped, Method method, Supplier<Locale> localeSupplier)
Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Class<? extends Annotation>,List<MethodParameter<?>>>
getAnnotatedMethodParameters()
Gets the method parameters stored by annotation.org.wicketstuff.restutils.http.HttpMethod
getHttpMethod()
Gets the HTTP method.String
getInputFormat()
Gets the mime input format.Supplier<Locale>
getLocaleSupplier()
Gets the Supplier used to retrieve the LocaleMethod
getMethod()
Gets the relative class method.List<MethodParameter<?>>
getMethodParameters()
Gets the method parameters.String
getOutputFormat()
Gets the mime output format.Roles
getRoles()
Gets the optional authorization roles for this method.List<AbstractURLSegment>
getSegments()
Gets the segments of the mapped URL.int
getSegmentsCount()
Gets the segments count.
-
-
-
Constructor Detail
-
MethodMappingInfo
public MethodMappingInfo(MethodMapping methodMapped, Method method, Supplier<Locale> localeSupplier)
Class constructor.- Parameters:
methodMapped
- the method mappedmethod
- the resource's method mapped.
-
-
Method Detail
-
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 interfaceIMimeTypeResolver
- Returns:
- the mime input format
-
getOutputFormat
public String getOutputFormat()
Gets the mime output format.- Specified by:
getOutputFormat
in interfaceIMimeTypeResolver
- 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
-
-