|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.wim.util.SDOHelper
public class SDOHelper
A helper class for construt virtual member manager SDO data graph and data object.
Constructor Summary | |
---|---|
SDOHelper()
|
Method Summary | |
---|---|
static commonj.sdo.DataObject |
cloneDataObject(commonj.sdo.DataObject dataObject)
Clones the input DataObject. |
static org.eclipse.emf.ecore.EObject |
cloneEObject(org.eclipse.emf.ecore.EObject obj)
Clones an EObject. |
static commonj.sdo.DataObject |
cloneRootDataObject(commonj.sdo.DataObject root)
Clones the input root DataObject. |
static commonj.sdo.DataObject |
createChangeCtrlFromChangeRespCtrl(commonj.sdo.DataObject newRoot,
commonj.sdo.DataObject prevRoot)
Creates ChangeControl DataObject using the ChangeResponseControl DataObject. |
static commonj.sdo.DataObject |
createConfigDataObject(commonj.sdo.DataObject parentDO,
java.lang.String uri,
java.lang.String configType)
Creates a config type data object under the specified parent data ojbect, with specified virtual member manager configuration uri. |
static commonj.sdo.DataObject |
createConfigProviderDataObject()
Creates an empty data object that contains virtual member manager configuration name space URI in the document root. |
static commonj.sdo.DataObject |
createConfigRepositoryDataObject(commonj.sdo.DataObject configProvider,
java.lang.String repositoryTypeName)
Creates an entity data object under the specified root data object with specified eitity type URI. |
static commonj.sdo.DataObject |
createContextDataObject(commonj.sdo.DataGraph dataGraph,
java.lang.String uri,
java.lang.String contextTypeName)
Creates a context data object under the specified data graph with specified context type uri. |
static commonj.sdo.DataObject |
createContextDataObject(commonj.sdo.DataObject root,
java.lang.String uri,
java.lang.String contextTypeName)
Creates a context data object under the specified root data object with specified context type URI. |
static commonj.sdo.DataObject |
createControlDataObject(commonj.sdo.DataGraph dataGraph,
java.lang.String uri,
java.lang.String controlTypeName)
Creates a control data object under the specified data graph with specified control type URI. |
static commonj.sdo.DataObject |
createControlDataObject(commonj.sdo.DataObject root,
java.lang.String uri,
java.lang.String controlTypeName)
Creates a control data object under the specified root data object with specified control type URI. |
static commonj.sdo.DataGraph |
createDataGraph(java.lang.String uri)
Creates an empty data graph that has the document root under the specified URI. |
static commonj.sdo.DataObject |
createDataObject(java.lang.String uri,
java.lang.String typeName)
Creates a type data object with specified uri. |
static commonj.sdo.DataObject |
createEntityDataObject(commonj.sdo.DataGraph dataGraph,
java.lang.String uri,
java.lang.String entityTypeName)
Creates an entity data object under the specified data graph with specified entity type URI. |
static commonj.sdo.DataObject |
createEntityDataObject(commonj.sdo.DataObject root,
java.lang.String uri,
java.lang.String entityTypeName)
Creates an entity data object under the specified root data object with specified eitity type URI. |
static commonj.sdo.DataObject |
createRootDataObject()
Creates an empty data object that contains virtual member manager name space URI in the document root. |
static commonj.sdo.DataObject |
deepCloneRootDataObject(commonj.sdo.DataObject root)
Returns a deep clone of root DataObject once ChangeSummary is not null, otherwise, normal cloneRootDataObject will be returned. |
static java.lang.Object |
deepCopyObject(java.lang.Object root)
Returns a deep copy of an object, return null if the object to be cloned is null. |
static java.util.Date |
getDateFromString(java.lang.String dateStr)
Returns a Date from the specified String. |
static java.lang.String |
getDateString(java.util.Date date)
Returns a date String from the specified Date object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDOHelper()
Method Detail |
---|
public static commonj.sdo.DataObject createRootDataObject() throws WIMException
WIMException
public static commonj.sdo.DataObject createConfigDataObject(commonj.sdo.DataObject parentDO, java.lang.String uri, java.lang.String configType) throws WIMException
parentDO
- The parent data object to create the new data object under.uri
- The virtual member manager configuration namespace uri.configType
- The configuration type.
WIMException
public static commonj.sdo.DataObject createConfigProviderDataObject()
WIMException
public static commonj.sdo.DataObject createConfigRepositoryDataObject(commonj.sdo.DataObject configProvider, java.lang.String repositoryTypeName)
SDOHelper.createConfigRepositoryDataObject(configProvider, ConfigConstants.CONFIG_DO_LDAP_REPOSITORY_TYPE);
configProvider
- The configuration provider data object that the repository data object to create under.repositoryTypeName
- A repository type name.public static commonj.sdo.DataGraph createDataGraph(java.lang.String uri)
uri
- The document root URI.public static commonj.sdo.DataObject createEntityDataObject(commonj.sdo.DataGraph dataGraph, java.lang.String uri, java.lang.String entityTypeName)
SDOHelper.createEntityDataObject(datagraph, null, SchemaConstants.DO_PERSON_ACCOUNT);
dataGraph
- A data graph that the entity data object to create under.uri
- The name space URI of the entity. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").entityTypeName
- An entity type name.public static commonj.sdo.DataObject createEntityDataObject(commonj.sdo.DataObject root, java.lang.String uri, java.lang.String entityTypeName)
SDOHelper.createEntityDataObject(root, null, SchemaConstants.DO_PERSON_ACCOUNT);
root
- The root data object that the entity data object to create under.uri
- The name space URI of the entity. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").entityTypeName
- An entity type name.public static commonj.sdo.DataObject createControlDataObject(commonj.sdo.DataGraph dataGraph, java.lang.String uri, java.lang.String controlTypeName)
SDOHelper.createControlDataObject(datagraph, null, SchemaConstants.DO_PROPERTY_CONTROL);
dataGraph
- The data graph that the control data object to create under.uri
- The name space URI of the control. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").controlTypeName
- A control type name.public static commonj.sdo.DataObject createControlDataObject(commonj.sdo.DataObject root, java.lang.String uri, java.lang.String controlTypeName)
SDOHelper.createControlDataObject(root, null, SchemaConstants.DO_PROPERTY_CONTROL);
root
- The root data object that the control data object to create under.uri
- The name space URI of the control. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").controlTypeName
- A control type name.public static commonj.sdo.DataObject createContextDataObject(commonj.sdo.DataGraph dataGraph, java.lang.String uri, java.lang.String contextTypeName)
SDOHelper.createContextDataObject(datagraph, null, SchemaConstants.TYPE_CONTEXT)
dataGraph
- The data graph that the context data object to create under.uri
- The name space URI of the context. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").contextTypeName
- A context type name.public static commonj.sdo.DataObject createContextDataObject(commonj.sdo.DataObject root, java.lang.String uri, java.lang.String contextTypeName)
SDOHelper.createContextDataObject(root, null, SchemaConstants.TYPE_CONTEXT)
root
- The root data object that the context data object to create under.uri
- The name space URI of the context. If not specified, virtual member manager name space URI will be used ("http://www.ibm.com/websphere/wim").contextTypeName
- A context type name.public static commonj.sdo.DataObject createDataObject(java.lang.String uri, java.lang.String typeName)
SDOHelper.createDataObject(SchemaContants.WIM_NS_URI, SchemaConstants.DO_GROUP)
uri
- the name space URI of the type. If it is null or empty, default is virtual member manager name space URI ("http://www.ibm.com/websphere/wim").typeName
- The name of the type.public static java.lang.String getDateString(java.util.Date date)
date
- The Date object.public static java.util.Date getDateFromString(java.lang.String dateStr) throws WIMException
date
- Date string.
WIMException
- if a parsing error occurs.public static commonj.sdo.DataObject cloneDataObject(commonj.sdo.DataObject dataObject)
dataObject
- the DataObject to be cloned.public static commonj.sdo.DataObject cloneRootDataObject(commonj.sdo.DataObject root)
root
- root DataObject to be cloned.public static org.eclipse.emf.ecore.EObject cloneEObject(org.eclipse.emf.ecore.EObject obj)
obj
- EOObject to be cloned.public static final commonj.sdo.DataObject deepCloneRootDataObject(commonj.sdo.DataObject root)
root
- DataObject to be copiedpublic static final java.lang.Object deepCopyObject(java.lang.Object root)
source
- Object to be copied (must be Serializable)public static commonj.sdo.DataObject createChangeCtrlFromChangeRespCtrl(commonj.sdo.DataObject newRoot, commonj.sdo.DataObject prevRoot)
newRoot
- It has/will have the ChangeControlprevRoot
- It has the ChangeResponseControl from which the checkpoint
list is to be copied to the ChangeControl in the newRoot
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |