com.ibm.commerce.giftcenter.facade.client

Class GiftCenterFacadeClient



  • public class GiftCenterFacadeClient
    extends AbstractGiftCenterFacadeClient

    This class provides common methods that this and other utility classes of the GiftCenter facade can use. This class also provides a set of convenient Java APIs to represent particular GiftCenter operations. This set of Java APIs also includes APIs for Web-based requests to transform the name-value pair request into the appropriate request documents.

    • Field Detail

      • COPYRIGHT

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

      • GiftCenterFacadeClient

        public GiftCenterFacadeClient()
        This method creates an instance of the client to communicate with the GiftCenter facade.
      • GiftCenterFacadeClient

        public GiftCenterFacadeClient(BusinessContextType businessContext,
                                      javax.security.auth.callback.CallbackHandler callbackHandler)
        This method creates an instance of the client to communicate with the GiftCenter facade.
        Parameters:
        businessContext - The default business context to associate with the messages when making requests.
        callbackHandler - Used for authentication purposes so the controller can give the authentication information to the transport when required.
    • Method Detail

      • createGiftList

        public java.util.Map createGiftList(java.util.Map parameters)
                                     throws GiftListException
        This method creates a gift list using the input provided in the map.
        Parameters:
        parameters - - a HashMap of type HashMap.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException - - when the operation was not successful.
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#processGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • deleteGiftList

        public java.util.Map deleteGiftList(java.util.Map parameters)
                                     throws GiftListException
        This method deletes a GiftList. The mandatory parameters are:
        • giftListId or externalId
        • storeId
        Parameters:
        parameters - the input parameters.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#processGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • authenticate

        public java.util.Map authenticate(java.util.Map parameters)
                                   throws GiftCenterException
        This method invokes the authenticate service to authenticate the user for the gift list. It invokes the ProcessGiftList service with the GiftListAccessSpecifier noun part which contains the guest or manage access password. The parameters are:
        • giftListId or externalId
        • guestAccessPassword
        • manageAccessPassword
        Parameters:
        parameters - Map of input parameters.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftCenterException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#processGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • announceGiftList

        public java.util.Map announceGiftList(java.util.Map parameters)
                                       throws GiftListException
        This method invokes the gift list announcement service based on the input parameters. The following shows the parameter definition that need to be passed as input to the method.
        • message - The message to be to shown to guests who are viewing the email announcement
        • subject - The subject text that need to be used in the email
        • template - The email template name that need to be used for sending the email
        • senderName - The name of the sender
        • senderEmail - The e-mail address of the sender
        • recipientName - Name of the recipient
        • recipientEmail - E-mail address of the recipient
        • addressingMethod - The method in which the recipient is addressed in the mail. E.g they are directly addressed (TO), they are copied on the mail (CC) etc..
        Parameters:
        parameters - The map containing the input parameters. The keys that need to be used in the input parameter map are defined above.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#processGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • completeGiftList

        public java.util.Map completeGiftList(java.util.Map parameters)
                                       throws GiftListException
        This method invokes the gift list complete service to complete a gift registry. The only parameter that need to be passed is the gift list unique identifier with the key giftListId or the externalId.
        Parameters:
        parameters - The map containing the input parameter.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#processGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • addItem

        public java.util.Map addItem(java.util.Map parameters)
                              throws GiftListException
        This method adds an item to the GiftList. It invokes the ChangeGiftList service with the items to be added.
        Parameters:
        parameters - Map of input parameters. The mandatory parameters required are:
        • giftListId or externalId
        • catEntryId or partNumber
        • quantity
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateItem

        public java.util.Map updateItem(java.util.Map parameters)
                                 throws GiftListException
        This method updates an item in the gift list. It invokes the ChangeGiftList service with the items to be added.
        Parameters:
        parameters - Map of input parameters. The mandatory parameters required are:
        • giftListId or externalId
        • giftListItemId
        • quantity
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • deleteItem

        public java.util.Map deleteItem(java.util.Map parameters)
                                 throws GiftListException
        This method deletes an item from the gift list. It invokes the ChangeGiftList service with the items to be deleted.
        Parameters:
        parameters - Map of input parameters. The mandatory parameters required are:
        • giftListId or externalId
        • giftListItemId
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • addGiftListCoRegistrants

        public java.util.Map addGiftListCoRegistrants(java.util.Map parameters)
                                               throws GiftListException
        This method adds new coregistrant details to the registry. It invokes the ChangeGiftListCoRegistrant service with the list of coregistrant noun parts to be added.
        Parameters:
        parameters - Map of input parameters. The mandatory parameters required are:
        • giftListId or externalId
        • coRegistrantFirstName
        • coRegistrantLastName
        • coRegistrantMiddleName
        • coRegistrantPersonTitle
        • coRegistrantSuffix
        • coRegistrantAddress1
        • coRegistrantAddress2
        • coRegistrantAddress3
        • coRegistrantCity
        • coRegistrantCountry
        • coRegistrantState
        • coRegistrantZipCode
        • coRegistrantEmail1
        • coRegistrantEmail2
        • coRegistrantFax
        • coRegistrantPhone1
        • coRegistrantPhone2
        • coRegistrantRelationship
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateGiftListCoRegistrants

        public java.util.Map updateGiftListCoRegistrants(java.util.Map parameters)
                                                  throws GiftListException
        This method updates Gift List CoRegistrant details. It invokes the ChangeGiftListCoRegistrant service with the list of coregistrant noun parts to be updated
        Parameters:
        parameters - Map of input parameters. The mandatory parameters required are:
        • giftListId or externalId
        • coRegistrantId
        • numCoRegistrants
        • coRegistrantFirstName
        • coRegistrantLastName
        • coRegistrantMiddleName
        • coRegistrantPersonTitle
        • coRegistrantSuffix
        • coRegistrantAddress1
        • coRegistrantAddress2
        • coRegistrantAddress3
        • coRegistrantCity
        • coRegistrantCountry
        • coRegistrantState
        • coRegistrantZipCode
        • coRegistrantEmail1
        • coRegistrantEmail2
        • coRegistrantFax
        • coRegistrantPhone1
        • coRegistrantPhone2
        • coRegistrantRelationship
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • deleteGiftListCoRegistrants

        public java.util.Map deleteGiftListCoRegistrants(java.util.Map parameters)
                                                  throws GiftListException
        This method deletes coregistrant details from the registry. It invokes the ChangeGiftListCoRegistrant service with the list of coregistrant noun parts to be deleted.
        Parameters:
        parameters - Map of input parameters. The required parameters are:
        • giftListId or externalId
        • coRegistrantId
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateDescription

        public java.util.Map updateDescription(java.util.Map parameters)
                                        throws GiftCenterException
        This method updates the description of the gift list. It invokes the ChangeGiftList service with the description part to be updated. The description part contains the name, description, and guest message for the gift list.
        Parameters:
        parameters - Map of input parameters. The parameters accepted are:
        • giftListId or externalId
        • name
        • guestMessage
        • eventDescription
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftCenterException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateEventInformation

        public java.util.Map updateEventInformation(java.util.Map parameters)
                                             throws GiftCenterException
        This method updates event information for the gift list. It invokes the ChangeGiftList service with the even information part to be added. The event information part contains the event date, post event/pre event shipping addresses, preference for accepting gift cards, for this gift list
        Parameters:
        parameters - Map of input parameters.The parameters accepted are:
        • giftListId or externalId
        • eventDate
        • postEventShippingPreference
        • preEventShippingPreference

        The pre-event shipping address fields are required if the preEventShippingPreference is O. The pre-event shipping address field names are :
        • preEventFirstName
        • preEventLastName
        • preEventMiddleName
        • preEventPersonTitle
        • preEventSuffix
        • preEventAddress1
        • preEventAddress2
        • preEventAddress3
        • preEventCity
        • preEventCountry
        • preEventState
        • preEventZipCode
        • preEventEmail1
        • preEventEmail2
        • preEventFax
        • preEventPhone1
        • preEventPhone2

        The post-event shipping address fields are required if the preEventShippingPreference is O. The post-event shipping address field names are :
        • postEventFirstName
        • postEventLastName
        • postEventMiddleName
        • postEventPersonTitle
        • postEventSuffix
        • postEventAddress1
        • postEventAddress2
        • postEventAddress3
        • postEventCity
        • postEventCountry
        • postEventState
        • postEventZipCode
        • postEventEmail1
        • postEventEmail2
        • postEventFax
        • postEventPhone1
        • postEventPhone2
        • giftCardAccepted
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftCenterException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateAccessOptions

        public java.util.Map updateAccessOptions(java.util.Map parameters)
                                          throws GiftCenterException
        This method updates the gift list access options. It invokes the ChangeGiftList service with the GiftListAccessSpecifier noun part to be updated. The GiftListAccessSpecifier noun part contains the access specifier, the guest access password and manage access password.
        Parameters:
        parameters - Map of input parameters. The parameters accepted are:
        • giftListId or externalId
        • guestAccessPassword
        • manageAccessPassword
        • registryAccessPreference
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftCenterException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateGiftListRegistrant

        public java.util.Map updateGiftListRegistrant(java.util.Map parameters)
                                               throws GiftCenterException
        This method updates registrant details. It invokes the ChangeGiftListRegistrantMediator service with the registrant part to be updated. The registrant part contains the registrant relationship and address.
        Parameters:
        parameters - Map of input parameters. The parameters accepted are:
        • giftListId or externalId
        • registrantId
        • registrantFirstName
        • registrantLastName
        • registrantMiddleName
        • registrantPersonTitle
        • registrantSuffix
        • registrantAddress1
        • registrantAddress2
        • registrantAddress3
        • registrantCity
        • registrantCountry
        • registrantState
        • registrantZipCode
        • registrantEmail1
        • registrantEmail2
        • registrantFax
        • registrantPhone1
        • registrantPhone2
        • registrantRelationship
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftCenterException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updatePurchaseRecord

        public java.util.Map updatePurchaseRecord(java.util.Map parameters)
                                           throws GiftListException
        This method updates purchase record to the GiftList. It invokes the ChangeGiftList service with the purchase records to be added.
        Parameters:
        parameters - Map of input parameters. The parameters accepted are:
        • giftListId or externalId
        • purchaseRecordId
        • registrantMemo
        • purchaseRecordNoteSent
        • purchasedQuantity
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • deletePurchaseRecord

        public java.util.Map deletePurchaseRecord(java.util.Map parameters)
                                           throws GiftListException
        This method delete purchase record of a Gift List. It invokes the ChangeGiftList service with the purchase record to be deleted.
        Parameters:
        parameters - Map of input parameters. The parameters accepted are:
        • giftListId or externalId
        • purchaseRecordId
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • updateGiftList

        public java.util.Map updateGiftList(java.util.Map parameters)
                                     throws GiftListException
        This method updates the gift list using the input provided in the map.
        Parameters:
        parameters - - a HashMap of type HashMap.
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException - - when the operation was not successful.
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, List, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • changeGiftListStatus

        public java.util.Map changeGiftListStatus(java.util.Map parameters)
                                           throws GiftListException
        This method performs a Change GiftList status request.
        Parameters:
        parameters - input parameters. The parameters accepted are:
        • giftListId or externalId
        • giftListState
        Returns:
        The response map populated by populateGiftListResponse method.
        Throws:
        GiftListException
        See Also:
        GiftCenterFacadeClient#buildGiftListDataObject(Map, String)} {@link GiftCenterFacadeClient#changeGiftList(String, String, GiftListType)} {@link GiftCenterFacadeClient#populateGiftListResponse(Map, GiftListType)}
      • getCustomersWishListIds

        public java.util.List getCustomersWishListIds(java.util.List wishListParameters,
                                                      java.lang.Long userId,
                                                      java.lang.Integer storeId,
                                                      java.lang.Boolean create,
                                                      java.util.Locale locale)
                                               throws GiftListException
        This method finds a customer's wish lists. The wish lists found are those are that are using the gift registry implementation of wish lists.
        Parameters:
        wishListParameters - A list of wish list IDs or parameters. A value of . means locate the customer's current wish list. A value of * means locate all of the customer's wish lists. Otherwise, it is assumed the value is a unique identifier of a wish list (in the GRGFTREG database table).
        userId - The customer's member ID.
        storeId - The store ID.
        create - Should a wish list be created if a wish list does not already exist.
        locale - The customer's locale.
        Returns:
        A list containing the customer's wish lists ID values as Strings.
        Throws:
        GiftListException