wt.epm
Class ReviseManagerUtility

java.lang.Object
  extended bywt.epm.ReviseManagerUtility

public class ReviseManagerUtility
extends Object


Field Summary
(package private) static String EPM_FAMILY_REVISE_IN_PROGRESS
           
(package private) static String EPM_MULTI_REVISE_IN_PROGRESS
           
private static String EPMRESOURCE
           
 
Constructor Summary
ReviseManagerUtility()
           
 
Method Summary
private static QueryResult copyAsStoredConfigForRevise(QueryResult revisedObjects)
          Copy forward as-stored configurations for a set of documents.
private static EPMBuildHistory getBuildHistory(WTPart part, EPMDocument document)
           
private static EPMBuildRule getBuildRule(WTPart part)
           
private static EPMContainedIn getContainedInLink(EPMDocument generic, EPMDocument instance)
           
private static EPMDocument getEPMDocumentNewVersion(QueryResult result)
           
private static ObjectIdentifier getOID(Persistable object)
           
private static Persistable[] makePair(Persistable first, Persistable second)
           
private static Versioned revise(Versioned originalVersion, TeamTemplate teamTemplate, ReviseOptions.ObjectOptions options)
           
protected static QueryResult reviseAll(Collection toRevise)
           
protected static QueryResult reviseAll(Collection toRevise, ReviseOptions options, ConfigSpec partConfigSpec)
          Deprecated. at R8.0, use reviseALL( WTKeyedMap)
static WTKeyedMap reviseAll(WTKeyedMap toRevise)
          This method creates a new in-line version of the EPMDocuments and WTParts given.
private static Object reviseDocAndPart(ReviseOptions docOption, Map toRevise, Map revisedObjects)
           
protected static QueryResult reviseDocsAndParts(EPMDocument[] docsToRevise, ReviseOptions options, ConfigSpec partConfigSpec)
          Deprecated. at R8.0, use reviseALL( WTKeyedMap)
private static void reviseFamilyAndParts(EPMFamily family, Map toRevise, Map revisedObjects, ObjectSetVector objectPairs)
           
protected static QueryResult reviseFamilyAndParts(EPMFamily family, ReviseOptions options, ConfigSpec partConfigSpec)
          Deprecated. at R8.0, use reviseALL( WTKeyedMap)
protected static EPMBuildRule revisePartAndDoc(ReviseOptions docOption, ReviseOptions partOption, Map revisedObjects)
           
protected static QueryResult revisePartsAndDoc(EPMDocument docToRevise, ReviseOptions options, ConfigSpec partConfigSpec)
          Deprecated. Use reviseDocsAndParts(wt.epm.EPMDocument[], wt.epm.ReviseOptions, wt.vc.config.ConfigSpec)
protected static QueryResult revisePartsAndDoc(ObjectVector partsToRevise, ReviseOptions options)
          Deprecated. Get the build source document and then use reviseDocsAndParts(wt.epm.EPMDocument[], wt.epm.ReviseOptions, wt.vc.config.ConfigSpec) instead.
protected static QueryResult revisePartsAndDocs(ObjectVector partsToRevise, ReviseOptions options)
          This method creates new in-line versions of the given WTParts as well as a new in-line versions of EPMDocuments that build them.
private static void setEPMFamilyReviseInProgress(boolean inProgress)
           
private static void setEPMMultiReviseInProgress(boolean inProgress)
           
private static Versioned updateRevised(Versioned originalVersion, Versioned newVersion, TeamTemplate teamTemplate, ReviseOptions.ObjectOptions options)
           
private static void validateReviseFolders(Folder partFolder, Folder docFolder)
          Perform validation on the part and doc folders specified in revise options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

EPM_FAMILY_REVISE_IN_PROGRESS

static final String EPM_FAMILY_REVISE_IN_PROGRESS
See Also:
Constant Field Values

EPM_MULTI_REVISE_IN_PROGRESS

static final String EPM_MULTI_REVISE_IN_PROGRESS
See Also:
Constant Field Values
Constructor Detail

ReviseManagerUtility

public ReviseManagerUtility()
Method Detail

reviseAll

public static WTKeyedMap reviseAll(WTKeyedMap toRevise)
                            throws WTException
This method creates a new in-line version of the EPMDocuments and WTParts given. It will match up the WTParts with the associated parts, and for those that are associated, it copies the existing build rules from the original versions to the new versions. Such that, the new version of the EPMDocument builds the new versions of the WTParts while the original version continues to build the original versions. If all instances along with the generic are passed in, the entire family is revised together, along with all associated WTParts. Instances and generics sent in without the complete family shall be revised independently.

This method returns a WTKeyedHashMap where the key is the original object and the value, the new version.

Parameters:
toRevise - the key is the object to revise, the value a ReviseOptions object.
Returns:
WTKeyedMap
Throws:
WTException

updateRevised

private static Versioned updateRevised(Versioned originalVersion,
                                       Versioned newVersion,
                                       TeamTemplate teamTemplate,
                                       ReviseOptions.ObjectOptions options)
                                throws WTException,
                                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getBuildRule

private static EPMBuildRule getBuildRule(WTPart part)
                                  throws WTException
Throws:
WTException

getBuildHistory

private static EPMBuildHistory getBuildHistory(WTPart part,
                                               EPMDocument document)
                                        throws WTException
Throws:
WTException

getContainedInLink

private static EPMContainedIn getContainedInLink(EPMDocument generic,
                                                 EPMDocument instance)
                                          throws WTException
Throws:
WTException

copyAsStoredConfigForRevise

private static QueryResult copyAsStoredConfigForRevise(QueryResult revisedObjects)
                                                throws WTException
Copy forward as-stored configurations for a set of documents. This is used when multiple documents are revised together

Throws:
WTException

validateReviseFolders

private static void validateReviseFolders(Folder partFolder,
                                          Folder docFolder)
                                   throws WTException
Perform validation on the part and doc folders specified in revise options. Throws exception if Part folder is in shared cabinet but document folder is in personal cabinet. (This check is required to prevent build failures on revised objects)

Throws:
WTException

reviseAll

protected static QueryResult reviseAll(Collection toRevise)
                                throws WTException
Throws:
WTException

reviseFamilyAndParts

private static void reviseFamilyAndParts(EPMFamily family,
                                         Map toRevise,
                                         Map revisedObjects,
                                         ObjectSetVector objectPairs)
                                  throws WTException,
                                         WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

revisePartAndDoc

protected static EPMBuildRule revisePartAndDoc(ReviseOptions docOption,
                                               ReviseOptions partOption,
                                               Map revisedObjects)
                                        throws WTException,
                                               WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

reviseDocAndPart

private static Object reviseDocAndPart(ReviseOptions docOption,
                                       Map toRevise,
                                       Map revisedObjects)
                                throws WTException,
                                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getEPMDocumentNewVersion

private static EPMDocument getEPMDocumentNewVersion(QueryResult result)

makePair

private static Persistable[] makePair(Persistable first,
                                      Persistable second)

setEPMFamilyReviseInProgress

private static void setEPMFamilyReviseInProgress(boolean inProgress)

setEPMMultiReviseInProgress

private static void setEPMMultiReviseInProgress(boolean inProgress)

revisePartsAndDoc

protected static QueryResult revisePartsAndDoc(EPMDocument docToRevise,
                                               ReviseOptions options,
                                               ConfigSpec partConfigSpec)
                                        throws WTException
Deprecated. Use reviseDocsAndParts(wt.epm.EPMDocument[], wt.epm.ReviseOptions, wt.vc.config.ConfigSpec)

This method creates a new in-line version of the given EPMDocument as well as new in-line versions of all WTParts that the document builds. It copies the existing build rules from the original versions to the new versions. Such that, the new version of the EPMDocument builds the new versions of the WTParts while the original version continues to build the original versions.

This method returns a QueryResult of object pairs. If the EPMDocument does not build any WTParts, this method will return an EPMDocument[2]. If it does, this method will return one EPMBuildRule[2] for each WTPart that the EPMDocument builds. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

Parameters:
docToRevise - EPMDocument to revise
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project. If reviseParts property is set to false, only documents are revised else built parts are also revised.
partConfigSpec - configuration spec used to find the appropriate version of each WTPart that the given EPMDocument builds
Returns:
QueryResult
Throws:
WTException

revisePartsAndDoc

protected static QueryResult revisePartsAndDoc(ObjectVector partsToRevise,
                                               ReviseOptions options)
                                        throws WTException
Deprecated. Get the build source document and then use reviseDocsAndParts(wt.epm.EPMDocument[], wt.epm.ReviseOptions, wt.vc.config.ConfigSpec) instead.

This method creates new in-line versions of the given WTParts as well as a new in-line versions of EPMDocuments that build them. It copies the existing build rules from the original versions to the new versions. Such that, the new versions of the EPMDocuments build the new versions of the WTParts while the original versions continue to build the original versions.

This method returns a QueryResult of object pairs. For each WTPart that is not built by an EPMDocument, this method will return a WTPart[2]. For each WTPart that is built, this method will return an EPMBuildRule[2]. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

This method does not attempt to revise family of objects together. If you need to revise all the members of family together, use reviseFamilyAndParts(wt.epm.EPMFamily, java.util.Map, java.util.Map, wt.fc.ObjectSetVector) method.

Parameters:
partsToRevise - list of the WTParts to revise
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project.
Returns:
QueryResult
Throws:
WTException

reviseDocsAndParts

protected static QueryResult reviseDocsAndParts(EPMDocument[] docsToRevise,
                                                ReviseOptions options,
                                                ConfigSpec partConfigSpec)
                                         throws WTException
Deprecated. at R8.0, use reviseALL( WTKeyedMap)

This method creates a new in-line version of the given EPMDocuments as well as new in-line versions of all WTParts that the document builds. It copies the existing build rules from the original versions to the new versions. Such that, the new version of the EPMDocument builds the new versions of the WTParts while the original version continues to build the original versions.

This method returns a QueryResult of object pairs. If the EPMDocument does not build any WTParts, this method will return an EPMDocument[2]. If it does, this method will return one EPMBuildRule[2] for each WTPart that the EPMDocument builds. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

This method does not attempt to revise documents in a family together. Use reviseFamilyAndParts(wt.epm.EPMFamily, java.util.Map, java.util.Map, wt.fc.ObjectSetVector) if you need to revise all the members of the family together.

Parameters:
docsToRevise - Array of EPMDocuments to revise
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project. If reviseParts property is set to false, only documents are revised else built parts are also revised.
partConfigSpec - configuration spec used to find the appropriate version of each WTPart that the given EPMDocument builds
Returns:
QueryResult
Throws:
WTException

reviseFamilyAndParts

protected static QueryResult reviseFamilyAndParts(EPMFamily family,
                                                  ReviseOptions options,
                                                  ConfigSpec partConfigSpec)
                                           throws WTException
Deprecated. at R8.0, use reviseALL( WTKeyedMap)

This method creates a new in-line version of the all the member EPMDocuments of the given EPMFamily, as well as new in-line versions of all WTParts that these documents builds. It copies the existing build rules from the original versions to the new versions. Such that, the new version of the EPMDocument builds the new versions of the WTParts while the original version continues to build the original versions.

EPMFamily should be complete (i.e. all the instances) should be added in family. Use EPMFamily.getEPMFamily(EPMDocument generic) to create/load EPMFamily.

This method returns a QueryResult of object pairs. If the EPMDocument does not build any WTParts, this method will return an EPMDocument[2]. If it does, this method will return one EPMBuildRule[2] for each WTPart that the EPMDocument builds. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

Parameters:
family - EPMFamily to be revised.
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project. If reviseParts property is set to false, only documents are revised else built parts are also revised.
partConfigSpec - configuration spec used to find the appropriate version of each WTPart that the given EPMDocument builds
Returns:
QueryResult
Throws:
WTException

reviseAll

protected static QueryResult reviseAll(Collection toRevise,
                                       ReviseOptions options,
                                       ConfigSpec partConfigSpec)
                                throws WTException
Deprecated. at R8.0, use reviseALL( WTKeyedMap)

This method creates a new in-line version of the given EPMDocuments and EPMFamilies as well as new in-line versions of all WTParts that the document builds. It copies the existing build rules from the original versions to the new versions. Such that, the new version of the EPMDocument builds the new versions of the WTParts while the original version continues to build the original versions. In the case of an EPMFamily, the entire family is revised together, along with all associated WTParts. Instances and generics sent in as EPMDocuments shall be revised independently.

EPMFamily should be complete (i.e. all the instances) should be added in family. Use EPMFamily.getEPMFamily(EPMDocument generic) to create/load EPMFamily.

PLEASE NOTE that this API is temporary and will change.

This method returns a QueryResult of object pairs. If the EPMDocument does not build any WTParts, this method will return an EPMDocument[2]. If it does, this method will return one EPMBuildRule[2] for each WTPart that the EPMDocument builds. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

Parameters:
toRevise - Collection of EPMDocuments and EPMFamilies to revise. Any other objects specified in the array are ignored
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project. If reviseParts property is set to false, only documents are revised else built parts are also revised.
partConfigSpec - configuration spec used to find the appropriate version of each WTPart that the given EPMDocument builds
Returns:
QueryResult
Throws:
WTException

revisePartsAndDocs

protected static QueryResult revisePartsAndDocs(ObjectVector partsToRevise,
                                                ReviseOptions options)
                                         throws WTException
This method creates new in-line versions of the given WTParts as well as a new in-line versions of EPMDocuments that build them. It copies the existing build rules from the original versions to the new versions. Such that, the new versions of the EPMDocuments build the new versions of the WTParts while the original versions continue to build the original versions.

This method returns a QueryResult of object pairs. For each WTPart that is not built by an EPMDocument, this method will return a WTPart[2]. For each WTPart that is built, this method will return an EPMBuildRule[2]. The first element in the array contains the new version or build rule while the second contains the original version or build rule.

This method does not attempt to revise family of objects together. If you need to revise all the members of family together, use reviseFamilyAndParts(wt.epm.EPMFamily, java.util.Map, java.util.Map, wt.fc.ObjectSetVector) method.

Parameters:
partsToRevise - list of the WTParts to revise
options - list of properties to assign to the newly created versions. If a property is not specified (i.e. set to null), the new version inherits the value for that property from the original version. The properties that you may specify are a folder and life cycle template for documents, a folder and life cycle template for parts and a project.
Returns:
QueryResult
Throws:
WTException

revise

private static Versioned revise(Versioned originalVersion,
                                TeamTemplate teamTemplate,
                                ReviseOptions.ObjectOptions options)
                         throws WTException,
                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getOID

private static ObjectIdentifier getOID(Persistable object)