|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.vc.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 FormNested Class Summary | |
private static class |
StandardVersionControlService.AllElementsQuery
Helper class used by AllElementsOf to generate QuerySpecs to find all iterations or versions of a master. |
private static class |
StandardVersionControlService.AllIterationsQuery
|
private static class |
StandardVersionControlService.AllVersionsQuery
|
private static class |
StandardVersionControlService.HistoricalIterationsTracker
Utility class used by event listeners to help decide when updates to historical iterations are necessary |
private class |
StandardVersionControlService.PreDeleteListener
|
Field Summary | |
private static String |
BRANCH_ID
|
private static String |
CABINET_ID
|
private static String |
CLASSNAME
|
private static Object |
DELETE_ITERATIONS_KEY
|
private static String |
DOMAIN_ID
|
private static Object |
HISTORICAL_ITERATIONS_KEY
Used to look up the a HistoricalIterationsTracker that helps decide when updates to historical iterations are necessary |
private static String |
LATEST
|
private static RefreshSpec |
LOCK_NO_ACCESS
|
static String |
MULTI_DELETE_MODE
|
private static String |
OWNER_ID
|
private static String |
RESOURCE
|
private static String |
RULE_CONSTANT_FOR_VERSIONING
|
private static Object |
SB_CHECKIN_IGNORE_KEY
|
private static StatementParameterFactory |
statementFactory
|
static Object |
SVCS_CONTROLBRANCH_CREATE_IGNORE_KEY
|
static Object |
SVCS_DELETE_KEY
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardVersionControlService()
|
Method Summary | |
protected void |
addDirective(WTCollection iters)
Add directive to PRE_DELETE listener |
private QueryResult |
allElementsOf(Mastered master,
Class type)
Factors the implementation of allVersionsOf and allIterationsOf into a common method. |
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. |
protected void |
assignOneOffSeries(OneOffVersioned version)
|
private void |
copyAdminAttrs(WTValuedMap sourceToDestinationsMap,
WTValuedMap newIterationToDestinationsMap,
String note)
Copies various admin-ish attributes from targetVersion to newIter. |
Iterated |
copyBranchInfo(Iterated source,
Iterated target)
Supported API: false |
private void |
createMerge(Versioned target,
Ufid other,
boolean inwards)
|
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. |
private void |
dispatchMultiObjectMergeEvent(WTValuedMap sourceToDestinationsMap,
WTValuedMap sourceToNewIterationsMap,
WTValuedMap newIterationToDestinationsMap,
WTValuedMap destinationToNewIterationMap,
boolean isPreEvent)
|
private void |
dispatchSingleObjectMergeEvent(Versioned newIter,
Versioned srcVersion,
Versioned destVersion,
boolean isPreEvent)
|
protected void |
dispatchVetoableEvent(String eventType,
Iterated object)
Dispatches a VersionControlServiceEvent that includes the event type and target (i.e., either an Iterated or Versioned object). |
protected void |
dispatchVetoableEvent(String eventType,
Iterated supersededIteration,
Iterated supersedingIteration)
Dispatches a VersionControlServiceEvent that includes the event types (superseded and superseding iterations). |
protected void |
dispatchVetoableEvent(String eventType,
Vector targets)
Dispatches a VersionControlServiceEvent that includes the event types (vector of iterations). |
protected void |
dispatchVetoableEvent(String eventType,
WTCollection targets)
Dispatches a VersionControlServiceEvent that includes the event types (WTCollection of iterations). |
protected void |
dispatchVetoableMultiObjectEvent(String eventType,
WTCollection targets)
Dispatches a VersionControlServiceEvent that includes the event types (WTCollection of iterations). |
protected void |
dispatchVetoableMultiObjectEvent(String eventType,
WTValuedMap target)
Dispatches a VersionControlServiceEvent that includes the event types & WTValuedMap. |
private static Object |
duplicate(Serializable object)
Duplicate any serializable object via serialization/deserialization (much like WTObject.duplicate) |
private boolean |
existsInTXMapForDelete(ObjectReference objectRef)
|
private void |
fillTargetDetails(Hashtable insNodeTable)
|
private Versioned |
getAPossiblePredecessor(Hashtable insNodeTable)
|
private Iterated |
getBestMatchPredecessor(Iterated target,
Hashtable insNodeTable)
|
private QueryResult |
getBranchedControlBranches(WTCollection iterations)
|
private long[] |
getBranchIds(WTCollection objs)
|
private Iterated |
getBranchPointOf(Iterated target)
|
String |
getConceptualClassname()
Deprecated. |
private QueryResult |
getControlBranchesOf(Versioned target)
|
private Iterated |
getFirstIterationOf(long branchId)
|
private static Folder |
getFolder(FolderEntry folderEntry,
boolean bypassAccessControl)
|
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. |
private long[] |
getMasterIds(WTCollection objs,
boolean isMaster)
|
private Ufid[] |
getMergeUfidsOf(Iterated target,
boolean inwards)
|
private Versioned |
getObjectBySeriesAndView(QueryResult vtSet,
Series tSer,
View tView,
Series r1Ser)
|
private long[] |
getObjectIds(WTCollection objs)
|
Ufid[] |
getOutwardMergesOf(Iterated target)
Gets the Ufids of all nodes which form the "to node" of merges originating on the target node. |
private View[] |
getParentViews(Hashtable insNodeTable)
|
Ufid |
getPredBranchPointUfid(Iterated target)
Gets the Ufid of the node from which target node's version branched. |
private Versioned |
getPredInLowerVersions(QueryResult vtSet,
Series tSer,
View aView,
Series t1OffSer)
|
Ufid |
getUfidOf(Iterated target)
Gets the Ufid of the node. |
private QueryResult |
hasMasterWithNoIterations(WTCollection iterations,
Class targetClass,
Class masterClass)
Delete control branch for all those iterations in the collection that no longer have any other iterations left.. |
Iterated |
insertIteration(Iterated target)
This client accessable API expects that the IterationInfo and VersionInfo cookie data has been constructed correctly. |
private Iterated |
insertIteration(Iterated predecessor,
Iterated target,
Iterated successor)
|
private Iterated |
insertNode(Iterated target,
Hashtable insNodeTable)
Performs the insertion -- if master not persisted, persist the object and its CB -- else if the version of target exists, do an insertIteration -- else do an insertVersion |
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. |
private void |
insertNodeCreateMerges(Iterated target,
Hashtable insNodeTable)
|
private void |
insertNodeGetSuccessors(Hashtable insNodeTable)
|
private Iterated |
insertNodeIteration(Iterated target)
|
private void |
insertNodeUpdateSuccessors(Iterated target,
Hashtable insNodeTable)
|
private void |
insertNodeVerifyTarget(Iterated target,
Ufid targetUfid)
|
private Iterated |
insertNodeVersion(Iterated target,
Hashtable insNodeTable)
|
private boolean |
isAChildView(View aView,
View[] parentViews)
|
boolean |
isFirstIteration(Iterated iteration)
Tests if the given iteration is the first one in the version branch. |
private boolean |
isPredecessor(Versioned low,
Versioned high)
|
protected Vector |
iterationsBetween(Iterated first,
boolean include_first,
Iterated last,
boolean include_last)
Find all succeeding iterations between two iterations. |
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. |
private boolean |
lowerOrEqualView(View lView,
View hView)
|
private boolean |
lowerVersion(MultilevelSeries testSer,
MultilevelSeries refSer)
|
private void |
makeChainAndAdjust(WTArrayList iterations,
WTHashSet deleteList,
HashMap postRollupMap,
HashMap postRollbackMap)
|
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. |
static StandardVersionControlService |
newStandardVersionControlService()
Default factory for the class. |
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. |
private QueryResult |
numOfIterations(Set branchIDs)
|
protected QueryResult |
orderedIterationsOf(QueryResult iterations)
|
protected void |
performStartupProcess()
Overrides the startup process specific to the versioning service to provide custom startup for event subscription. |
private void |
postChangeDomain(WTCollection iterateds)
Update the domain of historical iterations |
private void |
postChangeFolder(WTKeyedMap destinations_to_targets,
WTValuedMap targets_to_sources)
Update the domain and cabinet of historical iterations |
private void |
preChangeDomain(WTList domain_administereds,
WTList target_domains)
Veto the domain change of any non-latest iteration |
private void |
preChangeFolder(WTValuedMap targets_to_destinations,
WTValuedMap targets_to_sources)
Cache the objects that are in change folder, so that we know not to deal with them in the POST_CHANGE_DOMAIN listener |
private void |
preCheckin(WTValuedMap checkedout_to_working)
Cache the iterations that we're checking in. |
Iterated |
predecessorOf(Iterated iteration)
Finds the predecessor of the iteration. |
private WTHashSet |
prepareIterationChainForDelete(WTArrayList iterations,
WTHashSet analyzed,
HashMap postRollupMap,
HashMap postRollbackMap)
|
private void |
processPostMultiDelete(Object[] objectsToDelete)
|
private void |
putInTXMapForDelete(WTCollection coll)
|
Iterated |
refresh(VersionForeignKey key)
Retrieves a Iterated object given its VersionForeignKey. |
(package private) boolean |
refsEqual(ObjectReference ref1,
ObjectReference ref2)
|
void |
registerEvents(ManagerService manager)
Overrides the registration of all applicable versioning service events with the service manager. |
protected void |
remove(Iterated iteration)
Removes (i.e., deletes) the given iteration. |
protected void |
remove(Mastered master)
Removes (i.e., deletes) all of the given master's iterations. |
private int |
removeControlBranches(WTCollection iterations,
Class targetClass)
Delete control branch for all those iterations in the collection that no longer have any other iterations left.. |
protected void |
removeIterations(WTCollection iterations)
Removes (i.e., deletes) the given colection of iterations. |
protected void |
removeMasters(WTCollection masters)
Removes (i.e., deletes) all of the given collection of master's iterations. |
protected void |
restore(WTCollection iterations)
Restores the collection of iteration's creator, predecessor, and master reference. |
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. |
protected void |
signalPersistenceOf(Iterated iteration)
Signals to any interested service by dispatching an event that a new version has just been stored. |
protected void |
signalPersistenceOf(WTCollection iterations)
Supported API: false |
protected void |
storeControlBranchOf(WTCollection iterations)
Stores the given iteration's ControlBranch if it is not already persistent. |
protected void |
storeMasterOf(WTCollection iterations)
Stores the given iteration's master if it is not already persistent. |
protected QueryResult |
successorsOf(Iterated iteration)
Find all successors of a given iteration |
protected QueryResult |
successorsOf(WTCollection iterations,
Class targetClass)
Find all the successors of a set of iterations, where a successor can't be one of the given iterations |
private QueryResult |
successorsOf(WTCollection iterations,
WTHashSet excludeList)
Find all the successors of a set of iterations, where a successor can't be one of the given iterations and also it can't be from the excludeList. |
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. |
private void |
throwPostRollupRollbackEvents(HashMap preRollupMap,
HashMap preRollbackMap,
HashMap postRollupMap,
HashMap postRollbackMap)
|
private void |
throwPreRollupRollbackEvents(WTArrayList[][] version_list,
HashMap preRollupMap,
HashMap preRollbackMap)
|
(package private) int |
updateHistoricalIterations(WTCollection iterations,
ObjectReference destination_domain_ref,
ObjectReference destination_cabinet_ref,
ObjectReference destination_owner_ref)
Assign the previous iterations of the given collection of latest iterations to the given domain and cabinet |
private void |
validateBranchConstraint(WTCollection outputIterations,
boolean sameBranch)
|
protected void |
validateDeletionOf(WTCollection iterations)
Validates whether or not the deletion of the given collection of iterations is appropriate. |
protected void |
validateReferencesOf(ObjectToVersionLink link)
Validates [if necessary] the object and version references to correctly refer to the role A and B objects, respectively. |
protected void |
validateReferencesOf(VersionToVersionLink link)
Validates [if necessary] the version references to correctly refer to the role A and B objects. |
private void |
validateVersionSchemeDuringMove(WTCollection versions,
WTValuedMap containedToDestinations,
WTValuedMap containedToSources)
|
private Vector |
wtArrayListToVector(WTArrayList iterations,
int from_index,
int end_index)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static StatementParameterFactory statementFactory
public static final String MULTI_DELETE_MODE
private static final String RULE_CONSTANT_FOR_VERSIONING
private static final Object HISTORICAL_ITERATIONS_KEY
private static final Object DELETE_ITERATIONS_KEY
private static final Object SB_CHECKIN_IGNORE_KEY
public static final Object SVCS_DELETE_KEY
public static final Object SVCS_CONTROLBRANCH_CREATE_IGNORE_KEY
private static final String CABINET_ID
private static final String DOMAIN_ID
private static final String BRANCH_ID
private static final String LATEST
private static final String OWNER_ID
private static final RefreshSpec LOCK_NO_ACCESS
Constructor Detail |
public StandardVersionControlService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public void registerEvents(ManagerService manager)
registerEvents
in interface Manager
registerEvents
in class StandardManager
manager
- protected void dispatchVetoableEvent(String eventType, Iterated object) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.object
- The target of the persistable operation.
WTException
WTPropertyVetoException
protected void dispatchVetoableEvent(String eventType, Iterated supersededIteration, Iterated supersedingIteration) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.supersededIteration
- The target of the persistable operation.supersedingIteration
- The target of the persistable operation.
WTException
WTPropertyVetoException
protected void dispatchVetoableEvent(String eventType, Vector targets) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.targets
- The target of the persistable operation.
WTException
WTPropertyVetoException
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
protected void remove(Mastered master) throws VersionControlException
master
-
VersionControlException
protected void removeMasters(WTCollection masters) throws VersionControlException
masters
-
VersionControlException
protected void remove(Iterated iteration) throws VersionControlException
iteration
-
VersionControlException
protected void removeIterations(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void restore(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void signalPersistenceOf(Iterated iteration) throws VersionControlException
iteration
-
VersionControlException
protected void signalPersistenceOf(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void storeMasterOf(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void storeControlBranchOf(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void validateDeletionOf(WTCollection iterations) throws VersionControlException
iterations
-
VersionControlException
protected void validateReferencesOf(ObjectToVersionLink link) throws VersionControlException
link
-
VersionControlException
protected void validateReferencesOf(VersionToVersionLink link) throws VersionControlException
link
-
VersionControlException
protected void dispatchVetoableEvent(String eventType, WTCollection targets) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.targets
- The target of the persistable operation.
WTException
WTPropertyVetoException
protected void dispatchVetoableMultiObjectEvent(String eventType, WTCollection targets) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.targets
- The target of the persistable operation.
WTException
WTPropertyVetoException
protected void dispatchVetoableMultiObjectEvent(String eventType, WTValuedMap target) throws WTException, WTPropertyVetoException
eventType
- The name of the PersistentManagerEvent type.target
- The target of the persistable operation.
WTException
WTPropertyVetoException
public static StandardVersionControlService newStandardVersionControlService() throws WTException
WTException
public Versioned newBranch(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
newBranch
in interface VersionControlService
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
newVersion
in interface VersionControlService
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newVersion(Versioned version, VersionIdentifier version_id, IterationIdentifier iteration_id) throws WTException, VersionControlException, WTPropertyVetoException
newVersion
in interface VersionControlService
version
- version_id
- iteration_id
-
WTException
VersionControlException
WTPropertyVetoException
public Versioned newUncontrolledVersion(Versioned version) throws WTException, VersionControlException, WTPropertyVetoException
newUncontrolledVersion
in interface VersionControlService
version
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated newIteration(Iterated iteration) throws WTException, VersionControlException, WTPropertyVetoException
newIteration
in interface VersionControlService
iteration
-
WTException
VersionControlException
WTPropertyVetoException
public AdHocStringVersioned newAdHocStringVersion(AdHocStringVersioned version, String adHocVersionId) throws WTException, VersionControlException, WTPropertyVetoException
newAdHocStringVersion
in interface VersionControlService
version
- adHocVersionId
-
WTException
VersionControlException
WTPropertyVetoException
public OneOffVersioned newOneOffVersion(OneOffVersioned version) throws WTException, VersionControlException, WTPropertyVetoException
newOneOffVersion
in interface VersionControlService
version
-
WTException
VersionControlException
WTPropertyVetoException
public Versionable newVersionable(Versionable version) throws WTException, VersionControlException, WTPropertyVetoException
newVersionable
in interface VersionControlService
version
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated supersede(Iterated iteration, Iterated replacement) throws WTException, VersionControlException, WTPropertyVetoException
supersede
in interface VersionControlService
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
rollback
in interface VersionControlService
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
rollup
in interface VersionControlService
iteration
- culmination
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated predecessorOf(Iterated iteration) throws WTException, VersionControlException, PersistenceException
predecessorOf
in interface VersionControlService
iteration
-
WTException
VersionControlException
PersistenceException
public QueryResult iterationsOf(Iterated iteration) throws WTException, PersistenceException
iterationsOf
in interface VersionControlService
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.
iterationsOf
in interface VersionControlService
branch
-
WTException
PersistenceException
public QueryResult allIterationsOf(Mastered master) throws WTException, PersistenceException
allIterationsOf
in interface VersionControlService
master
-
WTException
PersistenceException
public QueryResult allIterationsFrom(Iterated iteration) throws WTException, PersistenceException
allIterationsFrom
in interface VersionControlService
iteration
-
WTException
PersistenceException
public QueryResult allVersionsOf(Versioned version) throws WTException, PersistenceException
allVersionsOf
in interface VersionControlService
version
-
WTException
PersistenceException
public QueryResult allVersionsOf(Mastered master) throws WTException, PersistenceException
allVersionsOf
in interface VersionControlService
master
-
WTException
PersistenceException
public QueryResult allVersionsOf(WTCollection masters, Class versionClass) throws WTException, PersistenceException
allVersionsOf
in interface VersionControlService
masters
- versionClass
-
WTException
PersistenceException
public QueryResult allVersionsFrom(Versioned version) throws WTException, PersistenceException
allVersionsFrom
in interface VersionControlService
version
-
WTException
PersistenceException
public boolean isFirstIteration(Iterated iteration) throws WTException, VersionControlException
isFirstIteration
in interface VersionControlService
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.
iterationsOf
in interface VersionControlService
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
iterationsOf
in interface VersionControlService
iterations
- iteratedClass
- includeLatest
-
WTException
PersistenceException
public Iterated insertIteration(Iterated target) throws VersionControlException, WTException
insertIteration
in interface VersionControlService
target
-
VersionControlException
WTException
public Iterated appendIteration(Iterated target) throws VersionControlException, WTException
appendIteration
in interface VersionControlService
target
-
VersionControlException
WTException
public Iterated copyBranchInfo(Iterated source, Iterated target) throws VersionControlException, WTException
copyBranchInfo
in interface VersionControlService
source
- target
-
VersionControlException
WTException
public void setSuccessorVersionable(Iterated target, QueryResult successors) throws VersionControlException, WTException
setSuccessorVersionable
in interface VersionControlService
target
- successors
-
VersionControlException
WTException
public void setSuccessorVersionable(Iterated target, Versionable successor) throws VersionControlException, WTException
setSuccessorVersionable
in interface VersionControlService
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
merge
in interface VersionControlService
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
merge
in interface VersionControlService
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
newIteration
in interface VersionControlService
iteration
- copyAttributes
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated getLatestIteration(Iterated iteration, boolean includeMarkedForDelete) throws WTException, VersionControlException
getLatestIteration
in interface VersionControlService
iteration
- includeMarkedForDelete
-
WTException
VersionControlException
public void deleteIterations(Iterated beginIteration, Iterated endIteration) throws WTException, VersionControlException, WTPropertyVetoException
deleteIterations
in interface VersionControlService
beginIteration
- endIteration
-
WTException
VersionControlException
WTPropertyVetoException
public void deleteIterations(WTCollection iterations, ConflictResolution[] resolvers) throws WTException, VersionControlException, WTPropertyVetoException
deleteIterations
in interface VersionControlService
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
insertNode
in interface VersionControlService
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
insertNode
in interface VersionControlService
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
getPredBranchPointUfid
in interface VersionControlService
target
-
WTException
VersionControlException
public Ufid getUfidOf(Iterated target) throws WTException, VersionControlException
getUfidOf
in interface VersionControlService
target
-
WTException
VersionControlException
public Ufid[] getInwardsMergesOf(Iterated target) throws WTException, VersionControlException
getInwardsMergesOf
in interface VersionControlService
target
-
WTException
VersionControlException
public Ufid[] getOutwardMergesOf(Iterated target) throws WTException, VersionControlException
getOutwardMergesOf
in interface VersionControlService
target
-
WTException
VersionControlException
public WTValuedMap newIterations(WTCollection iterations) throws WTException, VersionControlException, WTPropertyVetoException
newIterations
in interface VersionControlService
iterations
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newIterations(WTCollection iterations, boolean copyAttributes) throws WTException, VersionControlException, WTPropertyVetoException
newIterations
in interface VersionControlService
iterations
- copyAttributes
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap supersede(WTValuedMap iterationReplacementMap) throws WTException, VersionControlException, WTPropertyVetoException
supersede
in interface VersionControlService
iterationReplacementMap
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTCollection versions) throws WTException, VersionControlException, WTPropertyVetoException
newVersions
in interface VersionControlService
versions
-
WTException
VersionControlException
WTPropertyVetoException
public WTValuedMap newVersions(WTKeyedMap versionMap) throws WTException, VersionControlException, WTPropertyVetoException
newVersions
in interface VersionControlService
versionMap
-
WTException
VersionControlException
WTPropertyVetoException
public WTList newVersionables(WTList versions) throws WTException, VersionControlException, WTPropertyVetoException
newVersionables
in interface VersionControlService
versions
-
WTException
VersionControlException
WTPropertyVetoException
public Iterated refresh(VersionForeignKey key) throws WTException
refresh
in interface VersionControlService
key
-
WTException
public WTValuedMap getLatestIterations(WTCollection iterations, boolean includeMarkedForDelete) throws WTException, VersionControlException
getLatestIterations
in interface VersionControlService
iterations
- includeMarkedForDelete
-
WTException
VersionControlException
private Iterated insertIteration(Iterated predecessor, Iterated target, Iterated successor) throws VersionControlException, WTException
VersionControlException
WTException
protected void assignOneOffSeries(OneOffVersioned version) throws WTException
WTException
protected QueryResult orderedIterationsOf(QueryResult iterations) throws VersionControlException
VersionControlException
private int removeControlBranches(WTCollection iterations, Class targetClass) throws WTException
WTException
private QueryResult hasMasterWithNoIterations(WTCollection iterations, Class targetClass, Class masterClass) throws WTException
WTException
protected QueryResult successorsOf(WTCollection iterations, Class targetClass) throws WTException
WTException
protected QueryResult successorsOf(Iterated iteration) throws WTException
WTException
protected Vector iterationsBetween(Iterated first, boolean include_first, Iterated last, boolean include_last) throws WTException, VersionControlException, WTPropertyVetoException
WTException
VersionControlException
WTPropertyVetoException
private QueryResult allElementsOf(Mastered master, Class type) throws WTException
WTException
private void dispatchSingleObjectMergeEvent(Versioned newIter, Versioned srcVersion, Versioned destVersion, boolean isPreEvent) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private void dispatchMultiObjectMergeEvent(WTValuedMap sourceToDestinationsMap, WTValuedMap sourceToNewIterationsMap, WTValuedMap newIterationToDestinationsMap, WTValuedMap destinationToNewIterationMap, boolean isPreEvent) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static Object duplicate(Serializable object) throws WTException
WTException
private void copyAdminAttrs(WTValuedMap sourceToDestinationsMap, WTValuedMap newIterationToDestinationsMap, String note) throws WTException, WTPropertyVetoException
Any additional copying should really be done via services that need their data copied in this manner, however, or, alternatively, a new attribute copying service could be created to house such logic. The latter was perceived as overly heavy and out-of-scope for the initial merge effort.
WTException
WTPropertyVetoException
private static Folder getFolder(FolderEntry folderEntry, boolean bypassAccessControl) throws WTException
WTException
private void processPostMultiDelete(Object[] objectsToDelete) throws VersionControlException
VersionControlException
private void makeChainAndAdjust(WTArrayList iterations, WTHashSet deleteList, HashMap postRollupMap, HashMap postRollbackMap) throws WTException, VersionControlException, WTPropertyVetoException
WTException
VersionControlException
WTPropertyVetoException
private WTHashSet prepareIterationChainForDelete(WTArrayList iterations, WTHashSet analyzed, HashMap postRollupMap, HashMap postRollbackMap) throws WTException, VersionControlException, WTPropertyVetoException
WTException
VersionControlException
WTPropertyVetoException
private void validateBranchConstraint(WTCollection outputIterations, boolean sameBranch) throws WTException, VCBranchPointException
WTException
VCBranchPointException
private QueryResult numOfIterations(Set branchIDs) throws WTException
WTException
private QueryResult getBranchedControlBranches(WTCollection iterations) throws WTException
WTException
private QueryResult successorsOf(WTCollection iterations, WTHashSet excludeList) throws WTException
WTException
private Versioned getAPossiblePredecessor(Hashtable insNodeTable) throws WTException
WTException
private Versioned getObjectBySeriesAndView(QueryResult vtSet, Series tSer, View tView, Series r1Ser) throws WTException
WTException
private Versioned getPredInLowerVersions(QueryResult vtSet, Series tSer, View aView, Series t1OffSer)
private Iterated getFirstIterationOf(long branchId) throws VersionControlException, WTException
VersionControlException
WTException
private boolean isAChildView(View aView, View[] parentViews)
private boolean lowerVersion(MultilevelSeries testSer, MultilevelSeries refSer)
private View[] getParentViews(Hashtable insNodeTable) throws VersionControlException, WTException
VersionControlException
WTException
private Iterated getBestMatchPredecessor(Iterated target, Hashtable insNodeTable) throws VersionControlException, WTException
VersionControlException
WTException
private void fillTargetDetails(Hashtable insNodeTable) throws WTException, VersionControlException
WTException
VersionControlException
private void insertNodeVerifyTarget(Iterated target, Ufid targetUfid) throws WTException, VersionControlException
WTException
VersionControlException
private Iterated insertNode(Iterated target, Hashtable insNodeTable) throws WTException, VersionControlException
WTException
VersionControlException
private QueryResult getControlBranchesOf(Versioned target) throws WTException, VersionControlException
WTException
VersionControlException
private void insertNodeGetSuccessors(Hashtable insNodeTable) throws WTException, VersionControlException
WTException
VersionControlException
private boolean lowerOrEqualView(View lView, View hView) throws WTException
WTException
private boolean isPredecessor(Versioned low, Versioned high) throws WTException, VersionControlException
WTException
VersionControlException
private Iterated insertNodeVersion(Iterated target, Hashtable insNodeTable) throws WTException, VersionControlException, WTPropertyVetoException
WTException
VersionControlException
WTPropertyVetoException
private void createMerge(Versioned target, Ufid other, boolean inwards) throws WTException, VersionControlException
WTException
VersionControlException
private void insertNodeCreateMerges(Iterated target, Hashtable insNodeTable) throws WTException, VersionControlException
WTException
VersionControlException
private void insertNodeUpdateSuccessors(Iterated target, Hashtable insNodeTable) throws WTException, VersionControlException, WTPropertyVetoException
WTException
VersionControlException
WTPropertyVetoException
private Iterated insertNodeIteration(Iterated target) throws VersionControlException, WTException
VersionControlException
WTException
private Iterated getBranchPointOf(Iterated target) throws VersionControlException, WTException
VersionControlException
WTException
private Ufid[] getMergeUfidsOf(Iterated target, boolean inwards) throws WTException
WTException
private long[] getMasterIds(WTCollection objs, boolean isMaster) throws WTException
WTException
private long[] getBranchIds(WTCollection objs) throws WTException
WTException
private long[] getObjectIds(WTCollection objs) throws WTException
WTException
private void validateVersionSchemeDuringMove(WTCollection versions, WTValuedMap containedToDestinations, WTValuedMap containedToSources) throws WTException
WTException
protected void addDirective(WTCollection iters) throws WTException
WTException
private void putInTXMapForDelete(WTCollection coll) throws WTException
WTException
private boolean existsInTXMapForDelete(ObjectReference objectRef) throws WTException
WTException
private void throwPreRollupRollbackEvents(WTArrayList[][] version_list, HashMap preRollupMap, HashMap preRollbackMap) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private void throwPostRollupRollbackEvents(HashMap preRollupMap, HashMap preRollbackMap, HashMap postRollupMap, HashMap postRollbackMap) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private Vector wtArrayListToVector(WTArrayList iterations, int from_index, int end_index) throws WTException
WTException
private void preCheckin(WTValuedMap checkedout_to_working) throws WTException
checkedout_to_working
-
WTException
private void preChangeFolder(WTValuedMap targets_to_destinations, WTValuedMap targets_to_sources) throws WTException
targets_to_destinations
- Mapping of target FolderEntry objects to their destination Folderstargets_to_sources
- Mapping of target FolderEntry objects to their source Folders
WTException
private void postChangeFolder(WTKeyedMap destinations_to_targets, WTValuedMap targets_to_sources) throws WTException
targets_to_sources
- Mapping of target FolderEntry objects to their source Folders
WTException
private void preChangeDomain(WTList domain_administereds, WTList target_domains) throws WTException
domain_administereds
- List of domain administeredstarget_domains
- List of the corresponding
domains to move them to
WTException
private void postChangeDomain(WTCollection iterateds) throws WTException
iterateds
- The iterated objects that have been moved to a new domain
WTException
int updateHistoricalIterations(WTCollection iterations, ObjectReference destination_domain_ref, ObjectReference destination_cabinet_ref, ObjectReference destination_owner_ref) throws WTException
iterations
- A collection of iterated objectsdestination_domain_ref
- The domain to move the iterations to. If null, then the domain isn't changeddestination_cabinet_ref
- The cabinet to move the iterations to. If null, then the cabinet isn't changeddestination_owner_ref
- The owner of the new folder that the objects are being moved to. If null, then the owner isn't changed
WTException
boolean refsEqual(ObjectReference ref1, ObjectReference ref2)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |