|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.tools.campaigns.CampaignInitiativeEvaluateCmdImpl
The CampaignInitiativeEvaluateCmdImpl class implements the CampaignInitiativeEvaluateCmd interface to provide the task command that evaluates a campaign initiative. Different implementations of this interface can be provided for different stores.
Field Summary | |
protected CampaignInitiativeContext |
_campaignInitiativeContext
An instance of the CampaignInitiativeContext object. |
protected java.lang.String |
_campaignLogResults
Campaign initiative log results. |
protected java.lang.String |
_campaignLogSegments
Campaign initiative log segments. |
protected java.util.Vector |
_catalogEntryIds
Catalog entry IDs used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected java.util.Vector |
_catalogEntryResults
Catalog entry results used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected java.util.Vector |
_categoryNames
Category names used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected java.util.Vector |
_categoryResults
Category results used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected CheckCurrentUserInMemberGroupCmd |
_checkCurrentUserInMemberGroupCmd
An instance of the CheckCurrentUserInMemberGroupCmd object. |
protected java.util.Vector |
_collateralNames
Collateral names used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected java.util.Vector |
_collateralResults
Collateral results used in the evaluation of this initiative on what to show in the e-marketing spot. |
protected java.lang.String |
_dayOfWeek
Campaign initiative WHEN condition a day of the week |
protected java.lang.Integer |
_eMarketingSpotId
e-Marketing spot ID. |
protected java.lang.String |
_eMarketingSpotName
e-Marketing spot name. |
protected InvokePersonalizationRuleServiceCommand |
_invokePersonalizationRuleServiceCommand
An instance of the InvokePersonalizationRuleServiceCommand object. |
protected int |
_maximumNumberOfCatalogEntries
Maximum number of catalog entries in this e-marketing spot. |
protected int |
_maximumNumberOfCategories
Maximum number of categories in this e-marketing spot. |
protected int |
_maximumNumberOfCollateral
Maximum number of ad copies in this e-marketing spot. |
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] |
_purchaseHistoryCatalogGroups
An array of instances of the CatalogGroupResultBean object, used to check the purchase history. |
protected java.lang.String |
_purchaseHistoryCatalogGroupsLanguage
The language of the catalog group in the purchase history. |
protected java.lang.String[] |
_purchaseHistoryCategories
An array of the categories in the purchase history. |
protected OrderItemAccessBean[] |
_purchaseHistoryOrderItems
An array of instances of the OrderItemAccessBean object, used to check the purchase history. |
protected SelectQuery |
_selectQuery
An instance of the SelectQuery object. |
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] |
_shoppingCartCatalogGroups
An array of instances of the CatalogGroupResultBean object, used to check the shopping cart. |
protected java.lang.String |
_shoppingCartCatalogGroupsLanguage
The language of the catalog group in the shopping cart. |
protected OrderAccessBean |
_shoppingCartOrderAccessBean
An instance of the OrderAccessBean object, used to check the shopping cart. |
protected OrderItemAccessBean[] |
_shoppingCartOrderItems
An array of instances of the OrderItemAccessBean object, used to check the shopping cart. |
protected java.math.BigDecimal |
_shoppingCartTotal
The current total amount in the shopping cart. |
static java.lang.String |
COPYRIGHT
Copyright. |
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.tools.campaigns.CampaignInitiativeEvaluateCmd |
defaultCommandClassName, Name |
Constructor Summary | |
CampaignInitiativeEvaluateCmdImpl()
|
Method Summary | |
protected void |
addCatalogEntry(java.lang.String catalogEntryId,
java.lang.Integer initiativeId)
The addCatalogEntry method is used to add catalog entries to the e-marketing spot, after all conditions are being successfully evaluated. |
protected void |
addCategory(java.lang.String categoryName,
java.lang.Integer initiativeId,
java.util.Vector memberIds)
The addCategory method is used to add categories to the e-marketing spot, after all conditions are being successfully evaluated. |
protected void |
addCollateral(java.lang.String collateralName,
java.lang.Integer initiativeId,
java.lang.Integer storeId,
java.lang.Integer languageId)
The addCollateral method is used to add ad copies to the e-marketing spot, after all conditions are being successfully evaluated. |
protected void |
appendCampaignLogResults(java.lang.Object object)
The appendCampaignLogResults method writes the execution log of the campaign initiative. |
boolean |
evaluate(java.lang.String name,
OpenCondition.Parameter[] parameters)
This evaluate method is used to evaluate open conditions using rule service. |
boolean |
evaluate(java.lang.String variable,
java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
This evaluate method is used to evaluate simple conditions. |
protected boolean |
evaluateCoupon(java.lang.String collateralName)
The evaluateCoupon method is used to evaluate the WHAT condition of coupon advertisement type. |
protected boolean |
evaluateDayOfWeek(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluateDayOfWeek method is used to evaluate the WHEN condition. |
protected boolean |
evaluateDiscount(java.lang.String discountUsage,
java.lang.String discountCode)
The evaluateDiscount method is used to evaluate the WHAT condition of discount advertisement type. |
protected boolean |
evaluatePurchaseHistoryCategory(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluatePurchaseHistoryCategory method is used to evaluate the WHICH condition, checking the purchase history on the specified category. |
protected boolean |
evaluatePurchaseHistorySku(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluatePurchaseHistorySku method is used to evaluate the WHICH condition, checking the purchase history on the specified SKU. |
protected boolean |
evaluateSegmentCondition(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluateSegmentCondition method is used to evaluate the WHO condition, comparing the target customer with the current customer in store. |
protected boolean |
evaluateShoppingCartCategory(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluateShoppingCartCategory method is used to evaluate the WHICH condition, checking the shopping cart if it contains the specified category. |
protected boolean |
evaluateShoppingCartSku(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluateShoppingCartSku method is used to evaluate the WHICH condition, checking the shopping cart if it contains the specified SKU. |
protected boolean |
evaluateShoppingCartTotal(java.lang.String operator,
java.lang.String value,
SimpleCondition.Qualifier[] qualifiers)
The evaluateShoppingCartTotal method is used to evaluate the WHICH condition, comparing the shopping cart total amount with the specified amount in the condition. |
protected CampaignInitiativeContext |
getCampaignInitiativeContext()
Gets the campaign initiative context object. |
EMarketingSpot.CatalogEntry[] |
getCatalogEntries()
Gets the catalog entries to be displayed in the e-marketing spot. |
EMarketingSpot.Category[] |
getCategories()
Gets the categories to be displayed in the e-marketing spot. |
protected java.lang.String |
getCategoryName(java.lang.String categoryIdentifier)
Gets the category name given the category identifier. |
protected CheckCurrentUserInMemberGroupCmd |
getCheckCurrentUserInMemberGroupCmd()
Gets the current user in the member group. |
EMarketingSpot.Collateral[] |
getCollateral()
Gets the ad copies to be displayed in the e-marketing spot. |
protected java.lang.String |
getDayOfWeek()
Gets the current day of the week from the java Calendar object. |
java.lang.Integer |
getEMarketingSpotId()
Gets the e-marketing spot ID. |
protected InvokePersonalizationRuleServiceCommand |
getInvokePersonalizationRuleServiceCommand()
Invokes the personalization rule service. |
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] |
getPurchaseHistoryCatalogGroups(java.lang.String language)
Gets the catalog groups from the purchase history of the store. |
protected java.lang.String[] |
getPurchaseHistoryCategories(java.lang.String language)
Gets the categories from the purchase history of the store. |
protected OrderItemAccessBean[] |
getPurchaseHistoryOrderItems()
Gets the order items from the purchase history of the store. |
protected int |
getSelectQueryOperator(java.lang.String operator)
Gets the integer constant to be used in the SelectQuery class. |
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] |
getShoppingCartCatalogGroups(java.lang.String language)
Gets the catalog groups from the shopping cart of the store. |
protected OrderAccessBean |
getShoppingCartOrderAccessBean()
Gets the order item from the shopping cart of the store. |
protected OrderItemAccessBean[] |
getShoppingCartOrderItems()
Gets the order items from the shopping cart of the store. |
protected java.math.BigDecimal |
getShoppingCartTotal(java.lang.String currency)
Gets the total amount from the shopping cart of the store. |
protected WCSRecommendationServer |
getWCSRecommendationServer()
Gets the instance of the likemind server. |
protected boolean |
invokeService(java.lang.String serviceName,
CampaignInitiativeContext campaignInitiativeContext)
The invokeService method is used to invoke the rule service to evaluate conditions. |
boolean |
isReadyToCallExecute()
Checks to see if the command is ready to call. |
void |
performAction(Action action)
Performs the execution of the command. |
protected void |
performAwarenessAd(Action.Parameter[] parameters)
Performs the execution of the command, used specific to general advertisements. |
protected void |
performCategoryRecommendation(Action.Parameter[] parameters)
Performs the execution of the command, used specific to category recommendations. |
protected void |
performCollaborativeFiltering(Action.Parameter[] parameters)
Performs the execution of the command, used specific to collaborative filtering. |
protected void |
performCouponAd(Action.Parameter[] parameters)
Performs the execution of the command, used specific to coupon advertisements. |
protected void |
performDiscountAd(Action.Parameter[] parameters)
Performs the execution of the command, used specific to discount advertisements. |
void |
performExecute()
Performs the execution of the command. |
protected void |
performSuggestiveSell(Action.Parameter[] parameters)
Performs the execution of the command, used specific to suggestive sellings. |
protected boolean |
populateCatalogEntryResults(java.lang.Integer initiativeId)
Populate the results on catalog entry. |
protected boolean |
populateCategoryResults(java.lang.Integer initiativeId)
Populate the results on category. |
protected boolean |
populateCollateralResults(java.lang.Integer initiativeId)
Populate the results on ad copy. |
protected boolean |
populateResults(java.lang.Integer initiativeId)
Populate the results on all e-marketing spot display types. |
void |
setEMarketingSpotName(java.lang.String eMarketingSpotName)
Sets the name of the e-marketing spot. |
void |
setMaximumNumberOfCatalogEntries(int maximumNumberOfCatalogEntries)
Sets the maximum number of catalog entries can be displayed in an e-marketing spot. |
void |
setMaximumNumberOfCategories(int maximumNumberOfCategories)
Sets the maximum number of categories can be displayed in an e-marketing spot. |
void |
setMaximumNumberOfCollateral(int maximumNumberOfCollateral)
Sets the maximum number of ad copies can be displayed in an e-marketing spot. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Field Detail |
protected CampaignInitiativeContext _campaignInitiativeContext
protected java.lang.String _campaignLogResults
protected java.lang.String _campaignLogSegments
protected java.util.Vector _catalogEntryIds
protected java.util.Vector _catalogEntryResults
protected java.util.Vector _categoryNames
protected java.util.Vector _categoryResults
protected CheckCurrentUserInMemberGroupCmd _checkCurrentUserInMemberGroupCmd
protected java.util.Vector _collateralNames
protected java.util.Vector _collateralResults
protected java.lang.String _dayOfWeek
protected java.lang.Integer _eMarketingSpotId
protected java.lang.String _eMarketingSpotName
protected InvokePersonalizationRuleServiceCommand _invokePersonalizationRuleServiceCommand
protected int _maximumNumberOfCatalogEntries
protected int _maximumNumberOfCategories
protected int _maximumNumberOfCollateral
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] _purchaseHistoryCatalogGroups
protected java.lang.String _purchaseHistoryCatalogGroupsLanguage
protected java.lang.String[] _purchaseHistoryCategories
protected OrderItemAccessBean[] _purchaseHistoryOrderItems
protected SelectQuery _selectQuery
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] _shoppingCartCatalogGroups
protected java.lang.String _shoppingCartCatalogGroupsLanguage
protected OrderAccessBean _shoppingCartOrderAccessBean
protected OrderItemAccessBean[] _shoppingCartOrderItems
protected java.math.BigDecimal _shoppingCartTotal
public static final java.lang.String COPYRIGHT
Constructor Detail |
public CampaignInitiativeEvaluateCmdImpl()
Method Detail |
protected void addCatalogEntry(java.lang.String catalogEntryId, java.lang.Integer initiativeId)
catalogEntryId
- The ID of the catalog entry.initiativeId
- The ID of the campaign initiative.protected void addCategory(java.lang.String categoryName, java.lang.Integer initiativeId, java.util.Vector memberIds)
categoryName
- The name of the category.initiativeId
- The ID of the campaign initiative.memberIds
- A vector of member IDs associated with the catalog used in the current store.protected void addCollateral(java.lang.String collateralName, java.lang.Integer initiativeId, java.lang.Integer storeId, java.lang.Integer languageId)
collateralName
- The name of the ad copies.initiativeId
- The ID of the campaign initiative.storeId
- The ID of the current store.languageId
- The ID of the language that is currently used.protected void appendCampaignLogResults(java.lang.Object object)
object
- The campaign initiative result log.public boolean evaluate(java.lang.String name, OpenCondition.Parameter[] parameters)
evaluate
in interface Evaluator
name
- The name of the condition.parameters
- The parameters of the condition.true
if the evaluation is successful.public boolean evaluate(java.lang.String variable, java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
evaluate
in interface Evaluator
variable
- The condition variable, indicates the type of WHICH condition to be evaluated.operator
- The operator of the condition.value
- The value of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateCoupon(java.lang.String collateralName) throws java.lang.Exception
collateralName
- The name of the coupon promotion.true
if the evaluation is successful.protected boolean evaluateDayOfWeek(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The value of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateDiscount(java.lang.String discountUsage, java.lang.String discountCode) throws java.lang.Exception
discountUsage
- The details of the discount.discountCode
- The code of the discount.true
if the evaluation is successful.protected boolean evaluatePurchaseHistoryCategory(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluatePurchaseHistorySku(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateSegmentCondition(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateShoppingCartCategory(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateShoppingCartSku(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected boolean evaluateShoppingCartTotal(java.lang.String operator, java.lang.String value, SimpleCondition.Qualifier[] qualifiers)
operator
- The operator of the condition.value
- The operator of the condition.qualifiers
- The qualifiers of the condition.true
if the evaluation is successful.protected CampaignInitiativeContext getCampaignInitiativeContext()
public EMarketingSpot.CatalogEntry[] getCatalogEntries()
getCatalogEntries
in interface CampaignInitiativeEvaluateCmd
public EMarketingSpot.Category[] getCategories()
getCategories
in interface CampaignInitiativeEvaluateCmd
protected java.lang.String getCategoryName(java.lang.String categoryIdentifier)
categoryIdentifier
- The category identifier.protected CheckCurrentUserInMemberGroupCmd getCheckCurrentUserInMemberGroupCmd()
public EMarketingSpot.Collateral[] getCollateral()
getCollateral
in interface CampaignInitiativeEvaluateCmd
protected java.lang.String getDayOfWeek()
public java.lang.Integer getEMarketingSpotId()
getEMarketingSpotId
in interface CampaignInitiativeEvaluateCmd
protected InvokePersonalizationRuleServiceCommand getInvokePersonalizationRuleServiceCommand()
protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] getPurchaseHistoryCatalogGroups(java.lang.String language)
language
- Language description of the catalog group.protected java.lang.String[] getPurchaseHistoryCategories(java.lang.String language)
language
- Language description of the category.protected OrderItemAccessBean[] getPurchaseHistoryOrderItems()
protected int getSelectQueryOperator(java.lang.String operator)
operator
- The operator of the condition.protected com.ibm.commerce.rules.helpers.CatalogGroupResultBean[][] getShoppingCartCatalogGroups(java.lang.String language)
language
- Language description of the catalog group.protected OrderAccessBean getShoppingCartOrderAccessBean()
protected OrderItemAccessBean[] getShoppingCartOrderItems()
protected java.math.BigDecimal getShoppingCartTotal(java.lang.String currency)
currency
- The currency used in the store.protected WCSRecommendationServer getWCSRecommendationServer()
protected boolean invokeService(java.lang.String serviceName, CampaignInitiativeContext campaignInitiativeContext)
serviceName
- The name of the rule service.campaignInitiativeContext
- An instance of the CampaignInitiativeContext object.true
if the service has been successfully invoked.public boolean isReadyToCallExecute()
false
if the e-marketing spot name is null.isReadyToCallExecute
in class AbstractECCommand
true
if the command is ready to go.public void performAction(Action action)
performAction
in interface ActionHandler
action
- The type of action to be executed.protected void performAwarenessAd(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.protected void performCategoryRecommendation(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.protected void performCollaborativeFiltering(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.protected void performCouponAd(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.protected void performDiscountAd(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.protected void performSuggestiveSell(Action.Parameter[] parameters)
parameters
- The parameters of the action conditions.protected boolean populateCatalogEntryResults(java.lang.Integer initiativeId)
initiativeId
- The ID of the campaign initiative.true
if results are returned.protected boolean populateCategoryResults(java.lang.Integer initiativeId)
initiativeId
- The ID of the campaign initiative.true
if results are returned.protected boolean populateCollateralResults(java.lang.Integer initiativeId)
initiativeId
- The ID of the campaign initiative.true
if results are returned.protected boolean populateResults(java.lang.Integer initiativeId)
initiativeId
- The ID of the campaign initiative.true
if results are returned.public void setEMarketingSpotName(java.lang.String eMarketingSpotName)
setEMarketingSpotName
in interface CampaignInitiativeEvaluateCmd
eMarketingSpotName
- The name of the e-marketing spot.public void setMaximumNumberOfCatalogEntries(int maximumNumberOfCatalogEntries)
setMaximumNumberOfCatalogEntries
in interface CampaignInitiativeEvaluateCmd
maximumNumberOfCatalogEntries
- The maximum number of catalog entries can be displayed in an e-marketing spot.public void setMaximumNumberOfCategories(int maximumNumberOfCategories)
setMaximumNumberOfCategories
in interface CampaignInitiativeEvaluateCmd
maximumNumberOfCategories
- The maximum number of categories can be displayed in an e-marketing spot.public void setMaximumNumberOfCollateral(int maximumNumberOfCollateral)
setMaximumNumberOfCollateral
in interface CampaignInitiativeEvaluateCmd
maximumNumberOfCollateral
- The maximum number of ad copies can be displayed in an e-marketing spot.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |