com.ibm.commerce.usermanagement.commands
Class AddressAddCmdImpl
java.lang.Object
AddressBaseCmdImpl
com.ibm.commerce.usermanagement.commands.AddressAddCmdImpl
- All Implemented Interfaces:
- AddressAddCmd
- public class AddressAddCmdImpl
- extends AddressBaseCmdImpl
- implements 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).
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
CLASSNAME
The name of the class. |
static java.lang.String |
COPYRIGHT
IBM Copyright notice field. |
Fields inherited from interface com.ibm.commerce.usermanagement.commands.AddressAddCmd |
NAME |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM Copyright notice field.
- See Also:
- Constant Field Values
CLASSNAME
public static final java.lang.String CLASSNAME
- The name of the class.
- See Also:
- Constant Field Values
AddressAddCmdImpl
public AddressAddCmdImpl()
setRequestProperties
public void setRequestProperties(TypedProperty reqProperties)
throws ECApplicationException
- Sets the properties of the command. This is done by executing the PreAddresAddCmd.
-
- Throws:
- ECApplicationException - if there is a problem executing the PreAddressAddCmd to extract the comand properties.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.