com.ibm.commerce.tools.contract.beans

Class MemberDataBean

  • java.lang.Object
    • com.ibm.commerce.beans.InputDataBeanImpl
      • com.ibm.commerce.beans.SmartDataBeanImpl
        • com.ibm.commerce.tools.contract.beans.MemberDataBean
  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, java.io.Serializable


    public class MemberDataBean
    extends com.ibm.commerce.beans.SmartDataBeanImpl
    This data bean represents a member object. Member, A person, group, or organization known to the system. This data bean takes a member id and populates itself with all the required type and DN info required in a B2B contract. This function is designed to be used in coordination with the MemberDataBean.
    The MemberDataBean data bean takes a memberid as an input argument. After the populate() method is called, 5 getters can be called to determine the relevant properties of the member. The getters map 1-to-1 with input argument for the Member() javascript function.
    1. getMemberType() - return the member type of the memberid. can be one of 3 possible values ('U' user, 'O' organization, or 'G' membergroup)
    2. getMemberDN() - returns the distinguish name of the memberid. will be set is the member is of type 'U' or 'O'. otherwise null.
    3. getMemberGroupName() - returns the member group name for the memberid. will only be set if member type is 'G'.
    4. getMemberGroupOwnerMemberType() - returns the member group's owner member type for the memberid. can be one of 2 possible values ('U' user, 'O' organization).
    5. will only be set if member type is 'G'.
    6. getMemberGroupOwnerMemberDN() - returns the member group's owner distinguish name for the memberid. will only be set if member type is 'G'.

    JSP/javascript usage is as follows:
    INPUT: 5 input arguments, generally coming from the MemberDataBean getters
    1. memberType - the type of member (either 'U', 'O', or 'G')
    2. memberDN - the DN of the member if the memberType is 'U' or 'O'. if the memberType is 'G', then this arg should be set to null or an empty string. the following 3 args are optional and are only necessary if the memberType is 'G' (MemberGroup)
    3. mgName - the name of the member group
    4. mgOwnerType - the member type of the owner of the member group (either 'U' or 'O')
    5. mgOwnerDN - the member DN of the member group's owner
    OUTPUT: javascript Member() object representing the populated MemberDataBean
    Sample Usage in a JSP:
     <%
      try{
        String memberid = fStoreMemberId; // figure out who your member id is!!!
        MemberDataBean mdb = new MemberDataBean();
        mdb.setId(memberid);
        DataBeanManager.activate(mdb, request);
     %>
         <script>
             myJSobject = new Member('<%= mdb.getMemberType() %>',
                                     '<%= mdb.getMemberDN() %>',
                                     '<%= mdb.getMemberGroupName() %>',
                                     '<%= mdb.getMemberGroupOwnerMemberType() %>',
                                     '<%= mdb.getMemberGroupOwnerMemberDN() %>'));
         </script>
     <%    
       }
       catch(Exception e) {
       }
     %>
     
    When retrieving the data for a Member, the data bean will be called. The member identifier is prerequisite parameter that need to be set before populate. The data bean maps to a database table MEMBER
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CUSTOMER_PRICE_MEMBER_GROUP
      Constant for the Customer Member Group
      static java.lang.String PRICE_OVERRIDE_MEMBER_GROUP
      Constant for the PRICE_OVERRIDE Member Group
      static java.lang.String USER_MEMBER_GROUP
      Constant for the User Member Group
      • Fields inherited from interface com.ibm.commerce.beans.DataBean

        emptyString
    • Constructor Summary

      Constructors 
      Constructor and Description
      MemberDataBean() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getId()
      Gets the member identifier
      java.lang.String getMemberDN()
      Gets the member distinguished name
      java.lang.String getMemberGroupName()
      Gets the member group name
      java.lang.String getMemberGroupOwnerMemberDN()
      Gets the distinguished name of the owner of the member group
      java.lang.String getMemberGroupOwnerMemberId()
      Gets the reference number of the owner of the member group
      java.lang.String getMemberGroupOwnerMemberType()
      Gets the type of the owner of the member group
      java.util.Vector getMemberGroups()
      Gets the list of member groups
      java.util.Vector getMemberGroups(java.util.Vector v)
      Gets the list of member groups
      java.lang.String getMemberType()
      Gets the type of the member
      void populate()
      This method is used to retrieve the data for the Member.
      void setId(java.lang.String memberId)
      Sets the member identifier
      void setMemberDN(java.lang.String memberDN)
      Sets the distinguished name of the member
      void setMemberGroupName(java.lang.String memberGroupName)
      Sets the name of the member group
      void setMemberGroupOwnerMemberDN(java.lang.String memberGroupOwnerMemberDN)
      Sets the distinguished name of the owner of the member group
      void setMemberGroupOwnerMemberId(java.lang.String memberGroupOwnerMemberId)
      Sets the identifier of the owner of the member group
      void setMemberGroupOwnerMemberType(java.lang.String memberGroupOwnerMemberType)
      Sets the type of the owner of the member group
      void setMemberType(java.lang.String memberType)
      Sets the type of the member
      • Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl

        fulfills, getCommandContext, getHttpRequest, getHttpResponse, getResources, getViewCommandContext, setCommandContext, setHttpRequest, setHttpResponse, setViewCommandContext
      • Methods inherited from class com.ibm.commerce.beans.InputDataBeanImpl

        getRequestProperties, setRequestProperties
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.beans.InputDataBean

        getRequestProperties, setRequestProperties
    • Field Detail

      • CUSTOMER_PRICE_MEMBER_GROUP

        public static final java.lang.String CUSTOMER_PRICE_MEMBER_GROUP
        Constant for the Customer Member Group
        See Also:
        Constant Field Values
      • PRICE_OVERRIDE_MEMBER_GROUP

        public static final java.lang.String PRICE_OVERRIDE_MEMBER_GROUP
        Constant for the PRICE_OVERRIDE Member Group
        See Also:
        Constant Field Values
      • USER_MEMBER_GROUP

        public static final java.lang.String USER_MEMBER_GROUP
        Constant for the User Member Group
        See Also:
        Constant Field Values
    • Constructor Detail

      • MemberDataBean

        public MemberDataBean()
    • Method Detail

      • getId

        public java.lang.String getId()
        Gets the member identifier
        Returns:
        java.lang.String
      • getMemberDN

        public java.lang.String getMemberDN()
        Gets the member distinguished name
        Returns:
        java.lang.String
      • getMemberGroupName

        public java.lang.String getMemberGroupName()
        Gets the member group name
        Returns:
        java.lang.String
      • getMemberGroupOwnerMemberDN

        public java.lang.String getMemberGroupOwnerMemberDN()
        Gets the distinguished name of the owner of the member group
        Returns:
        java.lang.String
      • getMemberGroupOwnerMemberId

        public java.lang.String getMemberGroupOwnerMemberId()
        Gets the reference number of the owner of the member group
        Returns:
        java.lang.String
      • getMemberGroupOwnerMemberType

        public java.lang.String getMemberGroupOwnerMemberType()
        Gets the type of the owner of the member group
        Returns:
        java.lang.String
      • getMemberGroups

        public java.util.Vector getMemberGroups()
        Gets the list of member groups
        Returns:
        Vector a list of the member groups
      • getMemberGroups

        public java.util.Vector getMemberGroups(java.util.Vector v)
        Gets the list of member groups
        Returns:
        Vector a list of the member groups
      • getMemberType

        public java.lang.String getMemberType()
        Gets the type of the member
        Returns:
        java.lang.String
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to retrieve the data for the Member. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Overrides:
        populate in class com.ibm.commerce.beans.SmartDataBeanImpl
        Throws:
        java.lang.Exception
      • setId

        public void setId(java.lang.String memberId)
        Sets the member identifier
        Parameters:
        memberId - java.lang.String
      • setMemberDN

        public void setMemberDN(java.lang.String memberDN)
        Sets the distinguished name of the member
        Parameters:
        memberDN - java.lang.String
      • setMemberGroupName

        public void setMemberGroupName(java.lang.String memberGroupName)
        Sets the name of the member group
        Parameters:
        memberGroupName - java.lang.String
      • setMemberGroupOwnerMemberDN

        public void setMemberGroupOwnerMemberDN(java.lang.String memberGroupOwnerMemberDN)
        Sets the distinguished name of the owner of the member group
        Parameters:
        memberGroupOwnerMemberDN - java.lang.String
      • setMemberGroupOwnerMemberId

        public void setMemberGroupOwnerMemberId(java.lang.String memberGroupOwnerMemberId)
        Sets the identifier of the owner of the member group
        Parameters:
        memberGroupOwnerMemberId - java.lang.String
      • setMemberGroupOwnerMemberType

        public void setMemberGroupOwnerMemberType(java.lang.String memberGroupOwnerMemberType)
        Sets the type of the owner of the member group
        Parameters:
        memberGroupOwnerMemberType - java.lang.String
      • setMemberType

        public void setMemberType(java.lang.String memberType)
        Sets the type of the member
        Parameters:
        memberType - java.lang.String