public class UserBehaviorRule
extends java.lang.Object
implements java.io.Serializable, com.ibm.websphere.cache.Sizeable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_NO_ACTION
The type for triggers that want no action taken.
|
static java.lang.String |
ACTION_RECORD
The type for triggers that need to be recorded in the customer's user behavior.
|
static java.lang.String |
ACTION_SEND
The type for triggers that need to be sent to the trigger handler.
|
static java.lang.String |
CLASS_NAME
The name of the class.
|
static char |
COMMA
The constant for a comma.
|
static java.lang.String |
COMPARISON_OPERATOR
Constant to specify the expression to determine if a string is representing a valid numeric.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
MARKETING_PARENTCATEGORY_DONOTRECORD
The constant to specify that the rule should not record a Variable that specifies the PARENTCATEGORY
|
static java.lang.String |
MATCH_ANY_COMMAND
A String to represent the wild card character used to indicate that this rule matches any command.
|
static java.lang.String |
MATCH_ANY_VALUE
A String to represent that any value should be recorded as the customer behavior.
|
static java.lang.String |
MULTIPLE_MATCHES_IN_SAME_STRING
The constant for the case where the rule is 'contains', and multiple matches were made in the same string
|
static java.lang.String |
PARAMETER_ANY
Constant for the parameter can contain any value.
|
static java.lang.String |
PARAMETER_CONTAIN_ALL
Constant for the all the tokens in the space separated parameter has to be contained in the actual value.
|
static java.lang.String |
PARAMETER_CONTAINS
Constant for the parameter has to be contained in the actual value.
|
static java.lang.String |
PARAMETER_ENDS
Constant for the parameter has to end the actual value.
|
static java.lang.String |
PARAMETER_EQUALS
Constant for the parameter has to equal the actual value.
|
static java.lang.String |
PARAMETER_GREATER_EQ
Constant for the parameter has to be greater than or equal to the actual value.
|
static java.lang.String |
PARAMETER_GREATER_THAN
Constant for the parameter has to be greater than the actual value.
|
static java.lang.String |
PARAMETER_LESS_EQ
Constant for the parameter has to be less than or equal to the actual value.
|
static java.lang.String |
PARAMETER_LESS_THAN
Constant for the parameter has to be less than the actual value.
|
static java.lang.String |
PARAMETER_NOT_EQUALS
Constant for the parameter has to not equal the actual value.
|
static java.lang.String |
PARAMETER_RECORD_ALL
Constant for the parameter to record all values.
|
static java.lang.String |
PARAMETER_STARTS
Constant for the parameter has to start the actual value.
|
static char |
SEPARATOR
The constant for a separator.
|
static java.lang.String |
SEPARATOR_TOKEN
The constant for a separator.
|
static java.lang.String |
XML_ATTR_RESET_BEHAVIOR_ON_TRIGGER
The attribute to decide if the behavior record for this UserBehaviorRule should be reset
when the rule is triggered.
|
Constructor and Description |
---|
UserBehaviorRule(FlowElement element)
This is the user behavior rule constructor.
|
UserBehaviorRule(FlowElement element,
FlowElement[] childElements)
This is the user behavior rule constructor.
|
UserBehaviorRule(java.lang.String userBehaviorRuleXML)
This is the user behavior rule constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkMatch(java.util.List ruleValues,
java.lang.String value)
For back-compatibility only, no long used.
|
java.lang.String |
checkMatch(java.util.List ruleValues,
java.lang.String value,
java.util.Map urlString,
java.lang.String referralUrlString)
For back-compatibility only, no long used.
|
java.lang.String |
checkMatch(java.util.List ruleValues,
java.lang.String comparison,
java.lang.String value,
java.util.Map urlString,
java.lang.String referralUrlString)
This method checks if a given value matches the expected values defined in
the rule.
|
java.lang.String |
checkMatch(java.util.List ruleValues,
java.lang.String value,
java.lang.String urlString,
java.lang.String referralUrlString)
For back-compatibility only, no long used.
|
java.lang.String |
checkMultipleParameters(java.lang.String name)
This method checks if the given parameter should be checked for multiple parameter matches
on the URL.
|
boolean |
currentDateIsValid()
This method evaluates the current date to determine if it is valid for this user behavior rule.
|
boolean |
dateIsValid(java.sql.Timestamp date)
This method evaluates the given date to determine if it is valid for this user behavior rule.
|
boolean |
datesSet()
This method gets if the dates have been set for user behavior evaluation.
|
java.lang.String |
getAction()
This method gets the action this user behavior rule will perform when the rule matches.
|
java.lang.Integer |
getActivityId()
This method gets the activity ID value associated with this user behavior rule.
|
boolean |
getAllowMultipleActivities()
This method gets if this user behavior rule should allow a customer to participate
in a dialog activity multiple times.
|
static java.lang.String |
getBehaviorData(java.lang.String onlineBehaviorXml,
java.lang.String currentElementId)
This method gets the data associated with an element from the user's online behavior XML string.
|
java.lang.String |
getCallCmdOnMatch()
This method gets the interface name of the task command to call when the behavior rule matches.
|
boolean |
getCaseSensitive()
This method gets if this user behavior rule should perform a case sensitive match
when checking name value pairs.
|
boolean |
getCheckParentCategoriesNotEqual()
This method gets the setting if the parent categories defined in this user behavior rule must not match
against a provided product or category.
|
java.util.List |
getCommand()
This method gets the names of the commands this user behavior rule will match against.
|
java.lang.String |
getComparisonType()
This method gets the
String used to represent the comparison type for the name/value pairs. |
java.lang.String |
getCustomVariableName()
This method gets the name defined for a custom variable name/value pair.
|
java.lang.String |
getCustomVariableType()
This method gets the type defined for a custom variable name/value pair.
|
java.util.List |
getCustomVariableValues()
This method gets the
List containing the values this user behavior rule must match
against a provided custom name/value pair. |
java.sql.Timestamp |
getDate1()
This method gets the first date this user behavior rule must be evaluated against.
|
java.sql.Timestamp |
getDate2()
This method gets the second date this user behavior rule must be evaluated against.
|
java.lang.String |
getDateOperator1()
This method gets the operator used to evaluate this user behavior rule against the first date.
|
java.lang.String |
getDateOperator2()
This method gets the operator used to evaluate this user behavior rule against the second date.
|
java.util.ArrayList |
getDoNotRecordList()
Get the do-not-record list
|
java.lang.Integer |
getElementId()
This method gets the element ID associated with this user behavior rule.
|
int |
getMaximumSize()
This method gets the maximum number of entries for each value that this user behavior rule will record.
|
java.lang.String |
getMaximumTotalSize()
This method gets the maximum number of entries for all values combined that this user behavior rule will record.
|
java.util.Map |
getMultipleParameterAppendList()
Get the multiple parameter append list
|
java.util.Map |
getNvpComparisons()
This method gets the
Map used to represent this user behavior rules name/comparison pairs. |
java.util.Map |
getNVPs()
This method gets the
Map used to represent this user behavior rules name/value pairs. |
long |
getObjectSize()
Returns the estimated footprint size in bytes
of this object and the objects it contains.
|
java.util.List |
getParentCategories()
This method gets the
List containing the parent categories this user behavior rule must match
against a provided product. |
boolean |
getProcessOnCommandExit()
This method gets if this user behavior rule should be processed only when the corresponding
command successfully executes.
|
boolean |
getProcessOnlyFromService()
This method gets if this user behavior rule should be processed only when called from
a service.
|
java.util.Map |
getReferalNvpComparisons()
This method gets the
Map used to represent this user behavior rule referral operator. |
java.util.Map |
getReferralNVPs()
This method gets the
Map used to represent this user behavior rule referral name/value pairs. |
java.lang.String |
getReferralOperator()
This method gets the referral operator value for this user behavior rule if one is defined.
|
java.lang.String |
getReferralURL()
This method gets the referral URL value for this user behavior rule if one is defined.
|
boolean |
getRelativeDays()
This method gets if the rule has a within or prior days condition.
|
boolean |
getResetBehaviorOnTrigger()
This method gets if this user behavior rule should reset the behavior XML string on firing the related activity.
|
boolean |
getRetrieveAllParentCategories()
This method gets the setting that when finding parent categories, then all the parent categories should
be retrieved.
|
boolean |
getSynonymMatch()
This method gets if this user behavior rule should perform a synonym match
when checking name value pairs.
|
void |
setActivityId(java.lang.Integer newActivityId)
This method sets the value for the activity ID associated with this user behavior rule.
|
void |
setElementId(java.lang.Integer newElementId)
This method sets the element ID associated with this user behavior rule.
|
void |
setResetBehaviorOnTrigger(boolean reset)
This method set the reset behavior on trigger flag.
|
boolean |
shouldRecord(java.lang.String name)
This method returns a boolean indicating whether or not this variable needs to be recorded in the user behavior rule.
|
java.lang.String |
toString()
This method returns a string representation of the user behavior rule object.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static final java.lang.String MATCH_ANY_COMMAND
public static final java.lang.String MATCH_ANY_VALUE
public static final java.lang.String ACTION_RECORD
public static final java.lang.String ACTION_SEND
public static final java.lang.String ACTION_NO_ACTION
public static final java.lang.String PARAMETER_ANY
public static final java.lang.String PARAMETER_RECORD_ALL
public static final java.lang.String PARAMETER_EQUALS
public static final java.lang.String PARAMETER_NOT_EQUALS
public static final java.lang.String PARAMETER_ENDS
public static final java.lang.String PARAMETER_CONTAINS
public static final java.lang.String PARAMETER_STARTS
public static final java.lang.String PARAMETER_CONTAIN_ALL
public static final java.lang.String PARAMETER_GREATER_THAN
public static final java.lang.String PARAMETER_GREATER_EQ
public static final java.lang.String PARAMETER_LESS_THAN
public static final java.lang.String PARAMETER_LESS_EQ
public static final java.lang.String COMPARISON_OPERATOR
public static final char COMMA
public static final char SEPARATOR
public static final java.lang.String XML_ATTR_RESET_BEHAVIOR_ON_TRIGGER
public static final java.lang.String SEPARATOR_TOKEN
public static final java.lang.String MULTIPLE_MATCHES_IN_SAME_STRING
public static final java.lang.String MARKETING_PARENTCATEGORY_DONOTRECORD
public UserBehaviorRule(FlowElement element)
element
- The element that has a user behavior rule.public UserBehaviorRule(FlowElement element, FlowElement[] childElements)
element
- The element that has a user behavior rule.childElements
- The child elements of the element that has a user behavior rule.public UserBehaviorRule(java.lang.String userBehaviorRuleXML)
userBehaviorRuleXML
- The XML string of the representing the user behavior rule.public long getObjectSize()
getObjectSize
in interface com.ibm.websphere.cache.Sizeable
public java.util.List getCommand()
public java.lang.String getAction()
public java.sql.Timestamp getDate1()
public java.lang.String getDateOperator1()
public java.sql.Timestamp getDate2()
public boolean datesSet()
public java.lang.String getDateOperator2()
public java.util.Map getNVPs()
Map
used to represent this user behavior rules name/value pairs.Map
used to represent this user behavior rules name/value pairs.public java.util.Map getNvpComparisons()
Map
used to represent this user behavior rules name/comparison pairs.Map
used to represent this user behavior rules name/comparison pairs.public java.lang.String getComparisonType()
String
used to represent the comparison type for the name/value pairs.String
used to represent this comparison type for the name/value pairs.public java.util.List getParentCategories()
List
containing the parent categories this user behavior rule must match
against a provided product.List
containing parent categories this user behavior rule must match against a provided product.public boolean getCheckParentCategoriesNotEqual()
public void setElementId(java.lang.Integer newElementId)
newElementId
- The element ID associated with this user behavior rule.public java.lang.Integer getElementId()
public void setActivityId(java.lang.Integer newActivityId)
newActivityId
- The value for the activity ID associated with this user behavior rule.public java.lang.Integer getActivityId()
public java.lang.String getReferralURL()
public java.lang.String getReferralOperator()
public java.util.Map getReferralNVPs()
Map
used to represent this user behavior rule referral name/value pairs.Map
used to represent this user behavior rule referral name/value pairs.public java.util.Map getReferalNvpComparisons()
Map
used to represent this user behavior rule referral operator.Map
used to represent this user behavior rule referral operator.public int getMaximumSize()
public java.lang.String getMaximumTotalSize()
public boolean getProcessOnCommandExit()
public boolean getProcessOnlyFromService()
public boolean getAllowMultipleActivities()
public boolean getCaseSensitive()
public boolean getSynonymMatch()
public boolean getRelativeDays()
public java.lang.String getCallCmdOnMatch()
public boolean getRetrieveAllParentCategories()
public java.lang.String getCustomVariableType()
public java.lang.String getCustomVariableName()
public java.util.List getCustomVariableValues()
List
containing the values this user behavior rule must match
against a provided custom name/value pair.List
containing the value this user behavior rule must match against
a provided custom name/value pair.public boolean getResetBehaviorOnTrigger()
public void setResetBehaviorOnTrigger(boolean reset)
reset
- the boolean input the flag indicating if this user behavior rule should reset the behavior XML
string on firing the related activity when checking name value pairs.public boolean currentDateIsValid()
public boolean dateIsValid(java.sql.Timestamp date)
date
- The date to evaluate and determine if it is valid for this user behavior rule.public boolean shouldRecord(java.lang.String name)
name
- The variable's name.public java.lang.String checkMultipleParameters(java.lang.String name)
name
- The URL parameter.public java.lang.String checkMatch(java.util.List ruleValues, java.lang.String comparison, java.lang.String value, java.util.Map urlString, java.lang.String referralUrlString)
ruleValues
- The List
of expected values.comparison
- The comparison operator at parameter level.value
- The given value.urlString
- A query string from a URL.referralUrlString
- The referral URL of the request.null
is returned.public java.lang.String checkMatch(java.util.List ruleValues, java.lang.String value, java.util.Map urlString, java.lang.String referralUrlString)
ruleValues
- The List
of expected values.value
- The given value.urlString
- A query string from a URL.referralUrlString
- The referral URL of the request.null
is returned.public java.lang.String checkMatch(java.util.List ruleValues, java.lang.String value)
ruleValues
- The List
of expected values.value
- The given value.null
is returned.public java.lang.String checkMatch(java.util.List ruleValues, java.lang.String value, java.lang.String urlString, java.lang.String referralUrlString)
checkMatch
that has a Map for the urlString
is now called. This method calls
that method.ruleValues
- The List
of expected values.value
- The given value.urlString
- A query string from a URL.referralUrlString
- The referral URL of the request.null
is returned.public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getBehaviorData(java.lang.String onlineBehaviorXml, java.lang.String currentElementId)
onlineBehaviorXml
- The user's online behavior XML string.currentElementId
- The element ID for which to retrieve the user's online behavior.public java.util.Map getMultipleParameterAppendList()
public java.util.ArrayList getDoNotRecordList()