com.ibm.commerce.member.facade.client

Class MemberFacadeClient



  • public class MemberFacadeClient
    extends AbstractMemberFacadeClient
    This class provides convenient methods that client applications can call to access the Member facade. The methods transform the input into the format needed by the Member facade, for example an OAGIS BOD (Business Object Document).
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • REGISTER_ACTION_CODE

        public static final java.lang.String REGISTER_ACTION_CODE
        The register action code used when creating a new Person or Organization
        See Also:
        Constant Field Values
      • REGISTER_WITH_CHECKOUT_PROFILE_ACTION_CODE

        public static final java.lang.String REGISTER_WITH_CHECKOUT_PROFILE_ACTION_CODE
        The register action code used when creating a new Person along with a checkout profile.
        See Also:
        Constant Field Values
      • RESEND_EMAIL_ACTIVATION_ACTION_CODE

        public static final java.lang.String RESEND_EMAIL_ACTIVATION_ACTION_CODE
        The resend email activation action code used when resending the activation email to a user.
        See Also:
        Constant Field Values
      • CREATE_GUEST_ACTION_CODE

        public static final java.lang.String CREATE_GUEST_ACTION_CODE
        The create guest action code used when create a guest session.
        See Also:
        Constant Field Values
      • AUTHENTICATE_PASSWORD_ACTION_CODE

        public static final java.lang.String AUTHENTICATE_PASSWORD_ACTION_CODE
        The authenticate action code used when authenticating a Person using a password.
        See Also:
        Constant Field Values
      • LOGOUT_ACTION_CODE

        public static final java.lang.String LOGOUT_ACTION_CODE
        The logout action code used when ending a Person's session.
        See Also:
        Constant Field Values
      • AUTHENTICATE_LTPA_ACTION_CODE

        public static final java.lang.String AUTHENTICATE_LTPA_ACTION_CODE
        The authenticate action code used when authenticating a Person using a LTPA token value.
        See Also:
        Constant Field Values
      • AUTHENTICATE_WC_TOKENS_ACTION_CODE

        public static final java.lang.String AUTHENTICATE_WC_TOKENS_ACTION_CODE
        The authenticate action code used when authenticating a Person using WCToken and WCTrustedToken.
        See Also:
        Constant Field Values
      • UPDATE_ACTION_CODE

        public static final java.lang.String UPDATE_ACTION_CODE
        The update action code used when changing a Person or Organization
        See Also:
        Constant Field Values
      • UPDATE_WITH_CHECKOUT_PROFILE_ACTION_CODE

        public static final java.lang.String UPDATE_WITH_CHECKOUT_PROFILE_ACTION_CODE
        The update action code used when changing a person's profile and checkout profile
        See Also:
        Constant Field Values
      • CREATE_ACTION_CODE

        public static final java.lang.String CREATE_ACTION_CODE
        The create action code used when changing a Person or Organization
        See Also:
        Constant Field Values
      • DELETE_ACTION_CODE

        public static final java.lang.String DELETE_ACTION_CODE
        The delete action code used when changing a Person or Organization
        See Also:
        Constant Field Values
      • RESET_PASSWORD_ACTION_CODE

        public static final java.lang.String RESET_PASSWORD_ACTION_CODE
        The reset password action code used to reset a person's password
        See Also:
        Constant Field Values
      • PREVIEW_TOKEN_ACTION_CODE

        public static final java.lang.String PREVIEW_TOKEN_ACTION_CODE
        The preview token action code used to request a preview token based on preview and content properties
        See Also:
        Constant Field Values
      • CONTACT_INFO

        public static final int CONTACT_INFO
        Indicate the address parameters are for the contact information;
        See Also:
        Constant Field Values
      • CONTACT_ADDRESS_BOOK

        public static final int CONTACT_ADDRESS_BOOK
        Indicate the address parameters are for an address book contact
        See Also:
        Constant Field Values
      • CONTACT_CHECKOUT_PROFILE

        public static final int CONTACT_CHECKOUT_PROFILE
        Indicate the address parameters are for check out profile
        See Also:
        Constant Field Values
      • CONTEXT_ATTRIBUTE_DELETE

        public static final int CONTEXT_ATTRIBUTE_DELETE
        Indicate the address parameters are for check out profile
        See Also:
        Constant Field Values
    • Constructor Detail

      • MemberFacadeClient

        public MemberFacadeClient()
        Creates an instance of the client to communicate with the Member facade.
      • MemberFacadeClient

        public MemberFacadeClient(BusinessContextType businessContext,
                                  javax.security.auth.callback.CallbackHandler callbackHandler)
        Creates an instance of the client to communicate with the Member 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

      • updatePerson

        public java.util.Map updatePerson(java.util.Map parameters)
                                   throws PersonException
        Updates the profile of the person executing this method. Transforms the specified parameter input into the request document to peform ChangePerson with an action of Update and action expression of /Person. By default this service maps to the following command:
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. There are no mandatory parameters. The optional parameters can be found by looking at the online documentation for the following command:
        • UserRegistrationUpdate URL
        The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("gender", new String[]{"Female"});
          parameters.put("maritalStatus", new String[]{"Single"});
          parameters.put("city", new String[]{"Toronto"});
          parameters.put("JobFunction_" + 10001 + "_r_1", new String[]{"ProductManager"});
          parameters.put("JobFunction_" + 10001 + "_r_2", new String[]{"SalesManager"});
          parameters.put("JobFunction_" + "null" + "_r", new String[]{"TeamLead"}); //all stores
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • updatePersonWithCheckoutProfile

        public java.util.Map updatePersonWithCheckoutProfile(java.util.Map parameters)
                                                      throws PersonException
        Updates the profile and checkout profile of the person executing this method. Transforms the specified parameter input into the request document to peform ChangePerson with an action of UpdateWithCheckoutProfile and action expression of /Person. By default this service maps to the following commands:
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. There are no mandatory parameters. The optional parameters can be found by looking at the online documentation for the following commands:
        • UserRegistrationUpdate URL
        • OrderProfileUpdate URL
        The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("gender", new String[]{"Female"});
          parameters.put("maritalStatus", new String[]{"Single"});
          parameters.put("city", new String[]{"Toronto"});
          
          parameters.put("JobFunction_" + 10001 + "_r_1", new String[]{"ProductManager"});
          parameters.put("JobFunction_" + 10001 + "_r_2", new String[]{"SalesManager"});
          parameters.put("JobFunction_" + "null" + "_r", new String[]{"TeamLead"}); //all stores 
          
          parameters.put("pay_cardBrand",new String[]{"ABC"}); //Checkout profile data 
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • isPersonInMemberGroup

        public boolean isPersonInMemberGroup(java.lang.String astrPersonUniqueID,
                                             java.lang.String astrMemberGroupUniqueID)
                                      throws MemberGroupException
        Returns true if a person belongs to a member group; false otherwise. This takes into account implicit and explicit membership.
        Parameters:
        astrPersonUniqueID - The unique ID of the person
        astrMemberGroupUniqueID - The unique ID of the member group
        Returns:
        true if the person belongs to the member group; false otherwise
        Throws:
        MemberGroupException - The MemberGroupException is thrown if error information is found in the specified ShowMemberGroupDataArea. This will represent that there was a problem when performing the operation.
      • updateOrganization

        public java.util.Map updateOrganization(java.util.Map parameters)
                                         throws OrganizationException
        Updates an existing organization. Transforms the specified parameter input into the request document to peform ChangeOrganization with an action of Update and action expression of /Organization. By default this service maps to the following command: OrgEntityUpdateCmd
        Parameters:
        parameters - the map of String [] corresponding to the input parameters. The following are mandatory parameters: orgEntityId or distinguishedName. The optional parameters can be found by looking at the online documentation for OrgEntityUpdate URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("legalId", new String[]{"TSX-01789B"});
          parameters.put("city", new String[]{"Vancouver"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
          parameters.put("OrgEntityOwners_" + 10001 + "_r_1", new String[]{"Lee"});
          parameters.put("OrgEntityOwners_" + 10001 + "_r_2", new String[]{"Brown"});
          parameters.put("OrgEntityOwners_" + "null" + "_r", new String[]{"Martin"}); //all stores
         
        Returns:
        A map of String [] that contains the following response parameters: orgEntityId, addressId
        Throws:
        OrganizationException - if an exception occurs
      • addAddressForPerson

        public java.util.Map addAddressForPerson(java.util.Map parameters)
                                          throws PersonException
        Adds an address for an existing person. Transforms the specified parameter input into the request document to peform ChangePerson with an action of Create and action expression of /Person/AddressBook/Contact. By default this service maps to the following command: AddressAddCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: nickName and (userId OR distinguishedName) The optional parameters can be found by looking at the online documentation for AddressAdd URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("nickName", new String[]{"John"});
          parameters.put("userId", new String[]{"501"});
          parameters.put("city", new String[]{"Vancouver"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • addAddressForOrganization

        public java.util.Map addAddressForOrganization(java.util.Map parameters)
                                                throws OrganizationException
        Adds an address for an existing organization. Transforms the specified parameter input into the request document to peform ChangeOrganization with an action of Create and action expression of /Organization/AddressBook/Contact. By default this service calls the following command: AddressAddCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: nickName and (orgEntityId OR distinguishedName) The optional parameters can be found by looking at the online documentation for AddressAdd URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("nickName", new String[]{"John"});
          parameters.put("distinguishedName", new String[]{"o=org B,o=root organization"});
          parameters.put("city", new String[]{"Vancouver"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
         
        Returns:
        A map of String [] that contains the following response parameters: orgEntityId, addressId
        Throws:
        OrganizationException - if an exception occurs
      • deleteAddressForPerson

        public java.util.Map deleteAddressForPerson(java.util.Map parameters)
                                             throws PersonException
        Deletes an address of an existing person. Transforms the specified parameter input into the request document to peform ChangePerson with an action of Delete and action expression of /Person/AddressBook/Contact. By default this service calls the following command: AddressDeleteCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: addressId or (nickName and distinguishedName) The optional parameters can be found by looking at the online documentation for AddressDelete URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("nickName", new String[]{"Uncle"});
          parameters.put("distinguishedName", new String[]{"uid=jsmith,o=org a,o=root organization"});
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • deleteAddressForOrganization

        public java.util.Map deleteAddressForOrganization(java.util.Map parameters)
                                                   throws OrganizationException
        Deletes an address of an existing organization. Transforms the specified parameter input into the request document to peform ChangeOrganization with an action of Delete and action expression of /Organization/AddressBook/Contact. By default this service calls the following command: AddressDeleteCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: addressId or (nickName and distinguishedName) The optional parameters can be found by looking at the online documentation for AddressDelete URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("addressId", new String[]{"10002"});
         
        Returns:
        A map of String [] that contains the following response parameters: orgEntityId, addressId
        Throws:
        OrganizationException - if an exception occurs
      • deleteContextAttributeForPerson

        public java.util.Map deleteContextAttributeForPerson(java.util.Map parameters)
                                                      throws PersonException
        Deletes one or more context attributes of an existing person. Transforms the specified parameter input into the request document to perform ChangePerson with an action of Delete and action expression of /Person/ContextAttribute. By default this service calls the following command: UserRegistrationUpdateCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters using this format: attributeName_storeName_action_number=value. If the value is String[]{""}, all the values will be deleted for the attribute name in the specified store.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("JobFunction_10101_d_1", new String[]{"Manager"});
          
          Where: 
             10101 is the store ID.
             JobFunction is the name of the context attribute.
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • deleteContextAttributeForOrganization

        public java.util.Map deleteContextAttributeForOrganization(java.util.Map parameters)
                                                            throws OrganizationException
        Deletes one or more context attributes of an existing organization. Transforms the specified parameter input into the request document to peform ChangeOrganization with an action of Delete and action expression of /Organization/ContextAttribute. By default this service calls the following command: OrgEntityUpdateCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters using this format: attributeName_storeName_action_number=value. If the value is String[]{""}, all the values will be deleted for the attribute name in the specified store. The following are mandatory parameters: distinguishedName

        Code sample:
          Map parameters = new HashMap();
          parameters.put("OrgEntityOwners_10101_d_1", new String[]{"John"});
         
            Where:
              10101 is the store ID.
              OrgEntityOwners is the name of the context attribute.
         
        Returns:
        A map of String [] that contains the following response parameters: orgEntityId, addressId
        Throws:
        OrganizationException - if an exception occurs
      • updateAddressForPerson

        public java.util.Map updateAddressForPerson(java.util.Map parameters)
                                             throws PersonException
        Updates an address of an existing person. Transforms the specified parameter input into the request document to peform ChangePerson with an action of Update and action expression of /Person/AddressBook/Contact. By default this service calls the following command: AddressUpdateCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: addressId or (nickName and distinguishedName) or (nickName and userId). The optional parameters can be found by looking at the online documentation for AddressUpdate URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("nickName", new String[]{"Uncle"});
          parameters.put("distinguishedName", new String[]{"uid=jsmith,o=org a,o=root organization"});
                parameters.put("city", new String[]{"London"});
         
        Returns:
        A map of String [] that contains the following response parameters: userId, addressId
        Throws:
        PersonException - if an exception occurs
      • updateAddressForOrganization

        public java.util.Map updateAddressForOrganization(java.util.Map parameters)
                                                   throws OrganizationException
        Updates an address of an existing organization. Transforms the specified parameter input into the request document to peform ChangeOrganization with an action of Update and action expression of /Organization/AddressBook/Contact. By default this service calls the following command: AddressUpdateCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: addressId or (nickName and distinguishedName) or (nickName and orgEntityId). The optional parameters can be found by looking at the online documentation for AddressUpdate URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:
          Map parameters = new HashMap();
          parameters.put("addressId", new String[]{"10002"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
         
        Returns:
        A map of String [] that contains the following response parameters: orgEntityId, addressId
        Throws:
        OrganizationException - if an exception occurs
      • registerPerson

        public java.util.Map registerPerson(java.util.Map parameters)
                                     throws PersonException
        Registers a new person. Transforms the specified map of parameter into the request document to peform ProcessPerson with an action of Register. By default this service calls the following command:
        Parameters:
        parameters - The map of String [] corresponding to the input parameters.

        The following are mandatory parameters: logonId and logonPassword. logonPasswordVerify is not used.

        The optional parameters can be found by looking at the online documentation for UserRegistrationAdd URL.

        The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:

          Map parameters = new HashMap();
          parameters.put("logonId", new String[]{"newLogonId"});
          parameters.put("logonPassword", new String[]{"myNewPass1Word"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
          parameters.put("JobFunction_" + 10001 + "_r_1", new String[]{"ProductManager"});
          parameters.put("JobFunction_" + 10001 + "_r_2", new String[]{"SalesManager"});
          parameters.put("JobFunction_" + "null" + "_r", new String[]{"TeamLead"}); //all stores
         
        Returns:
        A map of String [] that contains the following response parameters: userId, distinguishedName, addressId, nickName. updatedUserId is also returned if registration is done using email activation, to signify that the session should run under the generic user ID after the registration is initially submitted.
        Throws:
        PersonException - if an exception occurs
      • registerPersonWithCheckoutProfile

        public java.util.Map registerPersonWithCheckoutProfile(java.util.Map parameters)
                                                        throws PersonException
        Registers a new person and creates a checkout profile for that person. Transforms the specified map of parameter into the request document to peform ProcessPerson with an action of RegisterWithCheckoutProfile. By default this service calls the following commands:
        Parameters:
        parameters - The map of String [] corresponding to the input parameters.

        The following are mandatory parameters: logonId and logonPassword. logonPasswordVerify is not used.

        The optional parameters can be found by looking at the online documentation for "UserRegistrationAdd URL" or "OrderProfileUpdate URL".

        The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

        Code sample:

          Map parameters = new HashMap();
          parameters.put("logonId", new String[]{"newLogonId"});
          parameters.put("logonPassword", new String[]{"myNewPass1Word"});
          parameters.put("addressType", new String[]{"ShippingAndBilling"});
          
          parameters.put("JobFunction_" + 10001 + "_r_1", new String[]{"ProductManager"});
          parameters.put("JobFunction_" + 10001 + "_r_2", new String[]{"SalesManager"});
          parameters.put("JobFunction_" + "null" + "_r", new String[]{"TeamLead"}); //all stores 
          
          parameters.put("pay_cardBrand",new String[]{"ABC"}); //Checkout profile data 
         
        Returns:
        A map of String [] that contains the following response parameters: userId, distinguishedName, addressId, nickName
        Throws:
        PersonException - if an exception occurs
      • createGuest

        public java.util.Map createGuest(java.util.Map parameters)
                                  throws PersonException
        Creates an guest person session that can be used for subsequent services that required some user identity.

        Performs ProcessPerson with an action of CreateGuest.

        Parameters:
        parameters - The map of String [] corresponding to the input parameters. By default there are no input parameters.
        Returns:
        A map of String [] that contains the following response parameters: userId, identityTokenID and identityTokenSignature . The identityTokenID and identityTokenSignature can be used in conjunction with IdentityTokenCallbackHandlerImpl to make subsequent requests using the guest person session that was just created. For example, the following code demonstrates how to create a guest person and then add an address while running as that new guest person:
                                BusinessContextType businessContext = CommerceFoundationFactory.eINSTANCE.createBusinessContextType();
                                ContextDataType storeId = CommerceFoundationFactory.eINSTANCE.createContextDataType();
                                storeId.setName("storeId");
                                storeId.setValue("10101);
                                businessContext.getContextData().add(storeId);
                                
                                MemberFacadeClient client = new MemberFacadeClient(businessContext, null);
                                Map request = new HashMap();
                                
                                Map response = client.createGuest(request);
                                
                                String[] userId = (String[]) response.get("userId");
                                String[] identityTokenId = (String[]) response.get("identityTokenID");
                                String[] identityTokenSignature = (String[]) response.get("identityTokenSignature");
                                
                                com.ibm.commerce.foundation.common.security.auth.callback.handler.IdentityTokenCallbackHandlerImpl sessionHandler = 
                                        new com.ibm.commerce.foundation.common.security.auth.callback.handler.IdentityTokenCallbackHandlerImpl(
                                                identityTokenId[0],identityTokenSignature[0]);
                                                
                                client = new MemberFacadeClient(businessContext, sessionHandler);
                                
                                request = new HashMap();
                                request.put("userId", userId);
                                request.put("nickName", new String[]{ "jsmith" });
                                request.put("city", new String[]{ "Toronto" } );
                                request.put("email1", new String[]{ "jsmith@email.com" });
                                
                                response = client.addAddressForPerson(request);
              
        Throws:
        PersonException
      • authenticatePassword

        public java.util.Map authenticatePassword(java.util.Map parameters)
                                           throws PersonException
        Authenticates a person based on the following criteria: logon ID and password.
        The identity of the previous person prior to authenticating is determined based on the IdentityToken that is in the header. If the previous person is a guest, then any resoures owned by the guest are migrated to the authenticated person. The specified map of parameters is transformed into a request document to peform ProcessPerson with an action of AuthenticatePassword. By default this service calls the following command: LogonServiceCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters.
        The following parameters are mandatory:
        • logonId: The logon ID.
        • logonPassword: The password.
        The following parameters are needed if the current password is expired:
        • logonPasswordNew: The new password.
        • logonPasswordVerify: Verification of the new password.
        Code sample:
          Map parameters = new HashMap();
          parameters.put("logonId", new String[]{"newLogonId"});
          parameters.put("logonPassword", new String[]{"myNewPass1Word"});
         
        Returns:
        A map of String [] that contains the following response parameters: userId, identityTokenID and identityTokenSignature
        Throws:
        PersonException - if an exception occurs. A detailed list of the error codes can be found by looking at the online documentation for Logon URL.
      • logout

        public java.util.Map logout(java.util.Map parameters)
                             throws PersonException
        Ends the session of the person based on the current identity token that is in the header.

        Performs ProcessPerson with an action of Logout. By default this service calls the following command: LogoffCmd

        Parameters:
        parameters - The map of String [] corresponding to the input parameters. By default there are no input parameters.
        Returns:
        A map of String [] that contains the following response parameters:
        • userId: The person after the session has ended.
        Throws:
        PersonException - if an exception occurs
      • authenticateLTPA

        public java.util.Map authenticateLTPA(java.util.Map parameters)
                                       throws PersonException
        This method authenticates a person using an LTPA token value.
        The identity of the previous person prior to authenticating is deterimined based on the IdentityToken that is in the header. If the previous person was a guest, then any resoures that were owned by the guest would be migrated to the authenticated person. The specified map of parameters is transformed into a request document to peform ProcessPerson with an action of AuthenticateLTPA. By default this service calls the following command: LTPAAuthenticationServiceCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: LTPAToken.

        Code sample:
            Map parameters = new HashMap();
            parameters.put("LTPAToken", new String[]{"abc123defg456hij"});
           
        Returns:
        A map of String [] that contains the following response parameters: userId, logonId, identityTokenID, identityTokenSignature
        Throws:
        PersonException - if an exception occurs. If LTPAToken parameter is missing, the error code is 2160.
      • authenticateWCTokens

        public java.util.Map authenticateWCTokens(java.util.Map parameters)
                                           throws PersonException
        This method authenticates a person using WC token and WC trusted tokens.
        The specified map of parameters is transformed into a request document to peform ProcessPerson with an action of AuthenticateWCTokens. By default this service calls the following command: WCTokensAuthenticationServiceCmd
        Parameters:
        parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: WCToken, WCTrustedToken.

        Code sample:
           Map parameters = new HashMap();
           parameters.put("WCToken", new String[]{"abc123defg456hij"});
           parameters.put("WCTrustedToken", new String[]{"abc123defg456hij"});
           
        Returns:
        A map of String [] that contains the following response parameters: userId, logonId, identityTokenID, identityTokenSignature
        Throws:
        PersonException - if an exception occurs. If WCToken or WCTrustedToken parameter is missing, the error codes are 2560 and 2570, respectively.
      • resetPassword

        public java.util.Map resetPassword(java.util.Map parameters)
                                    throws PersonException
        Resets a person's password. There are two high-level scenarios that are supported:

        1) While unauthenticated: A registered person has forgotten his/her password, so the person cannot logon. In this scenario, they would need to provide the logonId and challengeAnswer, and then:
        a) A temporary password is generated and emailed to the person.

        OR

        b) Two-step process: Beginning in 7.0.0.9, the CMDREG.PROPERTIES of ResetPasswordGuestCmd can be updated to include inSessionValidationCode=true to enable the following flow:

      • i) [7.0.0.9+] A validation code can be emailed to the person, which must be specified to update the password.
      • ii)[7.0.0.9+] The validation code, along with a new password, and verification of the new password are subsequently specified in the same session, to update the password.
        2) While authenticated: A registered person decides to change his/her password. In this case, the person first logs on, then provides the old password, the new password and verification of the new password.

        This method peforms ProcessPerson BOD with an action of ResetPassword. By default this service calls the following command: ResetPasswordCmd

Parameters:
parameters - The input parameters. The values should be specified within the following structure: String[]. The required parameters are as follows:
  • While unauthenticated:
    • (First request): logonId, challengeAnswer
    • (Second request): [7.0.0.9+]: validationCode, logonPassword, logonPasswordVerify
  • While authenticated:
    • logonPasswordOld, logonPassword, logonPasswordVerify
Returns:
A map of String [] that contains the following response parameters: userId
Throws:
PersonException - if an exception occurs
  • createPreviewToken

    public java.util.Map createPreviewToken(java.util.Map parameters)
                                     throws PersonException
    Generate a preview token based on the following criteria: start time, time zone ID, status (rolling/static), inventory status (0/1/-1), the list of customer segments to be included, the workspace ID, the task group ID, task ID and token life.
    The specified map of parameters is transformed into a request document to peform ProcessPerson with an action of PreviewToken. By default this service calls the following command: PreviewTokenServiceCmd
    Parameters:
    parameters - The map of String [] corresponding to the input parameters. Code sample:
      Map parameters = new HashMap();
      parameters.put("start", new String[]{"myStart"});
      parameters.put("timeZoneId", new String[]{"myTimeZoneId"});
      parameters.put("status", new String[]{"myStatus"});
      parameters.put("invstatus", new String[]{"myInvstatus"});
      parameters.put("includedMemberGroupIds", new String[]{"myIncludedMemberGroupIds"});
      parameters.put("workspaceId", new String[]{"myWorkspaceId"});
      parameters.put("taskGroupId", new String[]{"myTaskGroupId"});
      parameters.put("taskId", new String[]{"myTaskId"});
      parameters.put("tokenLife", new String[]{"myTokenLife"});
     
    Returns:
    A map of String [] that contains the following response parameter: previewToken
    Throws:
    PersonException - if an exception occurs.
  • registerOrganization

    public java.util.Map registerOrganization(java.util.Map parameters)
                                       throws OrganizationException
    Registers a new organization. Transforms the specified parameter input into the request document to peform ProcessOrganization with an action of Register. By default this service calls the following command: OrgEntityAddCmd
    Parameters:
    parameters - The map of String [] corresponding to the input parameters. The following are mandatory parameters: orgEntityName and orgEntityType. parentMemberId or parentDN is required if orgEntityType is specified to be OrganizationUnit. The optional parameters can be found by looking at the online documentation for OrgEntityAdd URL. The allowed values should be specified in the expanded format rather than the abbreviated format. For example, addressType accepts the following expanded values: Shipping, Billing and ShippingAndBilling rather than S, B and SB. The mapping of abbreviated to expanded values is stored in the following file: WC_eardir/xml/config/com.ibm.commerce.member/wc-component.xml.

    Code sample:
      Map parameters = new HashMap();
      parameters.put("orgEntityName", new String[]{"newOrgName"});
      parameters.put("orgEntityType", new String[]{"OrganizationUnit"});
      parameters.put("addressType", new String[]{"ShippingAndBilling"});
      parameters.put("OrgEntityOwners_" + 10001 + "_r_1", new String[]{"Lee"});
      parameters.put("OrgEntityOwners_" + 10001 + "_r_2", new String[]{"Brown"});
      parameters.put("OrgEntityOwners_" + "null" + "_r", new String[]{"Martin"}); //all stores
     
    Returns:
    A map of String [] that contains the following response parameters: orgEntityId, distinguishedName, addressId, nickName
    Throws:
    OrganizationException - if an exception occurs
  • updateCheckoutProfile

    public java.util.Map updateCheckoutProfile(java.util.Map parameters)
                                        throws PersonException
    Updates the check out profile of the person executing this method. Transforms the specified parameter input into the request document to perform ChangePerson with an action of Update and action expression of /Person/CheckoutProfile. By default this service maps to the following command: OrderProfileUpdateCmd
    Parameters:
    parameters - The map of String [] corresponding to the input parameters. There are no mandatory parameters. The optional parameters can be found by looking at the online documentation for OrderProfileUpdate URL. Code sample:
     Map checkoutProfileInfo = new HashMap();
     checkoutProfileInfo.put("shipModeId", new String[] { "10104" });
    
     checkoutProfileInfo.put("billing_nickName", new String[] { "Default_Billing_10101" });
     checkoutProfileInfo.put("billing_address1", new String[] { "7 Elm St." });
     checkoutProfileInfo.put("billing_city", new String[] { "North York" });
     checkoutProfileInfo.put("billing_state", new String[] { "Ontario" });
     checkoutProfileInfo.put("billing_country", new String[] { "Canada" });
     checkoutProfileInfo.put("billing_zipCode", new String[] { "M6A3E1" });
     checkoutProfileInfo.put("billing_lastName", new String[] { "Lee" });
    
     checkoutProfileInfo.put("shipping_nickName", new String[] { "Default_Shipping_10101" });
     checkoutProfileInfo.put("shipping_address1", new String[] { "7 Elm St." });
     checkoutProfileInfo.put("shipping_city", new String[] { "Toronto" });
     checkoutProfileInfo.put("shipping_state", new String[] { "Ontario" });
     checkoutProfileInfo.put("shipping_country", new String[] { "Canada" });
     checkoutProfileInfo.put("shipping_zipCode", new String[] { "M4M2T1" });
     checkoutProfileInfo.put("shipping_lastName", new String[] { "Lee" });
    
     checkoutProfileInfo.put("pay_cardBrand", new String[] { "Visa" });
     checkoutProfileInfo.put("pay_cardNumber", new String[] { "12312345937438" });
     checkoutProfileInfo.put("pay_cardExpiryMonth", new String[] { "12" });
     checkoutProfileInfo.put("pay_cardExpiryYear", new String[] { "2008" });
     checkoutProfileInfo.put("pay_account", new String[] { "12312345937438" });
     checkoutProfileInfo.put("pay_cc_cvc", new String[] { "1234" });
     
    Returns:
    A map of String [] that contains the following response parameters: userId
    Throws:
    PersonException - if an exception occurs
  • resendEmailActivation

    public java.util.Map resendEmailActivation(java.util.Map parameters)
                                        throws PersonException
    Re-sends the account activation e-mail to the user. Transforms the specified map of parameter into the request document to peform ProcessPerson with an action of ResendEmailActivation. This functionality requires the installation of a WebSphere Commerce Version 7 Feature Pack. This service calls the following command by default: UserRegistrationEmailActivateResendCmd
    Parameters:
    parameters - The map of String [] corresponding to the input parameters.

    The following are mandatory parameters: logonId and logonPassword The email1 parameter is optional. Code sample:

      Map parameters = new HashMap();
    parameters.put("logonId", new String[]{"xxxxx"}); parameters.put("logonPassword", new String[]{"xxxxx"});
    Returns:
    A map of String [] that contains the following response parameters: userId
    Throws:
    PersonException - if an exception occurs