atg.projects.store.scenario.action
Class StoreFillRelatedItemsSlotAction

java.lang.Object
  extended by atg.process.action.ActionImpl
      extended by atg.scenario.action.SlotAction
          extended by atg.commerce.scenario.FillRelatedItemsSlotAction
              extended by atg.projects.store.scenario.action.StoreFillRelatedItemsSlotAction
All Implemented Interfaces:
atg.process.action.Action

public class StoreFillRelatedItemsSlotAction
extends atg.commerce.scenario.FillRelatedItemsSlotAction

EStore implementation of a fillRelatedItemsSlotAction scenario action. This implementation filters related items based on order specified and current site (only products from sharing sites are added to slot).


Field Summary
static java.lang.String CLASS_VERSION
          Class version
 
Fields inherited from class atg.commerce.scenario.FillRelatedItemsSlotAction
NO_PRODUCTITEM_IN_COMMERCEITEM, PROPERTY_NAME, SHOPPINGCART_PATH_NOT_FOUND
 
Fields inherited from class atg.scenario.action.SlotAction
PARAM_REPOSITORY_IDS, PARAM_SITE, PARAM_SLOT, PARAM_TARGETER, PARAM_VALUES
 
Constructor Summary
StoreFillRelatedItemsSlotAction()
           
 
Method Summary
protected  boolean checkRelatedItem(java.util.List<atg.repository.RepositoryItem> pOrderProducts, atg.repository.RepositoryItem pRelatedProduct)
          This method checks the product specified to see if it should be added into related items slot.
protected  void checkRelatedItems(java.util.List pOrderProducts, java.util.List pRelatedItems, java.util.Set pRelatedItemSet)
          Checks to see that relatedItems don't exist in order, if any of the items exists then it omits them from the result set.
 void configure(java.lang.Object pConfiguration)
          Configures the action using the given configuration object.
 
Methods inherited from class atg.commerce.scenario.FillRelatedItemsSlotAction
executeAction, getProductsInOrder, initialize, updateRelatedItems
 
Methods inherited from class atg.scenario.action.SlotAction
getSlot, getValues
 
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

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version

See Also:
Constant Field Values
Constructor Detail

StoreFillRelatedItemsSlotAction

public StoreFillRelatedItemsSlotAction()
Method Detail

configure

public void configure(java.lang.Object pConfiguration)
               throws atg.process.ProcessException
Configures the action using the given configuration object. The configuration object is typically a global Nucleus component which is configured with the information necessary for the action's operation.

Specified by:
configure in interface atg.process.action.Action
Overrides:
configure in class atg.commerce.scenario.FillRelatedItemsSlotAction
Parameters:
pConfiguration - the configuration to use
Throws:
atg.process.ProcessException - - if the action could not be configured - for example, because some of the required properties are missing from the configuration

checkRelatedItems

protected void checkRelatedItems(java.util.List pOrderProducts,
                                 java.util.List pRelatedItems,
                                 java.util.Set pRelatedItemSet)
Checks to see that relatedItems don't exist in order, if any of the items exists then it omits them from the result set.

Overrides:
checkRelatedItems in class atg.commerce.scenario.FillRelatedItemsSlotAction
Parameters:
pOrderProducts - the products in the order.
pRelatedItems - related items for the products in the order.
pRelatedItemSet - related items which don't exist in order.

checkRelatedItem

protected boolean checkRelatedItem(java.util.List<atg.repository.RepositoryItem> pOrderProducts,
                                   atg.repository.RepositoryItem pRelatedProduct)
This method checks the product specified to see if it should be added into related items slot. Only products from shared sites will be added to this slot.

Parameters:
pOrderProducts - - products in the current order.
pRelatedProduct - - product to be tested.
Returns:
true if the product specified should be added into slot and false otherwise.