org.wicketstuff.rest.resource
Class MethodMappingInfo

java.lang.Object
  extended by 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 Summary
MethodMappingInfo(MethodMapping methodMapped, Method method)
          Class constructor.
 
Method Summary
 HttpMethod getHttpMethod()
          Gets the HTTP method.
 String getInputFormat()
          Gets the mime input format.
 Method 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.
 LinkedHashMap<String,String> populatePathParameters(PageParameters pageParameters)
          This method is invoked to populate the path parameters found in the mapped URL with the values obtained from the current request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodMappingInfo

public MethodMappingInfo(MethodMapping methodMapped,
                         Method method)
Class constructor.

Parameters:
methodMapped - the method mapped
method - the resource's method mapped.
Method Detail

populatePathParameters

public LinkedHashMap<String,String> populatePathParameters(PageParameters pageParameters)
This method is invoked to populate the path parameters found in the mapped URL with the values obtained from the current request.

Parameters:
pageParameters - the current PageParameters.
Returns:
a Map containing the path parameters with their relative value.

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 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


Copyright © 2013–2014. All rights reserved.