com.ibm.commerce.user.beans
Class UserDataBean
- java.lang.Object
-
- com.ibm.commerce.persistence.AbstractJpaEntityAccessBean
-
- com.ibm.commerce.user.objects.UserAccessBean
-
- com.ibm.commerce.user.beansrc.UserDataBeanBase
-
- com.ibm.commerce.user.beans.UserDataBean
-
- All Implemented Interfaces:
- DataBean, InputDataBean, SmartDataBean, Groupable, Delegator, Protectable, com.ibm.commerce.user.beans.UserInputDataBean, com.ibm.commerce.user.beans.UserSmartDataBean, java.io.Serializable
public class UserDataBean extends com.ibm.commerce.user.beansrc.UserDataBeanBase implements com.ibm.commerce.user.beans.UserInputDataBean, com.ibm.commerce.user.beans.UserSmartDataBean
Data bean which wraps the UserAccessBean, to be used for displaying user information in JSP files.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM copyright notice field.-
Fields inherited from interface com.ibm.commerce.beans.DataBean
emptyString
-
-
Constructor Summary
Constructors Constructor and Description UserDataBean()
Default constructorUserDataBean(UserAccessBean aabUser)
Constructs an UserDataBean from an UserAccessBean.UserDataBean(UserAccessBean aabUser, CommandContext aCommandContext)
Constructs an UserDataBean from an UserAccessBean and commandContext
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static void
clearTransactionCachedUserDataBeans()
boolean
fulfills(java.lang.Long member, java.lang.String relationship)
An access control method used to determine if a given member fulfills a given relationship with the user resource.java.lang.String
getAccountStatus()
Get the user's account statusCommandContext
getCommandContext()
Gets the command context set within this bean.java.lang.String
getDataBeanKeyMemberId()
Gets the key (user id) of this data bean.java.lang.String
getFirstName()
Get the user's firstnamejava.lang.String
getLastName()
Get the user's lastnamejava.lang.String
getLogonId()
Get the user's logon idTypedProperty
getRequestProperties()
Gets the request property set within this bean.static UserDataBean
getTransactionCachedUserDataBean(java.lang.String astrUserId, CommandContext aCommandContext)
Returns an UserDataBean from the transaction cache, or, if it is not there, then creates a new UserDataBean, and places it in the transaction cache.static UserDataBean
getTransactionCachedUserDataBean(UserAccessBean aUserAB, CommandContext aCommandContext)
Returns an UserDataBean from the transaction cache, or, if it is not there, then creates a new UserDataBean, and places it in the transaction cache.void
populate()
Retrieves data from the database.void
setCommandContext(CommandContext aCommandContext)
Sets the command context within this bean.void
setDataBeanKeyMemberId(java.lang.String aMemberId)
Sets the key(member id) of this data bean.void
setRequestProperties(TypedProperty aRequestProperty)
Sets the request property within this bean.-
Methods inherited from class com.ibm.commerce.user.objects.UserAccessBean
addAddress, addBusinessProfile, addDemographics, addUserProfile, addUserRegistry, findAccessGroupOwner, findAdministrators, findAllRegistered, findByDN, findByDNNoCache, findByUniqueIdentifier, findByUniqueIdentifierNoCache, findRegisteredUserByPersonalizationId, findRegisteredUserByPersonalizationIdNoCache, findUserIdsByPersonalizationId, findUserIdsByPersonalizationIdNoCache, findUsersByPersonalizationId, findUsersByPersonalizationIdNoCache, findUsersForAdminByLogonIdAndCriteria, findUsersForAdminByLogonIdAndCriteria, getAddress, getAllStoreGroupMembers, getAncestors, getBusinessProfile, getChildren, getDemographics, getDescendants, getDisplayName, getDistinguishedName, getEntity, getGroupingAttributeValue, getLastOrder, getLastOrderInEntityType, getLastSession, getLastSessionInEntityType, getMemberGroups, getMemberId, getMemberIdInEntityType, getOwnedMemberGroups, getOwner, getParentMemberId, getPersonalizationId, getPreferredCurrency, getPreferredLanguageId, getPreferredLanguageIdInEntityType, getPreviousLastSession, getPreviousLastSessionInEntityType, getPrimaryAddress, getProfileType, getRegisterType, getRegistration, getRegistrationCancel, getRegistrationCancelInEntityType, getRegistrationInEntityType, getRegistrationUpdate, getRegistrationUpdateInEntityType, getRoles, getRoles, getRolesForOrgEntityAndAncestors, getState, getStateInEntityType, getType, getUserField1, getUserField2, getUserField3, getUserId, getUserIdInEntityType, getUserProfile, getUserRegistry, instantiateEntity, isAdministrator, isAdministratorForAllStores, isRoleForAllStores, isSiteAdministrator, isStoreAdministrator, setDistinguishedName, setInitKey_memberId, setInitKey_memberId, setLastOrder, setLastOrder, setLastSession, setLastSession, setParentMemberId, setPersonalizationId, setPreferredCurrency, setPreferredLanguageId, setPreferredLanguageId, setPreviousLastSession, setPreviousLastSession, setProfileType, setRegisterType, setRegistration, setRegistration, setRegistrationCancel, setRegistrationCancel, setRegistrationUpdate, setRegistrationUpdate, setState, setState, setUserField1, setUserField2, setUserField3
-
Methods inherited from class com.ibm.commerce.persistence.AbstractJpaEntityAccessBean
createAccessBean, createAccessBean, createAccessBeanCollection, createAccessBeanCollection, createEntityCollection, detach, remove, setUseDataCache, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.security.Protectable
getOwner
-
Methods inherited from interface com.ibm.commerce.grouping.Groupable
getGroupingAttributeValue
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UserDataBean
public UserDataBean(UserAccessBean aabUser, CommandContext aCommandContext)
Constructs an UserDataBean from an UserAccessBean and commandContext- Parameters:
aabUser
- UserAccessBeanaCommandContext
- Command Context- Throws:
java.lang.Exception
-
UserDataBean
public UserDataBean(UserAccessBean aabUser)
Constructs an UserDataBean from an UserAccessBean. Note: Consider using UserDataBean(UserAccessBean aabUser,CommandContext aCommandContext) if commandContext is available.- Parameters:
aabUser
- UserAccessBean- Throws:
java.lang.Exception
-
UserDataBean
public UserDataBean()
Default constructor
-
-
Method Detail
-
getTransactionCachedUserDataBean
public static final UserDataBean getTransactionCachedUserDataBean(UserAccessBean aUserAB, CommandContext aCommandContext)
Returns an UserDataBean from the transaction cache, or, if it is not there, then creates a new UserDataBean, and places it in the transaction cache. As the returned bean is in the transaction cache, and may be used by other callers, the caller should not call any setters on the returned bean.- Parameters:
aUserAB
- the user for the data bean.aCommandContext
- the command context for the data bean. If this is null, then the transaction cache is not used.- Returns:
- the user data bean for the specified user and command context.
- Throws:
java.lang.Exception
-
getTransactionCachedUserDataBean
public static final UserDataBean getTransactionCachedUserDataBean(java.lang.String astrUserId, CommandContext aCommandContext)
Returns an UserDataBean from the transaction cache, or, if it is not there, then creates a new UserDataBean, and places it in the transaction cache. As the returned bean is in the transaction cache, and may be used by other callers, the caller should not call any setters on the returned bean.- Parameters:
astrUserId
- the user Id for the data bean.aCommandContext
- the command context for the data bean. If this is null, then the transaction cache is not used.- Returns:
- the user data bean for the specified user and command context
-
clearTransactionCachedUserDataBeans
public static final void clearTransactionCachedUserDataBeans()
-
getCommandContext
public CommandContext getCommandContext()
Gets the command context set within this bean.- Specified by:
getCommandContext
in interfaceSmartDataBean
- Returns:
- com.ibm.commerce.command.CommandContext
-
getDataBeanKeyMemberId
public java.lang.String getDataBeanKeyMemberId()
Gets the key (user id) of this data bean.- Specified by:
getDataBeanKeyMemberId
in interfacecom.ibm.commerce.user.beans.UserSmartDataBean
- Returns:
- The key of this data bean.
-
getRequestProperties
public TypedProperty getRequestProperties()
Gets the request property set within this bean.- Specified by:
getRequestProperties
in interfaceInputDataBean
- Returns:
- com.ibm.commerce.datatype.TypedProperty
-
populate
public void populate()
Retrieves data from the database.- Specified by:
populate
in interfaceSmartDataBean
- Throws:
java.lang.Exception
- Thrown if an exception occurs.
-
setCommandContext
public void setCommandContext(CommandContext aCommandContext)
Sets the command context within this bean.- Specified by:
setCommandContext
in interfaceSmartDataBean
- Parameters:
aCommandContext
- com.ibm.commerce.command.CommandContext
-
setDataBeanKeyMemberId
public void setDataBeanKeyMemberId(java.lang.String aMemberId)
Sets the key(member id) of this data bean.- Specified by:
setDataBeanKeyMemberId
in interfacecom.ibm.commerce.user.beans.UserInputDataBean
- Parameters:
aMemberId
- The key of this data bean.
-
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperty)
Sets the request property within this bean.- Specified by:
setRequestProperties
in interfaceInputDataBean
- Parameters:
aRequestProperty
- The input properties.
-
fulfills
public boolean fulfills(java.lang.Long member, java.lang.String relationship) throws java.lang.Exception
An access control method used to determine if a given member fulfills a given relationship with the user resource.- Specified by:
fulfills
in interfaceProtectable
- Overrides:
fulfills
in classUserAccessBean
- Parameters:
member
- The member ID.relationship
- The relationship.- Returns:
- True if the relationship is satisfied; false otherwise.
- Throws:
RemoteException
- Thrown if a remote exception occurs.java.lang.Exception
- Thrown if any other exception occurs.
-
getLastName
public java.lang.String getLastName()
Get the user's lastname- Returns:
- the user's lastname
-
getFirstName
public java.lang.String getFirstName()
Get the user's firstname- Returns:
- the user's firstname
-
getLogonId
public java.lang.String getLogonId()
Get the user's logon id- Returns:
- the user's logon id
-
getAccountStatus
public java.lang.String getAccountStatus()
Get the user's account status- Returns:
- the user's account status
-
-