com.ibm.commerce.rest.price.handler

Class PriceHandler

    • Field Detail

      • COPYRIGHT

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

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

        public static final java.lang.String RESOURCE_MAPPING_KEY
        The Constant RESOURCE_MAPPING_KEY.
        See Also:
        Constant Field Values
      • FORMAT_GROUP_NAME

        public static final java.lang.String FORMAT_GROUP_NAME
        The constant FORMAT_GROUP_NAME
        See Also:
        Constant Field Values
      • QUERY_FIND_BY_CATENTRYID

        public static final java.lang.String QUERY_FIND_BY_CATENTRYID
        The query name to find prices by catentry ID.
        See Also:
        Constant Field Values
      • QUERY_FIND_BY_PARTNUMBER

        public static final java.lang.String QUERY_FIND_BY_PARTNUMBER
        The query name to find prices by part number.
        See Also:
        Constant Field Values
      • URL_PARAMETER_GROUP_NAME_PRICE

        public static final java.lang.String URL_PARAMETER_GROUP_NAME_PRICE
        The URL parameter group name for price (defined in rest-price-clientobjects.xml).
        See Also:
        Constant Field Values
    • Constructor Detail

      • PriceHandler

        public PriceHandler()
    • Method Detail

      • 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
        See Also:
        IResourceHandler.getResourceName()
      • getHelper

        public PriceHelper getHelper()
        This method returns the BOD helper associated with the price resource. This method can be override to use the extended PriceHelper for customization.
        Returns:
        The BOD helper. This value will not be null.
      • findByQuery

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findByQuery(@PathParam(value="storeId")
                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                  @QueryParam(value="q")
                                                                                                                                                                  java.lang.String queryName,
                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                  java.lang.String responseFormat)
        Finds entitled and range prices by a query. See each query for details on input and output.
        Parameters:
        storeId - The store ID.
        queryName - The query name.
        responseFormat - The response format.
        Returns:
        The response.
      • byCatalogEntryIds

        public javax.ws.rs.core.Response byCatalogEntryIds(@PathParam(value="storeId")
                                                           java.lang.String storeId)
        Finds entitled and range prices by catalog entry ids.
        Parameters:
        storeId - The store ID.
        Returns:
        The response.
      • byPartNumbers

        public javax.ws.rs.core.Response byPartNumbers(@PathParam(value="storeId")
                                                       java.lang.String storeId)
        Finds entitled and range prices by part numbers.
        Parameters:
        storeId - The store ID.
        Returns:
        The response.
      • findPricesByQuery

        @POST
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response findPricesByQuery(@PathParam(value="storeId")
                                                                                                                                                                                                                                  java.lang.String storeId,
                                                                                                                                                                                                                                  @QueryParam(value="currency")
                                                                                                                                                                                                                                  java.lang.String currency,
                                                                                                                                                                                                                                  @QueryParam(value="profile")
                                                                                                                                                                                                                                  java.lang.String profile,
                                                                                                                                                                                                                                  @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                  java.lang.String responseFormat)
        This method returns the prices requested by the following parameters and the request body.
        Parameters:
        storeId - The store identifier, this is mandatory parameter and cannot be null or empty.
        currency - The currency to be used. If null or empty, a product-specific or store context currency will be used.
        profile - The value to indicate the type of data to be returned. Valid values are "default" and "range". If null, the "default" value will be assumed.
        responseFormat - The response format (xml, json, or atom).
        Returns:
        The array of price details in the specified format.