com.ibm.commerce.marketing.cache

Class GetMarketingSpotBehaviorCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.TargetableCommandImpl
      • com.ibm.websphere.command.CacheableCommandImpl
        • com.ibm.commerce.marketing.cache.GetMarketingSpotBehaviorCmdImpl
  • All Implemented Interfaces:
    GetMarketingSpotBehaviorCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class GetMarketingSpotBehaviorCmdImpl
    extends com.ibm.websphere.command.CacheableCommandImpl
    implements GetMarketingSpotBehaviorCmd
    This command evaluates if an activity should be run in relation to other activities currently running on the same e-Marketing Spot. If the e-Marketing Spot does not specify any requested amount of data, then the activities are run from highest priority down until one of the activities returns some data. Equal priority activities are all run even when an activity of the same priority has already returned some data. If the e-Marketing Spot specifies a requested amount of data for categories, products or marketing content, then the activities are run from highest priority down until the requested amount of data has been returned. Equal priority activities are all run even when the requested amount of data has already been reached.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

        LOCAL
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      CampaignInitiativeCache.CachedEMarketingSpot getESpot(java.lang.String emsName, java.lang.String usage, java.lang.Integer storeId)
      This method gets the cached information of an e-Marketing Spot.
      java.lang.String getMarketingSpotBehavior()
      This method gets the caching behavior for the e-Marketing Spot.
      java.util.List getMarketingSpotNameList()
      This method returns a list of e-Marketing Spots names that may be evaluated when displaying one e-Marketing Spot.
      int getNextTimeLimit()
      This method gets the number of seconds from now of the earliest start date or end date of activities scheduled to the e-Marketing Spot.
      boolean isReadyToCallExecute()
      This method checks that the e-Marketing Spot name has been specified.
      void performExecute()
      This method determines if there is any dynamic web activities or content currently associated with the e-Marketing Spot.
      void setMarketingSpotNameList(java.util.List newEmsNames)
      This method sets the names of the e-Marketing Spots for which to check the caching behavior.
      void setMarketingSpotUsage(java.lang.String newEmsUsage)
      This method sets the usage type of the e-Marketing Spot for which to check the caching behavior.
      void setStoreId(java.lang.Integer sId)
      This method sets the store ID.
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, reset, setCaller, setObjectSize, unionDependencies, updateCache
      • Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl

        getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.websphere.command.Command

        execute, reset
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
    • Field Detail

      • COPYRIGHT

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

      • GetMarketingSpotBehaviorCmdImpl

        public GetMarketingSpotBehaviorCmdImpl()
        This method is the default constructor. It currently performs no actions.
    • Method Detail

      • setStoreId

        public void setStoreId(java.lang.Integer sId)
        This method sets the store ID. If the store ID is not set on the command, it will be determined from the current context.
        Specified by:
        setStoreId in interface GetMarketingSpotBehaviorCmd
        Parameters:
        sId - The store ID.
      • performExecute

        public void performExecute()
        This method determines if there is any dynamic web activities or content currently associated with the e-Marketing Spot. It is assumed an e-Marketing Spot is static unless a web activity or content associated with the e-Marketing Spot specifies that it is dynamic.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Specified by:
        performExecute in class com.ibm.websphere.command.TargetableCommandImpl
      • getESpot

        public CampaignInitiativeCache.CachedEMarketingSpot getESpot(java.lang.String emsName,
                                                                     java.lang.String usage,
                                                                     java.lang.Integer storeId)
        This method gets the cached information of an e-Marketing Spot.
        Parameters:
        emsName - The name of the e-Marketing Spot.
        usage - The usage type of the e-Marketing Spot.
        storeId - The ID of the store.
        Returns:
        This method returns the cached information of an e-Marketing Spot.
      • getMarketingSpotBehavior

        public java.lang.String getMarketingSpotBehavior()
        This method gets the caching behavior for the e-Marketing Spot.
        Specified by:
        getMarketingSpotBehavior in interface GetMarketingSpotBehaviorCmd
        Returns:
        This method returns a value of 1 if the e-Marketing Spot is dynamic, and a value of 0 if it is static.
      • getNextTimeLimit

        public int getNextTimeLimit()
        This method gets the number of seconds from now of the earliest start date or end date of activities scheduled to the e-Marketing Spot.
        Specified by:
        getNextTimeLimit in interface GetMarketingSpotBehaviorCmd
        Returns:
        This method returns the number of seconds from now of the earliest start date or end date of activities scheduled to the e-Marketing Spot. If there are no activities, or no start or end dates, then a value of 0 is returned.
      • getMarketingSpotNameList

        public java.util.List getMarketingSpotNameList()
        This method returns a list of e-Marketing Spots names that may be evaluated when displaying one e-Marketing Spot. The default behavior is to return the one e-Marketing Spot name set in this command. A customization may return a list of e-Marketing Spot names that may be evaluated when an e-Marketing Spot is called.
        Returns:
        A list of e-Marketing Spot names.
      • setMarketingSpotNameList

        public void setMarketingSpotNameList(java.util.List newEmsNames)
        This method sets the names of the e-Marketing Spots for which to check the caching behavior.
        Specified by:
        setMarketingSpotNameList in interface GetMarketingSpotBehaviorCmd
        Parameters:
        newEmsNames - The names of the e-Marketing Spots.
      • setMarketingSpotUsage

        public void setMarketingSpotUsage(java.lang.String newEmsUsage)
        This method sets the usage type of the e-Marketing Spot for which to check the caching behavior. If this is not specified, then a default usage type of MARKETING is used.
        Parameters:
        newEmsUsage - The usage type of the e-Marketing Spot.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method checks that the e-Marketing Spot name has been specified.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Specified by:
        isReadyToCallExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Returns:
        This method returns true if the e-Marketing Spot name has been specified.