@Path(value="store/{storeId}/coupon")
@Encoded
public class CouponHandler
extends com.ibm.commerce.foundation.rest.resourcehandler.AbstractClassicResourceHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAME
|
static java.lang.String |
RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.
|
static java.lang.String |
RESOURCE_NAME
The Constant RESOURCE_NAME.
|
APPLICATION_ATOM_XML, APPLICATION_JSON, APPLICATION_XHTML_XML, APPLICATION_XML, CHANGE_VERB, PARAMETER_ACTION, PARAMETER_ACTION_DESCRIPTION, PARAMETER_CATALOG_ID, PARAMETER_CATALOG_ID_DESCRIPTION, PARAMETER_CURRENCY, PARAMETER_CURRENCY_DESCRIPTION, PARAMETER_FOR_USER, PARAMETER_FOR_USER_DESCRIPTION, PARAMETER_FOR_USER_ID, PARAMETER_FOR_USER_ID_DESCRIPTION, PARAMETER_LANG_ID, PARAMETER_LANG_ID_DESCRIPTION, PARAMETER_LOCALE, PARAMETER_LOCALE_DESCRIPTION, PARAMETER_MODE, PARAMETER_MODE_DESCRIPTION, PARAMETER_PAGE_NUMBER, PARAMETER_PAGE_NUMBER_DESCRIPTION, PARAMETER_PAGE_SIZE, PARAMETER_PAGE_SIZE_DESCRIPTION, PARAMETER_PROFILE_NAME, PARAMETER_PROFILE_NAME_DESCRIPTION, PARAMETER_QUERY, PARAMETER_QUERY_DESCRIPTION, PARAMETER_RESET_PASSWORD_DESCRIPTION, PARAMETER_RESPONSE_FORMAT, PARAMETER_RESPONSE_FORMAT_DESCRIPTION, PARAMETER_STORE_ID, PARAMETER_STORE_ID_DESCRIPTION, PARAMETER_WORKSPACE_IDENTIFIER, PARAMETER_WORKSPACE_IDENTIFIER_DESCRIPTION, PARAMETER_WORKSPACE_NAME, PARAMETER_WORKSPACE_NAME_DESCRIPTION, PARAMETER_WORKSPACE_TASK, PARAMETER_WORKSPACE_TASK_DESCRIPTION, PARAMETER_WORKSPACE_TASKGROUP, PARAMETER_WORKSPACE_TASKGROUP_DESCRIPTION, PROCESS_VERB, RESPONSE_200_DESCRIPTION, RESPONSE_201_DESCRIPTION, RESPONSE_204_DESCRIPTION, RESPONSE_400_DESCRIPTION, RESPONSE_401_DESCRIPTION, RESPONSE_403_DESCRIPTION, RESPONSE_404_DESCRIPTION, RESPONSE_500_DESCRIPTION
Constructor and Description |
---|
CouponHandler() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
deleteCouponById(java.lang.String storeId,
java.lang.String couponId,
java.lang.String responseFormat)
This method deletes the coupon by coupon id.
|
javax.ws.rs.core.Response |
getCoupon(java.lang.String storeId,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method returns the coupon list for the current shopper.
|
java.lang.String |
getFormattingGroupName()
Returns the formatting group name for resolving the struts action of the
formatting JSP.
|
CouponHelper |
getHelper()
This method returns the BOD helper associated with the Coupon resource.
|
java.lang.String |
getResourceName()
This method returns the name of the resource used primarily to determine
the representation of the resource.
|
javax.ws.rs.core.Response |
issueCoupon(java.lang.String storeId,
java.lang.String responseFormat)
This method is used by shopper to self-obtain a coupon.
|
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 can be used to do the pre-processing of the response map before the entity provider
is invoked passing the response map.
|
createMapForProvider, createMapForProvider, generateResponseForEntireDataObject, getMapFromRequest, getStoreId, getUserId, isRequestInPreviewMode, mergeMapsForProvider, prepareAndValidate
addError, createMapForProviderWithResultData, documentApi, generateResponseFromHttpStatusCodeAndRespData, getActionRegistry, getBooleanParameterValue, getClassDescription, getDoubleParameterValue, getDoubleParameterValues, getEnumeratedParameterValue, getErrorCodeFromMessage, getExternalResourceName, getFormattedMessage, getFormattedMessageWithLocale, getInstrumentor, getIntegerParameterValue, getIntegerParameterValues, getLongParameterValue, getLongParameterValues, getParameterValue, getParameterValue, getParameterValues, getQueryRegistry, getRequest, getResponse, getUriInfo, handleException, initializeActionRegistry, initializeQueryRegistry, performAction, registerOperationWithMethodSignature, runQuery, staticConvertStreamToString, throwInvalidQueryNameException, throwInvalidQueryNameException, throwRestException, throwRestExceptionIfErrorsAreDetected, validatePageNumberPageSize
public static final java.lang.String COPYRIGHT
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_MAPPING_KEY
public static final java.lang.String FORMAT_GROUP_NAME
public java.lang.String getResourceName()
IResourceHandler
IResourceHandler.getResourceName()
public java.lang.String getFormattingGroupName()
AbstractBaseResourceHandler
getFormattingGroupName
in interface IResourceHandler
getFormattingGroupName
in class AbstractBaseResourceHandler
AbstractBaseResourceHandler.getFormattingGroupName()
public CouponHelper getHelper()
CouponHelper
for customization.@GET @Path(value="@self") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response getCoupon(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
storeId
- the store idresponseFormat
- the response formatpageNumber
- the page number.pageSize
- the page size.@DELETE @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="{couponId}") public javax.ws.rs.core.Response deleteCouponById(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="couponId") java.lang.String couponId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store id.couponId
- the coupon id.responseFormat
- the response format.public void preProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
preProcess
in interface IResourceHandler
preProcess
in class AbstractBaseResourceHandler
responseMap
- the response map.public void postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
postProcess
in interface IResourceHandler
postProcess
in class AbstractBaseResourceHandler
responseMap
- The response Map after each DataObject has been converted to a Map.@POST @Path(value="@self") @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response issueCoupon(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store id.responseFormat
- the response format.