com.ibm.commerce.marketing.dialog.util

Interface MarketingServicesFEPTaskCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    MarketingServicesFEPTaskCmdImpl


    public interface MarketingServicesFEPTaskCmd
    extends TaskCommand
    The class is used to customize the behavior of the marketing services storefront functionality. This class is for extending runtime behavior when the V7 foundation feature pack 6 or higher is enabled. If the runtime behavior is part of the base marketing functionality, then the class MarketingServicesTaskCmd is extended.
    • Field Detail

      • COPYRIGHT

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

        static final java.lang.String defaultCommandClassName
        Default implementation class for this command.
    • Method Detail

      • manageCampaignElementVariables

        void manageCampaignElementVariables(java.util.Map variables,
                                            Dmeletemplate dmeletemplate,
                                            java.lang.Integer elementId,
                                            java.lang.Integer activityId)
        This method is called when loading an activity into the cache for each element in the activity that is being cached. This method should be extended by a customization that needs to take the authoring information associated with the element, and load additional data that is required during the storefront running of the command associated with the element. This logic will be performed once while loading the activity, and then is cached. For example, the authoring information has persisted a dictionaryId name-value pair in the DMELEMENTNVP table. However, the runtime command needs the dictionaryName for its implementation. This method can be implemented to lookup the dictionaryName and cache the result.
         super.manageCampaignElementVariables(variables, dmeletemplate, elementId, activityId);
         Object nvpToSwitch = variables.get("dictionaryId");
         if (nvpToSwitch != null) {
            String switchedNvp = findDictionaryNameById(nvpToSwitch);
            variables.put("dictionaryName", switchedNvp);       
            // this creates a new cached nvp dictionaryName
            // alternatively, you could update the existing variable
            // variables.put("dictionaryId", switchedNvp);
         }
         
        Parameters:
        variables - A Map containing the authoring information. This is the data from the DMELEMENTNVP database table.
        dmeletemplate - The database information associated with the element template for the element being loaded.
        elementId - The ID of the element being loaded.
        activityId - The ID of the activity to which the element belongs.