com.ibm.commerce.marketing.commands.elements

Class AddToRemoveFromSegmentActionTaskCmdImpl

    • 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.
        See Also:
        Constant Field Values
      • PARAM_CUSTOMER_SEGMENT_ID_LIST

        public static final java.lang.String PARAM_CUSTOMER_SEGMENT_ID_LIST
        Constant to specify the segmentIdList parameter in the task command input parameters.
        See Also:
        Constant Field Values
      • PARAM_ACTION

        public static final java.lang.String PARAM_ACTION
        Constant to specify the action parameter in the task command input parameters.
        See Also:
        Constant Field Values
      • ACTION_ADD

        public static final java.lang.String ACTION_ADD
        Constant to specify the action is add to Segment.
        See Also:
        Constant Field Values
      • ACTION_REMOVE

        public static final java.lang.String ACTION_REMOVE
        Constant to specify the action is remove from Segment.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AddToRemoveFromSegmentActionTaskCmdImpl

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

      • getPersonalizationIdForSegment

        public java.lang.String getPersonalizationIdForSegment()
        This method returns the personalization ID to whom to add to or remove from the segment. The default implementation gets the personalization ID of the current user from the context. A customization could override this method to add or remove a different customer, for example, to add the customer who referred this customer.
        Returns:
        This method returns a personalization ID to whom to add to or remove from the segment. If null is returned, then no action will be performed.
      • performExecute

        public void performExecute()
        This method adds members to or removes them from a Customer Segment.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class MarketingCampaignElementTaskCmdImpl
      • validateParameters

        public java.util.List validateParameters(java.util.Map elementParameters)
        This method validates that all the required name value pairs have been set for the campaign element. It checks for action and segmentIdList. As well, the customer segment must have selected the option to allow marketing to populate the customer segment.
        Specified by:
        validateParameters in interface MarketingCampaignElementTaskCmd
        Overrides:
        validateParameters in class MarketingCampaignElementTaskCmdImpl
        Parameters:
        elementParameters - The name value pairs for this element.
        Returns:
        This method returns a list of ApplicationError exceptions that contains any validation errors. The list may be empty or be null.