Member component client library

The member client library class, MemberFacadeClient, contains Web-friendly methods to facilitate calling various operations.

The member component client library is contained in the com.ibm.commerce.member.facade.client package.

The following is a mapping for the MemberFacadeClient methods and the corresponding URL commands:
  • Map registerPerson(Map) - UserRegistrationAdd
  • Map updatePerson(Map) - UserRegistrationUpdate
  • Map addAddressForPerson(Map) - AddressAdd
  • Map updateAddressForPerson(Map) - AddressUpdate
  • Map deleteAddressForPerson(Map) - AddressDelete
  • Map registerOrganization(Map) - OrgEntityAdd
  • Map updateOrganization(Map) - OrgEntityUpdate
  • Map addAddressForOrganization(Map) - AddressAdd
  • Map updateAddressForOrganization(Map) - AddressUpdate
  • Map deleteAddressForOrganization(Map) - AddressDelete
Note: The client-friendly URL methods contain built-in support for user data to pass additional parameters to the controller command. This requires extending the client library and the controller command.

From the server-side access to the Member component facade is facilitated through the member facade.

Client errors

The ClientErrors shown in the following sections, defined in MemberFacadeConstants.java, are part of a PersonException or OrganizationException if invalid data is supplied, when making a request using the Map methods of MemberFacadeClient. These errors occur when the noun SDO object cannot be formed due to the invalid input data. For example, /Person/@passwordExpired is a Boolean type, which is expecting the values "true" or "false". If any other value is given, a PersonException will be thrown, which contains the ClientError of "INVALID_PARAMETER_PASSWORD_EXPIRED".

Apart from these new ClientErrors, the standard exceptions and error codes that are thrown by the underlying member commands, for example UserRegistrationAdd, will continue to be passed back to the Client in the ChangeStatus element of the response from the server, and will be available in the client exception.

Person


/**
* The value specified for /Person/@passwordExpired is invalid
*/
public static final String INVALID_PARAMETER_PASSWORD_EXPIRED =
"INVALID_PARAMETER_PASSWORD_EXPIRED";

/**
* The value specified for
/Person/PersonalProfile/ReceiveEmailPreference/Value is invalid
*/
public static final String INVALID_PARAMETER_RECEIVE_EMAIL =
"INVALID_PARAMETER_RECEIVE_EMAIL";

/**
* The value specified for /Person/@profileType is invalid
*/
public static final String INVALID_PARAMETER_PROFILE_TYPE =
"INVALID_PARAMETER_PROFILE_TYPE";

/**
* The value specified for /Person/@accountStatus is invalid
*/
public static final String INVALID_PARAMETER_ACCOUNT_STATUS =
"INVALID_PARAMETER_ACCOUNT_STATUS";

/**
* The value specified for /Person/PersonalProfile/Gender is invalid
*/
public static final String INVALID_PARAMETER_GENDER =
"INVALID_PARAMETER_GENDER";

Organization


/**
* The value specified for /Organization/@type is invalid
*/
public static final String INVALID_PARAMETER_ORGENTITY_TYPE =
"INVALID_PARAMETER_ORGENTITY_TYPE";

Common to Person and Organization:


/**
* The value specified for /../Telephone1/@publish is invalid
*/
public static final String INVALID_PARAMETER_PUBLISH_PHONE_1 =
"INVALID_PARAMETER_PUBLISH_PHONE_1";

/**
* The value specified for /../Telephone2/@publish is invalid
*/
public static final String INVALID_PARAMETER_PUBLISH_PHONE_2 =
"INVALID_PARAMETER_PUBLISH_PHONE_2";

/**
* The value specified for
/../ContactInfo/Attributes/packageSuppression is invalid
*/
public static final String INVALID_PARAMETER_PACKAGE_SUPPRESSION =
"INVALID_PARAMETER_PACKAGE_SUPPRESSION";

/**
* The value specified for /../ContactInfo/Address/@primary is
invalid
*/
public static final String INVALID_PARAMETER_PRIMARY =
"INVALID_PARAMETER_PRIMARY";