|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides client accessible server-side functionality for Mastered
(unchanging), Versioned
(major change) and Iterated
(minor
change) objects to implement version control. There is also a server-accessible-only
VersionControlSvrService
.
VersionInfo
, IterationInfo
VersionControlHelper
provides helper methodsStandardVersionControlService
has listenersVersionControlServiceEvent
VersionControlException
Method Summary | |
QueryResult |
allIterationsFrom(Iterated iteration)
Finds all of the iterations to the very first one created from the given one. |
QueryResult |
allIterationsOf(Mastered master)
Finds all of the iterations to the very first one created associated with the given master. |
QueryResult |
allVersionsFrom(Versioned version)
Finds all of the versions to the very first one created from the given version. |
QueryResult |
allVersionsOf(Mastered master)
Finds all of the versions to the very first one created associated with the given master. |
QueryResult |
allVersionsOf(Versioned version)
Finds all of the versions to the very first one created associated [via its master] with the given version. |
QueryResult |
allVersionsOf(WTCollection masters,
Class versionClass)
Finds all of the versions to the very first one created associated with the given collection of masters. |
Iterated |
appendIteration(Iterated target)
This client accessable API expects that the IterationInfo and VersionInfo cookie data has been constructed correctly. |
Iterated |
copyBranchInfo(Iterated source,
Iterated target)
Supported API: false |
void |
deleteIterations(Iterated beginIteration,
Iterated endIteration)
Deletes all iterations between beginIteration and endIteration of same version. |
void |
deleteIterations(WTCollection iterations,
ConflictResolution[] resolvers)
This is for deletion of selective iterations. |
Ufid[] |
getInwardsMergesOf(Iterated target)
Gets the Ufids of all nodes which form the "from node" of merges terminating on the target node. |
Iterated |
getLatestIteration(Iterated iteration,
boolean includeMarkedForDelete)
Get the "latest" iteration in the same branch as the given one. |
WTValuedMap |
getLatestIterations(WTCollection iterations,
boolean includeMarkedForDelete)
Get the "latest" iteration in the same branch as the ones passed in the collection. |
Ufid[] |
getOutwardMergesOf(Iterated target)
Gets the Ufids of all nodes which form the "to node" of merges originating on the target node. |
Ufid |
getPredBranchPointUfid(Iterated target)
Gets the Ufid of the node from which target node's version branched. |
Ufid |
getUfidOf(Iterated target)
Gets the Ufid of the node. |
Iterated |
insertIteration(Iterated target)
This client accessable API expects that the IterationInfo and VersionInfo cookie data has been constructed correctly. |
Iterated |
insertNode(Iterated target,
Ufid targetUfid,
Ufid predBranchPointUfid)
Inserts the target node into the version tree of the object. |
Iterated |
insertNode(Iterated target,
Ufid targetUfid,
Ufid predBranchPointUfid,
Ufid[] inwardMergeUfids,
Ufid[] outwardMergeUfids)
Inserts the target node into the version tree of the object. |
boolean |
isFirstIteration(Iterated iteration)
Tests if the given iteration is the first one in the version branch. |
QueryResult |
iterationsOf(Iterated iteration)
Finds only the iterations directly associated with the given one. |
QueryResult |
iterationsOf(long branch)
Deprecated. Please use the iterationsOf(branch:long, iteratedClass:Class) api for better performing searches |
QueryResult |
iterationsOf(long branch,
Class iteratedClass)
Finds only the iterations directly associated with the given branch id. |
QueryResult |
iterationsOf(WTCollection iterations,
Class iteratedClass,
boolean includeLatest)
Finds only the iterations directly associated with the given colletion of iterated objects. |
Versioned |
merge(Versioned srcVersion,
Versioned destVersion,
String note)
Creates a new iteration of srcVersion and re-parents it as the latest iteration of destVersion. |
WTValuedMap |
merge(WTValuedMap sourceToDestinationsMap,
String note)
Multi-object form of merge operation. |
AdHocStringVersioned |
newAdHocStringVersion(AdHocStringVersioned version,
String adHocVersionId)
Creates a new in-line version with the given adHocVersionId assigned. |
Versioned |
newBranch(Versioned version)
Makes a new branched version from the given one using it as a branch point, which may or may not be the "latest" iteration. |
Iterated |
newIteration(Iterated iteration)
Deprecated. |
Iterated |
newIteration(Iterated iteration,
boolean copyAttributes)
Makes a new iteration/version as a copy from the given one, and does not increment its identifiier. |
WTValuedMap |
newIterations(WTCollection iterations)
Deprecated. |
WTValuedMap |
newIterations(WTCollection iterations,
boolean copyAttributes)
Deprecated. |
OneOffVersioned |
newOneOffVersion(OneOffVersioned version)
Creates a new in-line version from the given version. |
Versioned |
newUncontrolledVersion(Versioned version)
Makes a new version from the given version. |
Versioned |
newVersion(Versioned version)
Makes a new in-lined version from the given version. |
Versioned |
newVersion(Versioned version,
VersionIdentifier version_id,
IterationIdentifier iteration_id)
Makes a new in-lined version from the given version. |
Versionable |
newVersionable(Versionable version)
API intended to be called internally by any API that intends to create a new version. |
WTList |
newVersionables(WTList versions)
API intended to be called internally by any API that intends to create a new version. |
WTValuedMap |
newVersions(WTCollection versions)
Makes a new in-lined version from the given version. |
WTValuedMap |
newVersions(WTKeyedMap versionMap)
Makes a new in-lined version from the given version. |
Iterated |
predecessorOf(Iterated iteration)
Finds the predecessor of the iteration. |
Iterated |
refresh(VersionForeignKey key)
Retrieves a Iterated object given its VersionForeignKey. |
Iterated |
rollback(Iterated iteration,
Iterated reversion)
Deletes all iterations starting at the latest iteration in a version back to, but not including, a specified iteration in the same version. |
Iterated |
rollup(Iterated iteration,
Iterated culmination)
Deletes all iterations starting at the first iteration in a version up to, but not including, a specified iteration in the same version. |
void |
setSuccessorVersionable(Iterated target,
QueryResult successors)
The predecessor links are managed during new object creation and via the successor method. |
void |
setSuccessorVersionable(Iterated target,
Versionable successor)
The predecessor links are managed during new object creation and via the successor method. |
Iterated |
supersede(Iterated iteration,
Iterated replacement)
Supersedes the first iteration with the other iteration. |
WTValuedMap |
supersede(WTValuedMap iterationReplacementMap)
Supersedes each iteration passed as the key in the WTValuedMap with the corresponding iteration value in the WTValuedMap. |
Method Detail |
public Versioned newBranch(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version, VersionIdentifier version_id, IterationIdentifier iteration_id) throws WTException, VersionControlException, WTPropertyVetoException
version
- version_id
- iteration_id
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newUncontrolledVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
version
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated newIteration(Iterated iteration) throws WTException, VersionControlException, WTPropertyVetoException
iteration
-
WTException
VersionControlException
WTPropertyVetoException
public AdHocStringVersioned newAdHocStringVersion(AdHocStringVersioned version, String adHocVersionId) throws WTException, VersionControlException, WTPropertyVetoException
version
- adHocVersionId
-
WTException
VersionControlException
WTPropertyVetoException
public OneOffVersioned newOneOffVersion(OneOffVersioned version) throws WTException, VersionControlException, WTPropertyVetoException
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versionable newVersionable(Versionable version) throws WTException, VersionControlException, WTPropertyVetoException
version
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated supersede(Iterated iteration, Iterated replacement) throws WTException, VersionControlException, WTPropertyVetoException
iteration
- replacement
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated rollback(Iterated iteration, Iterated reversion) throws WTException, VersionControlException, WTPropertyVetoException
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
iteration
- reversion
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated rollup(Iterated iteration, Iterated culmination) throws WTException, VersionControlException, WTPropertyVetoException
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
iteration
- culmination
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated predecessorOf(Iterated iteration) throws WTException, VersionControlException, PersistenceException
iteration
-
WTException
VersionControlException
PersistenceException
public QueryResult iterationsOf(Iterated iteration) throws WTException, PersistenceException
iteration
-
WTException
PersistenceException
public QueryResult iterationsOf(long branch) throws WTException, PersistenceException
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.
branch
-
WTException
PersistenceException
public QueryResult allIterationsOf(Mastered master) throws WTException, PersistenceException
master
-
WTException
PersistenceException
public QueryResult allIterationsFrom(Iterated iteration) throws WTException, PersistenceException
iteration
-
WTException
PersistenceException
public QueryResult allVersionsOf(Versioned version) throws WTException, PersistenceException
version
-
WTException
PersistenceException
public QueryResult allVersionsOf(Mastered master) throws WTException, PersistenceException
master
-
WTException
PersistenceException
public QueryResult allVersionsOf(WTCollection masters, Class versionClass) throws WTException, PersistenceException
masters
- versionClass
-
WTException
PersistenceException
public QueryResult allVersionsFrom(Versioned version) throws WTException, PersistenceException
version
-
WTException
PersistenceException
public boolean isFirstIteration(Iterated iteration) throws WTException, VersionControlException
iteration
-
WTException
VersionControlException
public QueryResult iterationsOf(long branch, Class iteratedClass) throws WTException, PersistenceException
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.
branch
- iteratedClass
-
WTException
PersistenceException
public QueryResult iterationsOf(WTCollection iterations, Class iteratedClass, boolean includeLatest) throws WTException, PersistenceException
If the flag includeLatest is false then the latest iteration is not
included in the resulted list of iterations.
Supported API: true
iterations
- iteratedClass
- includeLatest
-
WTException
PersistenceException
public Iterated insertIteration(Iterated target) throws VersionControlException, WTException
target
-
VersionControlException
WTException
public Iterated appendIteration(Iterated target) throws VersionControlException, WTException
target
-
VersionControlException
WTException
public Iterated copyBranchInfo(Iterated source, Iterated target) throws VersionControlException, WTException
source
- target
-
VersionControlException
WTException
public void setSuccessorVersionable(Iterated target, QueryResult successors) throws VersionControlException, WTException
target
- successors
-
VersionControlException
WTException
public void setSuccessorVersionable(Iterated target, Versionable successor) throws VersionControlException, WTException
target
- successor
-
VersionControlException
WTException
public Versioned merge(Versioned srcVersion, Versioned destVersion, String note) throws WTException, WTPropertyVetoException
Note that this class provides a multi-object equivalent of this method
as well.
Supported API: true
srcVersion
- the version to be merged fromdestVersion
- the version to be merged tonote
- the iteration note to be assigned to the new iteration
WTException
WTPropertyVetoException
public WTValuedMap merge(WTValuedMap sourceToDestinationsMap, String note) throws WTException, WTPropertyVetoException
Returns map from source objects to newly formed "merged" iterations.
See comments on single-object merge operation for more details.
Supported API: true
sourceToDestinationsMap
- map from merge sources to merge destinationsnote
- the iteration note to be assigned to the new iterations
WTException
WTPropertyVetoException
public Iterated newIteration(Iterated iteration, boolean copyAttributes) throws WTException, VersionControlException, WTPropertyVetoException
iteration
- copyAttributes
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated getLatestIteration(Iterated iteration, boolean includeMarkedForDelete) throws WTException, VersionControlException
iteration
- includeMarkedForDelete
-
WTException
VersionControlException
public void deleteIterations(Iterated beginIteration, Iterated endIteration) throws WTException, VersionControlException, WTPropertyVetoException
beginIteration
- endIteration
-
WTException
VersionControlException
WTPropertyVetoException
public void deleteIterations(WTCollection iterations, ConflictResolution[] resolvers) throws WTException, VersionControlException, WTPropertyVetoException
iterations
- WTCollection of all iterations to be deleted.resolvers
- Resolutions provided to resove oevrridable conflicts.
WTException
VersionControlException
WTPropertyVetoException
public Iterated insertNode(Iterated target, Ufid targetUfid, Ufid predBranchPointUfid) throws WTException, VersionControlException
target
- Node to be insertedtargetUfid
- Ufid of the node to be insertedpredBranchPointUfid
- Ufid of the node from which the target node's version was branched.
WTException
VersionControlException
public Iterated insertNode(Iterated target, Ufid targetUfid, Ufid predBranchPointUfid, Ufid[] inwardMergeUfids, Ufid[] outwardMergeUfids) throws WTException, VersionControlException
target
- Node to be insertedtargetUfid
- Ufid of the node to be insertedpredBranchPointUfid
- Ufid of the node from which the target node's version was branched.inwardMergeUfids
- Ufids of all the nodes that form the "from node" of merges terminating on the target node.outwardMergeUfids
- Ufids of all the nodes that form the "to node" of merges originating on the target node.
WTException
VersionControlException
public Ufid getPredBranchPointUfid(Iterated target) throws WTException, VersionControlException
target
-
WTException
VersionControlException
public Ufid getUfidOf(Iterated target) throws WTException, VersionControlException
target
-
WTException
VersionControlException
public Ufid[] getInwardsMergesOf(Iterated target) throws WTException, VersionControlException
target
-
WTException
VersionControlException
public Ufid[] getOutwardMergesOf(Iterated target) throws WTException, VersionControlException
target
-
WTException
VersionControlException
public WTValuedMap newIterations(WTCollection iterations) throws WTException, VersionControlException, WTPropertyVetoException
iterations
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newIterations(WTCollection iterations, boolean copyAttributes) throws WTException, VersionControlException, WTPropertyVetoException
iterations
- copyAttributes
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap supersede(WTValuedMap iterationReplacementMap) throws WTException, VersionControlException, WTPropertyVetoException
iterationReplacementMap
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTCollection versions) throws WTException, VersionControlException, WTPropertyVetoException
versions
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTKeyedMap versionMap) throws WTException, VersionControlException, WTPropertyVetoException
versionMap
-
WTException
VersionControlException
WTPropertyVetoException
public WTList newVersionables(WTList versions) throws WTException, VersionControlException, WTPropertyVetoException
versions
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated refresh(VersionForeignKey key) throws WTException
key
-
WTException
public WTValuedMap getLatestIterations(WTCollection iterations, boolean includeMarkedForDelete) throws WTException, VersionControlException
iterations
- includeMarkedForDelete
-
WTException
VersionControlException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |