com.ibm.bct.rp.cms
Class OrgEntityXML

com.ibm.bct.rp.cms.OrgEntityXML

public class OrgEntityXML

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

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

Constructor Summary
OrgEntityXML()
          Blank OrgEntityXML constructor.
OrgEntityXML(com.ibm.bct.rp.cms.OrgEntityVO orgVO)
          OrgEntityXML constructor from OrgEntityVO object.
OrgEntityXML(java.lang.String theXML)
          OrgEntityXML constructor from XML attribute definition.
OrgEntityXML(java.lang.String theIiopNode, java.lang.String orgEntityId)
          OrgEntityXML constructor from existing OrgEntity CMS record.
OrgEntityXML(java.lang.String theIiopNode, java.lang.String interchangeType, java.lang.String interchangeId)
          OrgEntityXML constructor from existing OrgEntity CMS record.
 
Method Summary
 java.lang.String createOrgEntity()
          Create an OrgEntity in WMS based on attributes in this OrgEntity object.
 void deleteOrgEntity(boolean includeDescendants)
          Delete an OrgEntity from WMS represented by this OrgEntity object.
 java.util.List findOrgEntities(java.lang.String attrName, java.lang.String attrValue)
          Find all OrgEntities based on an attribute value returning unique OrgEntity identifiers.
 java.util.List findOrgEntityNames(java.lang.String attrName, java.lang.String attrValue)
          Find all OrgEntities based on an attribute value returning OrgEntity names.
 boolean fromXML(java.lang.String xml)
          Create an OrgEntity object from XML.
 java.util.List getAncestorOrgEntityIdentifiers()
          Get a List of ancestor OrgEntityies for this OrgEntity.
 java.util.List getChildrenOrgEntityIdentifiers()
          Get a List of child OrgEntityies for this OrgEntity.
 java.util.List getChildrenUserIdentifiers()
          Get a List of child User records for this OrgEntity.
 java.util.List getDescendantOrgEntityIdentifiers()
          Get a List of descendant OrgEntityies for this OrgEntity.
 java.util.List getDescendantUserIdentifiers()
          Get a List of descendant Users for this OrgEntity.
 com.ibm.bct.rp.cms.OrgEntityVO getOrgEntity()
          Get the OrgEntity Value Object for this OrgEntityXML object.
 com.ibm.bct.rp.cms.OrgEntityVO getOrgEntity(java.lang.String orgEntityId)
          Retrieve from WMS the OrgEntity for the specified OrgEntity identifier.
 java.lang.String getParentOrgEntityIdentifier()
          Get the parent OrgEntity for this OrgEntity.
 java.util.Map getServiceAttributes()
          Return a Map of all service related attributes for this OrgEntity object.
 java.util.Map getServiceAttributes(java.lang.String servPrefix)
          Return a Map of all related attributes that start with the specified prefix for this OrgEntity object.
 java.util.List searchOrgEntities(java.lang.String attrName, java.lang.String attrValue, java.util.List getAttr)
          Find all OrgEntities based on an attribute value and return a list of attribute Maps.
 java.lang.String toAttribXML(java.lang.String topLevel, java.util.List attrList)
          Convert this OrgEntity object to XML with values output as attributes.
 java.lang.String toXML()
          Convert OrgEntity to XML.
 java.lang.String updateOrgEntity()
          Create or update if it already exists on an OrgEntity in WMS based on attributes in this OrgEntity object.
 

Constructor Detail

OrgEntityXML

public OrgEntityXML()
Blank OrgEntityXML constructor.

OrgEntityXML

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

OrgEntityXML

public OrgEntityXML(com.ibm.bct.rp.cms.OrgEntityVO orgVO)
OrgEntityXML constructor from OrgEntityVO object.
Parameters:
com.ibm.websphere.memberservice.objects.OrgEntityVO - orgVO - The OrgEntity value object.

OrgEntityXML

public OrgEntityXML(java.lang.String theIiopNode,
                    java.lang.String orgEntityId)
             throws com.ibm.bct.rp.cms.MemberServiceException,
                    java.rmi.RemoteException,
                    com.ibm.bct.rp.cms.CreateException,
                    com.ibm.bct.rp.cms.NamingException
OrgEntityXML constructor from existing OrgEntity CMS record.
Parameters:
java.lang.String - theIiopNode - The IIOP node of the CMS to access (null=use "localhost").
java.lang.String - orgEntityId - The OrgEntity Id for the CMS retrieve.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

OrgEntityXML

public OrgEntityXML(java.lang.String theIiopNode,
                    java.lang.String interchangeType,
                    java.lang.String interchangeId)
             throws com.ibm.bct.rp.cms.MemberServiceException,
                    java.rmi.RemoteException,
                    com.ibm.bct.rp.cms.CreateException,
                    com.ibm.bct.rp.cms.NamingException
OrgEntityXML constructor from existing OrgEntity CMS record.
Parameters:
java.lang.String - theIiopNode - The IIOP node of the CMS to access (null=use "localhost").
java.lang.String - interchangeType - The integchange type.
java.lang.String - interchangeId - The integchange ID.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  
Method Detail

getAncestorOrgEntityIdentifiers

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

getChildrenOrgEntityIdentifiers

public java.util.List getChildrenOrgEntityIdentifiers()
Get a List of child OrgEntityies for this OrgEntity.
Returns:
java.util.List - The List of child OrgEntity identifiers.

getChildrenUserIdentifiers

public java.util.List getChildrenUserIdentifiers()
Get a List of child User records for this OrgEntity.
Returns:
java.util.List - The List of child User identifiers.

getDescendantOrgEntityIdentifiers

public java.util.List getDescendantOrgEntityIdentifiers()
Get a List of descendant OrgEntityies for this OrgEntity.
Returns:
java.util.List - The List of descendant OrgEntity identifiers.

getDescendantUserIdentifiers

public java.util.List getDescendantUserIdentifiers()
Get a List of descendant Users for this OrgEntity.
Returns:
java.util.List - The List of descendant User identifiers.

getParentOrgEntityIdentifier

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

getOrgEntity

public com.ibm.bct.rp.cms.OrgEntityVO getOrgEntity()
Get the OrgEntity Value Object for this OrgEntityXML object.
Returns:
com.ibm.websphere.memberservice.datatype.OrgEntityVO - The OrgEntity Value Object.

getOrgEntity

public com.ibm.bct.rp.cms.OrgEntityVO getOrgEntity(java.lang.String orgEntityId)
                                            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 OrgEntity for the specified OrgEntity identifier.
Parameters:
input - java.lang.String orgEntityId - The OrgEntity identifier.
Returns:
com.ibm.websphere.memberservice.datatype.OrgEntityVO - The OrgEntity Value Object.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

createOrgEntity

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

updateOrgEntity

public java.lang.String updateOrgEntity()
                                 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 on an OrgEntity in WMS based on attributes in this OrgEntity object.
Returns:
java.lang.String - The unique member identifier for this OrgEntity.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

deleteOrgEntity

public void deleteOrgEntity(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 an OrgEntity from WMS represented by this OrgEntity 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 -  

findOrgEntities

public java.util.List findOrgEntities(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 OrgEntities based on an attribute value returning unique OrgEntity 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 OrgEntity identifiers.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

findOrgEntityNames

public java.util.List findOrgEntityNames(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 OrgEntities based on an attribute value returning OrgEntity names.
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 OrgEntity names.
Throws:
com.ibm.websphere.memberservice.exception.MemberServiceException -  
java.rmi.RemoteException -  
javax.ejb.CreateException -  
javax.naming.NamingException -  

searchOrgEntities

public java.util.List searchOrgEntities(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 OrgEntities 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 -  

toAttribXML

public java.lang.String toAttribXML(java.lang.String topLevel,
                                    java.util.List attrList)
Convert this OrgEntity object to XML with values output as attributes.
Parameters:
input - java.lang.String topLevel - Top level tag.
input - java.util.List attrib - List of Attribute names to output.
Returns:
java.lang.String - XML string representation of attributes.

toXML

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

fromXML

public boolean fromXML(java.lang.String xml)
Create an OrgEntity object from XML.
Parameters:
input - java.lang.String xml - XML string representing the OrgEntity.
Returns:
java.lang.boolean - Success status.

getServiceAttributes

public java.util.Map getServiceAttributes()
Return a Map of all service related attributes for this OrgEntity object. Service related attributes are these attributes that begin with "serv."
Returns:
java.util.Map - Map of service related attribute values.

getServiceAttributes

public java.util.Map getServiceAttributes(java.lang.String servPrefix)
Return a Map of all related attributes that start with the specified prefix for this OrgEntity object.
Parameters:
input - java.lang.String servPrefix - Prefix for the attributes to be returned.
Returns:
java.util.Map - Map of related attribute values.