com.ibm.commerce.user.beans

Class 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 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 - UserAccessBean
        aCommandContext - 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 interface SmartDataBean
        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 interface com.ibm.commerce.user.beans.UserSmartDataBean
        Returns:
        The key of this data bean.
      • populate

        public void populate()
        Retrieves data from the database.
        Specified by:
        populate in interface SmartDataBean
        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 interface SmartDataBean
        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 interface com.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 interface InputDataBean
        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 interface Protectable
        Overrides:
        fulfills in class UserAccessBean
        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