com.ibm.commerce.tools.campaigns
Class CampaignInitiativeContext

java.lang.Object
  |
  +--com.ibm.commerce.tools.campaigns.CampaignInitiativeContext
All Implemented Interfaces:
InvocationContext, java.io.Serializable

public class CampaignInitiativeContext
extends java.lang.Object
implements InvocationContext

This class is used to map contextual information into Blaze projects.

See Also:
Serialized Form

Field Summary
protected  CommandContext _commandContext
          The command context.
protected  java.lang.String _conditionName
          The open condition name.
protected  OpenCondition.Parameter[] _parameters
          The array of open condition parameters.
protected  com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] _purchaseHistoryCatalogGroups
          An array of CatalogGroupResultBean objects from the purchase history.
protected  java.lang.String _purchaseHistoryCatalogGroupsLanguage
          The language of the purchase history catalog grouups.
protected  java.lang.String[] _purchaseHistoryCategories
          An arrray of purchase history categories.
protected  OrderItemAccessBean[] _purchaseHistoryOrderItems
          An array of OrderItemAccessBean objects from the purchase history.
protected  boolean _result
          Result returned by the rules project.
protected  OrderAccessBean _shoppingCartOrderAccessBean
          The OrderAccessBean that represents the shopping cart.
protected  OrderItemAccessBean[] _shoppingCartOrderItems
          An array of OrderItemAccessBean objects from the shopping cart.
protected  java.math.BigDecimal _shoppingCartTotal
          Shopping cart total.
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
CampaignInitiativeContext()
           
 
Method Summary
 java.math.BigDecimal getBigDecimalParameterValue(java.lang.String parameterName)
          Gets the specified BigDecimal parameter.
 CommandContext getCommandContext()
          Gets the command context.
 java.lang.String getConditionName()
          Gets the open condition name.
 java.lang.Integer getIntegerParameterValue(java.lang.String parameterName)
          Gets the specified Integer parameter.
 java.lang.Long getLongParameterValue(java.lang.String parameterName)
          Gets the specified Long parameter.
 OpenCondition.Parameter[] getParameters()
          Gets the open condition parameters.
 java.lang.String getParameterValue(java.lang.String parameterName)
          Gets the parameter value
 com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] getPurchaseHistoryCatalogGroups(java.lang.String language)
          Gets the purchase history catalog groups for the specified language.
 java.lang.String[] getPurchaseHistoryCategories(java.lang.String language)
          Gets the purchase history categories for a specified language.
 OrderItemAccessBean[] getPurchaseHistoryOrderItems()
          Gets the purchase history order items.
 boolean getResult()
          Gets the result.
 OrderAccessBean getShoppingCartOrderAccessBean()
          Gets the shopping cart.
 OrderItemAccessBean[] getShoppingCartOrderItems()
          Gets the order items for the shopping cart.
 java.math.BigDecimal getShoppingCartTotal(java.lang.String currency)
          Get the shopping cart total in the specified currency.
 void log(java.lang.String text)
          Log a string to System.out.
 void setCommandContext(CommandContext commandContext)
          Sets the command context.
 void setConditionName(java.lang.String conditionName)
          Sets the open condition name.
 void setParameters(OpenCondition.Parameter[] parameters)
          Sets the open condition parameters.
 void setResult(boolean result)
          Sets the open condition result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_commandContext

protected CommandContext _commandContext
The command context.

_conditionName

protected java.lang.String _conditionName
The open condition name.

_parameters

protected OpenCondition.Parameter[] _parameters
The array of open condition parameters.

_purchaseHistoryCatalogGroups

protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] _purchaseHistoryCatalogGroups
An array of CatalogGroupResultBean objects from the purchase history.

_purchaseHistoryCatalogGroupsLanguage

protected java.lang.String _purchaseHistoryCatalogGroupsLanguage
The language of the purchase history catalog grouups.

_purchaseHistoryCategories

protected java.lang.String[] _purchaseHistoryCategories
An arrray of purchase history categories.

_purchaseHistoryOrderItems

protected OrderItemAccessBean[] _purchaseHistoryOrderItems
An array of OrderItemAccessBean objects from the purchase history.

_result

protected boolean _result
Result returned by the rules project.

_shoppingCartOrderAccessBean

protected OrderAccessBean _shoppingCartOrderAccessBean
The OrderAccessBean that represents the shopping cart.

_shoppingCartOrderItems

protected OrderItemAccessBean[] _shoppingCartOrderItems
An array of OrderItemAccessBean objects from the shopping cart.

_shoppingCartTotal

protected java.math.BigDecimal _shoppingCartTotal
Shopping cart total.

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.
Constructor Detail

CampaignInitiativeContext

public CampaignInitiativeContext()
Method Detail

getBigDecimalParameterValue

public java.math.BigDecimal getBigDecimalParameterValue(java.lang.String parameterName)
Gets the specified BigDecimal parameter.
Parameters:
parameterName - The name of the parameter.
Returns:
The parameter value converted to BigDecimal.

getCommandContext

public CommandContext getCommandContext()
Gets the command context.
Returns:
The command context.

getConditionName

public java.lang.String getConditionName()
Gets the open condition name.
Returns:
The open condition name.

getIntegerParameterValue

public java.lang.Integer getIntegerParameterValue(java.lang.String parameterName)
Gets the specified Integer parameter.
Parameters:
parameterName - The name of the parameter.
Returns:
The parameter value converted to Integer.

getLongParameterValue

public java.lang.Long getLongParameterValue(java.lang.String parameterName)
Gets the specified Long parameter.
Parameters:
parameterName - The name of the parameter.
Returns:
The parameter value converted to Long.

getParameters

public OpenCondition.Parameter[] getParameters()
Gets the open condition parameters.
Returns:
The array of open condition parameters.

getParameterValue

public java.lang.String getParameterValue(java.lang.String parameterName)
Gets the parameter value
Parameters:
parameterName - The name of the parameter.
Returns:
The parameter value.

getPurchaseHistoryCatalogGroups

public com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] getPurchaseHistoryCatalogGroups(java.lang.String language)
Gets the purchase history catalog groups for the specified language.
Parameters:
A - language.
Returns:
An array of CatalogGroupResultBean objects.

getPurchaseHistoryCategories

public java.lang.String[] getPurchaseHistoryCategories(java.lang.String language)
Gets the purchase history categories for a specified language.
Parameters:
language - A specified language.
Returns:
An array of purchase history categories.

getPurchaseHistoryOrderItems

public OrderItemAccessBean[] getPurchaseHistoryOrderItems()
Gets the purchase history order items.
Returns:
An array of OrderItemAccessBean objects.

getResult

public boolean getResult()
Gets the result.
Returns:
The result from the rules project.

getShoppingCartOrderAccessBean

public OrderAccessBean getShoppingCartOrderAccessBean()
Gets the shopping cart.
Returns:
The OrderAccessBean for the shopping cart.

getShoppingCartOrderItems

public OrderItemAccessBean[] getShoppingCartOrderItems()
Gets the order items for the shopping cart.
Returns:
An array of OrderItemAccessBean objects.

getShoppingCartTotal

public java.math.BigDecimal getShoppingCartTotal(java.lang.String currency)
Get the shopping cart total in the specified currency.
Parameters:
The - desired currency.
Returns:
The shopping cart total.

log

public void log(java.lang.String text)
Log a string to System.out.
Parameters:
text - The text that you want to log.

setCommandContext

public void setCommandContext(CommandContext commandContext)
Sets the command context.
Parameters:
commandContext - The command context.

setConditionName

public void setConditionName(java.lang.String conditionName)
Sets the open condition name.
Parameters:
conditionName - The open condition name.

setParameters

public void setParameters(OpenCondition.Parameter[] parameters)
Sets the open condition parameters.
Parameters:
parameters - An array of Parameter objects.

setResult

public void setResult(boolean result)
Sets the open condition result.
Parameters:
result - The result.