com.ibm.commerce.user.beans

Class MemberRoleDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, Delegator, com.ibm.commerce.user.beans.MemberRoleInputDataBean, com.ibm.commerce.user.beans.MemberRoleSmartDataBean, java.io.Serializable


    public class MemberRoleDataBean
    extends com.ibm.commerce.user.beansrc.MemberRoleDataBeanBase
    implements com.ibm.commerce.user.beans.MemberRoleInputDataBean, com.ibm.commerce.user.beans.MemberRoleSmartDataBean
    Data bean to retrieve role assignment information for users and organizations.
    See Also:
    Serialized Form
    • Field Detail

      • 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 class name.
    • Constructor Detail

      • MemberRoleDataBean

        public MemberRoleDataBean()
    • Method Detail

      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperty)
        Sets the request property within this bean.
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aRequestProperty - com.ibm.commerce.datatype.TypedProperty
      • getDataBeanKeyRoleId

        public java.lang.String getDataBeanKeyRoleId()
        Gets the first key (role id) of this data bean.
        Specified by:
        getDataBeanKeyRoleId in interface com.ibm.commerce.user.beans.MemberRoleSmartDataBean
        Returns:
        The key of this data bean.
      • getDataBeanKeyMemberId

        public java.lang.String getDataBeanKeyMemberId()
        Gets the second key (member id) of this data bean.
        Specified by:
        getDataBeanKeyMemberId in interface com.ibm.commerce.user.beans.MemberRoleSmartDataBean
        Returns:
        The key of this data bean.
      • getDataBeanKeyOrgEntityId

        public java.lang.String getDataBeanKeyOrgEntityId()
        Gets the third key (orgEntity id) of this data bean.
        Specified by:
        getDataBeanKeyOrgEntityId in interface com.ibm.commerce.user.beans.MemberRoleSmartDataBean
        Returns:
        The key of this data bean.
      • getCommandContext

        public CommandContext getCommandContext()
        Gets the command context set within this bean.
        Specified by:
        getCommandContext in interface SmartDataBean
        Returns:
        com.ibm.commerce.command.CommandContext
      • setCommandContext

        public void setCommandContext(CommandContext aCommandContext)
        Sets the command context within this bean.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        aCommandContext - the command context.
      • setDataBeanKeyRoleId

        public void setDataBeanKeyRoleId(java.lang.String aRoleId)
        Sets the first key(role id) of this data bean.
        Specified by:
        setDataBeanKeyRoleId in interface com.ibm.commerce.user.beans.MemberRoleInputDataBean
        Parameters:
        aRoleId - The first key of this data bean.
      • setDataBeanKeyMemberId

        public void setDataBeanKeyMemberId(java.lang.String aMemberId)
        Sets the second key(role id) of this data bean.
        Specified by:
        setDataBeanKeyMemberId in interface com.ibm.commerce.user.beans.MemberRoleInputDataBean
        Parameters:
        aMemberId - The second key of this data bean.
      • setDataBeanKeyOrgEntityId

        public void setDataBeanKeyOrgEntityId(java.lang.String aOrgEntityId)
        Sets the third key(third id) of this data bean.
        Specified by:
        setDataBeanKeyOrgEntityId in interface com.ibm.commerce.user.beans.MemberRoleInputDataBean
        Parameters:
        aOrgEntityId - The third key of this data bean.
      • populate

        public void populate()
        Retrieves data from the database.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception
      • getRolesThatUserPlaysInOrg

        public static final java.lang.Integer[] getRolesThatUserPlaysInOrg(java.lang.Long anUserId,
                                                                           java.lang.Long anOrganizationId)
        Return the list of roles that a user plays in a given organization. This means not only the roles that are assigned specifically for that organization, but also any role played in an ancestor organization.
        Parameters:
        anUserId - The user Id
        anOrganizationId - The organization Id
        Returns:
        The roles that this user plays in the organization specified
      • getRolesDefinedForOrg

        public static final java.lang.Integer[] getRolesDefinedForOrg(java.lang.Long anOrganizationId)
        Return the list of roles that are defined for a particular organization. These are the entries in the MBRROLE table where MEMBER_ID == ORGENTITY_ID for the organization specified.
        Parameters:
        anOrganizationId - The organization Id
        Returns:
        The roles defined for this organization
      • getAllRolesForDisplay

        public static java.lang.String[][] getAllRolesForDisplay(CommandContext aCommandContext)
        Retrieve the list of all roles defined in the system.
        Parameters:
        aCommandContext - The command context; language must be set in the context in order that the display names resolve properly.
        Returns:
        Two-dimensional array, with the outer array representing the role list. And the inner array containing the role Id in the first position. And the role display name in the second position. The list is returned sorted on the role name.