com.ibm.commerce.rest.member.handler

Class PersonContactHandler

    • 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 for person
        See Also:
        Constant Field Values
      • CONTACT_MAPPING_KEY

        public static final java.lang.String CONTACT_MAPPING_KEY
        Resource mapping key for contact
        See Also:
        Constant Field Values
      • SINGLE_CONTACT_MAPPING_KEY

        public static final java.lang.String SINGLE_CONTACT_MAPPING_KEY
        The constant SINGLE_CONTACT_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
      • PARAMETER_ADDRESS_TYPE

        public static final java.lang.String PARAMETER_ADDRESS_TYPE
        Parameter constant for address type
        See Also:
        Constant Field Values
      • PARAMETER_ADDRESS_TYPE_DESCRIPTION

        public static final java.lang.String PARAMETER_ADDRESS_TYPE_DESCRIPTION
        Parameter description constants for address type
        See Also:
        Constant Field Values
      • PARAMETER_ADDRESS_ID

        public static final java.lang.String PARAMETER_ADDRESS_ID
        Parameter constant for address ID
        See Also:
        Constant Field Values
      • PARAMETER_ADDRESS_ID_DESCRIPTION

        public static final java.lang.String PARAMETER_ADDRESS_ID_DESCRIPTION
        Parameter description constants for address ID
        See Also:
        Constant Field Values
      • PARAMETER_NICKNAME

        public static final java.lang.String PARAMETER_NICKNAME
        Parameter constant for nickname
        See Also:
        Constant Field Values
      • PARAMETER_NICKNAME_DESCRIPTION

        public static final java.lang.String PARAMETER_NICKNAME_DESCRIPTION
        Parameter description constants for nickname
        See Also:
        Constant Field Values
    • Constructor Detail

      • PersonContactHandler

        public PersonContactHandler()
    • 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
      • getHelper

        public PersonHelper getHelper()
        This method returns the BOD helper used to get product data
        Returns:
        PersonHelper
      • getAllPersonContact

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
        public javax.ws.rs.core.Response getAllPersonContact(@PathParam(value="storeId")
                                                                                                                                                                          java.lang.String storeId,
                                                                                                                                                                          @QueryParam(value="addressType")
                                                                                                                                                                          java.lang.String addressType,
                                                                                                                                                                          @QueryParam(value="responseFormat")
                                                                                                                                                                          java.lang.String responseFormat)
        Get contacts in a person's address book. If optional query parameter addressType is passed in, the returned contacts will be filtered by addressType.
        Parameters:
        storeId - store ID
        addressType - address type.
        responseFormat - response format.
        Returns:
        Response
      • findPersonContactById

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="byAddressId/{addressId}")
        public javax.ws.rs.core.Response findPersonContactById(@PathParam(value="storeId")
                                                                                                                                                                                                                    java.lang.String storeId,
                                                                                                                                                                                                                    @PathParam(value="addressId")
                                                                                                                                                                                                                    java.lang.String addressId,
                                                                                                                                                                                                                    @QueryParam(value="responseFormat")
                                                                                                                                                                                                                    java.lang.String responseFormat)
        This method retrieve a person contact by address id.
        Parameters:
        storeId - store ID
        addressId - address id.
        responseFormat - response format.
        Returns:
        The Contact in the specified format.
      • findPersonContactByNickName

        @GET
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Path(value="{nickName}")
        public javax.ws.rs.core.Response findPersonContactByNickName(@PathParam(value="storeId")
                                                                                                                                                                                                             java.lang.String storeId,
                                                                                                                                                                                                             @PathParam(value="nickName")
                                                                                                                                                                                                             java.lang.String nickName,
                                                                                                                                                                                                             @QueryParam(value="responseFormat")
                                                                                                                                                                                                             java.lang.String responseFormat)
        This method retrieve a person contact by nick name.
        Parameters:
        storeId - the store Id.
        nickName - the contact name saved in addressBook by registered shopper.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        The Contact in the specified format.
      • addPersonContact

        @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 addPersonContact(@PathParam(value="storeId")
                                                                                                                                                                                                                                 java.lang.String storeId,
                                                                                                                                                                                                                                 @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                 java.lang.String responseFormat)
        This method performs a AddPersonContact to he shopper's addressBook.
        Parameters:
        storeId - the store Id.
        responseFormat - the response format (xml, json, or atom).
        Returns:
        A map of String [] that contains the following response parameters: resourceId, resourceType, userId, addressId
      • updatePersonContact

        @PUT
         @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"})
         @Consumes(value={"application/json","application/xml"})
         @Path(value="{nickName}")
        public javax.ws.rs.core.Response updatePersonContact(@PathParam(value="storeId")
                                                                                                                                                                                                                                                              java.lang.String storeId,
                                                                                                                                                                                                                                                              @PathParam(value="nickName")
                                                                                                                                                                                                                                                              java.lang.String nickName,
                                                                                                                                                                                                                                                              @QueryParam(value="responseFormat")
                                                                                                                                                                                                                                                              java.lang.String responseFormat)
        Update person contact data for a shopper. Because this method will change person's addressId, we use nickName to identify the person contact.
        Parameters:
        storeId - store id
        nickName - nick name
        responseFormat - response format
        Returns:
        Response the Response
      • deletePersonContact

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