com.ibm.commerce.emarketing.emailtemplate.commands

Interface AllocatePromotionCodeCmd

  • 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:
    AllocatePromotionCodeCmdImpl


    public interface AllocatePromotionCodeCmd
    extends TaskCommand
    This task command is used to allocate a promotion code from a promotion that has multiple promotion codes associated with the promotion. To use this command:
    1. Call setPromotionId() to set the promotion from which a code should be allocated.
    2. Optionally call setOwnerId() if the code should be assigned to a particular customer. Otherwise the code will be allocated, but will be unassigned.
    3. Call performExecute.
    4. Call getAllocatedPromotionCode to get the code that has been allocated. If no code has been allocated, then this method will return null.
    • 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
        The name of the default implementation of this interface.
    • Method Detail

      • setPromotionId

        void setPromotionId(java.lang.Integer newPromotionId)
        This method sets the promotion ID of the promotion from which a promotion code should be allocated.
        Parameters:
        newPromotionId - The ID of the promotion.
      • setOwnerId

        void setOwnerId(java.lang.Long newOwnerId)
        This method sets the member ID of the customer to whom the allocated promotion code should be assigned. If the member ID is null, the promotion code is allocated, but is unassigned to a particular customer.
        Parameters:
        newOwnerId - The ID of the owner.
      • getAllocatedPromotionCode

        java.lang.String getAllocatedPromotionCode()
        This method gets the promotion code that has been allocated.
        Returns:
        The promotion code that has been allocated.