com.ibm.commerce.rest.wishlist.handler

Class WishlistHandler

    • 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
        Resource name.
        See Also:
        Constant Field Values
      • RESOURCE_MAPPING_KEY

        public static final java.lang.String RESOURCE_MAPPING_KEY
        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
      • EXTERNAL_IDENTIFIER

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

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

      • WishlistHandler

        public WishlistHandler()
    • 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.
        Specified by:
        getResourceName in interface IResourceHandler
        Returns:
        the resource name
      • getHelper

        public WishlistHelper getHelper()
        This method returns the BOD helper used to get wishlist data.
        Returns:
        the helper
      • findWishlist

        @GET
         @Path(value="@self")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findWishlist(@PathParam(value="storeId")
                                                                                                                                                                                         java.lang.String storeId,
                                                                                                                                                                                         @QueryParam(value="responseFormat")
                                                                                                                                                                                         java.lang.String responseFormat)
        This method returns wish list for the logged in user.
        Parameters:
        storeId - the store Id of the request.
        responseFormat - the response format.
        Returns:
        a collection of Giftlist nouns in the specified format.
      • findWishlistByUserId_default

        @GET
         @Path(value="@default")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findWishlistByUserId_default(@PathParam(value="storeId")
                                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                                            java.lang.String responseFormat)
        This method returns the default wish list for a logged in user.
        Parameters:
        storeId - the store Id of the request.
        responseFormat - the response format.
        Returns:
        a collection of Giftlist nouns in the specified format.
      • findWishlistByExternalId

        @GET
         @Path(value="{externalId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findWishlistByExternalId(@PathParam(value="externalId")
                                                                                                                                                                                                            java.lang.String externalId,
                                                                                                                                                                                                            @PathParam(value="storeId")
                                                                                                                                                                                                            java.lang.String storeId,
                                                                                                                                                                                                            @QueryParam(value="guestAccessKey")
                                                                                                                                                                                                            java.lang.String guestAccessKey,
                                                                                                                                                                                                            @QueryParam(value="responseFormat")
                                                                                                                                                                                                            java.lang.String responseFormat)
        This method returns wish list by external id.
        Parameters:
        externalId - the external id
        storeId - the store Id of the request.
        guestAccessKey - the guest access key
        responseFormat - the response format.
        Returns:
        a collection of Giftlist nouns in the specified format.
      • findWishlistItemsByExternalId

        @GET
         @Path(value="{externalId}/item")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response findWishlistItemsByExternalId(@PathParam(value="externalId")
                                                                                                                                                                                                                      java.lang.String externalId,
                                                                                                                                                                                                                      @PathParam(value="storeId")
                                                                                                                                                                                                                      java.lang.String storeId,
                                                                                                                                                                                                                      @QueryParam(value="guestAccessKey")
                                                                                                                                                                                                                      java.lang.String guestAccessKey,
                                                                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                                                                      java.lang.String responseFormat)
        This method returns wish list items by wish list external id with paging support.
        Parameters:
        externalId - the external id
        storeId - the store Id of the request.
        guestAccessKey - the guest access key
        responseFormat - the response format.
        Returns:
        a collection of Giftlist nouns in the specified format.
      • createWishlist

        @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 createWishlist(@PathParam(value="storeId")
                                                                                                                                                                                                                               java.lang.String storeId,
                                                                                                                                                                                                                               @QueryParam(value="responseFormat")
                                                                                                                                                                                                                               java.lang.String responseFormat)
        Creates a wishlist for shopper.
        Parameters:
        storeId - the storeid
        responseFormat - the response format
        Returns:
        Response
      • processWishlist

        @POST
         @Path(value="{externalId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response processWishlist(@PathParam(value="storeId")
                                                                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                                                                             @PathParam(value="externalId")
                                                                                                                                                                                                                                                             java.lang.String externalId)
        Processes a wish list for shopper.
        Parameters:
        storeId - the store id
        externalId - the external id of the wish list
        Returns:
        Response
      • updateWishlist

        @PUT
         @Path(value="{externalId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response updateWishlist(@PathParam(value="storeId")
                                                                                                                                                                                                                                                           java.lang.String storeId,
                                                                                                                                                                                                                                                           @PathParam(value="externalId")
                                                                                                                                                                                                                                                           java.lang.String externalId,
                                                                                                                                                                                                                                                           @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                           java.lang.String responseFormat,
                                                                                                                                                                                                                                                           @QueryParam(value="addItem")
                                                                                                                                                                                                                                                           java.lang.String addItem)
        Update wishlist for a registered shopper. The shopper must log in before invoking this method.
        Parameters:
        storeId - the store id
        externalId - the external id
        responseFormat - the response format
        addItem - the add item
        Returns:
        Response
      • deleteWishlist

        @DELETE
         @Path(value="{externalId}")
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response deleteWishlist(@PathParam(value="storeId")
                                                                                                                                                                                                     java.lang.String storeId,
                                                                                                                                                                                                     @PathParam(value="externalId")
                                                                                                                                                                                                     java.lang.String externalId,
                                                                                                                                                                                                     @QueryParam(value="responseFormat")
                                                                                                                                                                                                     java.lang.String responseFormat,
                                                                                                                                                                                                     @QueryParam(value="itemId")
                                                                                                                                                                                                     java.lang.String itemId)
        Delete wishlist information for a registered shopper. The shopper must log in before invoking this method.
        Parameters:
        storeId - the store id
        externalId - the external id
        responseFormat - the response format
        itemId - the item id
        Returns:
        Response