com.ibm.bct.rp.cms
Class UserXML

com.ibm.bct.rp.cms.UserXML

public class UserXML

The class UserXML contains methods for performing basic operations on User objects in the WebSphere Member Subsystem.

Version:
1.10, 08/30/2002
Author:
Thomas W. Jaworski

Constructor Summary
UserXML()
          Blank UserXML constructor.
UserXML(java.lang.String theXML)
          UserXML constructor from XML attribute definition.
UserXML(java.lang.String theIiopNode, java.lang.String userId)
          UserXML constructor from existing User CMS record.
UserXML(java.lang.String theIiopNode, java.lang.String orgEntityId, java.lang.String userId)
          UserXML constructor from existing User CMS record.
UserXML(com.ibm.bct.rp.cms.UserVO userVO)
          UserXML constructor from UserVO object.
 
Method Summary
 java.lang.String createUser()
          Create a User in WMS based on attributes in this User object.
 void deleteUser(boolean includeDescendants)
          Delete a User from WMS represented by this User object.
 java.util.List findUserIDs(java.lang.String attrName, java.lang.String attrValue)
          Find all Users based on an attribute value returning User logon IDs.
 java.util.List findUsers(java.lang.String attrName, java.lang.String attrValue)
          Find all Users based on an attribute value returning unique User identifiers.
 boolean fromXML(java.lang.String xml)
          Create a User object from XML.
 java.util.List getAncestorOrgEntityIdentifiers()
          Get a List of ancestor OrgEntityies for this User object.
 java.util.List getMemberGroupsIdentifiers()
          Get a List of Member Groups for this User object.
 java.lang.String getParentOrgEntityIdentifier()
          Get the parent OrgEntity for this User object.
 com.ibm.bct.rp.cms.UserVO getUser()
          Get the User Value Object for this UserXML object.
 com.ibm.bct.rp.cms.UserVO getUser(java.lang.String userId)
          Retrieve from WMS the User for the specified User identifier.
 com.ibm.bct.rp.cms.UserVO getUser(java.lang.String orgEntityId, java.lang.String userId)
          Retrieve from WMS the User for the specified OrgEntity and User identifier.
 java.util.List searchUsers(java.lang.String attrName, java.lang.String attrValue, java.util.List getAttr)
          Find all Users based on an attribute value and return a list of attribute Maps.
 java.lang.String toXML()
          Convert User to XML.
 java.lang.String updateUser()
          Create or update if it already exists a User in WMS based on attributes in this User object
 

Constructor Detail

UserXML

public UserXML()
Blank UserXML constructor.

UserXML

public UserXML(java.lang.String theXML)
UserXML constructor from XML attribute definition.
Parameters:
java.lang.String - theXML - The XML document with the User definition.

UserXML

public UserXML(com.ibm.bct.rp.cms.UserVO userVO)
UserXML constructor from UserVO object.
Parameters:
com.ibm.websphere.memberservice.objects.UserVO - orgVO - The User value object.

UserXML

public UserXML(java.lang.String theIiopNode,
               java.lang.String userId)
        throws com.ibm.bct.rp.cms.MemberServiceException,
               java.rmi.RemoteException,
               com.ibm.bct.rp.cms.CreateException,
               com.ibm.bct.rp.cms.NamingException
UserXML constructor from existing User CMS record.
Parameters:
java.lang.String - theIiopNode - The IIOP node of the CMS to access (null=use "localhost").
java.lang.String - UserId - The User Id for the CMS retrieve.

UserXML

public UserXML(java.lang.String theIiopNode,
               java.lang.String orgEntityId,
               java.lang.String userId)
        throws com.ibm.bct.rp.cms.MemberServiceException,
               java.rmi.RemoteException,
               com.ibm.bct.rp.cms.CreateException,
               com.ibm.bct.rp.cms.NamingException
UserXML constructor from existing User CMS record.
Parameters:
java.lang.String - theIiopNode - The IIOP node of the CMS to access (null=use "localhost").
java.lang.String - OrgEntityId - The Org Entity Id for the CMS retrieve.
java.lang.String - UserId - The User Id for the CMS retrieve.
Method Detail

getAncestorOrgEntityIdentifiers

public java.util.List getAncestorOrgEntityIdentifiers()
Get a List of ancestor OrgEntityies for this User object.
Returns:
java.util.List - The List of ancestor OrgEntity identifiers.

getMemberGroupsIdentifiers

public java.util.List getMemberGroupsIdentifiers()
Get a List of Member Groups for this User object.
Returns:
java.util.List - The List of Member Groups identifiers.

getParentOrgEntityIdentifier

public java.lang.String getParentOrgEntityIdentifier()
Get the parent OrgEntity for this User object.
Returns:
java.lang.String - The parent OrgEntity identifier.

getUser

public com.ibm.bct.rp.cms.UserVO getUser()
Get the User Value Object for this UserXML object.
Returns:
com.ibm.websphere.memberservice.datatype.UserVO - The User Value Object.

getUser

public com.ibm.bct.rp.cms.UserVO getUser(java.lang.String userId)
                                  throws com.ibm.bct.rp.cms.MemberServiceException,
                                         java.rmi.RemoteException,
                                         com.ibm.bct.rp.cms.CreateException,
                                         com.ibm.bct.rp.cms.NamingException
Retrieve from WMS the User for the specified User identifier.
Parameters:
input - java.lang.String userId - The User identifier.
Returns:
com.ibm.websphere.memberservice.datatype.UserVO - The User Value Object.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

getUser

public com.ibm.bct.rp.cms.UserVO getUser(java.lang.String orgEntityId,
                                         java.lang.String userId)
                                  throws com.ibm.bct.rp.cms.MemberServiceException,
                                         java.rmi.RemoteException,
                                         com.ibm.bct.rp.cms.CreateException,
                                         com.ibm.bct.rp.cms.NamingException
Retrieve from WMS the User for the specified OrgEntity and User identifier.
Parameters:
input - java.lang.String orgEntityId - The OrgEntity identifier.
input - java.lang.String userId - The User identifier.
Returns:
com.ibm.websphere.memberservice.datatype.UserVO - The User Value Object.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

createUser

public java.lang.String createUser()
                            throws com.ibm.bct.rp.cms.MemberServiceException,
                                   java.rmi.RemoteException,
                                   com.ibm.bct.rp.cms.CreateException,
                                   com.ibm.bct.rp.cms.NamingException
Create a User in WMS based on attributes in this User object.
Returns:
java.lang.String - The unique member identifier for this User.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

updateUser

public java.lang.String updateUser()
                            throws com.ibm.bct.rp.cms.MemberServiceException,
                                   java.rmi.RemoteException,
                                   com.ibm.bct.rp.cms.CreateException,
                                   com.ibm.bct.rp.cms.NamingException
Create or update if it already exists a User in WMS based on attributes in this User object
Returns:
java.lang.String - The unique member identifier for this User
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

deleteUser

public void deleteUser(boolean includeDescendants)
                throws com.ibm.bct.rp.cms.MemberServiceException,
                       java.rmi.RemoteException,
                       com.ibm.bct.rp.cms.CreateException,
                       com.ibm.bct.rp.cms.NamingException
Delete a User from WMS represented by this User object.
Parameters:
boolean - includeDescendants - Also delete descendants (flag ignored in this version).
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

findUsers

public java.util.List findUsers(java.lang.String attrName,
                                java.lang.String attrValue)
                         throws com.ibm.bct.rp.cms.MemberServiceException,
                                java.rmi.RemoteException,
                                com.ibm.bct.rp.cms.CreateException,
                                com.ibm.bct.rp.cms.NamingException
Find all Users based on an attribute value returning unique User identifiers.
Parameters:
input - java.lang.String attrName - The name of the attribute to search on.
input - java.lang.String attrValue - The value to search for.
Returns:
java.util.List - List of resultant unique User identifiers.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

findUserIDs

public java.util.List findUserIDs(java.lang.String attrName,
                                  java.lang.String attrValue)
                           throws com.ibm.bct.rp.cms.MemberServiceException,
                                  java.rmi.RemoteException,
                                  com.ibm.bct.rp.cms.CreateException,
                                  com.ibm.bct.rp.cms.NamingException
Find all Users based on an attribute value returning User logon IDs.
Parameters:
input - java.lang.String attrName - The name of the attribute to search on.
input - java.lang.String attrValue - The value to search for.
Returns:
java.util.List - List of resultant User Logon IDs.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

searchUsers

public java.util.List searchUsers(java.lang.String attrName,
                                  java.lang.String attrValue,
                                  java.util.List getAttr)
                           throws com.ibm.bct.rp.cms.MemberServiceException,
                                  java.rmi.RemoteException,
                                  com.ibm.bct.rp.cms.CreateException,
                                  com.ibm.bct.rp.cms.NamingException
Find all Users based on an attribute value and return a list of attribute Maps.
Parameters:
input - java.lang.String attrName - The name of the attribute to search on.
input - java.lang.String attrValue - The value to search for.
input - java.util.List getAttr - A list of attribute names of the values to return.
Returns:
java.util.List - List of resultant requested attribute Maps.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

toXML

public java.lang.String toXML()
Convert User to XML.
Returns:
java.lang.String - XML string representation of User.

fromXML

public boolean fromXML(java.lang.String xml)
Create a User object from XML.
Parameters:
input - java.lang.String xml - XML string representing the User object.
Returns:
java.lang.boolean - success status.