com.ibm.commerce.rest.order.handler
Class ShippingInfoHandler
- java.lang.Object
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
-
- com.ibm.commerce.foundation.rest.resourcehandler.AbstractResourceHandler
-
- com.ibm.commerce.rest.order.handler.ShippingInfoHandler
-
- All Implemented Interfaces:
- DocumentedResourceHandler, IResourceHandler
@Path(value="store/{storeId}/cart/@self/shipping_info") @Encoded public class ShippingInfoHandler extends AbstractResourceHandler
This class provides RESTful services to get and update shipping information in the shopping cart.
-
-
Field Summary
Fields 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_NAMEstatic java.lang.String
ORDER_SHIPPING_UPDATE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.static java.lang.String
RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.static java.lang.String
RESOURCE_NAME
The Constant RESOURCE_NAME.-
Fields inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
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 Summary
Constructors Constructor and Description ShippingInfoHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.String
getExternalResourceName()
Get the resource name to show externally.java.lang.String
getFormattingGroupName()
This method returns the format group name to locate JSP template.OrderHelper
getHelper()
This method returns the BOD helper used to get product data.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
getShippingInfo(java.lang.String storeId, java.lang.String responseFormat, int pageNumber, int pageSize)
Get shipping information for the shopping cart.javax.ws.rs.core.Response
updateOrderShippingInfo(java.lang.String storeId, java.lang.String responseFormat)
Update shipping info for the shopping cart.-
Methods inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractResourceHandler
createMapForProvider, createMapForProvider, generateResponseForEntireDataObject, getMapFromRequest, getStoreId, getUserId, isRequestInPreviewMode, mergeMapsForProvider, prepareAndValidate
-
Methods inherited from class com.ibm.commerce.foundation.rest.resourcehandler.AbstractBaseResourceHandler
addError, createMapForProviderWithResultData, documentApi, generateResponseFromHttpStatusCodeAndRespData, getActionRegistry, getBooleanParameterValue, getClassDescription, getDoubleParameterValue, getDoubleParameterValues, getEnumeratedParameterValue, getErrorCodeFromMessage, getFormattedMessage, getFormattedMessageWithLocale, getInstrumentor, getIntegerParameterValue, getIntegerParameterValues, getLongParameterValue, getLongParameterValues, getParameterValue, getParameterValue, getParameterValues, getQueryRegistry, getRequest, getResponse, getUriInfo, handleException, initializeActionRegistry, initializeQueryRegistry, performAction, postProcess, preProcess, registerOperationWithMethodSignature, runQuery, staticConvertStreamToString, throwInvalidQueryNameException, throwInvalidQueryNameException, throwRestException, throwRestExceptionIfErrorsAreDetected, validatePageNumberPageSize
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.- See Also:
- Constant Field Values
-
RESOURCE_NAME
public static final java.lang.String RESOURCE_NAME
The Constant RESOURCE_NAME.- See Also:
- Constant Field Values
-
RESOURCE_MAPPING_KEY
public static final java.lang.String RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.- See Also:
- Constant Field Values
-
ORDER_SHIPPING_UPDATE_MAPPING_KEY
public static final java.lang.String ORDER_SHIPPING_UPDATE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.- See Also:
- Constant Field Values
-
FORMAT_GROUP_NAME
public static final java.lang.String FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAME- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceName
public java.lang.String getResourceName()
Description copied from interface:IResourceHandler
This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.- Returns:
- the resource name
-
getFormattingGroupName
public java.lang.String getFormattingGroupName()
This method returns the format group name to locate JSP template.- Specified by:
getFormattingGroupName
in interfaceIResourceHandler
- Overrides:
getFormattingGroupName
in classAbstractBaseResourceHandler
- Returns:
- formatting group name
-
getHelper
public OrderHelper getHelper()
This method returns the BOD helper used to get product data.- Returns:
- the helper
-
getShippingInfo
@GET public javax.ws.rs.core.Response getShippingInfo(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
Get shipping information for the shopping cart.- Parameters:
storeId
- the store idresponseFormat
- the response formatpageNumber
- the page numberpageSize
- the page size- Returns:
- the shipping info
-
updateOrderShippingInfo
@PUT @Consumes(value={"application/json","application/xml"}) public javax.ws.rs.core.Response updateOrderShippingInfo(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
Update shipping info for the shopping cart.- Parameters:
storeId
- the store idresponseFormat
- the response format- Returns:
- the response
-
getExternalResourceName
public java.lang.String getExternalResourceName()
Description copied from class:AbstractBaseResourceHandler
Get the resource name to show externally. This defaults to the value returned by getResourceName if this method isn't overridden.- Overrides:
getExternalResourceName
in classAbstractBaseResourceHandler
- Returns:
- The external resource name.
-
-