Interface VersionControlService
- All Known Implementing Classes:
StandardVersionControlService
Mastered
(unchanging), Versioned (major change) and Iterated (minor
change) objects to implement version control. There is also a server-accessible-only
VersionControlSvrService.
- Cookie:
VersionInfo,IterationInfo - Helper:
VersionControlHelperprovides helper methods - Service implementation:
StandardVersionControlServicehas listeners - ServiceEvent:
VersionControlServiceEvent - ServiceException:
VersionControlException
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionallIterations(WTCollection masters, boolean filterTerminals) Given a WTCollection of masters, this function returns a map where key = master(ObjectReference) and value = WTCollection of iterations of that master.allIterationsFrom(WTCollection iterations) Finds all of the iterations of each master from the first one created to the given iteration.allIterationsFrom(Iterated iteration) Finds all of the iterations of a master from the first one created to the given iteration.allIterationsFrom(Iterated iteration, boolean includeDerivedFroms) Finds all of the iterations of a master from the first one created to the given iteration.allIterationsFrom(Iterated iteration, boolean includeDerivedFroms, boolean filterTerminals) Finds all of the iterations of a master from the first one created to the given iteration.allIterationsOf(Mastered master) Finds all of the iterations of the given master.allIterationsOf(Mastered master, boolean filterTerminals) Finds all of the iterations of the given master.allIterationsOf(Mastered master, boolean filterTerminals, boolean filterPrivateWorkingCopies) Finds all of the iterations of the given master.allVersionsFrom(WTCollection versionedObjects) Finds all of the versions of each master from the first one created to the given version.allVersionsFrom(Versioned version) Finds all of the versions of a master from the first one created to the given version.allVersionsOf(WTCollection masters, boolean filterTerminals) Finds all of the versions associated with the given collection of masters.allVersionsOf(WTCollection masters, Class versionClass) Finds all of the versions associated with the given collection of masters.allVersionsOf(Mastered master) Finds all of the versions of the given master.allVersionsOf(Mastered master, boolean includeDerivedFroms) Finds all of the versions of the given master.allVersionsOf(Versioned version) Finds all of the versions associated [via its master] with the given version.voiddeleteIterations(WTCollection iterations, ConflictResolution[] resolvers) This is for deletion of selective iterations.voiddeleteIterations(WTCollection iterations, ConflictResolution[] resolvers, boolean changeModifyStamp) This is for deletion of selective iterations.voiddeleteIterations(Iterated beginIteration, Iterated endIteration) Deletes all iterations between beginIteration and endIteration of same version.voiddeleteIterations(Iterated beginIteration, Iterated endIteration, boolean changeModifyStamp) Deletes all iterations between beginIteration and endIteration of same version.derivedFrom(Iterated iteration) Given an iteration, return its derived from iteration or null if one does not exist.derivedFroms(WTCollection iterations) Given a collection of iterations, return a WTValuedMap with keys = objects in iterations that have a derivedFrom, values = corresponding derivedFrom iterations.String[]getAvailableVersionLabels(Versioned version, String versionLabel, ViewReference view, boolean onlySuccessors, int n) Return versions that are available to create new versions.getLatestIteration(Iterated iteration, boolean includeMarkedForDelete) Get the "latest" iteration in the same branch as the given one.getLatestIterations(WTCollection iterations, boolean includeMarkedForDelete) Get the "latest" iteration in the same branch as the ones passed in the collection.String[]getNextCommonLabels(WTCollection version, int n) Given a collection of Versioned objects return the next n version labels that are valid for all versions.String[]getNextVersionLabels(Versioned version, int n) Get the series for the input version and return the next n valid version labels.String[]getNextVersionLabels(Versioned version, LifeCycleTemplateReference lct, int n) Gets the next n version labels.booleanisFirstIteration(Iterated iteration) Tests if the given iteration is the first one in the version branch.iterationsOf(long branch, Class iteratedClass) Finds only the iterations directly associated with the given branch id.iterationsOf(WTCollection iterations, Class iteratedClass, boolean includeLatest) Finds only the iterations directly associated with the given colletion of iterated objects.iterationsOf(Iterated iteration) Finds only the iterations directly associated with the given one.newAdHocStringVersion(AdHocStringVersioned version, String adHocVersionId) Creates a new in-line version with the given adHocVersionId assigned.Makes a new branched version from the given one using it as a branch point, which may or may not be the "latest" iteration.newIteration(Iterated iteration, boolean copyAttributes) Makes a new iteration/version as a copy from the given one, and does not increment its identifier.newOneOffVersion(OneOffVersioned version) Creates a new in-line version from the given version.newUncontrolledVersion(Versioned version) Makes a new version from the given version.newVersion(Versioned version) Makes a new in-lined version from the given version.newVersion(Versioned version, boolean allowNonLatestRevise) Makes a new in-lined version from the given version.newVersion(Versioned version, VersionIdentifier version_id, IterationIdentifier iteration_id) Makes a new in-lined version from the given version.newVersion(Versioned version, VersionIdentifier versionId, IterationIdentifier iterationId, boolean allowNonLatestRevise) Makes a new in-lined version from the given version.newVersionable(Versionable version) API intended to be called internally by any API that intends to create a new version.newVersionables(WTList versions) API intended to be called internally by any API that intends to create a new version.newVersions(WTCollection versions) Makes new in-lined versions from the given versions.newVersions(WTCollection versions, boolean allowNonLatestRevise) Makes a new in-lined version from the given version.newVersions(WTKeyedMap versionMap) Makes new in-lined versions from the given versions.newVersions(WTKeyedMap versionMap, boolean allowNonLatestRevise) Makes new in-lined versions from the given versions.predecessorOf(Iterated iteration) Finds the predecessor of the iteration.refresh(VersionForeignKey key) Retrieves a Iterated object given its VersionForeignKey.Deletes all iterations starting at the latest iteration in a version back to, but not including, a specified iteration in the same version.Deletes all iterations starting at the first iteration in a version up to, but not including, a specified iteration in the same version.supersede(WTValuedMap iterationReplacementMap) Supersedes each iteration passed as the key in the WTValuedMap with the corresponding iteration value in the WTValuedMap.Supersedes the first iteration with the other iteration.
-
Method Details
-
newBranch
Versioned newBranch(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException Makes a new branched version from the given one using it as a branch point, which may or may not be the "latest" iteration. The newly branched version's identifier is moved to the next level to the right and reset. This method may only be called for objects that are Versioned and ViewManageable.
Supported API: true- Parameters:
version-- Returns:
- Versioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersion
Versioned newVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException Makes a new in-lined version from the given version. The newly in-lined version's identifier is incremented. This API checks that the user has REVISE permission for the given version.
Supported API: true- Parameters:
version-- Returns:
- Versioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersion
Versioned newVersion(Versioned version, VersionIdentifier version_id, IterationIdentifier iteration_id) throws WTException, VersionControlException, WTPropertyVetoException Makes a new in-lined version from the given version. The newly in-lined version's version and iteration identifiers are set to the values passed in to this method. This API checks that the user has REVISE permission for the given version.
Supported API: true- Parameters:
version-version_id-iteration_id-- Returns:
- Versioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersion
Makes a new in-lined version from the given version. The newly in-lined version's identifier is incremented. Creation of a new version from a non-latest version is optionally allowed. This API checks that the user has REVISE permission for the given version and the latest version.
Supported API: true- Parameters:
version-allowNonLatestRevise- If true will allow revise of non-latest versions. This is independent of the preference setting to allow non-latest revise for a system. The system will only do a non-latest revise if this boolean and the allow non-latest revise preference are true.- Returns:
- Versioned
- Throws:
WTException
-
newVersion
Versioned newVersion(Versioned version, VersionIdentifier versionId, IterationIdentifier iterationId, boolean allowNonLatestRevise) throws WTException Makes a new in-lined version from the given version. The newly in-lined version's version and iteration identifiers are set to the values passed in to this method. Creation of a new version from a non-latest version is optionally allowed. This API checks that the user has REVISE permission for the given version and the latest version.
Supported API: true- Parameters:
version-versionId-iterationId-allowNonLatestRevise- If true will allow revise of non-latest versions. This is independent of the preference setting to allow non-latest revise for a system. The system will only do a non-latest revise if this boolean and the allow non-latest revise preference are true.- Returns:
- Versioned
- Throws:
WTException
-
newUncontrolledVersion
Versioned newUncontrolledVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException Makes a new version from the given version. The new version will not be placed into the version tree (i.e. the predecessor will not be set) nor will it's version and iteration identifiers be set. The expected use for this api is to build a version tree out of order via data loading, replication or other direct data creation means. This API checks for REVISE permissions.
Supported API: true- Parameters:
version-- Returns:
- Versioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newAdHocStringVersion
AdHocStringVersioned newAdHocStringVersion(AdHocStringVersioned version, String adHocVersionId) throws WTException, VersionControlException, WTPropertyVetoException Creates a new in-line version with the given adHocVersionId assigned.
Supported API: true- Parameters:
version-adHocVersionId-- Returns:
- AdHocStringVersioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
getNextCommonLabels
String[] getNextCommonLabels(WTCollection version, int n) throws VersionControlException, WTException Given a collection of Versioned objects return the next n version labels that are valid for all versions. Uses the revision label delegateVersionLabelFilterDelegateif one has been registered to do further filtering of revision labels.
Supported API: true- Parameters:
version-n-- Returns:
- String[]
- Throws:
VersionControlExceptionWTException
-
newOneOffVersion
OneOffVersioned newOneOffVersion(OneOffVersioned version) throws WTException, VersionControlException, WTPropertyVetoException Creates a new in-line version from the given version. When persisted, a one-off version identifier will be assigned to the object. This API checks for REVISE permissions.
Supported API: true- Parameters:
version-- Returns:
- OneOffVersioned
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersionable
Versionable newVersionable(Versionable version) throws WTException, VersionControlException, WTPropertyVetoException API intended to be called internally by any API that intends to create a new version. It creates a new in-line version (with a new branch identifier), resets the iteration identifier, and assigns the version creator.
Supported API: true- Parameters:
version-- Returns:
- Versionable
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
supersede
Iterated supersede(Iterated iteration, Iterated replacement) throws WTException, VersionControlException, WTPropertyVetoException Supersedes the first iteration with the other iteration. Also, the superseding iteration's identifier is incremented.
Supported API: true- Parameters:
iteration-replacement-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
rollback
Iterated rollback(Iterated iteration, Iterated reversion) throws WTException, VersionControlException, WTPropertyVetoException Deletes all iterations starting at the latest iteration in a version back to, but not including, a specified iteration in the same version. The iteration that is rolled back to (reversion) becomes the latest iteration. Returns the reversion if the operation is successful. If the two iterations involved in the rollback are identical null is returned.Note: Since R3.0 rollback has changed its implementation from allowing a rollback between any two iterations, potentially from different versions, to the one described above.
It will throw conflict exception for branch point deletion if there exist iterations on successor branches.
Supported API: true- Parameters:
iteration-reversion-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
rollup
Iterated rollup(Iterated iteration, Iterated culmination) throws WTException, VersionControlException, WTPropertyVetoException Deletes all iterations starting at the first iteration in a version up to, but not including, a specified iteration in the same version. The iteration that is rolled up to (culmination) becomes the first iteration. Returns the culmination if the operation is successful. If the two iterations involved in the rollup are identical null is returned.Note: Since R3.0 rollup has changed its implementation from allowing a rollup between any two iterations, potentially from different versions, to the one described above.
It will throw conflict exception for branch point deletion if there exists iterations on successor branches.
Supported API: true- Parameters:
iteration-culmination-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
predecessorOf
Iterated predecessorOf(Iterated iteration) throws WTException, VersionControlException, PersistenceException Finds the predecessor of the iteration.
Supported API: true- Parameters:
iteration-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlExceptionPersistenceException
-
iterationsOf
Finds only the iterations directly associated with the given one. The result is an ordered list of iterations from the most recent one to the first one created for that version.
Supported API: true- Parameters:
iteration-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allIterationsOf
Finds all of the iterations of the given master. The result is an ordered list of iterations from the most recent one to the first one created for that version, e.g. (B.2, B.1, A.3, A.2, A.1).
Supported API: true- Parameters:
master-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allIterationsFrom
Finds all of the iterations of a master from the first one created to the given iteration. The result is an ordered list of iterations from the given iteration to the first one created. For example, if iteration B.2 is given, the list returned is B.2, B.1, A.2, A.1.
Supported API: true- Parameters:
iteration-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allIterationsFrom
Finds all of the iterations of each master from the first one created to the given iteration. The result is an ordered list of iterations from the given iteration to the first one created. For example, if iteration (B.2, A'.2) is given, the list returned is [(B.2, B.1, A.2, A.1), (A'.2, A'.1)].
Supported API: true- Parameters:
iterations-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsOf
Finds all of the versions associated [via its master] with the given version. The result is an ordered list of versions (i.e., latest iterations) from the most recent one to the first one created, e.g. (B, A).
Supported API: true- Parameters:
version-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsOf
Finds all of the versions of the given master. The result is an ordered list of versions (i.e., latest iterations) from the most recent one to the first one created, e.g. (B, A).
Supported API: true- Parameters:
master-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsOf
QueryResult allVersionsOf(WTCollection masters, Class versionClass) throws WTException, PersistenceException Finds all of the versions associated with the given collection of masters. The result for this API is *not* ordered.
Supported API: true- Parameters:
masters-versionClass-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsOf
QueryResult allVersionsOf(WTCollection masters, boolean filterTerminals) throws WTException, PersistenceException Finds all of the versions associated with the given collection of masters. The result for this API is *not* ordered. If filterTerminals is true, all terminals (and any iterations on the same branch) will be removed from the result set.
Supported API: true- Parameters:
masters-filterTerminals-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsFrom
Finds all of the versions of a master from the first one created to the given version. The result is an ordered list of versions (i.e., latest iterations) from the given iteration to the first one created. For example, if version C is given, the list returned is C, B, A.
Supported API: true- Parameters:
version-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsFrom
Finds all of the versions of each master from the first one created to the given version. The result is a map of version to an ordered list of versions (i.e., latest iterations)from the given version to the first one created. For example, if the input is [C, B'] the map returned is [(C, B, A), (B', A')].
Supported API: true- Parameters:
versionedObjects-- Returns:
- WTKeyedMap
- Throws:
WTExceptionPersistenceException
-
isFirstIteration
Tests if the given iteration is the first one in the version branch.
Supported API: true- Parameters:
iteration-- Returns:
- boolean
- Throws:
WTExceptionVersionControlException
-
iterationsOf
Finds only the iterations directly associated with the given branch id. The result is an ordered list of iterations from the most recent one to the first one created for that version.The branch id can uniquely identify a branch in a system based on its property of being unique since it's generated from the OID pool.
Supported API: true- Parameters:
branch-iteratedClass-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
iterationsOf
QueryResult iterationsOf(WTCollection iterations, Class iteratedClass, boolean includeLatest) throws WTException, PersistenceException Finds only the iterations directly associated with the given colletion of iterated objects. The result is not an ordered list.If the flag includeLatest is false then the latest iteration is not included in the resulted list of iterations.
Supported API: true- Parameters:
iterations-iteratedClass-includeLatest-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
newIteration
Iterated newIteration(Iterated iteration, boolean copyAttributes) throws WTException, VersionControlException, WTPropertyVetoException Makes a new iteration/version as a copy from the given one, and does not increment its identifier. Based on the boolean copyAttributes value, determines whether- ACLs
Lifecycle
Team Template and
Team
Supported API: true- Parameters:
iteration-copyAttributes-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
getLatestIteration
Iterated getLatestIteration(Iterated iteration, boolean includeMarkedForDelete) throws WTException, VersionControlException Get the "latest" iteration in the same branch as the given one. A check to see if the given iteration is the latest one is not made since it could be stale. Passing true for includeMarkedForDelete will attempt getting the latest iteratation even if marked for delete.
Supported API: true- Parameters:
iteration-includeMarkedForDelete-- Returns:
- Iterated
- Throws:
WTExceptionVersionControlException
-
deleteIterations
void deleteIterations(Iterated beginIteration, Iterated endIteration) throws WTException, VersionControlException, WTPropertyVetoException Deletes all iterations between beginIteration and endIteration of same version. Both beginIteration and endIteration will also get deleted. beginIteration should be chronologically smaller than endIteration. Also it will not delete all iterations in version, i.e., beginIteration can't be first of version and endIteration can't be latest of version simultaneously.
Supported API: true- Parameters:
beginIteration-endIteration-- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
deleteIterations
void deleteIterations(Iterated beginIteration, Iterated endIteration, boolean changeModifyStamp) throws WTException, VersionControlException, WTPropertyVetoException Deletes all iterations between beginIteration and endIteration of same version. Both beginIteration and endIteration will also get deleted. beginIteration should be chronologically smaller than endIteration. Also it will not delete all iterations in version, i.e., beginIteration can't be first of version and endIteration can't be latest of version simultaneously.
Supported API: true- Parameters:
beginIteration-endIteration-changeModifyStamp- If true update modifyStamp when re-chaining iterations.- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
deleteIterations
void deleteIterations(WTCollection iterations, ConflictResolution[] resolvers) throws WTException, VersionControlException, WTPropertyVetoException This is for deletion of selective iterations. List of iterations can include iterations from different versions and different masters. It can throw conflict exception for branch point deletion if all iterations on successor branches are not selected for deletion. Also, conflict exception is thrown during deletion of latest iteration and decision for deletion of latest iteration is taken on basis of resolutions provided.
Supported API: true- Parameters:
iterations- WTCollection of all iterations to be deleted.resolvers- Resolutions provided to resolve override-able conflicts.- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
getAvailableVersionLabels
String[] getAvailableVersionLabels(Versioned version, String versionLabel, ViewReference view, boolean onlySuccessors, int n) throws VersionControlException, WTException Return versions that are available to create new versions. Uses the revision label delegateVersionLabelFilterDelegateif one has been registered to do further filtering of revision labels.
Supported API: true- Parameters:
version-versionLabel- If not null will use this as a starting point for returning version labels. I.e., if n=3 and versionLabel="E" input then { F, G, H } will be returned if they are not already used.view-onlySuccessors- If true will only return labels that are successors to the input versionLabel value.n- Number of version labels to return- Returns:
- String[]
- Throws:
VersionControlExceptionWTException
-
supersede
WTValuedMap supersede(WTValuedMap iterationReplacementMap) throws WTException, VersionControlException, WTPropertyVetoException Supersedes each iteration passed as the key in the WTValuedMap with the corresponding iteration value in the WTValuedMap. Also, each superseding iteration's identifier is incremented.
Supported API: true- Parameters:
iterationReplacementMap-- Returns:
- WTValuedMap
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersions
WTValuedMap newVersions(WTCollection versions) throws WTException, VersionControlException, WTPropertyVetoException Makes new in-lined versions from the given versions. The newly in-lined versions' identifiers are incremented. This API checks that the user has REVISE permission for the given versions.
Supported API: true- Parameters:
versions-- Returns:
- WTValuedMap
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersions
WTValuedMap newVersions(WTKeyedMap versionMap) throws WTException, VersionControlException, WTPropertyVetoException Makes new in-lined versions from the given versions. The newly in-lined versions' version and iteration identifiers are set to the values passed in to this method. This API checks that the user has REVISE permission for the given versions.
Supported API: true- Parameters:
versionMap-- Returns:
- WTValuedMap
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
newVersions
Makes a new in-lined version from the given version. The newly in-lined version's identifier is incremented. Creation of new versions from non-latest versions is optionally allowed.
Supported API: true- Parameters:
versions-allowNonLatestRevise- If true will allow revise of non-latest versions. This is independent of the preference setting to allow non-latest revise for a system. The system will only do a non-latest revise if this boolean and the allow non-latest revise preference are true.- Returns:
- WTValuedMap
- Throws:
WTException
-
newVersions
Makes new in-lined versions from the given versions. The newly in-lined versions' identifiers are incremented. Creation of new versions from non-latest versions is optionally allowed. This API checks that the user has REVISE permission for the given versions and the latest versions.
Supported API: true- Parameters:
versionMap-allowNonLatestRevise-- Returns:
- WTValuedMap
- Throws:
WTException
-
newVersionables
WTList newVersionables(WTList versions) throws WTException, VersionControlException, WTPropertyVetoException API intended to be called internally by any API that intends to create a new version. It creates a new in-line version (with a new branch identifier), resets the iteration identifier, and assigns the version creator.
Supported API: true- Parameters:
versions-- Returns:
- WTList
- Throws:
WTExceptionVersionControlExceptionWTPropertyVetoException
-
refresh
Retrieves a Iterated object given its VersionForeignKey. The user must have READ permissions to the object.
Supported API: true- Parameters:
key-- Returns:
- Iterated
- Throws:
WTException
-
getLatestIterations
WTValuedMap getLatestIterations(WTCollection iterations, boolean includeMarkedForDelete) throws WTException, VersionControlException Get the "latest" iteration in the same branch as the ones passed in the collection. A check to see if the given iteration is the latest one is not made since it could be stale. Passing true for includeMarkedForDelete will attempt getting the latest iteratation even if marked for delete. The WTValuedMap that is returned gives a mapping from the iterations passed to the latest iterations found, a null value is returned for any non-persistent iterations passed, and for any working copies passed the same working copy will be the value.
Supported API: true- Parameters:
iterations-includeMarkedForDelete-- Returns:
- WTValuedMap
- Throws:
WTExceptionVersionControlException
-
deleteIterations
void deleteIterations(WTCollection iterations, ConflictResolution[] resolvers, boolean changeModifyStamp) throws VersionControlException, WTException, WTPropertyVetoException This is for deletion of selective iterations. List of iterations can include iterations from different versions and different masters. It can throw conflict exception for branch point deletion if all iterations on successor branches are not selected for deletion. Also, conflict exception is thrown during deletion of latest iteration and decision for deletion of latest iteration is taken on basis of resolutions provided.
Supported API: true- Parameters:
iterations- WTCollection of all iterations to be deleted.resolvers- Resolutions provided to resove oevrridable conflicts.changeModifyStamp- If true update modifyStamp when re-chaining iterations.- Throws:
VersionControlExceptionWTExceptionWTPropertyVetoException
-
getNextVersionLabels
String[] getNextVersionLabels(Versioned version, LifeCycleTemplateReference lct, int n) throws VersionControlException, WTException Gets the next n version labels. Looks up the version labels based on the specified LifeCycleTemplate and will not use the lifecycle template defined for version's container.
Supported API: true- Parameters:
version- If a container is set will look up series for that container. If no container set will return zero length array.lct- Assumes that the series to be defined will be the one defined for the first State in the LifeCycleTemplate. If null returns zero length array.n-- Returns:
- String[]
- Throws:
VersionControlExceptionWTException
-
getNextVersionLabels
Get the series for the input version and return the next n valid version labels. If the input version is persistent it will use the information on the version and return the next n labels from the version's current version label. If it's not persistent then the series will be looked up based on the container and lifecycle information on the object.
Supported API: true- Parameters:
version-n- number of labels to return- Returns:
- String[]
- Throws:
VersionControlExceptionWTException
-
allIterationsFrom
QueryResult allIterationsFrom(Iterated iteration, boolean includeDerivedFroms) throws VersionControlException, WTException Finds all of the iterations of a master from the first one created to the given iteration. The result is an ordered list of iterations from the given iteration to the first one created that optionally includes information about derivedFrom values resulting from non-latest checkout/in operations. For example, if (iteration B.2, false) is given, the list returned is B.2, B.1, A.2, A.1.
Supported API: true- Parameters:
iteration-includeDerivedFroms- If true then return a QueryResult where each element is a two-element array where element[0] = the previous iteration's predecessor element[1] = the previous iteration's derivedFrom if it is different than previous iteration's predecessor. If they are the same element[1] = null. If false then return a QueryResult containing the iterations ordered by predecessors.- Returns:
- QueryResult
- Throws:
VersionControlExceptionWTException
-
allIterationsFrom
QueryResult allIterationsFrom(Iterated iteration, boolean includeDerivedFroms, boolean filterTerminals) throws VersionControlException, WTException Finds all of the iterations of a master from the first one created to the given iteration. The result is an ordered list of iterations from the given iteration to the first one created that optionally includes information about derivedFrom values resulting from non-latest checkout/in operations. For example, if (iteration B.2, false) is given, the list returned is B.2, B.1, A.2, A.1. If filterTerminals is true, all terminals (and any iterations on the same branch) will be removed from the result set.
Supported API: true- Parameters:
iteration-includeDerivedFroms- If true then return a QueryResult where each element is a two-element array where element[0] = the previous iteration's predecessor element[1] = the previous iteration's derivedFrom if it is different than previous iteration's predecessor. If they are the same element[1] = null. If false then return a QueryResult containing the iterations ordered by predecessors.filterTerminals-- Returns:
- QueryResult
- Throws:
VersionControlExceptionWTException
-
allIterationsOf
QueryResult allIterationsOf(Mastered master, boolean filterTerminals) throws WTException, PersistenceException Finds all of the iterations of the given master. The result is an ordered list of iterations from the most recent one to the first one created for that version, e.g. (B.2, B.1, A.3, A.2, A.1). If filterTerminals is true, all terminals (and any iterations on the same branch) will be removed from the result set.
Supported API: true- Parameters:
master-filterTerminals-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allIterationsOf
QueryResult allIterationsOf(Mastered master, boolean filterTerminals, boolean filterPrivateWorkingCopies) throws WTException, PersistenceException Finds all of the iterations of the given master. The result is an ordered list of iterations from the most recent one to the first one created for that version, e.g. (B.2, B.1, A.3, A.2, A.1). If filterTerminals is true, all terminals (and any iterations on the same branch) will be removed from the result set. If filterPrivateWorkingCopies is true, all private working copies will be removed from the result.
Supported API: true- Parameters:
master-filterTerminals-filterPrivateWorkingCopies-- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
allVersionsOf
QueryResult allVersionsOf(Mastered master, boolean includeDerivedFroms) throws WTException, PersistenceException Finds all of the versions of the given master. The result is an ordered list of versions (i.e., latest iterations) from the most recent one to the first one created, e.g. (B, A). Optionally, the API includes information about derivedFrom values resulting from non-latest revise operations.
Supported API: true- Parameters:
master-includeDerivedFroms- If true then return a QueryResult where each element is a two-element array where element[0] = the previous versions's predecessor element[1] = the previous versions's derivedFrom if it is different than previous version's predecessor. If they are the same element[1] = null.- Returns:
- QueryResult
- Throws:
WTExceptionPersistenceException
-
derivedFrom
Given an iteration, return its derived from iteration or null if one does not exist.
Supported API: true- Parameters:
iteration-- Returns:
- Iterated
- Throws:
VersionControlExceptionWTException
-
derivedFroms
Given a collection of iterations, return a WTValuedMap with keys = objects in iterations that have a derivedFrom, values = corresponding derivedFrom iterations.
Supported API: true- Parameters:
iterations-- Returns:
- WTValuedMap
- Throws:
VersionControlExceptionWTException
-
allIterations
Map<ObjectReference,WTCollection> allIterations(WTCollection masters, boolean filterTerminals) throws WTException, PersistenceException Given a WTCollection of masters, this function returns a map where key = master(ObjectReference) and value = WTCollection of iterations of that master.
Supported API: true- Parameters:
masters- : WTCollection of masters.filterTerminals-- Returns:
- Map<ObjectReference, WTCollection> : map of master to its iterations.
- Throws:
WTExceptionPersistenceException
-