com.ibm.commerce.marketing.dialog.util

Class UserBehaviorRule

  • java.lang.Object
    • com.ibm.commerce.marketing.dialog.util.UserBehaviorRule
  • All Implemented Interfaces:
    com.ibm.websphere.cache.Sizeable, java.io.Serializable


    public class UserBehaviorRule
    extends java.lang.Object
    implements java.io.Serializable, com.ibm.websphere.cache.Sizeable
    This class represents a rule to detect a customer's behavior such as browsing a category or adding an item to their cart. The rule has a command to match, name value pairs to match associated with the command, parent categories to match with a product, referral url parameters to match, and date ranges in which the rule is valid. See the topic "Behavior rule definition" in the Information Center for complete details on how to define a behavior rule.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      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.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The name of the class.
        See Also:
        Constant Field Values
      • MATCH_ANY_COMMAND

        public static final java.lang.String MATCH_ANY_COMMAND
        A String to represent the wild card character used to indicate that this rule matches any command.
        See Also:
        Constant Field Values
      • MATCH_ANY_VALUE

        public static final java.lang.String MATCH_ANY_VALUE
        A String to represent that any value should be recorded as the customer behavior.
        See Also:
        Constant Field Values
      • ACTION_RECORD

        public static final java.lang.String ACTION_RECORD
        The type for triggers that need to be recorded in the customer's user behavior.
        See Also:
        Constant Field Values
      • ACTION_SEND

        public static final java.lang.String ACTION_SEND
        The type for triggers that need to be sent to the trigger handler.
        See Also:
        Constant Field Values
      • ACTION_NO_ACTION

        public static final java.lang.String ACTION_NO_ACTION
        The type for triggers that want no action taken.
        See Also:
        Constant Field Values
      • PARAMETER_ANY

        public static final java.lang.String PARAMETER_ANY
        Constant for the parameter can contain any value.
        See Also:
        Constant Field Values
      • PARAMETER_RECORD_ALL

        public static final java.lang.String PARAMETER_RECORD_ALL
        Constant for the parameter to record all values.
        See Also:
        Constant Field Values
      • PARAMETER_EQUALS

        public static final java.lang.String PARAMETER_EQUALS
        Constant for the parameter has to equal the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_NOT_EQUALS

        public static final java.lang.String PARAMETER_NOT_EQUALS
        Constant for the parameter has to not equal the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_ENDS

        public static final java.lang.String PARAMETER_ENDS
        Constant for the parameter has to end the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_CONTAINS

        public static final java.lang.String PARAMETER_CONTAINS
        Constant for the parameter has to be contained in the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_STARTS

        public static final java.lang.String PARAMETER_STARTS
        Constant for the parameter has to start the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_CONTAIN_ALL

        public static final 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.
        See Also:
        Constant Field Values
      • PARAMETER_GREATER_THAN

        public static final java.lang.String PARAMETER_GREATER_THAN
        Constant for the parameter has to be greater than the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_GREATER_EQ

        public static final java.lang.String PARAMETER_GREATER_EQ
        Constant for the parameter has to be greater than or equal to the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_LESS_THAN

        public static final java.lang.String PARAMETER_LESS_THAN
        Constant for the parameter has to be less than the actual value.
        See Also:
        Constant Field Values
      • PARAMETER_LESS_EQ

        public static final java.lang.String PARAMETER_LESS_EQ
        Constant for the parameter has to be less than or equal to the actual value.
        See Also:
        Constant Field Values
      • COMPARISON_OPERATOR

        public static final java.lang.String COMPARISON_OPERATOR
        Constant to specify the expression to determine if a string is representing a valid numeric.
        See Also:
        Constant Field Values
      • COMMA

        public static final char COMMA
        The constant for a comma. Not used, kept for backward compatibility.
        See Also:
        Constant Field Values
      • SEPARATOR

        public static final char SEPARATOR
        The constant for a separator. Not used, kept for backward compatibility.
        See Also:
        Constant Field Values
      • XML_ATTR_RESET_BEHAVIOR_ON_TRIGGER

        public static final 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.
        See Also:
        Constant Field Values
      • SEPARATOR_TOKEN

        public static final java.lang.String SEPARATOR_TOKEN
        The constant for a separator. This is used by the runtime when evaluating multiple search terms in the same field.
        See Also:
        Constant Field Values
      • MULTIPLE_MATCHES_IN_SAME_STRING

        public static final 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
        See Also:
        Constant Field Values
      • MARKETING_PARENTCATEGORY_DONOTRECORD

        public static final java.lang.String MARKETING_PARENTCATEGORY_DONOTRECORD
        The constant to specify that the rule should not record a Variable that specifies the PARENTCATEGORY
        See Also:
        Constant Field Values
    • Constructor Detail

      • UserBehaviorRule

        public UserBehaviorRule(FlowElement element)
        This is the user behavior rule constructor. It parses the user behavior rule XML and creates an object that can be placed in the cache to match against commands and their associated parameters.
        Parameters:
        element - The element that has a user behavior rule.
      • UserBehaviorRule

        public UserBehaviorRule(FlowElement element,
                                FlowElement[] childElements)
        This is the user behavior rule constructor. It parses the user behavior rule XML and creates an object that can be placed in the cache to match against commands and their associated parameters.
        Parameters:
        element - The element that has a user behavior rule.
        childElements - The child elements of the element that has a user behavior rule.
      • UserBehaviorRule

        public UserBehaviorRule(java.lang.String userBehaviorRuleXML)
        This is the user behavior rule constructor. It parses the user behavior rule XML and creates an object that can be placed in the cache to match against commands and their associated parameters.
        Parameters:
        userBehaviorRuleXML - The XML string of the representing the user behavior rule.
    • Method Detail

      • getObjectSize

        public long getObjectSize()
        Returns the estimated footprint size in bytes of this object and the objects it contains.
        Specified by:
        getObjectSize in interface com.ibm.websphere.cache.Sizeable
        Returns:
        the estimated footprint size in bytes or -1 if a size cannot be determined.
      • getCommand

        public java.util.List getCommand()
        This method gets the names of the commands this user behavior rule will match against. This will match against a commerce command name.
        Returns:
        The names of the commands this user behavior rule will match against.
      • getAction

        public java.lang.String getAction()
        This method gets the action this user behavior rule will perform when the rule matches. Valid values are send, record, or an empty string.
        Returns:
        The action this user behavior rule will perform when the rule matches.
      • getDate1

        public java.sql.Timestamp getDate1()
        This method gets the first date this user behavior rule must be evaluated against.
        Returns:
        The first date this user behavior rule must be evaluated against.
      • getDateOperator1

        public java.lang.String getDateOperator1()
        This method gets the operator used to evaluate this user behavior rule against the first date.
        Returns:
        The operator used to evaluate this user behavior rule against the first date.
      • getDate2

        public java.sql.Timestamp getDate2()
        This method gets the second date this user behavior rule must be evaluated against.
        Returns:
        The second date this user behavior rule must be evaluated against.
      • datesSet

        public boolean datesSet()
        This method gets if the dates have been set for user behavior evaluation.
        Returns:
        If the dates have been set for user behavior evaluation.
      • getDateOperator2

        public java.lang.String getDateOperator2()
        This method gets the operator used to evaluate this user behavior rule against the second date.
        Returns:
        The operator used to evaluate this user behavior rule against the second date.
      • getNVPs

        public java.util.Map getNVPs()
        This method gets the Map used to represent this user behavior rules name/value pairs.
        Returns:
        The Map used to represent this user behavior rules name/value pairs.
      • getNvpComparisons

        public java.util.Map getNvpComparisons()
        This method gets the Map used to represent this user behavior rules name/comparison pairs.
        Returns:
        The Map used to represent this user behavior rules name/comparison pairs.
      • getComparisonType

        public java.lang.String getComparisonType()
        This method gets the String used to represent the comparison type for the name/value pairs.
        Returns:
        The String used to represent this comparison type for the name/value pairs.
      • getParentCategories

        public java.util.List getParentCategories()
        This method gets the List containing the parent categories this user behavior rule must match against a provided product.
        Returns:
        The List containing parent categories this user behavior rule must match against a provided product.
      • getCheckParentCategoriesNotEqual

        public 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.
        Returns:
        The setting if the parent categories defined in this user behavior rule must not match against a provided product or category.
      • setElementId

        public void setElementId(java.lang.Integer newElementId)
        This method sets the element ID associated with this user behavior rule.
        Parameters:
        newElementId - The element ID associated with this user behavior rule.
      • getElementId

        public java.lang.Integer getElementId()
        This method gets the element ID associated with this user behavior rule.
        Returns:
        The element ID associated with this user behavior rule.
      • setActivityId

        public void setActivityId(java.lang.Integer newActivityId)
        This method sets the value for the activity ID associated with this user behavior rule.
        Parameters:
        newActivityId - The value for the activity ID associated with this user behavior rule.
      • getActivityId

        public java.lang.Integer getActivityId()
        This method gets the activity ID value associated with this user behavior rule.
        Returns:
        The activity ID associated with this user behavior rule.
      • getReferralURL

        public java.lang.String getReferralURL()
        This method gets the referral URL value for this user behavior rule if one is defined.
        Returns:
        The referral URL of this user behavior rule.
      • getReferralOperator

        public java.lang.String getReferralOperator()
        This method gets the referral operator value for this user behavior rule if one is defined.
        Returns:
        The referral operator of this user behavior rule.
      • getReferralNVPs

        public java.util.Map getReferralNVPs()
        This method gets the Map used to represent this user behavior rule referral name/value pairs.
        Returns:
        The Map used to represent this user behavior rule referral name/value pairs.
      • getReferalNvpComparisons

        public java.util.Map getReferalNvpComparisons()
        This method gets the Map used to represent this user behavior rule referral operator.
        Returns:
        The Map used to represent this user behavior rule referral operator.
      • getMaximumSize

        public int getMaximumSize()
        This method gets the maximum number of entries for each value that this user behavior rule will record.
        Returns:
        The maximum number of entries for each value that this user behavior rule will record.
      • getMaximumTotalSize

        public java.lang.String getMaximumTotalSize()
        This method gets the maximum number of entries for all values combined that this user behavior rule will record.
        Returns:
        The maximum number of entries for all values combined that this user behavior rule will record.
      • getProcessOnCommandExit

        public boolean getProcessOnCommandExit()
        This method gets if this user behavior rule should be processed only when the corresponding command successfully executes.
        Returns:
        This method returns true if this user behavior rule should be processed only when the corresponding command successfully executes.
      • getProcessOnlyFromService

        public boolean getProcessOnlyFromService()
        This method gets if this user behavior rule should be processed only when called from a service. This behavior rule cannot match from URL requests.
        Returns:
        This method returns true if this user behavior rule should be processed only when called from a service.
      • getAllowMultipleActivities

        public boolean getAllowMultipleActivities()
        This method gets if this user behavior rule should allow a customer to participate in a dialog activity multiple times. The default behavior is that if a customer is currently waiting for a trigger in the dialog activity (for example, the activity is Customer Places Order then Wait 7 days, and the customer is at the wait trigger), then if the customer places another order, it will be ignored as the customer is already participating in this dialog. This behavior can be changed by setting the allowMultipleActivities attribute. Then for each order placed, the customer will reach the wait trigger.
        Returns:
        This method returns true if this user behavior rule should allow a customer to be participate in a dialog activity multiple times.
      • getCaseSensitive

        public boolean getCaseSensitive()
        This method gets if this user behavior rule should perform a case sensitive match when checking name value pairs.
        Returns:
        This method returns true if this user behavior rule should perform a case sensitive match when checking name value pairs.
      • getSynonymMatch

        public boolean getSynonymMatch()
        This method gets if this user behavior rule should perform a synonym match when checking name value pairs.
        Returns:
        This method returns true if this user behavior rule should perform a synonym match when checking name value pairs.
      • getRelativeDays

        public boolean getRelativeDays()
        This method gets if the rule has a within or prior days condition.
        Returns:
        This method returns true if the rule has a within or prior days condition.
      • getCallCmdOnMatch

        public java.lang.String getCallCmdOnMatch()
        This method gets the interface name of the task command to call when the behavior rule matches.
        Returns:
        The interface name of a task command.
      • getRetrieveAllParentCategories

        public boolean getRetrieveAllParentCategories()
        This method gets the setting that when finding parent categories, then all the parent categories should be retrieved. The default behavior is to stop find parent categories once the first match is found. A value of findAll means that all the categories should be retrieved.
        Returns:
        This method returns true if all the parent categories should be retrieved, otherwise it returns false.
      • getCustomVariableType

        public java.lang.String getCustomVariableType()
        This method gets the type defined for a custom variable name/value pair. Only one custom name/value pair is supported in one behavior rule.
        Returns:
        The type defined for a custom variable name/value pair.
      • getCustomVariableName

        public java.lang.String getCustomVariableName()
        This method gets the name defined for a custom variable name/value pair. Only one custom name/value pair is supported in one behavior rule.
        Returns:
        The name defined for a custom variable name/value pair.
      • getCustomVariableValues

        public 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.
        Returns:
        The List containing the value this user behavior rule must match against a provided custom name/value pair.
      • getResetBehaviorOnTrigger

        public boolean getResetBehaviorOnTrigger()
        This method gets if this user behavior rule should reset the behavior XML string on firing the related activity. when checking name value pairs.
        Returns:
        True if this user behavior rule should reset the behavior XML string on firing the related activity. when checking name value pairs.
      • setResetBehaviorOnTrigger

        public void setResetBehaviorOnTrigger(boolean reset)
        This method set the reset behavior on trigger flag.
        Parameters:
        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.
      • currentDateIsValid

        public boolean currentDateIsValid()
        This method evaluates the current date to determine if it is valid for this user behavior rule.
        Returns:
        This method returns true if the current date is valid for this user behavior rule.
      • dateIsValid

        public boolean dateIsValid(java.sql.Timestamp date)
        This method evaluates the given date to determine if it is valid for this user behavior rule.
        Parameters:
        date - The date to evaluate and determine if it is valid for this user behavior rule.
        Returns:
        This method returns true if the given date is valid for this user behavior rule.
      • shouldRecord

        public 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.
        Parameters:
        name - The variable's name.
        Returns:
        This method returns true if the value for this variable needs to be recorded, otherwise it returns false.
      • checkMultipleParameters

        public 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. If the parameter should not be checked for multiple matches, then null is returned. If the parameter should be checked for multiple matches, then the string that needs to be appended to the original parameter (to check for multiple matches) is returned. For example, in the OrderItemAdd command, if multiple catalog entry IDs are specified, they appear as catEntryId_1=123&catEntryId_2=456&catEntryId_3=789. For the parameter "catEntryId", the string "_" will be returned. When checking for catEntryId on the URL, first catEntryId will be checked. Since this method returns "_", then any parameter starting with "catEntryID_" will be checked as well.
        Parameters:
        name - The URL parameter.
        Returns:
        This method returns null if the parameter should not be checked for multiple matches. If the parameter should be checked for multiple matches, then the string that needs to be appended to the original parameter is returned.
      • checkMatch

        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)
        This method checks if a given value matches the expected values defined in the rule. The rule defines how to do the text comparison of the given value to the expected value (equal, contains, starts with, ends with, contains all).
        Parameters:
        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.
        Returns:
        This method returns the value from the rules that matches against the provided value. If the provided value does not match any of the rule values, then null is returned.
      • checkMatch

        public 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. This method checks if a given value matches the expected values defined in the rule. The rule defines how to do the text comparison of the given value to the expected value (equal, contains, starts with, ends with, contains all).
        Parameters:
        ruleValues - The List of expected values.
        value - The given value.
        urlString - A query string from a URL.
        referralUrlString - The referral URL of the request.
        Returns:
        This method returns the value from the rules that matches against the provided value. If the provided value does not match any of the rule values, then null is returned.
      • checkMatch

        public java.lang.String checkMatch(java.util.List ruleValues,
                                           java.lang.String value)
        For back-compatibility only, no long used. This method checks if a given value matches the expected values defined in the rule. This method does an exact case sensitive match.
        Parameters:
        ruleValues - The List of expected values.
        value - The given value.
        Returns:
        This method returns the value from the rules that matches against the provided value. If the provided value does not match any of the rule values, then null is returned.
      • checkMatch

        public 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. This method checks if a given value matches the expected values defined in the rule. The rule defines how to do the text comparison of the given value to the expected value (equal, contains, starts with, ends with, contains all). This method is no longer used. The method checkMatch that has a Map for the urlString is now called. This method calls that method.
        Parameters:
        ruleValues - The List of expected values.
        value - The given value.
        urlString - A query string from a URL.
        referralUrlString - The referral URL of the request.
        Returns:
        This method returns the value from the rules that matches against the provided value. If the provided value does not match any of the rule values, then null is returned.
      • toString

        public java.lang.String toString()
        This method returns a string representation of the user behavior rule object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation of the user behavior rule object.
      • getBehaviorData

        public 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.
        Parameters:
        onlineBehaviorXml - The user's online behavior XML string.
        currentElementId - The element ID for which to retrieve the user's online behavior.
        Returns:
        The data from the user's online behavior XML string associated with the provided element.
      • getMultipleParameterAppendList

        public java.util.Map getMultipleParameterAppendList()
        Get the multiple parameter append list
        Returns:
        the multiple parameter append list
      • getDoNotRecordList

        public java.util.ArrayList getDoNotRecordList()
        Get the do-not-record list
        Returns:
        the do-not-record list