atg.commerce.promotion
Class PromotionAction

java.lang.Object
  extended by atg.process.action.ActionImpl
      extended by atg.commerce.promotion.PromotionAction
All Implemented Interfaces:
Action

public class PromotionAction
extends ActionImpl


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  Repository mPromotionRepository
          reference to the Promotion Repository
protected  RepositoryItem[] mPromotions
           
protected  PromotionTools mPromotionTools
          reference to the PromotionTools service
static java.lang.String PARAM_PROMOTIONS
          parameter: template
 
Constructor Summary
PromotionAction()
           
 
Method Summary
 void configure(java.lang.Object pConfiguration)
          Configures the action using the given configuration object.
protected  java.lang.String[] convertIds(java.lang.Object pSource)
          With the given object convert it into a String array of ids.
protected  void executeAction(ProcessExecutionContext pContext)
          Executes this action in the given single process execution context.
 java.lang.String getActionName()
          Returns the name of the action.
protected  RepositoryItem[] getPromotions(java.lang.String[] pIds, PromotionTools pTools)
          With the given set of ids find the corresponding promotions
 void initialize(java.util.Map pParameters)
          Initializes the action with the given parameters.
 
Methods inherited from class atg.process.action.ActionImpl
execute, execute, 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 java.lang.String CLASS_VERSION
Class version string


PARAM_PROMOTIONS

public static final java.lang.String PARAM_PROMOTIONS
parameter: template

See Also:
Constant Field Values

mPromotionTools

protected PromotionTools mPromotionTools
reference to the PromotionTools service


mPromotions

protected RepositoryItem[] mPromotions

mPromotionRepository

protected Repository mPromotionRepository
reference to the Promotion Repository

Constructor Detail

PromotionAction

public PromotionAction()
Method Detail

configure

public void configure(java.lang.Object pConfiguration)
               throws 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 Action
Overrides:
configure in class ActionImpl
Throws:
ProcessException - if the action could not be configured - for example, because some of the required properties are missing from the configuration

initialize

public void initialize(java.util.Map pParameters)
                throws ProcessException
Description copied from class: ActionImpl
Initializes the action with the given parameters. The keys in the parameter Map are the String parameter names; the values are the Expression objects representing parameter values.

This default implementation does nothing.

Specified by:
initialize in interface Action
Overrides:
initialize in class ActionImpl
Throws:
ProcessException - if the action could not be properly initialized - for example, if not all of the required parameters are present in the Map
See Also:
Expression

convertIds

protected java.lang.String[] convertIds(java.lang.Object pSource)
                                 throws ProcessException
With the given object convert it into a String array of ids. e.g. If the object is a Collection, transform the Collection into a usable array.

Throws:
ProcessException - if there was an error during conversion

getPromotions

protected RepositoryItem[] getPromotions(java.lang.String[] pIds,
                                         PromotionTools pTools)
                                  throws ProcessException
With the given set of ids find the corresponding promotions

Throws:
ProcessException - if there was any error while find all the promotions

executeAction

protected void executeAction(ProcessExecutionContext pContext)
                      throws ProcessException
Description copied from class: ActionImpl
Executes this action in the given single process execution context. Called by both of the execute methods.

Specified by:
executeAction in class ActionImpl
Throws:
ProcessException - if the action can not be executed

getActionName

public java.lang.String getActionName()
Returns the name of the action.

Overrides:
getActionName in class ActionImpl