com.plumtree.server
Interface IPTMigrationElement


public interface IPTMigrationElement

This interface represents an intermediate format for serialized Plumtree objects. Objects implementing the IPTMigratable interface will serialize themselves to/from this format using methods on the IPTMigrationElement interface. This intermediate format can also be stored and loaded from a migration package via the IPTMigrationManager interface methods.

Version:
2.0
Author:
Arvind Seshan

Method Summary
 void ApplyDependencyMapping(java.lang.String strSourceUUID, java.lang.String strMappedUUID)
          Applies a dependency mapping to this IPTMigrationElement.
 void BeginComplexElement(java.lang.String strElementName, boolean bWriting)
          Begins an element with child nodes (a scope) when reading or writing to the IPTMigrationElement, and sets the node as the active element.
 java.lang.Object[][] CheckDependencies()
          Returns only missing dependencies for this object, as a 2-D array.
 boolean ChildElementExists(java.lang.String strElementName)
          Tests whether or not a child element of the specified name exists.
 void EndComplexElement(java.lang.String strElementName)
          Ends an element with child nodes (a scope) when reading or writing to the IPTMigrationElement, and sets the parent node as the active element.
 int GetClassID()
          Returns the classID of the underlying object.
 java.lang.Object[][] GetDependencies()
          Returns all dependencies for this object, as a 2-D array.
 java.lang.String GetDescription()
          Returns the description of the serialized object.
 int GetFolderID()
          Returns the folderID where the serialized object resides.
 java.lang.String GetFolderPath()
          Returns the full path to the folder where the serialized object resides.
 java.lang.String GetMigrationComment()
          Returns the migration comment used when requesting migration for the object.
 java.lang.String GetName()
          Returns the name of the serialized object.
 java.lang.String GetUUID()
          Returns the UUID (Universally Unique Identifier) of the serialized object.
 void OverwriteSimpleElement(java.lang.String strElementName, double dNewValue)
          Overwrites the value of an existing child element of the currently active node.
 void OverwriteSimpleElement(java.lang.String strElementName, float fNewValue)
          Overwrites the value of an existing child element of the currently active node.
 void OverwriteSimpleElement(java.lang.String strElementName, int nNewValue)
          Overwrites the value of an existing child element of the currently active node.
 void OverwriteSimpleElement(java.lang.String strElementName, com.plumtree.openfoundation.util.IXPPropertyBag pbagNewValue)
          Overwrites the value of an existing child element of the currently active node.
 void OverwriteSimpleElement(java.lang.String strElementName, java.lang.String strNewValue)
          Overwrites the value of an existing child element of the currently active node.
 void OverwriteSimpleElement(java.lang.String strElementName, com.plumtree.openfoundation.util.XPDateTime xpdtNewValue)
          Overwrites the value of an existing child element of the currently active node.
 java.lang.Object[] ReadArrayAsObject1DArray(java.lang.String strArrayName, java.lang.String[] asColumnNames)
          Reads an array of primitive types from an IPTMigrationElement.
 java.lang.Object[][] ReadArrayAsObject2DArray(java.lang.String strArrayName, java.lang.String[] asColumnNames)
          Reads an array of primitive types from an IPTMigrationElement.
 int[][] ReadArrayOfObjectReferences(java.lang.String strElementName)
          Reads an array of object references from the IPTMigrationElement.
 double ReadSimpleElementAsDouble(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 float ReadSimpleElementAsFloat(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 int ReadSimpleElementAsInt(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 com.plumtree.openfoundation.util.IXPPropertyBag ReadSimpleElementAsIXPPropertyBag(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 java.lang.Object ReadSimpleElementAsObject(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 java.lang.String ReadSimpleElementAsString(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 com.plumtree.openfoundation.util.XPDateTime ReadSimpleElementAsXPDateTime(java.lang.String strElementName)
          Reads a value from the specified child node of the currently active element.
 void RemoveElement(java.lang.String strElementName)
          Removes the child element with the specified name.
 void RestoreFromXML(java.lang.String strXML)
          Deprecated.  
 java.lang.String SerializeToXML()
          Serializes an IPTMigrationElement to an XML string.
 void SetClassID(int nClassID)
          Sets the classID of the underlying object.
 void SetFolderID(int nFolderID)
          Returns the folderID where the serialized object resides.
 void SetMigrationComment(java.lang.String strMigrationComment)
          Sets the migration comment for the object.
 void SetMigrationConfigBagSettings(com.plumtree.openfoundation.util.IXPPropertyBag migrationConfigBag)
          Sets user specified migration configuration options, such as export parent folders.
 void SetRootAsActiveElement()
          Sets the root element as the active element when enumerating over the tree nodes in the IPTMigrationElement.
 void SetUUID(java.lang.String strValue)
          Sets the UUID (Universally Unique Identifier) of the serialized object.
 void WriteArray(java.lang.String strArrayName, java.lang.String strElementName, java.lang.String[] asColumnNames, java.lang.Object[] oaValues)
          Creates a new child node and associates a 1-D array of primitive datatypes as the value.
 void WriteArray(java.lang.String strArrayName, java.lang.String strElementName, java.lang.String[] asColumnNames, java.lang.Object[][] oaValues)
          Creates a new child node and associates a 1-D array of primitive datatypes as the value.
 void WriteArrayOfObjectReferences(java.lang.String strElementName, int[][] iaObjects)
          Writes an array of object references into the IPTMigrationElement.
 void WriteSimpleElement(java.lang.String strElementName, double dValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String strElementName, float fValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String strElementName, int nValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String bstrElementName, com.plumtree.openfoundation.util.IXPPropertyBag pbagValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String strElementName, java.lang.Object oValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String strElementName, java.lang.String strValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 void WriteSimpleElement(java.lang.String strElementName, com.plumtree.openfoundation.util.XPDateTime xpdtValue)
          Creates a new child node of the currently active element, with the specified name, and associates a value with the node.
 

Method Detail

GetDependencies

java.lang.Object[][] GetDependencies()
Returns all dependencies for this object, as a 2-D array.

Returns:
A 2-D array of dependencies. Each row represents an object dependency, and columns are from the PT_OBJECT_DEPENDENCY_COLS enumeration.

CheckDependencies

java.lang.Object[][] CheckDependencies()
Returns only missing dependencies for this object, as a 2-D array.

Returns:
A 2-D array of dependencies. Each row represents an object dependency, and columns are from the PT_OBJECT_DEPENDENCY_COLS enumeration.

ApplyDependencyMapping

void ApplyDependencyMapping(java.lang.String strSourceUUID,
                            java.lang.String strMappedUUID)
Applies a dependency mapping to this IPTMigrationElement. Used to substitute a missing dependency with an existing object on a target system.

Parameters:
strSourceUUID - - The UUID of the missing object from the source system.
strMappedUUID - - The UUID of the object on the target system to be used as a replacement.

GetClassID

int GetClassID()
Returns the classID of the underlying object.

Returns:
The classID.

SetClassID

void SetClassID(int nClassID)
Sets the classID of the underlying object. Can only be set once per instance of an IPTMigrationElement.

Parameters:
nClassID - - The classid.

GetFolderID

int GetFolderID()
Returns the folderID where the serialized object resides. Can be an admin folder ID or document folder ID, depending on the object.

Returns:
The objectID of the folder.

SetFolderID

void SetFolderID(int nFolderID)
Returns the folderID where the serialized object resides. Will be interpreted as an admin folder ID or a document folder ID, depending on the object.

Parameters:
nFolderID - - The objectID of the folder.

GetMigrationComment

java.lang.String GetMigrationComment()
Returns the migration comment used when requesting migration for the object.

Returns:
The migration comment.

SetMigrationComment

void SetMigrationComment(java.lang.String strMigrationComment)
Sets the migration comment for the object.

Parameters:
strMigrationComment - - The migration comment.

SetRootAsActiveElement

void SetRootAsActiveElement()
Sets the root element as the active element when enumerating over the tree nodes in the IPTMigrationElement.


BeginComplexElement

void BeginComplexElement(java.lang.String strElementName,
                         boolean bWriting)
Begins an element with child nodes (a scope) when reading or writing to the IPTMigrationElement, and sets the node as the active element.

Parameters:
strElementName - - The name of the element (scope) to begin.
bWriting - - Pass true if writing to the element, false if reading.

EndComplexElement

void EndComplexElement(java.lang.String strElementName)
Ends an element with child nodes (a scope) when reading or writing to the IPTMigrationElement, and sets the parent node as the active element.

Parameters:
strElementName - - The name of the element (scope) to end.

ReadSimpleElementAsObject

java.lang.Object ReadSimpleElementAsObject(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsInt

int ReadSimpleElementAsInt(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsString

java.lang.String ReadSimpleElementAsString(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsXPDateTime

com.plumtree.openfoundation.util.XPDateTime ReadSimpleElementAsXPDateTime(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsFloat

float ReadSimpleElementAsFloat(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsDouble

double ReadSimpleElementAsDouble(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

ReadSimpleElementAsIXPPropertyBag

com.plumtree.openfoundation.util.IXPPropertyBag ReadSimpleElementAsIXPPropertyBag(java.lang.String strElementName)
Reads a value from the specified child node of the currently active element.

Parameters:
strElementName - - The name of the child node.
Returns:
- The value associated with the child node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        java.lang.Object oValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
oValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        int nValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
nValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        java.lang.String strValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
strValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        com.plumtree.openfoundation.util.XPDateTime xpdtValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
xpdtValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        float fValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
fValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String strElementName,
                        double dValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
dValue - - The value to associate with the new node.

WriteSimpleElement

void WriteSimpleElement(java.lang.String bstrElementName,
                        com.plumtree.openfoundation.util.IXPPropertyBag pbagValue)
Creates a new child node of the currently active element, with the specified name, and associates a value with the node.

Parameters:
strElementName - - The name of the new child node.
pbagValue - - The value to associate with the new node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            int nNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
nNewValue - - The new value to associate with the child node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            java.lang.String strNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
strNewValue - - The new value to associate with the child node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            com.plumtree.openfoundation.util.XPDateTime xpdtNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
xpdtNewValue - - The new value to associate with the child node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            float fNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
fNewValue - - The new value to associate with the child node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            double dNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
dNewValue - - The new value to associate with the child node.

OverwriteSimpleElement

void OverwriteSimpleElement(java.lang.String strElementName,
                            com.plumtree.openfoundation.util.IXPPropertyBag pbagNewValue)
Overwrites the value of an existing child element of the currently active node.

Parameters:
strElementName - - The name of the child element.
pbagNewValue - - The new value to associate with the child node.

RemoveElement

void RemoveElement(java.lang.String strElementName)
Removes the child element with the specified name.

Parameters:
strElementName - - The name of the child element to remove.

ReadArrayOfObjectReferences

int[][] ReadArrayOfObjectReferences(java.lang.String strElementName)
Reads an array of object references from the IPTMigrationElement.

Parameters:
strElementName - - The name of the child element containing the object references.
Returns:
A 2-D array of int. Each row represents an object reference. The columns returned are: the dependency type from PT_OBJECT_DEPENDENCY_TYPES in the 0th column, the classID from PT_CLASSIDS in the 1st column, and the objectID of the object in the 2nd column.

WriteArrayOfObjectReferences

void WriteArrayOfObjectReferences(java.lang.String strElementName,
                                  int[][] iaObjects)
Writes an array of object references into the IPTMigrationElement.

Parameters:
strElementName - - The name of the child element containing the object references.
iaObjects - - A 2-D array of int. Each row represents an object reference. The columns of the array are: the dependency type from PT_OBJECT_DEPENDENCY_TYPES in the 0th column, the classID from PT_CLASSIDS in the 1st column, and the objectID of the object in the 2nd column.

ReadArrayAsObject1DArray

java.lang.Object[] ReadArrayAsObject1DArray(java.lang.String strArrayName,
                                            java.lang.String[] asColumnNames)
Reads an array of primitive types from an IPTMigrationElement. Each object in the array has an innter element name which contains the simple datatype (int, String, float, double, or IXPPropertyBag).

Parameters:
strArrayName - - The name of the child element containing the array of objects.
asColumnNames - - The column name of the object.
Returns:
A 1-D array of Objects wrapping primitive values.

ReadArrayAsObject2DArray

java.lang.Object[][] ReadArrayAsObject2DArray(java.lang.String strArrayName,
                                              java.lang.String[] asColumnNames)
Reads an array of primitive types from an IPTMigrationElement. Each object in the array can have multiple columns, with each column holding a simple datatype (int, String, float, double, or IXPPropertyBag).

Parameters:
strArrayName - - The name of the child element containing the array of objects.
asColumnNames - - The columns of the object.
Returns:
A 2-D array of Objects wrapping primitive values.

WriteArray

void WriteArray(java.lang.String strArrayName,
                java.lang.String strElementName,
                java.lang.String[] asColumnNames,
                java.lang.Object[] oaValues)
Creates a new child node and associates a 1-D array of primitive datatypes as the value.

Parameters:
strArrayName - - The name of the child node.
strElementName - The name of each element in the array.
asColumnNames - - The names of the columns in the array.
oaValues - The 1-D array of Objects wrapping primitive values (int, String, float, double, or IXPPropertyBag).

WriteArray

void WriteArray(java.lang.String strArrayName,
                java.lang.String strElementName,
                java.lang.String[] asColumnNames,
                java.lang.Object[][] oaValues)
Creates a new child node and associates a 1-D array of primitive datatypes as the value.

Parameters:
strArrayName - - The name of the child node.
strElementName - The name of each element in the array.
asColumnNames - - The names of the columns in the array.
oaValues - The 2-D array of Objects wrapping primitive values (int, String, float, double, or IXPPropertyBag).

RestoreFromXML

void RestoreFromXML(java.lang.String strXML)
Deprecated. 

Deprecated. Populates an IPTMigrationElement from an XML string.

Parameters:
strXML - - The XML string to use to populate the IPTMigrationElement.

SerializeToXML

java.lang.String SerializeToXML()
Serializes an IPTMigrationElement to an XML string.

Returns:
- The XML string.

ChildElementExists

boolean ChildElementExists(java.lang.String strElementName)
Tests whether or not a child element of the specified name exists.

Parameters:
strElementName - - The name of the element to check for.
Returns:
true if the child element exists, false otherwise.

GetUUID

java.lang.String GetUUID()
Returns the UUID (Universally Unique Identifier) of the serialized object.

Returns:
The UUID.

SetUUID

void SetUUID(java.lang.String strValue)
Sets the UUID (Universally Unique Identifier) of the serialized object. Can only be called once the IPTMigrationElement has been populated.

Parameters:
strValue - - The UUID.

GetName

java.lang.String GetName()
Returns the name of the serialized object.

Returns:
The name.

GetDescription

java.lang.String GetDescription()
Returns the description of the serialized object.

Returns:
The description.

GetFolderPath

java.lang.String GetFolderPath()
Returns the full path to the folder where the serialized object resides.

Returns:
The folder path.

SetMigrationConfigBagSettings

void SetMigrationConfigBagSettings(com.plumtree.openfoundation.util.IXPPropertyBag migrationConfigBag)
Sets user specified migration configuration options, such as export parent folders.

Parameters:
migrationConfigBag - An IXPPropertyBag representing migration manager settings. Keys can be found in PTMigrationConstants.