com.ibm.commerce.user.beans
Class AddressBookDataBean

java.lang.Object
  |
  +--com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean
        |
        +--com.ibm.commerce.user.objects.AddressBookAccessBean
              |
              +--com.ibm.commerce.user.beans.AddressBookDataBean
All Implemented Interfaces:
AddressBookAccessBeanData

public class AddressBookDataBean
extends AddressBookAccessBean

The bean representing the address book information of a member.

The AddressBookAccessBean will automatially get userId from commandContext. Users can use getAddressList() method to return a list of all addresses belong to this user getAddressBookProperties() method returns a hashtable containing the information in the AddressBook property file.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The full qualified name of this class.
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Constructor Summary
AddressBookDataBean()
          AddressBookDataBean default constructor.
 
Method Summary
 java.util.Enumeration getAddressAccessBeans()
          Gets a enumeration of all AddresseAccessBeans belong to this customer.
  AddressAccessBean[] getAddressAccessBeansList()
          Return a Address AccessBean array which contains all Address Accessbeans belong to this customer.
 java.lang.String[][] getAddressList()
          Return a two dimensions array which contains all addresses belong to this customer First column: Address Ids Second column: Address Nicknames + address type + * (if this address is primary)
  CommandContext getCommandContext()
          Returns the command's context within this bean.
 com.ibm.commerce.security.Protectable getDelegate()
          Returns the Protectable object whose access control policies will indirectly control the access control for this object
  TypedProperty getRequestProperties()
          Returns the request properties within this bean.
 java.lang.String getStoreDirectory()
          Gets the name of the store directory, which is used in getUserRegistrationProperties 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 to this bean.
 void setMemberId(java.lang.Long anMemberId)
          Sets the MemberId for the UserBookDataBean.
 void setMemberId(java.lang.String astrMemberId)
          Sets the MemberId for the UserRegistrationDataBean.
 void setRequestProperties( TypedProperty areqParms)
          Sets the request properties to this bean.
 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 getAddressBookProperties method.
 void setUserId(java.lang.Long anMemberId)
          Sets the UserId for the UserBookDataBean.
 void setUserId(java.lang.String astrMemberId)
          Sets the UserId for the UserRegistrationDataBean.
 
Methods inherited from class com.ibm.commerce.user.objects. AddressBookAccessBean
commitCopyHelper, defaultJNDIName, findByMemberId, getAddressBookId, getAddressBookIdInEJBType, getDescription, getDisplayName, getMemberId, getMemberIdInEJBType, getType, instantiateEJB, instantiateEJBByPrimaryKey, refreshCopyHelper, setDescription, setDisplayName, setInitKey_AddressBookId, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
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 full qualified name of this class.
See Also:
Constant Field Values
Constructor Detail

AddressBookDataBean

public AddressBookDataBean()
AddressBookDataBean default constructor.
Method Detail

getAddressAccessBeans

public java.util.Enumeration getAddressAccessBeans()
Gets a enumeration of all AddresseAccessBeans belong to this customer.
Returns:
A enumeration of all AddresseAccessBeans belong to this customer

getAddressList

public java.lang.String[][] getAddressList()
Return a two dimensions array which contains all addresses belong to this customer First column: Address Ids Second column: Address Nicknames + address type + * (if this address is primary)
Returns:
String[][] Address list array

getCommandContext

public CommandContext getCommandContext()
Returns the command's context within this bean.
Returns:
com.ibm.commerce.command.CommandContext

getDelegate

public com.ibm.commerce.security.Protectable getDelegate()
                                                  throws java.lang.Exception
Returns the Protectable object whose access control policies will indirectly control the access control for this object
Returns:
The Protectable object whose access control policies will indirectly control the access control for this object
Throws:
java.lang.Exception

getRequestProperties

public TypedProperty getRequestProperties()
Returns the request properties within this bean.
Returns:
com.ibm.commerce.datatype.TypedProperty

getStoreDirectory

public java.lang.String getStoreDirectory()
Gets the name of the store directory, which is used in getUserRegistrationProperties for the path to the property file.
Returns:
The name of the store directory

populate

public void populate()
              throws java.lang.Exception
Fetches and populates information needed by the bean.
Throws:
java.lang.Exception - Any exception thrown during populating.

setCommandContext

public void setCommandContext(CommandContext acommandContext)
Sets the command context to this bean.

setMemberId

public void setMemberId(java.lang.Long anMemberId)
Sets the MemberId for the UserBookDataBean. If the MemberId is not set, UserBookDataBean will get from commandContext.
Overrides:
setMemberId in class AddressBookAccessBean
Parameters:
anMemberId - The User Id
Returns:
void

setMemberId

public void setMemberId(java.lang.String astrMemberId)
Sets the MemberId for the UserRegistrationDataBean. If the MemberId is not set, UserRegistrationDataBean will get from commandContext.
Specified by:
setMemberId in interface AddressBookAccessBeanData
Overrides:
setMemberId in class AddressBookAccessBean
Parameters:
astrMemberId - The User Id
Returns:
void

setRequestProperties

public void setRequestProperties(TypedProperty areqParms)
Sets the request properties to this bean.
Parameters:
areqParms - com.ibm.commerce.datatype.TypedProperty

setStoreDirectory

public 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 getAddressBookProperties method.
Parameters:
astrStoreDirectory - The name of store directory

setUserId

public void setUserId(java.lang.Long anMemberId)
Sets the UserId for the UserBookDataBean. If the UserId is not set, UserBookDataBean will get from commandContext.

setUserId

public void setUserId(java.lang.String astrMemberId)
Sets the UserId for the UserRegistrationDataBean. If the UserId is not set, UserRegistrationDataBean will get from commandContext.

getAddressAccessBeansList

public AddressAccessBean[] getAddressAccessBeansList()
Return a Address AccessBean array which contains all Address Accessbeans belong to this customer.
Returns:
AddressAccessBean[] An Address AccessBean array which contains all Address Accessbeans belong to this customer.