com.ibm.commerce.rest.marketing.handler

Class SpotHandler

    • 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_TYPE

        public static final java.lang.String QUERY_FIND_BY_TYPE
        The query name to search for all spots of a given type.
        See Also:
        Constant Field Values
      • QUERY_FIND_BY_TYPE_AND_NAME

        public static final java.lang.String QUERY_FIND_BY_TYPE_AND_NAME
        The query name to search for the spot with the given type and name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SpotHandler

        public SpotHandler()
        Constructor for this.
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Returns the spot resource name.
        Returns:
        The name for the spot resource, which is RESOURCE_NAME. This value will not be null or empty.
        See Also:
        IResourceHandler.getResourceName()
      • getHelper

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

        @GET
        public javax.ws.rs.core.Response findSpotsByQuery(@PathParam(value="storeId")
                                                               java.lang.String storeId,
                                                               @QueryParam(value="q")
                                                               java.lang.String query,
                                                               @QueryParam(value="responseFormat")
                                                               java.lang.String responseFormat)
        This method returns the spot details for the specified store.
        Parameters:
        storeId - The store identifier, this is a mandatory parameter and cannot be null or empty.
        query - The name of the search query to perform. Must be either QUERY_FIND_BY_TYPE or QUERY_FIND_BY_TYPE_AND_NAME. This value cannot be null or empty.
        responseFormat - The response format (xml, json, or atom). This value cannot be null or empty.
        Returns:
        The array of spot details in the specified format. This value will not be null. If an error occurred, this value will contain the error message.
      • findSpotByID

        @GET
         @Path(value="{spotId}")
        public javax.ws.rs.core.Response findSpotByID(@PathParam(value="storeId")
                                                                                    java.lang.String storeId,
                                                                                    @PathParam(value="spotId")
                                                                                    int spotId,
                                                                                    @QueryParam(value="responseFormat")
                                                                                    java.lang.String responseFormat,
                                                                                    @QueryParam(value="pageNumber")
                                                                                    int pageNumber,
                                                                                    @QueryParam(value="pageSize")
                                                                                    int pageSize)
        This method returns the spot details for the specified store.
        Parameters:
        storeId - The store identifier, this is a mandatory parameter and cannot be null or empty.
        spotId - The spot identifier, this is a mandatory parameter.
        responseFormat - The response format (xml, json, or atom). This value cannot be null or empty.
        pageNumber - The 0-based index of the page of results to retrieve. This value must be > = 0.
        pageSize - The number of results to return per page. This value must be > = 1.
        Returns:
        The array of spot details in the specified format. This value will not be null. If an error occurred, this value will contain the error message.