public class AddressBookDataBean extends AddressBookAccessBean implements com.ibm.commerce.user.beans.AddressBookInputDataBean, com.ibm.commerce.user.beans.AddressBookSmartDataBean, Delegator
The AddressBookAccessBean will automatically get userId from commandContext. Users can use the getAddressList() method to get a list of all the addresses that belong to this user. The getAddressBookProperties() method returns a hashtable containing the information in the AddressBook property file.
Usage:For example: AddressBookDataBean dbAddressBook = new AddressBookDataBean(); dbAddressBook.setCommandContext(commandContext); // optional dbAddressBook.setMemberId(strMemberId); OR dbAddressBook.setUserId(strUserId);Note that the setMemberId()/setUserId() method will always override the userId in the command context.
example: to get the list of AddressDataBeans for this member AddressDataBean[] arrAddressBeans = dbAddressBook.getAddressDataBeansList(); example: to get the list of addressId/nickname pairs dbAddressBook.populate(); String[][] arrAddressList = dbAddressBook.getAddressList();
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASSNAME
The fully qualified name of this class.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
AddressBookDataBean()
AddressBookDataBean default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Enumeration | getAddressAccessBeans()
Gets an Enumeration of all AddressAccessBeans belonging to this member.
|
AddressAccessBean[] | getAddressAccessBeansList()
Returns an AddressAccessBean array which contains all AddressAccessbeans belonging to this member.
|
AddressDataBean[] | getAddressDataBeansList()
Returns an AddressDataBeanarray which contains all AddressDatabeans that belong to this member.
|
java.lang.String[][] | getAddressList()
Returns a two dimensional array which contains all addresses belonging to this member.
First column of the array: Address Ids Second column of the array: Address Nicknames + address type + * (if this address is primary) |
CommandContext | getCommandContext()
Returns the command's context within this bean.
|
Protectable | getDelegate()
Returns the Protectable object whose access control policies will indirectly control the access control for this object
|
int | getNumberOfAddresses()
Returns the number of addresses in the address book
|
TypedProperty | getRequestProperties()
Returns the request properties.
|
java.lang.String | getStoreDirectory()
Gets the name of the store directory, which is used in the getUserRegistrationProperties() method for the path to the property file.
|
void | populate()
Fetches and populates information needed by the bean.
|
void | setCommandContext(CommandContext acommandContext)
Sets the command context.
|
void | setMemberId(java.lang.Long anMemberId)
Sets the MemberId.
|
void | setMemberId(java.lang.String astrMemberId)
Sets the MemberId.
|
void | setRequestProperties(TypedProperty requestProperties)
Sets the request properties.
|
void | setStoreDirectory(java.lang.String astrStoreDirectory)
Sets the name of store directory, which is used as the path to the find the property file in the getAddressBookProperties() method.
|
void | setUserId(java.lang.Long anUserId)
Sets the UserId.
|
void | setUserId(java.lang.String astrUserId)
Sets the UserId.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public AddressBookDataBean()
public java.util.Enumeration getAddressAccessBeans()
public java.lang.String[][] getAddressList()
public CommandContext getCommandContext()
public Protectable getDelegate() throws java.lang.Exception
public TypedProperty getRequestProperties()
public java.lang.String getStoreDirectory()
public void populate() throws java.lang.Exception
public void setCommandContext(CommandContext acommandContext)
public void setMemberId(java.lang.Long anMemberId)
public void setMemberId(java.lang.String astrMemberId)
public void setRequestProperties(TypedProperty requestProperties)
public void setStoreDirectory(java.lang.String astrStoreDirectory)
public void setUserId(java.lang.Long anUserId)
public void setUserId(java.lang.String astrUserId)
public AddressAccessBean[] getAddressAccessBeansList()
public AddressDataBean[] getAddressDataBeansList()
public int getNumberOfAddresses()