Package com.adobe.granite.rest.converter
Class ResourceConverterContext
java.lang.Object
com.adobe.granite.rest.converter.ResourceConverterContext
The
ResourceConverterContext provides context information which are necessary or useful for converting a
resource.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault page size limit.static final booleanDefault show all properties flag.static final booleanDefault indicator if absolute URIs should be used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the portion of the request URI that indicates the context.Returns the filter.intgetLimit()Returns the limit.intReturns the offset.Returns the request parameters.getQuery()Returns the query.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.String[]Retrieves the properties to show.booleanIndicator if absolute URI's are used.booleanIndicator if all properties should be shown.setAbsolutURI(boolean useAbsoluteURI) Sets the property to use absolute URI's.setContextPath(String contextPath) Sets the portion of the request URI that indicates the context.Sets the filter.setLimit(int limit) Sets the limit.voidsetModelFilters(Map<String, String[]> filters) setOffset(int offset) Set the offset.setParameters(Map<String, String[]> parameters) Sets the request parameters.Sets the query.setRequestPathInfo(RequestPathInfo requestPathInfo) Sets theRequestPathInfo.voidsetRootContextPath(String rootContextPath) Set the root context pathSets the name of the scheme.setServerName(String serverName) Sets the host name of the server.setServerPort(int serverPort) Sets the port number.setShowAllProperties(boolean showAllProperties) Sets the property to show all properties.setShowProperties(String[] showProperties) Sets the properties to show.
-
Field Details
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMITDefault page size limit.- See Also:
-
DEFAULT_USE_ABSOLUTE_URIS
public static final boolean DEFAULT_USE_ABSOLUTE_URISDefault indicator if absolute URIs should be used.- See Also:
-
DEFAULT_SHOW_ALL_PROPERTIES
public static final boolean DEFAULT_SHOW_ALL_PROPERTIESDefault show all properties flag.- See Also:
-
-
Constructor Details
-
ResourceConverterContext
public ResourceConverterContext()Create a newResourceConverterContext.
-
-
Method Details
-
getRootContextPath
Get the Root Context Path Value as defined in OSGI config for ApiEndpointResourceProviderFactory- Returns:
- The root context path.
-
setRootContextPath
Set the root context path- Parameters:
rootContextPath- The root context path
-
getOffset
public int getOffset()Returns the offset.- Returns:
- The offset value
-
setOffset
Set the offset.- Parameters:
offset- Offset value- Returns:
- reference to self
-
getLimit
public int getLimit()Returns the limit.- Returns:
- The limit value
-
setLimit
Sets the limit.- Parameters:
limit- Limit value- Returns:
- reference to self
-
getFilter
Returns the filter.- Returns:
- The filter
-
setFilter
Sets the filter.- Parameters:
filter- A filter- Returns:
- reference to self
-
getScheme
Returns the name of the scheme.- Returns:
- Scheme name
-
setScheme
Sets the name of the scheme.- Parameters:
scheme- Scheme name- Returns:
- reference to self
-
getServerName
Returns the host name of the server.- Returns:
- Server host name
-
setServerName
Sets the host name of the server.- Parameters:
serverName- Server host name- Returns:
- reference to self
-
getServerPort
public int getServerPort()Returns the port number.- Returns:
- Server port
-
setServerPort
Sets the port number.- Parameters:
serverPort- Server port- Returns:
- reference to self
-
getContextPath
Returns the portion of the request URI that indicates the context.- Returns:
- Context path
-
setContextPath
Sets the portion of the request URI that indicates the context.- Parameters:
contextPath- Context path- Returns:
- reference to self
-
getRequestPathInfo
Returns theRequestPathInfo.- Returns:
- RequestPathInfo
-
setRequestPathInfo
Sets theRequestPathInfo.- Parameters:
requestPathInfo- A RequestPathInfo- Returns:
- reference to self
-
getParameters
Returns the request parameters.- Returns:
- A
Mapof request parameter keys and values
-
setParameters
Sets the request parameters.- Parameters:
parameters- Request parameters- Returns:
- reference to self
-
getQuery
Returns the query.- Returns:
- Query value
-
setQuery
Sets the query.- Parameters:
query- Query value- Returns:
- reference to self
-
isAbsolutURI
public boolean isAbsolutURI()Indicator if absolute URI's are used.- Returns:
trueif URIs are absolute,falseotherwise
-
setAbsolutURI
Sets the property to use absolute URI's.- Parameters:
useAbsoluteURI- Indicator to use absolute URIs- Returns:
- reference to self
-
isShowAllProperties
public boolean isShowAllProperties()Indicator if all properties should be shown.- Returns:
- the showAllProperties
-
setShowAllProperties
Sets the property to show all properties.- Parameters:
showAllProperties- Indicator to show all properties- Returns:
- reference to self
-
getShowProperties
Retrieves the properties to show.- Returns:
- A list of property names to show.
-
setShowProperties
Sets the properties to show.- Parameters:
showProperties- Property names to show.- Returns:
- references to self
-
getModelFilters
-
setModelFilters
-