com.ibm.commerce.rest.marketing.handler

Class AssociatedPromotionHandler

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • RESOURCE_NAME

        public static final java.lang.String RESOURCE_NAME
        The Constant RESOURCE_NAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AssociatedPromotionHandler

        public AssociatedPromotionHandler()
        Used with WC to instantiate the handler
    • Method Detail

      • getUri

        public javax.ws.rs.core.UriInfo getUri()
        Get the URI of the atom feed request.
        Returns:
        the uri
      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Returns:
        the resource name
      • byName

        public javax.ws.rs.core.Response byName(@QueryParam(value="responseFormat")
                                                java.lang.String responseFormat,
                                                @PathParam(value="storeId")
                                                java.lang.String storeId)
                                         throws java.lang.Exception
        This method retrieves the calculation code details using the name assigned to the calculation code
        Parameters:
        responseFormat - The response format
        storeId - The store ID
        Returns:
        The response containing calculation code details
        Throws:
        java.lang.Exception - if anything goes wrong.
      • findPromotionList

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findPromotionList(@PathParam(value="storeId")
                                                                                                                                                                        java.lang.String storeId,
                                                                                                                                                                        @QueryParam(value="responseFormat")
                                                                                                                                                                        java.lang.String responseFormat,
                                                                                                                                                                        @QueryParam(value="q")
                                                                                                                                                                        java.lang.String queryName)
        Get promotion list by query name and parameters. See the individual queries for the details on input and output.
        Parameters:
        storeId - The store ID
        responseFormat - The response format
        queryName - The query name
        Returns:
        The populated promotion list or the error response.
      • findPromotionsByCategory

        public javax.ws.rs.core.Response findPromotionsByCategory(@QueryParam(value="responseFormat")
                                                                  java.lang.String responseFormat,
                                                                  @PathParam(value="storeId")
                                                                  java.lang.String storeId)
                                                           throws java.lang.Exception
        This method queries the associated promotions by category.
        Parameters:
        responseFormat - The response format
        storeId - The store ID
        Returns:
        The promotions queried by category ID.
        Throws:
        java.lang.Exception - Any exception that occurs while running the query.
      • findPromotionsByCategoryWAssociatedPromotionSummaryProfileName

        public javax.ws.rs.core.Response findPromotionsByCategoryWAssociatedPromotionSummaryProfileName(@QueryParam(value="responseFormat")
                                                                                                        java.lang.String responseFormat,
                                                                                                        @PathParam(value="storeId")
                                                                                                        java.lang.String storeId)
        Internal method findPromotionsByCategoryWAssociatedPromotionSummaryProfileName for documentation ONLY.
        Parameters:
        responseFormat - The response format
        storeId - The store ID
        Returns:
        The null response.
      • findPromotionsByProduct

        public javax.ws.rs.core.Response findPromotionsByProduct(@QueryParam(value="responseFormat")
                                                                 java.lang.String responseFormat,
                                                                 @PathParam(value="storeId")
                                                                 java.lang.String storeId)
                                                          throws java.lang.Exception
        This method queries the promotions by product.
        Parameters:
        responseFormat - The response format.
        storeId - The store ID.
        Returns:
        The promotions queried by product ID
        Throws:
        java.lang.Exception - Any exception that occurs while running the query.
      • findPromotionsByProductWAssociatedPromotionSummaryProfileName

        public javax.ws.rs.core.Response findPromotionsByProductWAssociatedPromotionSummaryProfileName(@QueryParam(value="responseFormat")
                                                                                                       java.lang.String responseFormat,
                                                                                                       @PathParam(value="storeId")
                                                                                                       java.lang.String storeId)
        Internal method findPromotionsByProductWAssociatedPromotionSummaryProfileName for documentation ONLY.
        Parameters:
        responseFormat - The response format.
        storeId - The store ID.
        Returns:
        The null response.