public class OrderHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CAL_USAGE_KEY
The XPath key for calculation usage ids for CalculationInfoType.
|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String | DEFAULT_ACCESS_PROFILE
The default access profile.
|
static java.lang.String | DEFAULT_EXPRESSION
The default expression, used to retrieve order in current shopping cart.
|
static java.lang.String | EXTERNAL_DETAILS_ACCESS_PROFILE
Access profile for external details
|
static java.lang.String | EXTERNAL_SUMMARY_ACCESS_PROFILE
Access profile for external summary
|
static java.lang.String | FIND_BY_ORDER_STATUS_EXT_XPATH
The XPath key to find a Order noun by status using the external order ID.
|
static java.lang.String | FIND_BY_ORDERID_WITH_ORDER_ITEM_XPATH
The XPath key to find an Order noun by order ID with order item key
|
static java.lang.String | FIND_BY_ORDERID_XPATH
The XPath key to find a Order noun by orderid.
|
static java.lang.String | FIND_BY_STATUS_XPATH
The XPath key to find a Order noun by status.
|
static java.lang.String | FIND_CHILD_ORDER_BY_ORDER_ITEM_ID_XPATH
The XPath key to find a child order by the parent order item ID.
|
static java.lang.String | FIND_CHILD_ORDER_BY_PARENT_ORDER_ID_XPATH
The XPath key to find a child order by the parent order ID.
|
static java.lang.String | FIND_ORDER_ITEM_CONFIG_BY_ORDER_ITEM_XPATH
The XPath key to find an Order item configuration by orderItemId.
|
static java.lang.String | FIND_SCHEDULED_ORDER_XPATH
The XPath key to find a scheduled order.
|
static java.lang.String | ORDER_ITEM_CONFIGURATION_ACCESS_PROFILE
Access proflie for order item configuration
|
static java.lang.String | ORDER_SUMMARY_ACCESS_PROFILE
Access profile for order summary.
|
Constructor and Description |
---|
OrderHelper() |
OrderHelper(com.ibm.commerce.rest.utils.Instrumentor instrumentor)
Instantiates a new order helper.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> | applyCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Apply coupon to the order.
|
java.util.Map<java.lang.String,java.lang.Object> | applyPromoCode(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Apply promotion code to the order.
|
protected SelectionCriteriaHelper | buildExpression(java.lang.String expression, java.lang.String accessProfile)
This method creates a SelectionCriteriaHelper object with the provided XPath expression and access profile.
|
protected GetType | buildGetVerb(ExpressionType expression, int pageNumber, int pageSize)
This method creates the Order Get Verb.
|
void | cancelOrderInCart(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler cbh)
This method cancel the current shopping cart.
|
static java.util.Map<java.lang.String,java.lang.Object> | convertPIRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestMap)
This method converts the original request map into the map format that is accepted by BOD mapping utility.
|
java.util.Map<java.lang.String,java.lang.Object> | deletePaymentInst(java.util.Map<java.lang.String,java.lang.String> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Delete payment instruction.
|
ShowOrderDataAreaType | getCurrentShoppingCart(boolean isSummary, CommonOrderFacadeClient iClient)
Gets the current shopping cart.
|
com.ibm.commerce.rest.utils.Instrumentor | getInstrumentor()
Get the instrumentor associated with this request instance.
|
commonj.sdo.DataObject | getOrder(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression, java.lang.String accessProfile, int pageNumber, int pageSize)
This method performs a GetOrder service request and returns DataObject for DataArea.
|
java.lang.String | getOrderId(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression)
This method returns the orderid.
|
java.lang.String[] | getPaymentInstructionsIds(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression)
This method returns all the pay instructions that are related to the current order.
|
java.util.Map<java.lang.String,java.lang.Object> | lockOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
CSR locks the order
|
java.util.Map<java.lang.String,java.lang.Object> | prepareOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
This method prepare the order to be submitted.
|
java.util.Map<java.lang.String,java.lang.Object> | processOrChangeOrder(java.lang.String resourceName, java.lang.String urlParamGrpName, java.lang.String verb, java.lang.String actionCode, java.util.Map requestMap, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler)
Create BOD object and execute it.
|
java.util.Map<java.lang.String,java.lang.Object> | removeCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Remove the coupon from order.
|
java.util.Map<java.lang.String,java.lang.Object> | removePromoCode(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Remove the promotion code from order.
|
protected void | replaceRESTInputVarNameWithOrderInputVarName(java.util.Map<java.lang.String,java.lang.Object> parameters, java.lang.String restInputVarName, java.lang.String orderInputVarName)
This methods replaces the input variable name that passed from REST service with the input variable name that usable for Order service.
|
java.util.Map<java.lang.String,java.lang.Object> | submitOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
Submits the order to be processed.
|
java.util.Map<java.lang.String,java.lang.Object> | unlockOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
CSR unlocks the order.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String DEFAULT_ACCESS_PROFILE
public static final java.lang.String ORDER_SUMMARY_ACCESS_PROFILE
public static final java.lang.String ORDER_ITEM_CONFIGURATION_ACCESS_PROFILE
public static final java.lang.String EXTERNAL_DETAILS_ACCESS_PROFILE
public static final java.lang.String EXTERNAL_SUMMARY_ACCESS_PROFILE
public static final java.lang.String DEFAULT_EXPRESSION
public static final java.lang.String FIND_BY_ORDERID_XPATH
public static final java.lang.String FIND_BY_ORDERID_WITH_ORDER_ITEM_XPATH
public static final java.lang.String CAL_USAGE_KEY
public static final java.lang.String FIND_BY_STATUS_XPATH
public static final java.lang.String FIND_ORDER_ITEM_CONFIG_BY_ORDER_ITEM_XPATH
public static final java.lang.String FIND_CHILD_ORDER_BY_PARENT_ORDER_ID_XPATH
public static final java.lang.String FIND_CHILD_ORDER_BY_ORDER_ITEM_ID_XPATH
public static final java.lang.String FIND_BY_ORDER_STATUS_EXT_XPATH
public static final java.lang.String FIND_SCHEDULED_ORDER_XPATH
public OrderHelper()
public OrderHelper(com.ibm.commerce.rest.utils.Instrumentor instrumentor)
public com.ibm.commerce.rest.utils.Instrumentor getInstrumentor()
public commonj.sdo.DataObject getOrder(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression, java.lang.String accessProfile, int pageNumber, int pageSize) throws OrderException
public ShowOrderDataAreaType getCurrentShoppingCart(boolean isSummary, CommonOrderFacadeClient iClient) throws OrderException
protected GetType buildGetVerb(ExpressionType expression, int pageNumber, int pageSize)
protected SelectionCriteriaHelper buildExpression(java.lang.String expression, java.lang.String accessProfile)
public java.lang.String getOrderId(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> processOrChangeOrder(java.lang.String resourceName, java.lang.String urlParamGrpName, java.lang.String verb, java.lang.String actionCode, java.util.Map requestMap, BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler) throws java.lang.Exception
public void cancelOrderInCart(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler cbh) throws java.lang.Exception
public java.lang.String[] getPaymentInstructionsIds(BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh, java.lang.String expression) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> deletePaymentInst(java.util.Map<java.lang.String,java.lang.String> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws java.lang.Exception
public java.util.Map<java.lang.String,java.lang.Object> prepareOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> submitOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
protected void replaceRESTInputVarNameWithOrderInputVarName(java.util.Map<java.lang.String,java.lang.Object> parameters, java.lang.String restInputVarName, java.lang.String orderInputVarName)
public java.util.Map<java.lang.String,java.lang.Object> applyCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> removeCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> applyPromoCode(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> removePromoCode(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public static java.util.Map<java.lang.String,java.lang.Object> convertPIRequestMap(java.util.Map<java.lang.String,java.lang.Object> requestMap)
public java.util.Map<java.lang.String,java.lang.Object> lockOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException
public java.util.Map<java.lang.String,java.lang.Object> unlockOrder(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh) throws OrderException