|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.services.StandardManager
wt.vc.StandardVersionControlService
public class StandardVersionControlService
Provides the standard implementation of server-side functionality as
defined by the VersionControlService interface. This class is
the one intended to be extended to enhance functionality.
As defined by the standard versioning service's access control rules, there are no constraints placed on the access of iterated/versioned objects. Furthermore, there are no constraints placed on the access of either mastered objects. Warning: direct manipulation or deletion of masters is currently unsupported. All functions should be carried out on iterated/versioned objects.
Event-based processing is performed on business objects asserted as being Iterated/Versioned during database storing, deletions, and full restorations. After a successful store, the versioning service listens to a dispatched event indicating that the store has completed and signals all other interested services that a new iteration exists. When a business object is being deleted from the database, the versioning service listens to a dispatched event indicating that the deletion is about to commence and vetos the deletion if the version is not the latest one (i.e., has no successor). Otherwise, it passes on vetoing the deletion. After a successful deletion, the versioning service listens to a dispatched event indicating that the delete has completed and deletes all of the version's iterations. If it turns out that the deleted version is the only one remaining related to a master then it gets deleted as well. When a business object is being fully restored from the database, the versioning service listens to a dispatched event indicating that the full restoration is beginning and restores the version cookie's predecessor reference, and restores the iteration cookie's creator, prececessor, and master references.
If the standard implementation is not desired then a custom implementation can extend from VersionControlService alongside the standard implementation, and be specified as a property to be used as the default versioning service.
Use the newStandardVersionControlService static factory
method(s), not the StandardVersionControlService constructor,
to construct instances of this class. Instances must be constructed
using the static factory(s), in order to ensure proper initialization
of the instance.
Supported API: true
Extendable: false
StandardManager,
VersionControlServiceEvent,
wt.fc.PersistenceManagerEvent.POST_STORE,
wt.fc.PersistenceManagerEvent.PRE_DELETE,
wt.fc.PersistenceManagerEvent.POST_DELETE,
wt.fc.PersistenceManagerEvent.FULL_RESTORE,
Serialized Form| Method Summary | |
|---|---|
QueryResult |
allIterationsFrom(Iterated iteration)
Finds all of the iterations to the very first one created from the given one. |
QueryResult |
allIterationsFrom(Iterated iteration,
boolean includeDerivedFroms)
Finds all of the iterations to the very first one created from the given one. |
QueryResult |
allIterationsFrom(Iterated iteration,
boolean includeDerivedFroms,
boolean filterTerminals)
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 |
allIterationsOf(Mastered master,
boolean filterTerminals)
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. |
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. |
void |
deleteIterations(WTCollection iterations,
ConflictResolution[] resolvers,
boolean changeModifyStamp)
This is for deletion of selective iterations. |
String[] |
getAvailableVersionLabels(ObjectReference master,
String versionLabel,
ViewReference view,
boolean onlySuccessors,
int n)
Return versions that are available to create new versions. |
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. |
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,
wt.lifecycle.LifeCycleTemplateReference lct,
int n)
Gets the next n version labels. |
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,
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,
boolean copyAttributes)
Makes a new iteration/version as a copy from the given one, and does not increment its identifiier. |
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(wt.vc.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. |
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. |
| Methods inherited from class wt.services.StandardManager |
|---|
getManagerService, getManagerStatus, getName, getStartupType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Versioned newBranch(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException
newBranch in interface VersionControlServiceversion -
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersion in interface VersionControlServiceversion -
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version,
VersionIdentifier version_id,
IterationIdentifier iteration_id)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersion in interface VersionControlServiceversion - version_id - iteration_id -
WTException
VersionControlException
WTPropertyVetoException
public Versioned newUncontrolledVersion(Versioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException
newUncontrolledVersion in interface VersionControlServiceversion -
WTException
VersionControlException
WTPropertyVetoException
public AdHocStringVersioned newAdHocStringVersion(AdHocStringVersioned version,
String adHocVersionId)
throws WTException,
VersionControlException,
WTPropertyVetoException
newAdHocStringVersion in interface VersionControlServiceversion - adHocVersionId -
WTException
VersionControlException
WTPropertyVetoException
public String[] getNextCommonLabels(WTCollection version,
int n)
throws VersionControlException,
WTException
getNextCommonLabels in interface VersionControlServiceversion - n -
VersionControlException
WTException
public OneOffVersioned newOneOffVersion(OneOffVersioned version)
throws WTException,
VersionControlException,
WTPropertyVetoException
newOneOffVersion in interface VersionControlServiceversion -
WTException
VersionControlException
WTPropertyVetoException
public Versionable newVersionable(Versionable version)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersionable in interface VersionControlServiceversion -
WTException
VersionControlException
WTPropertyVetoException
public Iterated supersede(Iterated iteration,
Iterated replacement)
throws WTException,
VersionControlException,
WTPropertyVetoException
supersede in interface VersionControlServiceiteration - 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
rollback in interface VersionControlServiceiteration - 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
rollup in interface VersionControlServiceiteration - culmination -
WTException
VersionControlException
WTPropertyVetoException
public Iterated predecessorOf(Iterated iteration)
throws WTException,
VersionControlException,
PersistenceException
predecessorOf in interface VersionControlServiceiteration -
WTException
VersionControlException
PersistenceException
public QueryResult iterationsOf(Iterated iteration)
throws WTException,
PersistenceException
iterationsOf in interface VersionControlServiceiteration -
WTException
PersistenceException
public QueryResult allIterationsOf(Mastered master)
throws WTException,
PersistenceException
allIterationsOf in interface VersionControlServicemaster -
WTException
PersistenceException
public QueryResult allIterationsFrom(Iterated iteration)
throws WTException,
PersistenceException
allIterationsFrom in interface VersionControlServiceiteration -
WTException
PersistenceException
public QueryResult allVersionsOf(Versioned version)
throws WTException,
PersistenceException
allVersionsOf in interface VersionControlServiceversion -
WTException
PersistenceException
public QueryResult allVersionsOf(Mastered master)
throws WTException,
PersistenceException
allVersionsOf in interface VersionControlServicemaster -
WTException
PersistenceException
public QueryResult allVersionsOf(WTCollection masters,
Class versionClass)
throws WTException,
PersistenceException
allVersionsOf in interface VersionControlServicemasters - versionClass -
WTException
PersistenceException
public QueryResult allVersionsFrom(Versioned version)
throws WTException,
PersistenceException
allVersionsFrom in interface VersionControlServiceversion -
WTException
PersistenceException
public boolean isFirstIteration(Iterated iteration)
throws WTException,
VersionControlException
isFirstIteration in interface VersionControlServiceiteration -
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.
iterationsOf in interface VersionControlServicebranch - 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
iterationsOf in interface VersionControlServiceiterations - iteratedClass - includeLatest -
WTException
PersistenceException
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
merge in interface VersionControlServicesrcVersion - 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
merge in interface VersionControlServicesourceToDestinationsMap - 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
newIteration in interface VersionControlServiceiteration - copyAttributes -
WTException
VersionControlException
WTPropertyVetoException
public Iterated getLatestIteration(Iterated iteration,
boolean includeMarkedForDelete)
throws WTException,
VersionControlException
getLatestIteration in interface VersionControlServiceiteration - includeMarkedForDelete -
WTException
VersionControlException
public void deleteIterations(Iterated beginIteration,
Iterated endIteration)
throws WTException,
VersionControlException,
WTPropertyVetoException
deleteIterations in interface VersionControlServicebeginIteration - endIteration -
WTException
VersionControlException
WTPropertyVetoException
public void deleteIterations(WTCollection iterations,
ConflictResolution[] resolvers)
throws WTException,
VersionControlException,
WTPropertyVetoException
deleteIterations in interface VersionControlServiceiterations - WTCollection of all iterations to be deleted.resolvers - Resolutions provided to resove oevrridable conflicts.
WTException
VersionControlException
WTPropertyVetoException
public String[] getAvailableVersionLabels(ObjectReference master,
String versionLabel,
ViewReference view,
boolean onlySuccessors,
int n)
throws VersionControlException,
WTException
getAvailableVersionLabels in interface VersionControlServicemaster - 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 -
VersionControlException
WTException
public WTValuedMap supersede(WTValuedMap iterationReplacementMap)
throws WTException,
VersionControlException,
WTPropertyVetoException
supersede in interface VersionControlServiceiterationReplacementMap -
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTCollection versions)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersions in interface VersionControlServiceversions -
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTKeyedMap versionMap)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersions in interface VersionControlServiceversionMap -
WTException
VersionControlException
WTPropertyVetoException
public WTList newVersionables(WTList versions)
throws WTException,
VersionControlException,
WTPropertyVetoException
newVersionables in interface VersionControlServiceversions -
WTException
VersionControlException
WTPropertyVetoException
public Iterated refresh(wt.vc.VersionForeignKey key)
throws WTException
refresh in interface VersionControlServicekey -
WTException
public WTValuedMap getLatestIterations(WTCollection iterations,
boolean includeMarkedForDelete)
throws WTException,
VersionControlException
getLatestIterations in interface VersionControlServiceiterations - includeMarkedForDelete -
WTException
VersionControlException
public void deleteIterations(WTCollection iterations,
ConflictResolution[] resolvers,
boolean changeModifyStamp)
throws VersionControlException,
WTException,
WTPropertyVetoException
deleteIterations in interface VersionControlServiceiterations - WTCollection of all iterations to be deleted.resolvers - Resolutions provided to resove oevrridable conflicts.changeModifyStamp - If true update modifyStamp when re-chaining iterations.
VersionControlException
WTException
WTPropertyVetoException
public String[] getNextVersionLabels(Versioned version,
wt.lifecycle.LifeCycleTemplateReference lct,
int n)
throws VersionControlException,
WTException
getNextVersionLabels in interface VersionControlServiceversion - 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 -
VersionControlException
WTException
public String[] getNextVersionLabels(Versioned version,
int n)
throws VersionControlException,
WTException
getNextVersionLabels in interface VersionControlServiceversion - n - number of labels to return
VersionControlException
WTException
public QueryResult allIterationsFrom(Iterated iteration,
boolean includeDerivedFroms)
throws VersionControlException,
WTException
allIterationsFrom in interface VersionControlServiceiteration - 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.
VersionControlException
WTException
public QueryResult allIterationsFrom(Iterated iteration,
boolean includeDerivedFroms,
boolean filterTerminals)
throws VersionControlException,
WTException
allIterationsFrom in interface VersionControlServiceiteration - 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 -
VersionControlException
WTException
public QueryResult allIterationsOf(Mastered master,
boolean filterTerminals)
throws WTException,
PersistenceException
allIterationsOf in interface VersionControlServicemaster - filterTerminals -
WTException
PersistenceException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||