com.ibm.commerce.marketing.runtime.engine

Class FlowElement

  • java.lang.Object
    • com.ibm.commerce.marketing.runtime.engine.FlowElement
  • All Implemented Interfaces:
    com.ibm.websphere.cache.Sizeable, java.io.Serializable


    public class FlowElement
    extends java.lang.Object
    implements java.io.Serializable, com.ibm.websphere.cache.Sizeable
    This class represents entries in the DMELEMENT database table.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String VARIABLE_NAME_PREFIX
      The prefix used in element templates to indicate variables that need to be replaced by the user interface.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FlowElement()
      This method is the default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Short determinePriority()
      This method calculates the priority of this flow element based on the priority of any related flow elements and the priority of the associated activity.
      java.lang.Integer getActivityId()
      This method gets the ID of the activity associated with this flow element.
      java.lang.String getBehaviorXml()
      This method gets the behavior rule XML associated with this flow element.
      java.lang.String getCallCmdOnMatch()
      This method gets the interface name of the task command to call when the trigger is received.
      java.lang.Integer getElementTemplateId()
      This method gets the ID of the template that created this flow element.
      java.lang.String getElementTemplateName()
      This method gets the name of the template of this flow element.
      java.lang.Integer getElementTypeId()
      This method gets the ID of the type of this flow element.
      java.lang.String getElementTypeName()
      This method gets the name of the type of this flow element.
      java.lang.String getElementXml()
      This method gets the XML associated with this flow element.
      java.lang.Integer getField1()
      This method gets the customization field 1.
      java.lang.Long getField2()
      This method gets the customization field 2.
      java.math.BigDecimal getField3()
      This method gets the customization field 3.
      java.lang.String getField4()
      This method gets the customization field 4.
      java.lang.Integer getId()
      This method gets the unique ID of the flow element.
      java.lang.Object[] getInvocationObject()
      This method gets the invocation parameters associated with the flow element XML.
      java.lang.String getName()
      This method gets the name of the flow element.
      long getObjectSize()
      Returns the estimated footprint size in bytes of this object and the objects it contains.
      java.lang.String getParent()
      This method gets the name of the parent element of the flow element.
      java.lang.Integer getParentId()
      This method gets the identifier of the parent element of the flow element.
      boolean getPersistBehaviorDataToDatabase()
      This method returns if the behavior data associated with this flow element should be persisted to the database.
      java.lang.Short getPriority()
      This method gets the priority of this flow element.
      java.lang.Integer getRelatedId()
      This method gets the ID of the element associated with this flow element.
      java.lang.String getRelatedXml()
      This method gets the element XML of the flow element related to this flow element.
      java.lang.Double getSequence()
      This method gets the sequence of the flow element under the parent element.
      java.util.Map getTriggerParameters()
      This method gets the parameters of the trigger associated with the flow element XML.
      java.lang.String getTriggerType()
      This method gets the type of the trigger associated with the flow element XML.
      java.lang.String getTrueForAllUsers()
      This method returns if the trigger associated with this flow element is an trigger that is for all users.
      UserBehaviorRule getUserBehaviorRule()
      This method gets the user behavior rule object associated with the flow element XML.
      java.util.Map<java.lang.String,java.lang.String> getVariables()
      This method gets the flow element variables (from the DMELEMENTNVP database table) contained in a Map object.
      void setActivityId(java.lang.Integer newActivityId)
      This method sets the ID of the activity associated with this flow element.
      void setBehaviorXml(java.lang.String newBehaviorXml)
      This method sets the behavior rule XML associated with this flow element.
      void setCallCmdOnMatch(java.lang.String newCallCmdOnMatch)
      This method sets the interface name of the task command to call when the trigger is received.
      void setElementTemplateId(java.lang.Integer newTemplateId)
      This method sets the ID of the template that created this flow element.
      void setElementTemplateName(java.lang.String newTemplateName)
      This method sets the name of the template of this flow element.
      void setElementTypeId(java.lang.Integer newTypeId)
      This method sets the ID of the type of this flow element.
      void setElementTypeName(java.lang.String newTypeName)
      This method sets the name of the type of this flow element.
      void setElementXml(java.lang.String newElementXml)
      This method gets the XML associated with this flow element.
      void setField1(java.lang.Integer newField1)
      This method sets the customization field 1.
      void setField2(java.lang.Long newField2)
      This method sets the customization field 2.
      void setField3(java.math.BigDecimal newField3)
      This method sets the customization field 3.
      void setField4(java.lang.String newField4)
      This method sets the customization field 4.
      void setId(java.lang.Integer newId)
      This method sets the unique ID of the flow element.
      void setInvocationObject(java.lang.Object[] newInvocationObject)
      This method sets the invocation parameters associated with the flow element XML.
      void setName(java.lang.String newName)
      This method sets the name of the flow element.
      void setParent(java.lang.String newParent)
      This method sets the name of the parent element of the flow element.
      void setParentId(java.lang.Integer newParentId)
      This method sets the identifier of the parent element of the flow element.
      void setPersistBehaviorDataToDatabase(boolean newPersistBehaviorDataToDatabase)
      This method sets if the behavior data associated with this flow element should be persisted to the database.
      void setPriority(java.lang.Short newPriority)
      This method sets the priority of this flow element.
      void setRelatedId(java.lang.Integer newRelatedId)
      This method sets the ID of the element associated with this flow element.
      void setRelatedXml(java.lang.String newRelatedXml)
      This method gets the element XML of the flow element related to this flow element.
      void setSequence(java.lang.Double newSequence)
      This method sets the sequence of the flow element under the parent element.
      void setTriggerParameters(java.util.Map newTriggerParameters)
      This method sets the parameters of the trigger associated with the flow element XML.
      void setTriggerType(java.lang.String newTriggerType)
      This method sets the type of the trigger associated with the flow element XML.
      void setTrueForAllUsers(java.lang.String newTrueForAllUsers)
      This method sets if the trigger associated with this flow element is an trigger that is for all users.
      void setUserBehaviorRule(UserBehaviorRule newUserBehaviorRule)
      This method sets the user behavior rule object associated with the flow element XML.
      void setVariables(java.util.Map<java.lang.String,java.lang.String> newVariables)
      This method sets the flow element variables (from the DMELEMENTNVP database table) that are contained in a Map object.
      java.lang.String toString()
      This method returns a string with the content of the flow element.
      • 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
      • VARIABLE_NAME_PREFIX

        public static final java.lang.String VARIABLE_NAME_PREFIX
        The prefix used in element templates to indicate variables that need to be replaced by the user interface. If a variable starts with the string MARKETING_ then it indicates this is a variable that will be set by the user interface.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FlowElement

        public FlowElement()
        This method is the default constructor. It sets all variables to null.
    • 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.
      • getId

        public java.lang.Integer getId()
        This method gets the unique ID of the flow element.
        Returns:
        This method gets the unique ID of the flow element.
      • getName

        public java.lang.String getName()
        This method gets the name of the flow element.
        Returns:
        This method gets the name of the flow element.
      • getElementTemplateId

        public java.lang.Integer getElementTemplateId()
        This method gets the ID of the template that created this flow element. This is from DMELETEMPLATE_ID column of the DMELETEMPLATE table.
        Returns:
        This method gets the ID of the template that created this flow element.
      • getElementTypeName

        public java.lang.String getElementTypeName()
        This method gets the name of the type of this flow element. This is from the TYPE column of the DMELEMENTTYPE table.
        Returns:
        This method gets the name of the type of this flow element.
      • getElementTemplateName

        public java.lang.String getElementTemplateName()
        This method gets the name of the template of this flow element. This is from the NAME column of the DMELEMENTTYPE table.
        Returns:
        This method gets the name of the template of this flow element.
      • getElementTypeId

        public java.lang.Integer getElementTypeId()
        This method gets the ID of the type of this flow element. This is from the DMELEMENTTYPE_ID column of the DMELEMENTTYPE table.
        Returns:
        This method gets the ID of the type of this flow element.
      • getActivityId

        public java.lang.Integer getActivityId()
        This method gets the ID of the activity associated with this flow element.
        Returns:
        This method gets the ID of the activity associated with this flow element.
      • getRelatedId

        public java.lang.Integer getRelatedId()
        This method gets the ID of the element associated with this flow element. An action element may have an related trigger element. When the trigger occurs, then perform the action.
        Returns:
        This method gets the ID of the element associated with this flow element.
      • getPriority

        public java.lang.Short getPriority()
        This method gets the priority of this flow element.
        Returns:
        This method gets the priority of this flow element.
      • getParent

        public java.lang.String getParent()
        This method gets the name of the parent element of the flow element.
        Returns:
        This method gets the name of the parent element of the flow element.
      • getParentId

        public java.lang.Integer getParentId()
        This method gets the identifier of the parent element of the flow element. For triggers, targets, and actions, this would be the path element.
        Returns:
        This method gets the identifier of the parent element of the flow element.
      • getSequence

        public java.lang.Double getSequence()
        This method gets the sequence of the flow element under the parent element.
        Returns:
        This method gets the sequence of the flow element under the parent element.
      • determinePriority

        public java.lang.Short determinePriority()
        This method calculates the priority of this flow element based on the priority of any related flow elements and the priority of the associated activity.
        Returns:
        This method gets the priority of this flow element.
      • getElementXml

        public java.lang.String getElementXml()
        This method gets the XML associated with this flow element.
        Returns:
        This method gets the XML associated with this flow element.
      • getBehaviorXml

        public java.lang.String getBehaviorXml()
        This method gets the behavior rule XML associated with this flow element.
        Returns:
        This method gets the behavior rule XML associated with this flow element.
      • getRelatedXml

        public java.lang.String getRelatedXml()
        This method gets the element XML of the flow element related to this flow element.
        Returns:
        This method gets the element XML of the flow element related to this flow element.
      • getTrueForAllUsers

        public java.lang.String getTrueForAllUsers()
        This method returns if the trigger associated with this flow element is an trigger that is for all users.
        Returns:
        This method returns true if the trigger associated with this flow element is an trigger that is for all users, otherwise it return false.
      • getField1

        public java.lang.Integer getField1()
        This method gets the customization field 1.
        Returns:
        This method gets the customization field 1.
      • getField2

        public java.lang.Long getField2()
        This method gets the customization field 2.
        Returns:
        This method gets the customization field 2.
      • getField3

        public java.math.BigDecimal getField3()
        This method gets the customization field 3.
        Returns:
        This method gets the customization field 3.
      • getField4

        public java.lang.String getField4()
        This method gets the customization field 4.
        Returns:
        This method gets the customization field 4.
      • setId

        public void setId(java.lang.Integer newId)
        This method sets the unique ID of the flow element.
        Parameters:
        newId - The unique ID of the flow element.
      • setName

        public void setName(java.lang.String newName)
        This method sets the name of the flow element.
        Parameters:
        newName - The name of the flow element.
      • setElementTemplateId

        public void setElementTemplateId(java.lang.Integer newTemplateId)
        This method sets the ID of the template that created this flow element. This is from DMELETEMPLATE_ID column of the DMELETEMPLATE table.
        Parameters:
        newTemplateId - The ID of the template that created this flow element.
      • setElementTypeName

        public void setElementTypeName(java.lang.String newTypeName)
        This method sets the name of the type of this flow element. This is from the TYPE column of the DMELEMENTTYPE table.
        Parameters:
        newTypeName - The name of the type of this flow element.
      • setElementTemplateName

        public void setElementTemplateName(java.lang.String newTemplateName)
        This method sets the name of the template of this flow element. This is from the NAME column of the DMELEMENTTYPE table.
        Parameters:
        newTemplateName - The name of the template of this flow element.
      • setElementTypeId

        public void setElementTypeId(java.lang.Integer newTypeId)
        This method sets the ID of the type of this flow element. This is from the DMELEMENTTYPE_ID column of the DMELEMENTTYPE table.
        Parameters:
        newTypeId - The ID of the type of this flow element.
      • setActivityId

        public void setActivityId(java.lang.Integer newActivityId)
        This method sets the ID of the activity associated with this flow element.
        Parameters:
        newActivityId - The ID of the activity associated with this flow element.
      • setRelatedId

        public void setRelatedId(java.lang.Integer newRelatedId)
        This method sets the ID of the element associated with this flow element. An action element may have an related trigger element. When the trigger occurs, then perform the action.
        Parameters:
        newRelatedId - The ID of the element associated with this flow element.
      • setPriority

        public void setPriority(java.lang.Short newPriority)
        This method sets the priority of this flow element.
        Parameters:
        newPriority - The priority of this flow element.
      • setParent

        public void setParent(java.lang.String newParent)
        This method sets the name of the parent element of the flow element.
        Parameters:
        newParent - The name of the parent element of the flow element.
      • setParentId

        public void setParentId(java.lang.Integer newParentId)
        This method sets the identifier of the parent element of the flow element. For triggers, targets, and actions, this would be the path element.
        Parameters:
        newParentId - The identifier of the parent element of the flow element.
      • setSequence

        public void setSequence(java.lang.Double newSequence)
        This method sets the sequence of the flow element under the parent element.
        Parameters:
        newSequence - The sequence of the flow element under the parent element.
      • setElementXml

        public void setElementXml(java.lang.String newElementXml)
        This method gets the XML associated with this flow element.
        Parameters:
        newElementXml - The XML associated with this flow element.
      • setBehaviorXml

        public void setBehaviorXml(java.lang.String newBehaviorXml)
        This method sets the behavior rule XML associated with this flow element.
        Parameters:
        newBehaviorXml - The behavior rule XML associated with this flow element.
      • setRelatedXml

        public void setRelatedXml(java.lang.String newRelatedXml)
        This method gets the element XML of the flow element related to this flow element.
        Parameters:
        newRelatedXml - The element XML of the flow element related to this flow element.
      • setTrueForAllUsers

        public void setTrueForAllUsers(java.lang.String newTrueForAllUsers)
        This method sets if the trigger associated with this flow element is an trigger that is for all users.
        Parameters:
        newTrueForAllUsers - This is "1" if the trigger associated with this flow element is for all users, otherwise it is "0".
      • setField1

        public void setField1(java.lang.Integer newField1)
        This method sets the customization field 1.
        Parameters:
        newField1 - This method sets the customization field 1.
      • setField2

        public void setField2(java.lang.Long newField2)
        This method sets the customization field 2.
        Parameters:
        newField2 - This method sets the customization field 2.
      • setField3

        public void setField3(java.math.BigDecimal newField3)
        This method sets the customization field 3.
        Parameters:
        newField3 - This method sets the customization field 3.
      • setField4

        public void setField4(java.lang.String newField4)
        This method sets the customization field 4.
        Parameters:
        newField4 - This method sets the customization field 4.
      • getTriggerType

        public java.lang.String getTriggerType()
        This method gets the type of the trigger associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the type is set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for trigger type flow elements.
        Returns:
        This method gets the type of the trigger associated with the flow element XML.
      • getTriggerParameters

        public java.util.Map getTriggerParameters()
        This method gets the parameters of the trigger associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the parameters are set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for trigger type flow elements.
        Returns:
        This method gets the parameters of the trigger associated with the flow element XML.
      • setTriggerType

        public void setTriggerType(java.lang.String newTriggerType)
        This method sets the type of the trigger associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the trigger type is set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for trigger type flow elements.
        Parameters:
        newTriggerType - The trigger type associated with the flow element XML.
      • setTriggerParameters

        public void setTriggerParameters(java.util.Map newTriggerParameters)
        This method sets the parameters of the trigger associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the trigger parameters are set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for trigger type flow elements.
        Parameters:
        newTriggerParameters - The trigger type associated with the flow element XML.
      • getInvocationObject

        public java.lang.Object[] getInvocationObject()
        This method gets the invocation parameters associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the method invocation parameters are set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for target and action type flow elements. The first object in the array is the remote class to call, the second object is the method to call, and the remaining parameters are the parameters to pass to the method.
        Returns:
        This method gets the invocation parameters associated with the flow element XML.
      • setInvocationObject

        public void setInvocationObject(java.lang.Object[] newInvocationObject)
        This method sets the invocation parameters associated with the flow element XML. This is done to prevent parsing the XML more than once. When the element is loaded into the cache, the XML document is parsed and the method invocation parameters are set into the flow element object. The element XML is then set to null to free up the space in the cache. This is only done for target and action type flow elements. The first object in the array is the remote class to call, the second object is the method to call, and the remaining parameters are the parameters to pass to the method.
        Parameters:
        newInvocationObject - The invocation parameters associated with the flow element XML.
      • getUserBehaviorRule

        public UserBehaviorRule getUserBehaviorRule()
        This method gets the user behavior rule object associated with the flow element XML. This is done to prevent parsing the behavior rule XML more than once. When the element is loaded into the cache, the behavior rule XML document is parsed and the user behavior object is set into the flow element object. The behavior XML is then set to null to free up the space in the cache. This is only done for target and trigger type flow elements.
        Returns:
        This method returns the user behavior rule object associated with the flow element XML.
      • setUserBehaviorRule

        public void setUserBehaviorRule(UserBehaviorRule newUserBehaviorRule)
        This method sets the user behavior rule object associated with the flow element XML. This is done to prevent parsing the behavior rule XML more than once. When the element is loaded into the cache, the behavior rule XML document is parsed and the user behavior object is set into the flow element object. The behavior XML is then set to null to free up the space in the cache. This is only done for target and trigger type flow elements.
        Parameters:
        newUserBehaviorRule - The user behavior rule object associated with the flow element XML.
      • getPersistBehaviorDataToDatabase

        public boolean getPersistBehaviorDataToDatabase()
        This method returns if the behavior data associated with this flow element should be persisted to the database. If no value has been set on this object, then the default value of true is returned.
        Returns:
        This method returns true if the behavior data should be persisted to the database.
      • setPersistBehaviorDataToDatabase

        public void setPersistBehaviorDataToDatabase(boolean newPersistBehaviorDataToDatabase)
        This method sets if the behavior data associated with this flow element should be persisted to the database.
        Parameters:
        newPersistBehaviorDataToDatabase - Set to false if the behavior data should not be persisted to the database.
      • getCallCmdOnMatch

        public java.lang.String getCallCmdOnMatch()
        This method gets the interface name of the task command to call when the trigger is received.
        Returns:
        The interface name of a task command.
      • setCallCmdOnMatch

        public void setCallCmdOnMatch(java.lang.String newCallCmdOnMatch)
        This method sets the interface name of the task command to call when the trigger is received.
        Parameters:
        newCallCmdOnMatch - The interface name of a task command.
      • toString

        public java.lang.String toString()
        This method returns a string with the content of the flow element.
        Overrides:
        toString in class java.lang.Object
        Returns:
        This method returns a string with the content of the flow element.
      • setVariables

        public void setVariables(java.util.Map<java.lang.String,java.lang.String> newVariables)
        This method sets the flow element variables (from the DMELEMENTNVP database table) that are contained in a Map object.
        Parameters:
        newVariables - The element name-value pair variables.
      • getVariables

        public java.util.Map<java.lang.String,java.lang.String> getVariables()
        This method gets the flow element variables (from the DMELEMENTNVP database table) contained in a Map object.
        Returns:
        The element name-value pair variables.