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:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class MemberDataBean
extends SmartDataBeanImpl

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 databean 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) {
   }
 %>
 
See Also:
Serialized Form

Field Summary
protected java.lang.String _memberDN
protected java.lang.String _memberGroupName
protected java.lang.String _memberGroupOwnerMemberDN
protected java.lang.String _memberGroupOwnerMemberId
protected java.lang.String _memberGroupOwnerMemberType
protected java.lang.String _memberId
protected java.lang.String _memberType
Fields inherited from class com.ibm.commerce.beans.SmartDataBeanImpl
commandContext
Fields inherited from class com.ibm.commerce.beans.InputDataBeanImpl
requestProperties
Fields inherited from interface com.ibm.commerce.beans.DataBean
emptyString
Constructor Summary
MemberDataBean()
Method Summary
java.lang.String getId()
Get the member identifier
java.lang.String getMemberDN()
Get the member distinguished name
java.lang.String getMemberGroupName()
Get the member group name
java.lang.String getMemberGroupOwnerMemberDN()
Get the distinguished name of the owner of the member group
java.lang.String getMemberGroupOwnerMemberId()
Get the reference number of the owner of the member group
java.lang.String getMemberGroupOwnerMemberType()
Get the type of the owner of the member group
java.lang.String getMemberType()
Get the type of the member
void populate()
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, getResources, setCommandContext
Methods inherited from class com.ibm.commerce.beans.InputDataBeanImpl
getRequestProperties, setRequestProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.commerce.beans.InputDataBean
getRequestProperties, setRequestProperties
Field Detail

_memberId

protected java.lang.String _memberId

_memberType

protected java.lang.String _memberType

_memberDN

protected java.lang.String _memberDN

_memberGroupOwnerMemberId

protected java.lang.String _memberGroupOwnerMemberId

_memberGroupOwnerMemberType

protected java.lang.String _memberGroupOwnerMemberType

_memberGroupOwnerMemberDN

protected java.lang.String _memberGroupOwnerMemberDN

_memberGroupName

protected java.lang.String _memberGroupName
Constructor Detail

MemberDataBean

public MemberDataBean()
Method Detail

getId

public java.lang.String getId()
Get the member identifier
Returns:
java.lang.String

getMemberDN

public java.lang.String getMemberDN()
Get the member distinguished name
Returns:
java.lang.String

getMemberGroupName

public java.lang.String getMemberGroupName()
Get the member group name
Returns:
java.lang.String

getMemberGroupOwnerMemberDN

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

getMemberGroupOwnerMemberId

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

getMemberGroupOwnerMemberType

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

getMemberType

public java.lang.String getMemberType()
Get the type of the member
Returns:
java.lang.String

populate

public void populate()
              throws java.lang.Exception
Retrieve the data for the Member
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception

setId

public void setId(java.lang.String memberId)
Sets the member identifier

setMemberDN

public void setMemberDN(java.lang.String memberDN)
Sets the distinguished name of the member

setMemberGroupName

public void setMemberGroupName(java.lang.String memberGroupName)
Sets the name of the member group

setMemberGroupOwnerMemberDN

public void setMemberGroupOwnerMemberDN(java.lang.String memberGroupOwnerMemberDN)
Sets the distinguished name of the owner of the member group

setMemberGroupOwnerMemberId

public void setMemberGroupOwnerMemberId(java.lang.String memberGroupOwnerMemberId)
Sets the identifier of the owner of the member group

setMemberGroupOwnerMemberType

public void setMemberGroupOwnerMemberType(java.lang.String memberGroupOwnerMemberType)
Sets the type of the owner of the member group

setMemberType

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

Feedback