com.ibm.commerce.marketing.runtime.engine

Class Activity

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


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

      Fields 
      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 Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getActivityFormat()
      This method gets the format of the activity.
      com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement getActivityRootElement()
      This method gets the cached object associated with the runtime XML.
      java.lang.Short getActivityType()
      This method gets the type of the activity.
      java.lang.Integer getCampaignId()
      This method gets the campaign ID associated with the activity.
      java.lang.String getCampaignName()
      This method gets the name of the campaign associated with the activity.
      java.sql.Timestamp getCreatedDate()
      This method gets the creation time of the activity.
      java.lang.Integer getCurrentVersion()
      This method gets the current version of the activity.
      java.lang.String getDescription()
      This method gets the description of the activity.
      java.sql.Timestamp getEndDate()
      This method gets the end date of the activity.
      java.lang.Short getExperimentType()
      This method gets the type of the experimental activity.
      java.lang.Integer getField1()
      This method gets custom field 1 of the activity.
      java.lang.Long getField2()
      This method gets custom field 2 of the activity.
      java.math.BigDecimal getField3()
      This method gets custom field 3 of the activity.
      java.lang.String getField4()
      This method gets custom field 4 of the activity.
      FlowElement getFlowElement(java.lang.String elementId)
      This method gets the FlowElement business object associated with the activity.
      java.lang.String getFlowXml()
      This method gets the runtime XML associated with the activity.
      boolean getHasOnlyTriggersForAllUsers()
      This method gets the setting of whether the activity has only triggers that are for all users.
      java.lang.Integer getId()
      This method gets the unique activity ID.
      boolean getIsActivityRepeatable()
      This method gets the setting of whether the activity is repeatable.
      java.sql.Timestamp getLastUpdate()
      This method gets the last update time of the activity.
      java.lang.String getLastUpdatedBy()
      This method gets the name of the user who last updated the activity.
      java.lang.Integer getMarketingSpotBehavior()
      This method gets the caching behavior for the marketing activity and how it should affect the e-Marketing Spot caching behavior.
      java.lang.String getName()
      This method gets the name of the activity.
      int getNumberOfFlowElements()
      This method returns the number of flow elements associated with this activity.
      long getObjectSize()
      Returns the estimated footprint size in bytes of this object and the objects it contains.
      java.lang.Short getPriority()
      This method gets the priority of the activity.
      java.lang.Integer getPublishedVersion()
      This method gets the published version of the activity.
      java.lang.Short getRepeatable()
      This method gets the setting if the activity is repeatable.
      java.sql.Timestamp getStartDate()
      This method gets the start date of the activity.
      java.lang.Short getState()
      This method gets the state of the activity.
      java.lang.Integer getStoreId()
      This method gets the store ID associated with the activity.
      java.lang.Short getTemplateType()
      This method gets the type of the activity template.
      void putFlowElement(FlowElement element)
      This method caches the FlowElement that is associated with the activity.
      void setActivityElementData(com.ibm.commerce.marketing.internal.runtime.objects.ActivityElementData activityElementData)
      This method stores the ActivityElementData.
      void setActivityFormat(java.lang.String newActivityFormat)
      This method sets the format of the activity.
      void setActivityRootElement(com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement newActivityRootElement)
      This method sets the cached object associated with the runtime XML.
      void setActivityType(java.lang.Short newActivityType)
      This method sets the type of the activity.
      void setCampaignId(java.lang.Integer newCampaignId)
      This method sets the campaign ID associated with the activity.
      void setCampaignName(java.lang.String newCampaignName)
      This method sets the name campaign associated with the activity.
      void setCreatedDate(java.sql.Timestamp newCreatedDate)
      This method sets the creation date of the activity.
      void setCurrentVersion(java.lang.Integer newCurrentVersion)
      This method sets the current version of the activity.
      void setDescription(java.lang.String newDescription)
      This method sets the description of the activity.
      void setEndDate(java.sql.Timestamp newEndDate)
      This method sets the end date of the activity.
      void setExperimentType(java.lang.Short newExperimentType)
      This method sets the type of the experimental activity.
      void setField1(java.lang.Integer newField1)
      This method sets custom field 1 of the activity.
      void setField2(java.lang.Long newField2)
      This method sets custom field 2 of the activity.
      void setField3(java.math.BigDecimal newField3)
      This method sets custom field 3 of the activity.
      void setField4(java.lang.String newField4)
      This method sets custom field 4 of the activity.
      void setFlowXml(java.lang.String newFlowXml)
      This method sets the runtime XML associated with the activity.
      void setHasOnlyTriggersForAllUsers(boolean newHasOnlyTriggersForAllUsers)
      This method sets the setting of whether the activity has only triggers that are for all users.
      void setId(java.lang.Integer newId)
      This method sets the unique activity ID.
      void setLastUpdate(java.sql.Timestamp newLastUpdate)
      This method sets the last update time of the activity.
      void setLastUpdatedBy(java.lang.String newLastUpdatedBy)
      This method sets the name of the user who last updated the activity.
      void setMarketingSpotBehavior(java.lang.Integer newMarketingSpotBehavior)
      This method sets the caching behavior for the marketing activity and how it should affect the e-Marketing Spot caching behavior.
      void setName(java.lang.String newName)
      This method sets the name of the activity.
      void setPriority(java.lang.Short newPriority)
      This method sets the priority of the activity.
      void setPublishedVersion(java.lang.Integer newPublishedVersion)
      This method sets the published version of the activity.
      void setRepeatable(java.lang.Short newRepeatable)
      This method sets the setting if the activity is repeatable.
      void setStartDate(java.sql.Timestamp newStartDate)
      This method sets the start date of the activity.
      void setState(java.lang.Short newState)
      This method sets the state of the activity.
      void setStoreId(java.lang.Integer newStoreId)
      This method sets the store ID associated with the activity.
      void setTemplateType(java.lang.Short newTemplateType)
      This method sets the type of the activity template.
      java.lang.String toString()
      This method returns a string with the content of the marketing activity.
      • 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
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class.
    • Constructor Detail

      • Activity

        public Activity()
        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 activity ID.
        Returns:
        This method gets the unique activity ID.
      • getName

        public java.lang.String getName()
        This method gets the name of the activity.
        Returns:
        This method gets the name of the activity.
      • getDescription

        public java.lang.String getDescription()
        This method gets the description of the activity.
        Returns:
        This method gets the description of the activity.
      • getStoreId

        public java.lang.Integer getStoreId()
        This method gets the store ID associated with the activity.
        Returns:
        This method gets the store ID associated with the activity.
      • getCampaignId

        public java.lang.Integer getCampaignId()
        This method gets the campaign ID associated with the activity.
        Returns:
        This method gets the campaign ID associated with the activity.
      • getCampaignName

        public java.lang.String getCampaignName()
        This method gets the name of the campaign associated with the activity.
        Returns:
        This method gets the name of the campaign associated with the activity.
      • getState

        public java.lang.Short getState()
        This method gets the state of the activity.
        Returns:
        This method gets the state of the activity.
      • getLastUpdate

        public java.sql.Timestamp getLastUpdate()
        This method gets the last update time of the activity.
        Returns:
        This method gets the last update time of the activity.
      • getCreatedDate

        public java.sql.Timestamp getCreatedDate()
        This method gets the creation time of the activity.
        Returns:
        This method gets the creation time of the activity.
      • getLastUpdatedBy

        public java.lang.String getLastUpdatedBy()
        This method gets the name of the user who last updated the activity.
        Returns:
        This method gets the name of the user who last updated the activity.
      • getStartDate

        public java.sql.Timestamp getStartDate()
        This method gets the start date of the activity.
        Returns:
        This method gets the start date of the activity.
      • getEndDate

        public java.sql.Timestamp getEndDate()
        This method gets the end date of the activity.
        Returns:
        This method gets the end date of the activity.
      • getPriority

        public java.lang.Short getPriority()
        This method gets the priority of the activity.
        Returns:
        This method gets the priority of the activity.
      • getRepeatable

        public java.lang.Short getRepeatable()
        This method gets the setting if the activity is repeatable.
        Returns:
        This method gets the setting if the activity is repeatable.
      • getIsActivityRepeatable

        public boolean getIsActivityRepeatable()
        This method gets the setting of whether the activity is repeatable. This is set by the marketing cache so that the XML does not need to be parsed more than once to determine if the activity is repeatable.
        Returns:
        This method gets the setting of whether the activity is repeatable. This is set by the marketing cache so that the XML does not need to be parsed more than once to determine if the activity is repeatable.
      • getCurrentVersion

        public java.lang.Integer getCurrentVersion()
        This method gets the current version of the activity.
        Returns:
        This method gets the current version of the activity.
      • getPublishedVersion

        public java.lang.Integer getPublishedVersion()
        This method gets the published version of the activity.
        Returns:
        This method gets the published version of the activity.
      • getActivityType

        public java.lang.Short getActivityType()
        This method gets the type of the activity. It is a value from the DMACTTYPE table.
        Returns:
        This method gets the type of the activity.
      • getActivityFormat

        public java.lang.String getActivityFormat()
        This method gets the format of the activity. It is a value from the DMACTTYPE table.
        Returns:
        This method gets the format of the activity.
      • getTemplateType

        public java.lang.Short getTemplateType()
        This method gets the type of the activity template. It is a value from the DMTEMPLATETYPE table. If this value is null, then this activity is not a template.
        Returns:
        This method gets the type of the activity template.
      • getExperimentType

        public java.lang.Short getExperimentType()
        This method gets the type of the experimental activity. It is a value from the DMEXPTYPE table. If this value is null, then this activity is not an experiment.
        Returns:
        This method gets the type of the experimental activity.
      • getFlowXml

        public java.lang.String getFlowXml()
        This method gets the runtime XML associated with the activity.
        Returns:
        This method gets the runtime XML associated with the activity.
      • getField1

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

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

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

        public java.lang.String getField4()
        This method gets custom field 4 of the activity.
        Returns:
        This method gets custom field 4 of the activity.
      • getMarketingSpotBehavior

        public java.lang.Integer getMarketingSpotBehavior()
        This method gets the caching behavior for the marketing activity and how it should affect the e-Marketing Spot caching behavior.
        Returns:
        This method returns a value of 1 if the marketing activity is dynamic, and a value of 0 if it is static.
      • setId

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

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

        public void setDescription(java.lang.String newDescription)
        This method sets the description of the activity.
        Parameters:
        newDescription - The description of the activity.
      • setStoreId

        public void setStoreId(java.lang.Integer newStoreId)
        This method sets the store ID associated with the activity.
        Parameters:
        newStoreId - The store ID associated with the activity.
      • setCampaignId

        public void setCampaignId(java.lang.Integer newCampaignId)
        This method sets the campaign ID associated with the activity.
        Parameters:
        newCampaignId - The campaign ID associated with the activity.
      • setCampaignName

        public void setCampaignName(java.lang.String newCampaignName)
        This method sets the name campaign associated with the activity.
        Parameters:
        newCampaignName - The name of the campaign associated with the activity.
      • setState

        public void setState(java.lang.Short newState)
        This method sets the state of the activity.
        Parameters:
        newState - The state of the activity.
      • setLastUpdate

        public void setLastUpdate(java.sql.Timestamp newLastUpdate)
        This method sets the last update time of the activity.
        Parameters:
        newLastUpdate - This method sets the last update time of the activity.
      • setCreatedDate

        public void setCreatedDate(java.sql.Timestamp newCreatedDate)
        This method sets the creation date of the activity.
        Parameters:
        newCreatedDate - This method sets the creation date of the activity.
      • setLastUpdatedBy

        public void setLastUpdatedBy(java.lang.String newLastUpdatedBy)
        This method sets the name of the user who last updated the activity.
        Parameters:
        newLastUpdatedBy - The name of the user who last updated the activity.
      • setStartDate

        public void setStartDate(java.sql.Timestamp newStartDate)
        This method sets the start date of the activity.
        Parameters:
        newStartDate - This method sets the start date of the activity.
      • setEndDate

        public void setEndDate(java.sql.Timestamp newEndDate)
        This method sets the end date of the activity.
        Parameters:
        newEndDate - This method sets the end date of the activity.
      • setPriority

        public void setPriority(java.lang.Short newPriority)
        This method sets the priority of the activity.
        Parameters:
        newPriority - This method sets the priority of the activity.
      • setRepeatable

        public void setRepeatable(java.lang.Short newRepeatable)
        This method sets the setting if the activity is repeatable.
        Parameters:
        newRepeatable - This method sets the setting if the activity is repeatable.
      • setCurrentVersion

        public void setCurrentVersion(java.lang.Integer newCurrentVersion)
        This method sets the current version of the activity.
        Parameters:
        newCurrentVersion - This method sets the current version of the activity.
      • setPublishedVersion

        public void setPublishedVersion(java.lang.Integer newPublishedVersion)
        This method sets the published version of the activity.
        Parameters:
        newPublishedVersion - This method sets the published version of the activity.
      • setActivityType

        public void setActivityType(java.lang.Short newActivityType)
        This method sets the type of the activity. It is a value from the DMACTTYPE table.
        Parameters:
        newActivityType - This method sets the type of the activity.
      • setActivityFormat

        public void setActivityFormat(java.lang.String newActivityFormat)
        This method sets the format of the activity. It is a value from the DMACTTYPE table.
        Parameters:
        newActivityFormat - This method sets the format of the activity.
      • setTemplateType

        public void setTemplateType(java.lang.Short newTemplateType)
        This method sets the type of the activity template. It is a value from the DMTEMPLATETYPE table. If this value is null, then this activity is not a template.
        Parameters:
        newTemplateType - This method sets the type of the activity template.
      • setExperimentType

        public void setExperimentType(java.lang.Short newExperimentType)
        This method sets the type of the experimental activity. It is a value from the DMEXPTYPE table. If this value is null, then this activity is not an experiment.
        Parameters:
        newExperimentType - This method sets the type of the experimental activity.
      • setFlowXml

        public void setFlowXml(java.lang.String newFlowXml)
        This method sets the runtime XML associated with the activity.
        Parameters:
        newFlowXml - The runtime XML associated with the activity.
      • setField1

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

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

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

        public void setField4(java.lang.String newField4)
        This method sets custom field 4 of the activity.
        Parameters:
        newField4 - The custom field 4 of the activity.
      • setMarketingSpotBehavior

        public void setMarketingSpotBehavior(java.lang.Integer newMarketingSpotBehavior)
        This method sets the caching behavior for the marketing activity and how it should affect the e-Marketing Spot caching behavior.
        Parameters:
        newMarketingSpotBehavior - Set a value of 1 if the marketing activity is dynamic, and a value of 0 if it is static.
      • setActivityRootElement

        public void setActivityRootElement(com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement newActivityRootElement)
        This method sets the cached object associated with the runtime XML. This is set by the marketing cache so that the XML does not need to be parsed more than once.
        Parameters:
        newActivityRootElement - The cached object associated with the runtime XML.
      • getActivityRootElement

        public com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement getActivityRootElement()
        This method gets the cached object associated with the runtime XML. This is set by the marketing cache so that the XML does not need to be parsed more than once.
        Returns:
        This method returns the cached object associated with the runtime XML. This is set by the marketing cache so that the XML does not need to be parsed more than once.
      • setHasOnlyTriggersForAllUsers

        public void setHasOnlyTriggersForAllUsers(boolean newHasOnlyTriggersForAllUsers)
        This method sets the setting of whether the activity has only triggers that are for all users. This is set by the marketing cache and is used to optimize runtime performance by not loading information from the user behavior database table when running certain web activities.
        Parameters:
        newHasOnlyTriggersForAllUsers - The setting of whether the activity only has triggers that are for all users. This is usually true for web activities, and false for dialog activities.
      • getHasOnlyTriggersForAllUsers

        public boolean getHasOnlyTriggersForAllUsers()
        This method gets the setting of whether the activity has only triggers that are for all users. This is set by the marketing cache and is used to optimize runtime performance by not loading information from the user behavior database table when running certain web activities.
        Returns:
        This method gets the setting of whether the activity only has triggers that are for all users.
      • getNumberOfFlowElements

        public int getNumberOfFlowElements()
        This method returns the number of flow elements associated with this activity. The flow elements only include the triggers, targets, and actions. These are the elements that are kept in the activity cache.
        Returns:
        The number of flow elements in the activity cache.
      • getFlowElement

        public FlowElement getFlowElement(java.lang.String elementId)
        This method gets the FlowElement business object associated with the activity.
        Parameters:
        elementId - The ID of the element.
        Returns:
        A FlowElement
      • putFlowElement

        public void putFlowElement(FlowElement element)
        This method caches the FlowElement that is associated with the activity.
        Parameters:
        element - The FlowElement business object.
      • setActivityElementData

        public void setActivityElementData(com.ibm.commerce.marketing.internal.runtime.objects.ActivityElementData activityElementData)
        This method stores the ActivityElementData. It is only required to be set when servlet caching is disabled.
        Parameters:
        activityElementData - The ActivityElementData.
      • toString

        public java.lang.String toString()
        This method returns a string with the content of the marketing activity.
        Overrides:
        toString in class java.lang.Object
        Returns:
        This method returns a string with the content of the marketing activity.