@Path(value="store/{storeId}/order") @Encoded public class OrderHandler extends AbstractConfigBasedClassicHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_GENERAL_OMS
Name of the configuration property for SterlingOMS.
|
static java.lang.String |
CONFIG_GROUPING_SIDE_BY_SIDE_INTEGRATION
Name of the configuration grouping for the side-by-side integration flow.
|
static java.lang.String |
CONFIG_OMS_STERLING
Name of the configuration property for SterlingOMS.
|
static java.lang.String |
CONFIG_PROPERTY_OMS_PROVIDER
Name of the configuration property for OMS provider.
|
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 |
ONBEHALF_MODE
onbehalf mode
|
static java.lang.String |
ORDER_DETAIL_MAPPING_KEY
Resource mapping key for order detail
|
static java.lang.String |
ORDER_HISTORY_DEFAULT_STATUS
All possible status (with states of N, M, A, B, C, R, S, D, F, G, L, and X) for order history.
|
static java.lang.String |
ORDER_HISTORY_STATUS
Deprecated.
Replaced by "N,M,A,B,C,R,S,D,F,G,L,X"
|
static java.lang.String |
ORDER_ITEM_CONFIGURATION_MAPPING_KEY
Resource mapping key for order item configuration
|
static java.lang.String |
ORDER_SUMMARY_MAPPING_KEY
Resource mapping key for order summary
|
static java.lang.String |
PARAMETER_BUYER_ID
user identifier
|
static java.lang.String |
PARAMETER_EXTERNAL_ORDER_ID
external order identifier
|
static java.lang.String |
PARAMETER_EXTERNAL_ORDER_ID_DESCRIPTION
external order identifier description
|
static java.lang.String |
PARAMETER_IS_SUMMARY
summary value
|
static java.lang.String |
PARAMETER_IS_SUMMARY_DESCRIPTION
summary value description
|
static java.lang.String |
PARAMETER_MODE
csr add comment mode, csr can add comment onbehalf mode
|
static java.lang.String |
PARAMETER_ORDER_BY_FIELD
order by filed
|
static java.lang.String |
PARAMETER_ORDER_BY_FIELD_DESCRIPTION
order by field description
|
static java.lang.String |
PARAMETER_ORDER_ID
order identifier
|
static java.lang.String |
PARAMETER_ORDER_ID_DESCRIPTION
order identifier description
|
static java.lang.String |
PARAMETER_ORDER_ITEM_ID
order item identifier
|
static java.lang.String |
PARAMETER_ORDER_ITEM_ID_DESCRIPTION
order item identifier description
|
static java.lang.String |
PARAMETER_ORMORDER
user identifier
|
static java.lang.String |
PARAMETER_RECORD_SET_TOTAL
total number of records in set
|
static java.lang.String |
PARAMETER_RECORD_SET_TOTAL_DESCRIPTION
record set total description
|
static java.lang.String |
PARAMETER_RETRIEVAL_ORDER_STATUS
retrieval order status
|
static java.lang.String |
PARAMETER_RETRIEVAL_ORDER_STATUS_DESCRIPTION
retrieval order status description
|
static java.lang.String |
PARAMETER_SORT_ORDER_ASC
sort comment asc
|
static java.lang.String |
PARAMETER_SORT_ORDER_ASC_DESCRIPTION
sort comment asc description
|
static java.lang.String |
PARAMETER_START_TIME
start time name
|
static java.lang.String |
PARAMETER_START_TIME_DESCRIPTION
start time description
|
static java.lang.String |
PARAMETER_STATUS
order status
|
static java.lang.String |
PARAMETER_STATUS_DESCRIPTION
order status description
|
static java.lang.String |
PARAMETER_USER_ID
user identifier
|
static java.lang.String |
PARAMETER_USER_ID_DESCRIPTION
user identifier description
|
static java.lang.String |
PARAMETR_MODE_DESCRIPTION
csr add comment mode description
|
static java.lang.String |
RESOURCE_NAME
Resource name
|
static java.lang.String |
SELF_MODE
self mode
|
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_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 |
---|
OrderHandler() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addCSROrderComments(java.lang.String storeId,
java.lang.String orderId,
java.lang.String mode,
java.lang.String responseFormat)
This allows to add CSR comments to the order.
|
javax.ws.rs.core.Response |
copyOMSOrderByExternalOrderId(java.lang.String storeId,
java.lang.String extOrderId,
java.lang.String responseFormat)
This method copies OMS order by an external order id.
|
javax.ws.rs.core.Response |
findByBuyerId(java.lang.String storeId,
java.lang.String buyerId,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method retrieves orders by status.
|
javax.ws.rs.core.Response |
findByOrderId(java.lang.String orderId,
java.lang.String storeId,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method retrieves order detail by an order id.
|
javax.ws.rs.core.Response |
findByORMOrder(java.lang.String storeId,
java.lang.String ORMOrder,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method retrieves orders by ORMORder.
|
javax.ws.rs.core.Response |
findByParentOrderId(java.lang.String storeId)
This method retrieves orders by the parent order identifier.
|
javax.ws.rs.core.Response |
findByQuery(java.lang.String storeId,
java.lang.String queryName,
java.lang.String responseFormat)
Finds orders by a query.
|
javax.ws.rs.core.Response |
findByStatus(java.lang.String storeId,
java.lang.String status,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method retrieves orders by status.
|
javax.ws.rs.core.Response |
findByStatusExt(java.lang.String storeId)
This method retrieves order status by the external order ID.
|
javax.ws.rs.core.Response |
findChildOrderByOrderItemId(java.lang.String storeId)
This method retrieves child orders by the order item identifier.
|
javax.ws.rs.core.Response |
findConfigurationByOrderItemId(java.lang.String storeId)
This method retrieves the order item configuration by an order item ID.
|
javax.ws.rs.core.Response |
findOMSOrderDetailsByExternalOrderId(java.lang.String storeId,
java.lang.String extOrderId,
java.lang.String responseFormat)
This method retrieves OMS order detail by an external order id.
|
javax.ws.rs.core.Response |
findOrderHistory(java.lang.String storeId,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
This method retrieves order history for the current shopper.
|
javax.ws.rs.core.Response |
findOrderPromotions(java.lang.String storeId)
This method retrieves the order promotions information.
|
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 order data
|
javax.ws.rs.core.Response |
getOrderCommentsByOrderId(java.lang.String storeId,
java.lang.String orderId,
boolean isAsc,
java.lang.String orderByField,
java.lang.String responseFormat,
int pageNumber,
int pageSize)
Gets the comments for the specific order by order id.
|
java.lang.String |
getResourceName()
This method returns the name of the resource used primarily to determine
the representation of the resource.
|
void |
initializeQueryRegistry(OperationRegistry registry)
Initialize the query registry.
|
javax.ws.rs.core.Response |
orderProfile(java.lang.String storeId)
This method retrieves the order profile by a user identifier.
|
javax.ws.rs.core.Response |
ordersICanWorkonbehalf(java.lang.String storeId)
This allows a CSR to find orders that he/she can work on behalf.
|
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.
|
javax.ws.rs.core.Response |
processOMSOrderByExternalOrderId(java.lang.String storeId,
java.lang.String extOrderId,
java.lang.String responseFormat)
This method process OMS order by an external order id.
|
executeConfigBasedBean, executeConfigBasedBean, executeConfigBasedBeanWithContext, executeConfigBasedBeanWithContext, executeConfigBasedCommand, executeConfigBasedCommandWithContext
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, performAction, preProcess, 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 ORDER_SUMMARY_MAPPING_KEY
public static final java.lang.String ORDER_DETAIL_MAPPING_KEY
public static final java.lang.String ORDER_ITEM_CONFIGURATION_MAPPING_KEY
public static final java.lang.String FORMAT_GROUP_NAME
public static final java.lang.String ORDER_HISTORY_STATUS
public static final java.lang.String PARAMETER_EXTERNAL_ORDER_ID
public static final java.lang.String PARAMETER_EXTERNAL_ORDER_ID_DESCRIPTION
public static final java.lang.String PARAMETER_IS_SUMMARY
public static final java.lang.String PARAMETER_IS_SUMMARY_DESCRIPTION
public static final java.lang.String PARAMETER_ORDER_ID
public static final java.lang.String PARAMETER_ORDER_ID_DESCRIPTION
public static final java.lang.String PARAMETER_ORDER_ITEM_ID
public static final java.lang.String PARAMETER_ORDER_ITEM_ID_DESCRIPTION
public static final java.lang.String PARAMETER_RECORD_SET_TOTAL
public static final java.lang.String PARAMETER_RECORD_SET_TOTAL_DESCRIPTION
public static final java.lang.String PARAMETER_RETRIEVAL_ORDER_STATUS
public static final java.lang.String PARAMETER_RETRIEVAL_ORDER_STATUS_DESCRIPTION
public static final java.lang.String PARAMETER_START_TIME
public static final java.lang.String PARAMETER_START_TIME_DESCRIPTION
public static final java.lang.String PARAMETER_STATUS
public static final java.lang.String PARAMETER_STATUS_DESCRIPTION
public static final java.lang.String PARAMETER_USER_ID
public static final java.lang.String PARAMETER_BUYER_ID
public static final java.lang.String PARAMETER_ORMORDER
public static final java.lang.String PARAMETER_USER_ID_DESCRIPTION
public static final java.lang.String PARAMETER_SORT_ORDER_ASC
public static final java.lang.String PARAMETER_SORT_ORDER_ASC_DESCRIPTION
public static final java.lang.String PARAMETER_ORDER_BY_FIELD
public static final java.lang.String PARAMETER_ORDER_BY_FIELD_DESCRIPTION
public static final java.lang.String PARAMETER_MODE
public static final java.lang.String PARAMETR_MODE_DESCRIPTION
public static final java.lang.String ONBEHALF_MODE
public static final java.lang.String SELF_MODE
public static final java.lang.String ORDER_HISTORY_DEFAULT_STATUS
public static final java.lang.String CONFIG_GROUPING_SIDE_BY_SIDE_INTEGRATION
public static final java.lang.String CONFIG_PROPERTY_OMS_PROVIDER
public static final java.lang.String CONFIG_OMS_STERLING
public static final java.lang.String CONFIG_GENERAL_OMS
public java.lang.String getResourceName()
IResourceHandler
public void initializeQueryRegistry(OperationRegistry registry)
AbstractBaseResourceHandler
initializeQueryRegistry
in class AbstractBaseResourceHandler
registry
- The query registry to initialize.public java.lang.String getFormattingGroupName()
getFormattingGroupName
in interface IResourceHandler
getFormattingGroupName
in class AbstractBaseResourceHandler
public OrderHelper getHelper()
@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="@history") public javax.ws.rs.core.Response findOrderHistory(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
getOrderHistoryDefaultStatus()
.storeId
- The store Id of the request.responseFormat
- The response format.pageNumber
- The page number.pageSize
- The page size.Response
document.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="{orderId}") public javax.ws.rs.core.Response findByOrderId(@PathParam(value="orderId") java.lang.String orderId, @PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
orderId
- The Order orderId.storeId
- The store Id.responseFormat
- The response format (xml, json, or atom).pageNumber
- The page number.pageSize
- The page size.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="byStatus/{status}") public javax.ws.rs.core.Response findByStatus(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="status") java.lang.String status, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
storeId
- The store Id.status
- The Order status.responseFormat
- The response format (xml, json, or atom).pageNumber
- The page number.pageSize
- The page size.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="byBuyerId/{buyerId}") public javax.ws.rs.core.Response findByBuyerId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="buyerId") java.lang.String buyerId, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
storeId
- The store Id.status
- The Order status.responseFormat
- The response format (xml, json, or atom).pageNumber
- The page number.pageSize
- The page size.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="oms_order/{extOrderId}") public javax.ws.rs.core.Response findOMSOrderDetailsByExternalOrderId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="extOrderId") java.lang.String extOrderId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
extOrderId
- The external order orderId.storeId
- The store Id.responseFormat
- The response format (xml, json, or atom).@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="process_oms_order/{extOrderId}") public javax.ws.rs.core.Response processOMSOrderByExternalOrderId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="extOrderId") java.lang.String extOrderId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
extOrderId
- The external order orderId.storeId
- The store Id.responseFormat
- The response format (xml, json, or atom).@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="copy_oms_order/{extOrderId}") public javax.ws.rs.core.Response copyOMSOrderByExternalOrderId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="extOrderId") java.lang.String extOrderId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
extOrderId
- The external order orderId.storeId
- The store Id.responseFormat
- The response format (xml, json, or atom).public javax.ws.rs.core.Response findByParentOrderId(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store identifier.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findByQuery(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="q") java.lang.String queryName, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- The store ID.queryName
- The query name.responseFormat
- The response format.public javax.ws.rs.core.Response findByStatusExt(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store identifier.public javax.ws.rs.core.Response findChildOrderByOrderItemId(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store identifier.public javax.ws.rs.core.Response findConfigurationByOrderItemId(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store identifier@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="byORMOrder/{ORMOrder}") public javax.ws.rs.core.Response findByORMOrder(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="ORMOrder") java.lang.String ORMOrder, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
storeId
- The store Id.ORMORDER
- The external order id.responseFormat
- The response format (xml, json, or atom).pageNumber
- The page number.pageSize
- The page size.public javax.ws.rs.core.Response orderProfile(@PathParam(value="storeId") java.lang.String storeId) throws com.ibm.commerce.foundation.rest.resourcehandler.RestException
storeId
- The store identifiercom.ibm.commerce.foundation.rest.resourcehandler.RestException
public javax.ws.rs.core.Response findOrderPromotions(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store identifierpublic 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.public javax.ws.rs.core.Response ordersICanWorkonbehalf(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store ID.@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) @Path(value="{orderId}/comment") public javax.ws.rs.core.Response addCSROrderComments(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="orderId") java.lang.String orderId, @QueryParam(value="mode") java.lang.String mode, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store id.orderId
- the order id.responseFormat
- @GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="{orderId}/comment") public javax.ws.rs.core.Response getOrderCommentsByOrderId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="orderId") java.lang.String orderId, @QueryParam(value="isAsc") boolean isAsc, @QueryParam(value="orderByField") java.lang.String orderByField, @QueryParam(value="responseFormat") java.lang.String responseFormat, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="pageSize") int pageSize)
storeId
- the store idorderId
- the order id.isAsc
- if the returned comment sort by ascending or not.orderByField
- the order by field.responseFormat
- the response format.pageNumber
- the page number.pageSize
- the page size.