public interface IResourceHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
generateResponseFromHttpStatusCodeAndRespData(java.lang.String responseFormat,
java.util.Map<java.lang.String,java.lang.Object> responseData,
org.apache.wink.common.http.HttpStatus statusCode)
This method generates REST response for a given response map.
|
java.lang.String |
getFormattingGroupName()
Returns the formatting group name for resolving the struts action of the formatting JSP.
|
java.lang.String |
getResourceName()
This method returns the name of the resource used primarily to determine
the representation of the resource.
|
void |
postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
Method to provide post process in out of box JSON/XML entity providers
after each DataObject has been converted to a Map and before constructing
the REST response.
|
void |
preProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
This method does the pre-processing of the response map before the entity provider
is invoked passing the response map.
|
static final java.lang.String COPYRIGHT
java.lang.String getResourceName()
java.lang.String getFormattingGroupName()
NULL
. Overwrite this method in your resource handler class to return
a formatting group name specific to your resource handler.void preProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
Overwrite this method in your resource handler class to customize the response map.
responseMap
- the response map.void postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
responseMap
- The response Map after each DataObject has been converted to a Map.javax.ws.rs.core.Response generateResponseFromHttpStatusCodeAndRespData(java.lang.String responseFormat, java.util.Map<java.lang.String,java.lang.Object> responseData, org.apache.wink.common.http.HttpStatus statusCode)
Use this method in your resource handler class when you want to pass name value pairs to the entity provider.
responseFormat
- the response format shortcut. Response format is used to resolve the
media type for the REST response.responseData
- the response map to pass to the entity provider.statusCode
- the HTTP status code to set in the REST response.