public class BehaviorRuleTaskCmdImpl extends com.ibm.websphere.command.CacheableCommandImpl implements BehaviorRuleTaskCmd
callCmdOnMatch
parameter. If the marketing runtime should also process the event, then
the behavior rule action should be record
or send
.
If only the custom command should
process the event, then the behavior rule action should be custom
.
For example, if the behavior rule matches when CategoryDisplay is
called with a categoryId of 10101, and the behavior rule is configured
to call a behavior rule task command, the category ID that matched
the rule can be retrieved from the behavior rule (getUserBehaviorRule().getNVPs().get("categoryId")
)
or from the current request parameters (getTriggerParameters().get("categoryId")
).
In this scenario,
the behavior rule looks like the following:
For example, if the behavior rule matches when ProductDisplay is
called for any product in categoryId 10101, and the behavior rule is configured
to call a behavior rule task command, the category ID that matched
the rule can be retrieved from the behavior rule (getUserBehaviorRule().getParentCategories().get(0)
)
and the product ID that matched the rule can be retrieved from the
current request parameters (getTriggerParameters().get("productId")
). In this scenario,
the behavior rule looks like the following:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName
Constructor and Description |
---|
BehaviorRuleTaskCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.List |
getParentCategoriesOfCategory()
This method gets the list of parent categories of the current category being viewed.
|
java.util.List |
getParentCategoriesOfProduct()
This method gets the list of parent categories of the current product being viewed.
|
java.lang.String |
getReferralUrl()
This method gets referral URL associated with the current request.
|
java.util.Map |
getTriggerParameters()
This method gets the trigger parameters associated with the current request.
|
UserBehaviorRule |
getUserBehaviorRule()
This method gets the behavior rule that was matched.
|
boolean |
isReadyToCallExecute()
This method returns true.
|
void |
performExecute()
This method performs no actions.
|
void |
setParentCategoriesOfCategory(java.util.List categories)
This method sets the list of parent categories of the current category being viewed.
|
void |
setParentCategoriesOfProduct(java.util.List categories)
This method sets the list of parent categories of the current product being viewed.
|
void |
setReferralUrl(java.lang.String newReferralUrl)
This method sets referral URL associated with the current request.
|
void |
setTriggerParameters(java.util.Map newParameters)
This method sets the trigger parameters associated with the current request.
|
void |
setUserBehaviorRule(UserBehaviorRule newUserBehaviorRule)
This method sets the behavior rule that was matched.
|
execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, reset, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public void setTriggerParameters(java.util.Map newParameters)
setTriggerParameters
in interface BehaviorRuleTaskCmd
newParameters
- A Map
containing the trigger parameters.public void setUserBehaviorRule(UserBehaviorRule newUserBehaviorRule)
setUserBehaviorRule
in interface BehaviorRuleTaskCmd
newUserBehaviorRule
- The behavior rule business object.public void setReferralUrl(java.lang.String newReferralUrl)
setReferralUrl
in interface BehaviorRuleTaskCmd
newReferralUrl
- The referral URL associated with the current request.public java.util.Map getTriggerParameters()
Map
containing the trigger parameters.public UserBehaviorRule getUserBehaviorRule()
public java.lang.String getReferralUrl()
public void setParentCategoriesOfProduct(java.util.List categories)
setParentCategoriesOfProduct
in interface BehaviorRuleTaskCmd
categories
- A List
of category IDs as strings.public void setParentCategoriesOfCategory(java.util.List categories)
setParentCategoriesOfCategory
in interface BehaviorRuleTaskCmd
categories
- A List
of category IDs as strings.public java.util.List getParentCategoriesOfProduct()
List
of category IDs as strings.public java.util.List getParentCategoriesOfCategory()
List
of category IDs as strings.public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class com.ibm.websphere.command.TargetableCommandImpl
public void performExecute()
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class com.ibm.websphere.command.TargetableCommandImpl