com.ibm.commerce.promotion.facade.client

Class PromotionFacadeClient



  • public class PromotionFacadeClient
    extends AbstractPromotionFacadeClient

    This class provides common methods that this and other utility class to the Promotion facade can use. This class also provides a set of convenient Java API to represent particular Promotion operations. This set of Java API also include APIs for Web based requests to transform the name value pair request into the appropriate request documents.

    • Constructor Detail

      • PromotionFacadeClient

        public PromotionFacadeClient()
        Creates an instance of the client to communicate with the Promotion facade.
      • PromotionFacadeClient

        public PromotionFacadeClient(BusinessContextType businessContext,
                                     javax.security.auth.callback.CallbackHandler callbackHandler)
        Creates an instance of the client to communicate with the Promotion facade.
        Parameters:
        businessContext - The default business context to associate with the messages when making requests.
        callbackHandler - Used for authentication purposes so the controller can give the authentication information to the transport when required.
    • Method Detail

      • deletePromotion

        public AcknowledgePromotionDataAreaType deletePromotion(java.lang.String promotionId,
                                                                int storeId)
                                                         throws PromotionException
        This method builds and then sends a request to delete a promotion.
        Parameters:
        promotionId - The ID of the promotion to be deleted.
        storeId - The store ID of the store the promotions are in
        Returns:
        This method returns the AcknowledgePromotionDataAreaType object that contains the ID of the deleted promotion.
        Throws:
        PromotionException
      • deletePromotion

        public AcknowledgePromotionDataAreaType deletePromotion(java.util.List promotionIdList,
                                                                int storeId)
                                                         throws PromotionException
        This method deletes promotions.
        Parameters:
        promotionIdList - The list of IDs of the promotions to be deleted.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the IDs of the deleted promotions.
        Throws:
        PromotionException
      • archivePromotion

        public AcknowledgePromotionDataAreaType archivePromotion(java.lang.String promotionId,
                                                                 int storeId)
                                                          throws PromotionException
        This method builds and then sends a request to archive a promotion.
        Parameters:
        promotionId - The ID of the promotion to be archived.
        storeId - The store ID of the store the promotions are in
        Returns:
        This method returns the AcknowledgePromotionDataAreaType object that contains the ID of the archived promotion.
        Throws:
        PromotionException
      • archivePromotion

        public AcknowledgePromotionDataAreaType archivePromotion(java.util.List promotionIdList,
                                                                 int storeId)
                                                          throws PromotionException
        This method archives promotions.
        Parameters:
        promotionIdList - The list of IDs of the promotions to be archived.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the IDs of the archived promotions.
        Throws:
        PromotionException
      • activatePromotion

        public AcknowledgePromotionDataAreaType activatePromotion(java.lang.String promotionId,
                                                                  int storeId)
                                                           throws PromotionException
        This method activates an promotion.
        Parameters:
        promotionId - The ID of the promotion to be activated.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the ID of the activated promotion.
        Throws:
        PromotionException
      • activatePromotion

        public AcknowledgePromotionDataAreaType activatePromotion(java.util.List promotionIdList,
                                                                  int storeId)
                                                           throws PromotionException
        This method activates promotions.
        Parameters:
        promotionIdList - The list of IDs of the promotions to be activated.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the IDs of the activated promotions.
        Throws:
        PromotionException
      • deactivatePromotion

        public AcknowledgePromotionDataAreaType deactivatePromotion(java.lang.String promotionId,
                                                                    int storeId)
                                                             throws PromotionException
        This method deactivates an promotion.
        Parameters:
        promotionId - The ID of the promotion to be deactivated.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the ID of the deactivated promotion.
        Throws:
        PromotionException
      • deactivatePromotion

        public AcknowledgePromotionDataAreaType deactivatePromotion(java.util.List promotionIdList,
                                                                    int storeId)
                                                             throws PromotionException
        This method deactivates promotions.
        Parameters:
        promotionIdList - The list of IDs of the promotions to be deactivated.
        storeId - The store ID of the store the promotions are in
        Returns:
        The AcknowledgePromotionDataAreaType that contains the IDs of the activated promotions.
        Throws:
        PromotionException