Interface ConverterContext
- All Superinterfaces:
Adaptable
A context object providing useful information from the request. Can be adapted to ResourceConverterContext.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault page size limit.static final booleanDefault indicator if absolute URIs should be used. -
Method Summary
Modifier and TypeMethodDescriptionReturns the portion of the request URI that indicates the context.intgetLimit()Returns the limit.Returns the media type that was matched from the request and that the converter is being asked to provide.Retrieves the filters to be applied by the model when getting entities.Get this converters current offset value or the offset if that has been set.Get this converters current list of order by information.Returns the request parameters.getQuery()Returns the query.Returns the HTTP method of the request.Returns theRequestPathInfo.Get the Root Context Path Value as defined in OSGI config for ApiEndpointResourceProviderFactoryReturns the name of the scheme.Returns the host name of the server.intReturns the port number.booleanIndicator if absolute URI's are used.voidsetMatchedMediaType(String mediaType) Set the media type that was matched from the request and the converter is being asked to provide.setOffsetValue(String value) Set the offset value.
-
Field Details
-
DEFAULT_LIMIT
static final int DEFAULT_LIMITDefault page size limit.- See Also:
-
DEFAULT_USE_ABSOLUTE_URIS
static final boolean DEFAULT_USE_ABSOLUTE_URISDefault indicator if absolute URIs should be used.- See Also:
-
-
Method Details
-
getRootContextPath
Get the Root Context Path Value as defined in OSGI config for ApiEndpointResourceProviderFactory- Returns:
- The root context path.
-
getLimit
int getLimit()Returns the limit.- Returns:
- The limit value
-
getScheme
Returns the name of the scheme.- Returns:
- Scheme name
-
getServerName
Returns the host name of the server.- Returns:
- Server host name
-
getServerPort
int getServerPort()Returns the port number.- Returns:
- Server port
-
getContextPath
Returns the portion of the request URI that indicates the context.- Returns:
- Context path
-
getRequestPathInfo
Returns theRequestPathInfo.- Returns:
- RequestPathInfo
-
getParameters
Returns the request parameters.- Returns:
- A
Mapof request parameter keys and values
-
getQuery
Returns the query.- Returns:
- Query value
-
isAbsoluteURI
boolean isAbsoluteURI()Indicator if absolute URI's are used.- Returns:
trueif URIs are absolute,falseotherwise
-
getModelFilters
Retrieves the filters to be applied by the model when getting entities.- Returns:
- The filters the model must use.
-
getMatchedMediaType
Returns the media type that was matched from the request and that the converter is being asked to provide.- Returns:
- The matched media type
-
setMatchedMediaType
Set the media type that was matched from the request and the converter is being asked to provide.- Parameters:
mediaType- The matched media type
-
getRequestMethod
Returns the HTTP method of the request.- Returns:
- The HTTP method of the request
-
setOffsetValue
Set the offset value. Pagination could assign this value to a number or a string depending on the design of the URL space.- Parameters:
value- the value of the url parameter- Returns:
- the current context
-
getOffsetValue
String getOffsetValue()Get this converters current offset value or the offset if that has been set.- Returns:
- the offset value
-
getOrderBy
Get this converters current list of order by information.- Returns:
- the list of requested order by details or an empty list if nothing was specified
-