|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.process.action.ActionImpl atg.commerce.promotion.AddItemToOrder
public class AddItemToOrder
This action takes is responsible for creating a CommerceItem object from the passed product, sku, and quantity parameters and adding it to the first order that is in a state of INCOMPLETE.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected ComponentName |
mOrderHolderComponent
order holder component name |
protected OrderManager |
mOrderManager
reference to the order manager object |
protected java.lang.String |
mPricingOperation
repricing operation to use |
protected PricingTools |
mPricingTools
reference to the pricing tools |
protected PromotionTools |
mPromotionTools
reference to the PromotionTools |
java.lang.String |
PRICING_TOOLS_PATH
Location of the PricingTools component. |
static java.lang.String |
PRODUCT_PARAM
Parameter for product id information |
java.lang.String |
PROMOTION_TOOLS_PATH
Location of the PromotionTools component. |
static java.lang.String |
QUANTITY_PARAM
Parameter for quantity information |
java.lang.String |
SHOPPINGCART_PATH
Location of the OrderHolder component, called the shopping cart. |
static java.lang.String |
SITE_ID_PARAM
Parameter for site id |
static java.lang.String |
SKU_PARAM
Parameter for sku id information |
Constructor Summary | |
---|---|
AddItemToOrder()
|
Method Summary | |
---|---|
protected void |
addItem(java.lang.String pSkuId,
java.lang.String pProductId,
long pQuantity,
java.lang.String pSiteId,
ProcessExecutionContext pContext)
This method will actually perform the action of adding an item to an order. |
void |
configure(java.lang.Object pConfiguration)
Configures the action using the given configuration object. |
protected void |
executeAction(ProcessExecutionContext pContext)
Executes this action in the given single process execution context. |
Order |
getOrderToAddItemTo(ProcessExecutionContext pContext)
This method returns the order to which the CommerceItem should be added. |
void |
initialize(java.util.Map pParameters)
Initializes the action with the given parameters. |
Methods inherited from class atg.process.action.ActionImpl |
---|
execute, execute, getActionName, getParameterExpression, getParameterValue, storeOptionalParameter, storeRequiredMutableParameter, storeRequiredParameter, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public java.lang.String SHOPPINGCART_PATH
public java.lang.String PROMOTION_TOOLS_PATH
public java.lang.String PRICING_TOOLS_PATH
public static final java.lang.String PRODUCT_PARAM
public static final java.lang.String SKU_PARAM
public static final java.lang.String QUANTITY_PARAM
public static final java.lang.String SITE_ID_PARAM
protected OrderManager mOrderManager
protected PromotionTools mPromotionTools
protected PricingTools mPricingTools
protected ComponentName mOrderHolderComponent
protected java.lang.String mPricingOperation
Constructor Detail |
---|
public AddItemToOrder()
Method Detail |
---|
public void configure(java.lang.Object pConfiguration) throws ProcessException
configure
in interface Action
configure
in class ActionImpl
ProcessException
- if the action could not be configured
- for example, because some of the required properties are
missing from the configurationpublic void initialize(java.util.Map pParameters) throws ProcessException
ActionImpl
This default implementation does nothing.
initialize
in interface Action
initialize
in class ActionImpl
ProcessException
- if the action could not be properly
initialized - for example, if not all of the required parameters
are present in the MapExpression
protected void executeAction(ProcessExecutionContext pContext) throws ProcessException
ActionImpl
execute
methods.
executeAction
in class ActionImpl
ProcessException
- if the action can not be executedpublic Order getOrderToAddItemTo(ProcessExecutionContext pContext) throws CommerceException, RepositoryException
pContext
- - the process execution context at the time of this event
CommerceException
RepositoryException
protected void addItem(java.lang.String pSkuId, java.lang.String pProductId, long pQuantity, java.lang.String pSiteId, ProcessExecutionContext pContext) throws CommerceException, RepositoryException
pSkuId
- the sku id of the commerce item that will be created and added to the orderpProductId
- product id of the commerce item that will be created and addedpQuantity
- the quantity of the particular item to addpContext
- the context in which the action is occuringpSiteId
- the id of site order will be associated with
CommerceException
- if an error occurs
RepositoryException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |