public class BehaviorRuleTaskCmdImpl extends com.ibm.websphere.command.CacheableCommandImpl implements BehaviorRuleTaskCmd
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.
|
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.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public void setTriggerParameters(java.util.Map newParameters)
public void setUserBehaviorRule(UserBehaviorRule newUserBehaviorRule)
public void setReferralUrl(java.lang.String newReferralUrl)
public java.util.Map getTriggerParameters()
public UserBehaviorRule getUserBehaviorRule()
public java.lang.String getReferralUrl()
public void setParentCategoriesOfProduct(java.util.List categories)
public void setParentCategoriesOfCategory(java.util.List categories)
public java.util.List getParentCategoriesOfProduct()
public java.util.List getParentCategoriesOfCategory()
public boolean isReadyToCallExecute()
public void performExecute()