com.ibm.commerce.usermanagement.commands
Interface AddressAddCmd
- All Known Implementing Classes:
- AddressAddCmdImpl
- public interface AddressAddCmd
This command adds a new address entry for a user, organization or organizational unit.
The information of the address is stored in the ADDRBOOK and ADDRESS tables.
Use this command with SSL (Secure Sockets Layer) to ensure that the information are encrypted.
To do so type the command with the HTTPS secure protocol.
The parameters URL and nickName are mandatory. The rest of the parameters are all optional.
Behavior
- Calls an empty task command PreAddressAddCmd. Store Developers can overwrite it change the input to the command.
- memberId is used to specified whom this address will be created for. If memberId is not specified,
default is current user (the user who is logging on).
- For each address type, there can be zero or one primary address (primary field equals to 1).
If the new address is primary, then this command will change the existing primary in this address
type to not-primary.
- Check the required parameters.
- If primary is not specified, the default value is 0 (not primary).
- If addressType is not specified, the default value is 'SB'(ShippingBilling Address)
- Check whether the specified nickname is already in use for this member.
- Call a task command AuditAddressCmd to perform additional parameter checking.
Store Developers need to add new code to AuditAddressCmd task command if they want to customerizable check.
- Create an new address in the ADDRESS table.
- If the member does not have an address book, then a new record is created in the ADDRBOOK
table.
- If the command fails, the AddressErrorView view command is called. Upon successful completion, the specified URL is called.
- Calls an empty task command PostAddressAddCmd. Store Developers can overwrite it to perform additional operations.
Exception Conditions
- URL is null (_ERR_CMD_MISSING_PARAM).
- The length of URL length equals 0 (_ERR_CMD_INVALID_PARAM).
- nickName is null (_ERR_CMD_MISSING_PARAM).
- The length of nickName equals 0 (_ERR_CMD_INVALID_PARAM).
- nickName already exists in address book (_ERR_NICKNAME_ALREDY_EXIST).
- primary is not null and not equal to 0 or 1 (_ERR_CMD_INVALID_PARAM).
- publishPhone1, publishPhone2, and packageSupression is not null and not an integer (_ERR_CMD_INVALID_PARAM).
Field Summary |
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
NAME
|
Method Summary |
void |
setMemberId(java.lang.String astrMemberId)
Sets the memberId of the member to add address for. |
COPYRIGHT
public static final java.lang.String COPYRIGHT
NAME
public static final java.lang.String NAME
setMemberId
public void setMemberId(java.lang.String astrMemberId)
- Sets the memberId of the member to add address for.
- Parameters:
astrMemberId
- The memberId.