|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.sandbox.StandardSandboxService
Standard implementation of SandboxService interface.
Use the newStandardSandboxService
static factory method(s),
not the StandardSandboxService
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: false
Extendable: false
Nested Class Summary | |
private class |
StandardSandboxService.DeletedCheckinImplicitUndoer
Works in conjunction with processPreDeletionOfCheckedInCopies(). |
private static class |
StandardSandboxService.MethodContextCleaner
|
Field Summary | |
private static String |
CLASSNAME
|
private static String |
INITIAL_SANDBOX_WORKING_COPY_ONE_OFF_VER_LABEL
Though a constant is used for this value it really must be "0" for reasons detailed in zeroOutOneOffVersionLabels(). |
private static StandardSandboxService.MethodContextCleaner |
METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_CLEANER
Transaction listener to clean up METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_KEY at end of transaction. |
private static Object |
METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_KEY
Method context key for WTContainerRef to SandboxBaseline map. |
private static Object |
METHOD_CONTEXT_CR_TO_SB_BL_CLEANER_INSTALLED_KEY
Key for use in map in method context at key METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_KEY for flag indicating whether METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_CLEANER has been installed. |
private static Object |
METHOD_CONTEXT_KNOWN_TERMINAL_ITERATIONS_TO_DELETE
Method context key to tell us to ignore ourselves when we delete terminal predecessor iterations. |
private static Class[] |
REQUIRED_SANDBOX_WORKABLE_INTERFACES
Array of interfaces which a class must implement in order for it to be "sandbox" checked-in and out by this service. |
private static Class[] |
REQUIRED_SANDBOX_WORKABLE_INTERFACES_PLUS_BASELINEABLE
Same as REQUIRED_SANDBOX_WORKABLE_INTERFACES but with Baselineable tacked on as well. |
private static String |
RESOURCE
|
private static Object |
SANDBOX_COPIES_WITH_CHECKIN_COPIES_BEING_DELETED_KEY
Transaction map key storing set of sandbox copies whose checkins are being deleted. |
static Object |
SANDBOX_REMOVE_OBJECTS_KEY
Transaction map key containing all the elements to be processed in removeObjects. |
private TransactionCommitListener |
UNDO_CHECKIN_HANDLER
Works in conjunction with processPreDeletionOfCheckedInCopies(). |
private static Object |
UNDO_CHECKIN_HANDLER_INSTALLED_KEY
Transaction map key storing whether UNDO_CHECKIN_HANDLER has been installed in transaction. |
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 | |
StandardSandboxService()
|
Method Summary | |
private static void |
addOriginalCopyShareRefs(WTCollection sandboxWorkingCopyRefs,
WTCollection originalCopyShareRefs,
boolean bypassAccessControl)
Returns a set of references to all version shares which exist for original copies of sandbox working copies referenced by 'sandboxWorkingCopyRefs'. |
private void |
addToSandboxBaseline(Map sandboxToOtherVersionRefMap,
Map contRefToSandboxVersionRefCollMap)
|
SandboxBaseline |
addToSandboxBaseline(WTCollection wtCollOfBaselineables,
WTContainerRef sandboxContainer)
Add a collection of baselinables to the SandboxBaseline associated with the given sandbox container. |
SandboxBaseline |
addToSandboxBaseline(WTCollection wtCollOfBaselineables,
WTContainerRef sandboxContainer,
boolean replaceEntriesFromSameMasters)
Add a collection of baselinables to the SandboxBaseline associated with the given sandbox container. |
private void |
addWorkableFolderChildren(WTSet outputSet,
Collection inputCollection)
|
private void |
addWorkableFolderChildren(WTSet outputSet,
Folder folder)
|
private static void |
applyInitialCheckinData(WTKeyedMap initialCheckinWorkingCopyToDataMap,
WTValuedMap workingCopyToInitialCheckinMap,
InitialCheckinDataApplicator applicator)
|
void |
checkin(WTKeyedMap inputRefToInitialCheckinDataMap,
String note)
Check-in a group of versioned objects from a sandbox container to the larger enterprise. |
Map |
checkin(WTKeyedMap inputRefToInitialCheckinDataMap,
String note,
InitialCheckinDataApplicator applicator,
boolean returnCheckedinVersions)
Check-in a group of versioned objects from a sandbox container to the larger enterprise. |
void |
checkout(WTCollection wtOrigCopiesSet,
WTContainerRef targetContainerRef,
Folder targetFolder,
String note)
Check-out a group of versioned objects from the larger enterprise to a sandbox container. |
Map |
checkout(WTCollection wtOrigCopiesSet,
WTContainerRef targetContainerRef,
Folder targetFolder,
String note,
boolean returnCheckedoutVersions)
Check-out a group of versioned objects from the larger enterprise to a sandbox container. |
private static void |
correctVersionSeries(WTValuedMap workingCopyToInitialCheckinMap)
Fixes the version series on the initial send to PDM. |
private static boolean |
couldBeSandboxWorkable(Object obj)
|
private static boolean |
couldBeSandboxWorkingCopy(Persistable version,
boolean doInstanceOfChecks,
boolean requireLatestActiveIter)
Determines if a given persistable could be a sandbox working copy without hitting the database |
private static WTSet |
deleteObjects(WTSet objectsToDelete,
boolean validateAndRefreshRefs)
|
private static Set |
getBaselinedSubset(Collection wtColl,
long baselineId,
boolean restrictToSameBranch)
Get subset of references in 'wcColl' which have an iteration with the same master (when 'restrictToSameBranch' is false) or same branch id (when 'restrictToSameBranch' is true) as an iteration in the specified baseline. |
Versioned |
getCheckedinCopyOf(Versioned version)
Given a sandbox iteration that has been checked in returns the resulting checked-in iteration -- otherwise returns null. |
Map |
getCheckedInCopyToSandboxCopyRefMap(Collection wtCollOfCheckedinCopies)
Gets map from any sandbox check ins in the input collection to sandbox copies. |
private Map |
getCheckedInCopyToSandboxCopyRefMapNoAcl(Collection wtCollOfCheckedInCopies)
|
Map |
getCheckinsToSandboxesMap(Collection wtColl)
Gets map from any sandbox check ins from input collection to sandboxes containers from which they were checked in. |
String |
getConceptualClassname()
Deprecated. |
private static WTKeyedMap |
getContainerRefToContainedObjRefMap(Collection refColl)
Gets map from container refs to collections of version references which are contained by them and refer to objects which are both contained and baselineable. |
private static WTSet |
getContainersWithActiveWorkingCopies(WTCollection wtContainerRefColl)
|
private static Collection |
getCorrespondingBaselineEntries(Collection wtColl,
long baselineId,
boolean restrictToSameBranch)
Get references to baseline entries which either have the same master (when 'restrictToSameBranch' is false) or same branch id (when 'restrictToSameBranch' is true) as an iteration or master in wtColl. |
private static Collection |
getCorrespondingBaselineEntries(Collection wtColl,
long baselineId,
boolean restrictToSameBranch,
boolean bypassAccessControl)
Access control by-pass for getCorrespondingBaselineEntries(Collection,long,boolean). |
private static Map |
getIterRefToSandboxRefMap(QueryResult results,
Map idsToReferences,
int keyMask,
int valueMask)
|
private static Map |
getMapToBaselineEntries(Collection wtColl,
long baselineId,
boolean restrictToSameBranch)
|
private static Map |
getMapToBaselineEntries(Collection wtColl,
long baselineId,
boolean restrictToSameBranch,
boolean useDummyEntries)
Get map from masters or iteration/versions in wtColl to corresponding entries in baseline (if any). |
Map |
getMapToSandboxBaselineIterations(Collection wtCollOfBaselineables,
WTContainerRef containerRef,
boolean restrictToSameBranch)
Gets map from any master, iteration, or version in the input collection to the corresponding iteration in the sandbox baseline. |
private static WTSet |
getMastersWithMultiItersInColl(WTCollection iterColl)
|
private static WTSet |
getObjsWithoutPriv(WTCollection objsToCheck,
AccessPermission permission)
Essentially a multi-object hasAccess() except that inaccessibility audit entries are produced where necessary. |
private SandboxBaseline |
getOrCreateSandboxBaseline(WTContainerRef sandboxContainerRef)
|
private static WTSet |
getOriginalCopiesUserCannotUnlock(WTValuedMap workingToOriginalRefMap,
Map sandboxContRefToWorkingCopyRefsMap)
|
Versioned |
getOriginalCopyOf(Versioned version)
Similar to method of the same name in WorkInProgressService. |
Map |
getOriginalCopyToWorkingCopyRefMap(Collection wtColl)
Get map from any sandbox original copies in the input collection to corresopnding working copies. |
Map |
getOriginalCopyToWorkingCopyRefMap(Collection wtColl,
boolean allowWorkingCopyInputs)
Get map from any sandbox original copies in the input collection to corresopnding working copies. |
private static Map |
getOriginalCopyToWorkingCopyRefMap(Collection wtColl,
boolean lockDatabaseRows,
boolean allowWorkingCopyInputs)
|
Map |
getOriginalsToSandboxesMap(Collection wtColl)
Gets map from any sandbox check out original copies in the input collection to sandboxes containers to which they have been checked out. |
Map |
getRefreshCandidates(WTContainerRef sandboxRef,
EPMDocConfigSpec docConfigSpec,
WTPartConfigSpec partConfigSpec,
boolean isDocCentric)
For all objects shared from PDM to Sandbox, returns newer iterations available in PDM. |
private static WTValuedMap |
getRefreshedLockedWorkingToOrigCopyWTMap(WTCollection inputRefs,
boolean forceObjRefsForOrigCopies)
produce map from working to original copies, locking both in the process |
WTContainerRef |
getRelatedSandboxRef(Versioned originalCopy,
boolean previous)
Given an iteration, returns a reference to the "related" sandbox container. |
SandboxBaseline |
getSandboxBaseline(WTContainerRef sandboxContainer)
Returns the given sandbox container's baseline. |
Baselineable |
getSandboxBaselineIteration(Baselineable baselineable,
WTContainerRef containerRef)
Returns the iteration found in the sandbox baseline for the given object and containerRef. |
private ObjectReference |
getSandboxBaselineRef(WTContainerRef containerRef)
Simple wrapper for getSandboxToBaselineRefMap(). |
private static WTSet |
getSandboxCheckoutlinks(WTValuedMap workingToOriginalRefMap)
|
private static Collection |
getSandboxCopyCheckedInCopyPairs(Collection wtColl,
boolean inputsAreSandboxCopies)
|
Versioned |
getSandboxCopyOf(Versioned version)
Given an iteration which resulted from a sandbox check-in, returns the original sandbox iteration -- otherwise returns null. |
private Versioned |
getSandboxCopyOf(Versioned version,
boolean bypassAccessControl)
Access control by-pass for getSandboxCopyOf(Versioned). |
Map |
getSandboxCopyToCheckedInCopyRefMap(Collection wtCollOfSandboxCopies)
Get map from any sandbox (inactive working) copies in input collection to corresponding checked-in copies. |
WTValuedMap |
getSandboxToBaselineRefMap(Collection wtCollOfSandboxRefs,
boolean inflateBaselineRefs)
Gets map from any sandbox containers in the input collection to the corresponding sandbox baselines. |
private static Map |
getSandboxToBaselineRefMapIgnoreLocalCache(Collection wtCollOfSandboxRefs,
boolean inflateBaselineRefs)
|
Set |
getSandboxWorkingCopySubset(Collection wtColl,
boolean excludeTerminalCopies)
Returns those objects from the input collection that are sandbox working copies. |
Set |
getSubsetCheckedOutToSandbox(Collection wtColl,
WTContainerRef containerRef)
Returns those objects from the input collection that are checked out to the given sandbox. |
private static Set |
getSubsetWithSuccessorIterations(WTCollection iteratedObjColl)
|
private static Set |
getSubsetWithWorkingCopyInSandbox(Collection wtColl,
WTContainerRef sandboxContainer)
|
WTSet |
getWorkingCopies(WTPrincipalReference principal,
boolean includePersonalCheckouts)
Get set of sandbox working copies checked out by a given individual. |
Versioned |
getWorkingCopyOf(Versioned version)
Similar to method of the same name in WorkInProgressService. |
private Versioned |
getWorkingCopyOf(Versioned version,
boolean bypassAccessControl)
Access control by-pass for getWorkingCopyOf(Versioned). |
private static Collection |
getWorkingCopyOriginalCopyPairs(Collection wtColl,
boolean lockDatabaseRows,
boolean allowWorkingCopyInputs,
boolean allowOrigCopyInputs,
boolean allowWorkingCopyOutputAsVerRefs)
|
Map |
getWorkingCopyToOriginalCopyRefMap(Collection wtColl)
Get map from any sandbox working copies in the input collection to corresopnding original copies. |
Map |
getWorkingCopyToOriginalCopyRefMap(Collection wtColl,
boolean allowOrigCopyInputs)
Get map from any sandbox working copies in the input collection to corresopnding original copies. |
private static Map |
getWorkingCopyToOriginalCopyRefMap(Collection wtColl,
boolean lockDatabaseRows,
boolean allowOrigCopyInputs)
|
private Map |
getWorkingCopyToOriginalCopyRefMapNoAcl(Collection wtCollOfWorkingCopies)
|
boolean |
isCheckedOutToSandbox(Versioned version,
WTContainerRef containerRef)
Returns whether the given version is checked out to the given sandbox container. |
private static boolean |
isSandboxWorkableClass(Class cls)
|
boolean |
isWorkingCopy(Versioned version)
Returns true if the given version branch was the direct result of a sandbox check-out, i.e. |
private static boolean |
isWorkingCopyBranchId(long versionBranchId)
Returns true if and only if 'versionBranchId' is the identifier of a sandbox working copy branch. |
private static void |
modifyMastersOf(WTCollection wtColl)
|
static StandardSandboxService |
newStandardSandboxService()
Default factory for the class. |
private static void |
nullOutOneOffVersionLabels(WTCollection versions)
|
protected void |
performStartupProcess()
Perform necessary startup processing includoing creating and adding service event listeners to monitor other services' activities where necessary. |
void |
preCheckinValidate(Map versionRefToInitialCheckinDataMap)
Attempts to validate InitialCheckinData items within versionRefToInitialCheckinDataMap against each other and existing masters for uniqueness, etc. |
void |
preCheckinValidate(Map versionRefToInitialCheckinDataMap,
InitialCheckinDataApplicator applicator)
Attempts to validate InitialCheckinData items within versionRefToInitialCheckinDataMap against each other and existing masters for uniqueness, etc. |
private void |
processMultiPreDeletionEvent(PersistenceManagerEvent preDeleteEvent)
Since this is called upon pre-deletion, possibly from a flat-line (i.e. |
private void |
processPreDeletionOfCheckedInCopies(WTCollection interestingObjectsBeingDeleted)
In concert with UNDO_CHECKIN_HANDLER, when deleting checked-in iterations and not deleting sandbox copy in same transaction and either working copy has no original or original copy is latest, implicitly undo the checkin. |
private void |
processPreDeletionOfObjectsWithTerminalDescendents(WTCollection sandboxObjectsBeingDeleted)
If the iterations being deleted have sandbox-terminal iterations associated with them (that is, are superseded by iterations in the sandbox via PDM checkout that have sub- sequently been sent back to PDM and made terminal), we want to delete those terminal iterations associated with them. |
private static void |
processSandboxBaselineableWorkablesAndMasters(Collection wtColl,
Utilities.PerClassCollectionProcessorMastersSeparate processor)
|
private static void |
processSandboxWorkables(Collection wtColl,
Utilities.PerClassProcessor processor)
|
private static void |
processSandboxWorkablesAndMasters(Collection wtColl,
Utilities.PerClassCollectionProcessorMastersSeparate processor)
|
void |
registerEvents(ManagerService managerService)
Register events fired/dispatched by this service with the given ManagerService. |
private void |
removeAllIterationsFromBaseline(Collection baselineableRefColl,
WTContainerRef sandboxContainerRef,
boolean byVersion,
SandboxBaseline inSandboxBaseline)
For each iteration or master referenced by an element of input collection, remove all iterations with the same master from the sandbox baseline. |
void |
removeObjects(WTCollection objectsToRemove)
Remove the given set of objects from the project. |
private void |
removeObsoleteSharesFromSandboxBaselines(WTCollection shareMapsColl)
|
private static WTSet |
removeShares(WTSet sharesToRemove,
boolean validateAndRefreshRefs)
|
private void |
resetControlBranchUntrustedBusinessFields(WTSet set)
Resets the oneOffVersionId on the ControlBranch to avoid conflicts. |
private static void |
sharePDMCopiesToSandbox(WTValuedMap sandboxCopyToPDMCopyMap,
Map sandboxContRefToSandboxCopyRefsMap)
|
private static void |
swapOneOffVersionLabels(WTValuedMap verToVerMap)
|
void |
undoCheckout(WTCollection inputRefs)
Undo check-out of a set of versioned objects from the sandbox container. |
Set |
undoCheckout(WTCollection inputRefs,
boolean returnOriginalCopies)
Undo check-out of a set of versioned objects from the sandbox container. |
private Set |
undoCheckout(WTCollection inputRefs,
boolean returnOriginalCopies,
boolean shareOriginalToSandbox,
boolean skipInitialRefreshAndLock)
|
private WTSet |
undoSBCheckouts(WTSet sandboxWorkingCopyRefs,
boolean validateAndRefreshRefs)
Undo the sandbox checkouts indicated by references in 'sandboxWorkingCopyRefs'. |
private static WTSet |
undoWipCheckouts(WTSet wipCheckouts,
boolean validateAndRefreshRefs)
|
private static void |
validateCheckinInputs(WTSet workingCopies,
WTKeyedMap initialCheckinToDataMap,
WTValuedMap workingToOriginalRefMap,
WTKeyedMap sandboxContRefToWorkingCopyRefsMap,
WTSet initialCheckinsWithoutData)
|
private void |
validateCheckoutInputs(WTCollection wtOrigCopiesSet,
WTContainerRef targetContainerRef)
|
private static void |
validateUndoCheckoutInputs(WTCollection inputRefs,
WTValuedMap workingToOriginalRefMap,
Map sandboxContRefToWorkingCopyRefsMap)
|
private void |
vetoDeletionOfActiveWorkingCopies(WTCollection interestingObjectsBeingDeleted)
|
private void |
vetoDeletionOfUnresolvedSandboxBaselineMembers(WTCollection interestingObjectsBeingDeleted)
Throw a conflict exception if there are non-latest iterations called out in a sandbox baseline. |
private static void |
zeroOutOneOffVersionLabels(WTCollection versions)
|
private static void |
zeroOutOneOffVersionLabels(WTCollection versions,
boolean nullOutRatherThanZeroOut)
StandardVersionControlService.assignOneOffSeries(), or rather the stored procedure it uses, does not notice one-off-versions unless they are child versions of the main version (e.g. |
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 final String INITIAL_SANDBOX_WORKING_COPY_ONE_OFF_VER_LABEL
private static final Object METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_KEY
private static final Object METHOD_CONTEXT_CR_TO_SB_BL_CLEANER_INSTALLED_KEY
private static final Object METHOD_CONTEXT_KNOWN_TERMINAL_ITERATIONS_TO_DELETE
private static final StandardSandboxService.MethodContextCleaner METHOD_CONTEXT_CONT_REF_TO_SB_BASELINE_MAP_CLEANER
private static final Object SANDBOX_COPIES_WITH_CHECKIN_COPIES_BEING_DELETED_KEY
private static final Object UNDO_CHECKIN_HANDLER_INSTALLED_KEY
public static final Object SANDBOX_REMOVE_OBJECTS_KEY
private final TransactionCommitListener UNDO_CHECKIN_HANDLER
private static final Class[] REQUIRED_SANDBOX_WORKABLE_INTERFACES
private static final Class[] REQUIRED_SANDBOX_WORKABLE_INTERFACES_PLUS_BASELINEABLE
Constructor Detail |
public StandardSandboxService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public void registerEvents(ManagerService managerService)
registerEvents
in interface Manager
registerEvents
in class StandardManager
managerService
- the ManagerService with which to register events.public static StandardSandboxService newStandardSandboxService() throws WTException
WTException
public boolean isWorkingCopy(Versioned version) throws WTException
See getSandboxWorkingCopySubset() for a multi-object equivalent of
this routine.
Supported API: false
isWorkingCopy
in interface SandboxService
version
- sandbox version to make determination for
WTException
public Set getSandboxWorkingCopySubset(Collection wtColl, boolean excludeTerminalCopies) throws WTException
When the input Collection is a WTCollection, the actual method result
will be a WTSet.
Supported API: false
getSandboxWorkingCopySubset
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollectionexcludeTerminalCopies
- Whether TERMINAL (inactive/checked-in) working copies should be excluded.
WTException
public boolean isCheckedOutToSandbox(Versioned version, WTContainerRef containerRef) throws WTException
See getSubsetCheckedOutToSandbox() for a multi-object equivalent of
this routine.
Supported API: false
isCheckedOutToSandbox
in interface SandboxService
version
- sandbox version to make determination forcontainerRef
- reference to sandbox container
WTException
public Set getSubsetCheckedOutToSandbox(Collection wtColl, WTContainerRef containerRef) throws WTException
When the input Collection is a WTCollection, the actual method result
will be a WTSet.
Supported API: false
getSubsetCheckedOutToSandbox
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollectioncontainerRef
- reference to sandbox container
WTException
public WTContainerRef getRelatedSandboxRef(Versioned originalCopy, boolean previous) throws WTException
See getOriginalsToSandboxesMap() and getCheckinsToSandboxesMap() for
multi-object equivalents of this routine.
Supported API: false
getRelatedSandboxRef
in interface SandboxService
originalCopy
- sandbox checked out to find sandbox forprevious
- whether to return the "previous" sandbox (that from which this iteration was formed via a sandbox check-in) or the sandbox to which this iteration has been checked out to
WTException
public Map getOriginalsToSandboxesMap(Collection wtColl) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getOriginalsToSandboxesMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollection
WTException
public Map getCheckinsToSandboxesMap(Collection wtColl) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getCheckinsToSandboxesMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollection
WTException
public Versioned getOriginalCopyOf(Versioned version) throws WTException
See getWorkingCopyToOriginalCopyRefMap() methods for multi-object
equivalents of this method.
Supported API: false
getOriginalCopyOf
in interface SandboxService
version
- sandbox version object
WTException
public Map getWorkingCopyToOriginalCopyRefMap(Collection wtColl) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getWorkingCopyToOriginalCopyRefMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollection
WTException
public Map getWorkingCopyToOriginalCopyRefMap(Collection wtColl, boolean allowOrigCopyInputs) throws WTException
This method can optionally navigate for any sandbox original copies as well as working copies in its inputs (and thus including the correspoding working/original copy pair in the results), but in either case the returned map is always strictly from working copies to originals.
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input is a WTCollection and 'allowOrigCopyInputs' is false,
the output will be a WTValuedMap.
Supported API: false
getWorkingCopyToOriginalCopyRefMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollectionallowOrigCopyInputs
- whether method should navigate from original copies in the inputs as well
WTException
public Versioned getWorkingCopyOf(Versioned version) throws WTException
See getOriginalCopyToWorkingCopyRefMap() methods for multi-object
equivalents of this method.
Supported API: false
getWorkingCopyOf
in interface SandboxService
version
- sandbox version object
WTException
public Map getOriginalCopyToWorkingCopyRefMap(Collection wtColl) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getOriginalCopyToWorkingCopyRefMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollection
WTException
public Map getOriginalCopyToWorkingCopyRefMap(Collection wtColl, boolean allowWorkingCopyInputs) throws WTException
This method can optionally navigate from sandbox working copies as well as original copies in its inputs (and thus including the correspoding working/original copy pair in the results), but in either case the returned map is always strictly from working copies to originals.
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while resuing the input reference objects.
When the input is a WTCollection and 'allowWorkingCopyInputs' is
false, the output will be a WTValuedMap.
Supported API: false
getOriginalCopyToWorkingCopyRefMap
in interface SandboxService
wtColl
- accepts a Collection of WTReferences or a WTCollectionallowWorkingCopyInputs
- whether method should navigate from working copies in the inputs as well
WTException
public Versioned getSandboxCopyOf(Versioned version) throws WTException
See getCheckedInCopyToSandboxCopyRefMap() for a multi-object equivalent
to this method.
Supported API: false
getSandboxCopyOf
in interface SandboxService
version
- sandbox version object
WTException
public Map getCheckedInCopyToSandboxCopyRefMap(Collection wtCollOfCheckedinCopies) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getCheckedInCopyToSandboxCopyRefMap
in interface SandboxService
wtCollOfCheckedinCopies
- accepts a Collection of WTReferences or a WTCollection
WTException
public Versioned getCheckedinCopyOf(Versioned version) throws WTException
See getSandboxCopyToCheckedInCopyRefMap() for a multi-object equivalent
to this method.
Supported API: false
getCheckedinCopyOf
in interface SandboxService
version
- sandbox version object
WTException
public Map getSandboxCopyToCheckedInCopyRefMap(Collection wtCollOfSandboxCopies) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getSandboxCopyToCheckedInCopyRefMap
in interface SandboxService
wtCollOfSandboxCopies
- accepts a Collection of WTReferences or a WTCollection
WTException
public SandboxBaseline getSandboxBaseline(WTContainerRef sandboxContainer) throws WTException
Note that a given sandbox container may not have an associated baseline and thus the result may be null. Also, note that any additions to the baseline should be made via addToSandboxBaseline() rather than by using the result of this method in a normal baseline addition operation.
See getSandboxToBaselineRefMap() for a multi-object equivalent of
this routine.
Supported API: false
getSandboxBaseline
in interface SandboxService
sandboxContainer
- reference to sandbox container
WTException
public WTValuedMap getSandboxToBaselineRefMap(Collection wtCollOfSandboxRefs, boolean inflateBaselineRefs) throws WTException
getSandboxToBaselineRefMap
in interface SandboxService
wtCollOfSandboxRefs
- accepts a Collection of WTReferences or a WTCollectioninflateBaselineRefs
- whether the resulting sandbox baseline references should be inflated or not
WTException
public Baselineable getSandboxBaselineIteration(Baselineable baselineable, WTContainerRef containerRef) throws WTException
The sandbox baseline associated to the passed in containerRef is consulted to determine which iteration of the passed in object is in the baseline. If an iteration is found in the baseline it is returned, otherwise the latest iteration of the object is returned.
See getMapToSandboxBaselineIterations() for a multi-object equivalent
to this method.
Supported API: false
getSandboxBaselineIteration
in interface SandboxService
baselineable
- The object for which the sandbox baseline iteration is desired to be found.containerRef
- reference to sandbox container
WTException
public Map getMapToSandboxBaselineIterations(Collection wtCollOfBaselineables, WTContainerRef containerRef, boolean restrictToSameBranch) throws WTException
In general, the actual result of this method will be a WTKeyedMap
or WTValuedMap where possible while reusing the input reference objects.
When the input Collection is a WTCollection, the output will be a
WTValuedMap.
Supported API: false
getMapToSandboxBaselineIterations
in interface SandboxService
wtCollOfBaselineables
- accepts a Collection of WTReferences or a WTCollectioncontainerRef
- reference to sandbox containerrestrictToSameBranch
- when true only iterations from the same branch as the inputs will be returned
WTException
public WTSet getWorkingCopies(WTPrincipalReference principal, boolean includePersonalCheckouts) throws WTException
getWorkingCopies
in interface SandboxService
principal
- individual in questionincludePersonalCheckouts
- whether sandbox working copies that are also checked out to the same individual via WIP should be included in the results
WTException
public Map getRefreshCandidates(WTContainerRef sandboxRef, EPMDocConfigSpec docConfigSpec, WTPartConfigSpec partConfigSpec, boolean isDocCentric) throws WTException
Returns Map of ObjectReference of shared Iteration in Sandbox as key and new iteration as value.
This method works in two modes, docCentric and partCentric. In docCentric mode, EPMDocuments are refreshed first and latest compatible WTParts are added to refresh Map. Then for any left over WTParts (that are not associated with any EPMDocuments), WTParts are refreshed and added to refresh Map.
In partCentric mode, WTParts are refreshed first and latest compatible EPMDocuments are added to refresh Map. Then for any leftover EPMDocuments (that are not associated with any WTParts), WTParts are refreshed and added to refresh Map.
Supported API: false
getRefreshCandidates
in interface SandboxService
sandboxRef
- reference to sandbox containerdocConfigSpec
- EPM document config specpartConfigSpec
- WTPart config specisDocCentric
- whether navigation should be document or part centric
WTException
public void checkout(WTCollection wtOrigCopiesSet, WTContainerRef targetContainerRef, Folder targetFolder, String note) throws WTException, WTPropertyVetoException, SandboxValidationException
checkout
in interface SandboxService
wtOrigCopiesSet
- a collection of objects to be checked outtargetContainerRef
- a reference to the container that the versionRefSet will be checked out totargetFolder
- the target folder within the reference container to check out tonote
- the note/comment to be provided on checkout
WTException
WTPropertyVetoException
SandboxValidationException
public Map checkout(WTCollection wtOrigCopiesSet, WTContainerRef targetContainerRef, Folder targetFolder, String note, boolean returnCheckedoutVersions) throws WTException, WTPropertyVetoException, SandboxValidationException
This version of this routine can return a map containing newly checked
out and original versions upon request.
Supported API: false
checkout
in interface SandboxService
wtOrigCopiesSet
- a collection of objects to be checked outtargetContainerRef
- a reference to the container that the versionRefSet will be checked out totargetFolder
- the target folder within the reference container to check out tonote
- the note/comment to be provided on checkoutreturnCheckedoutVersions
- whether the routine should return a map with keys of WTReferences to original enterprise versions and values of WTReferences to newly checked-out versions or null (for sake of reduced data transfer between processes)
WTException
WTPropertyVetoException
SandboxValidationException
public void undoCheckout(WTCollection inputRefs) throws WTException, WTPropertyVetoException, SandboxValidationException
undoCheckout
in interface SandboxService
inputRefs
- collection of objects to undo the sandbox check out of
WTException
WTPropertyVetoException
SandboxValidationException
public Set undoCheckout(WTCollection inputRefs, boolean returnOriginalCopies) throws WTException, WTPropertyVetoException, SandboxValidationException
This method can return a set of references to the resulting original
copies on request.
Supported API: false
undoCheckout
in interface SandboxService
inputRefs
- collection of objects to undo the sandbox check out ofreturnOriginalCopies
- whether to return a set of WTReferences to the original copies or null (to reduce remote data marshalling)
WTException
WTPropertyVetoException
SandboxValidationException
public void preCheckinValidate(Map versionRefToInitialCheckinDataMap) throws WTException, CheckinUniquenessException
preCheckinValidate
in interface SandboxService
versionRefToInitialCheckinDataMap
- a Map (or WTKeyedMap) whose keys are WTReferences to versions to be checked in and whose values are InitialCheckinData objects, for objects created in the sandbox and being newly exposed to the enterprise, or null, for objects being merged back to an existing enterprise version
WTException
CheckinUniquenessException
public void preCheckinValidate(Map versionRefToInitialCheckinDataMap, InitialCheckinDataApplicator applicator) throws WTException, CheckinUniquenessException
preCheckinValidate
in interface SandboxService
versionRefToInitialCheckinDataMap
- a Map (or WTKeyedMap) whose keys are WTReferences to versions to be checked in and whose values are InitialCheckinData objects, for objects created in the sandbox and being newly exposed to the enterprise, or null, for objects being merged back to an existing enterprise versionapplicator
- applicator object for InitialCheckinData instances
WTException
CheckinUniquenessException
public void checkin(WTKeyedMap inputRefToInitialCheckinDataMap, String note) throws WTException, WTPropertyVetoException, SandboxValidationException
checkin
in interface SandboxService
inputRefToInitialCheckinDataMap
- a map whose keys are objects to be checked in and whose values are InitialCheckinData objects, for objects created in the sandbox and being newly exposed to the enterprise, or null, for objects being merged back to an existing enterprise versionnote
- the note/comment to be provided on all new iterations created
WTException
WTPropertyVetoException
SandboxValidationException
public Map checkin(WTKeyedMap inputRefToInitialCheckinDataMap, String note, InitialCheckinDataApplicator applicator, boolean returnCheckedinVersions) throws WTException, WTPropertyVetoException, SandboxValidationException
This version of this routine allows specification of a custom InitialCheckinData
applicator instance and can return a map containing newly checked
in and original versions upon request.
Supported API: false
checkin
in interface SandboxService
inputRefToInitialCheckinDataMap
- a map whose keys are objects to be checked in and whose values are InitialCheckinData objects, for objects created in the sandbox and being newly exposed to the enterprise, or null, for objects being merged back to an existing enterprise versionnote
- the note/comment to be provided on all new iterations createdapplicator
- an instance of a sub-class of IntiialCheckinDataApplicator or null; intended to allow custom application of InitialCheckinData including specification of handling of custom subclasses thereof; pass null to obtain default handling of InitialCheckinDatareturnCheckedinVersions
- whether the routine should return a map with keys of WTReferences to original sandbox versions and values of WTReferences to newly checked-in versions or null (for sake of reduced data transfer between processes)
WTException
WTPropertyVetoException
SandboxValidationException
public SandboxBaseline addToSandboxBaseline(WTCollection wtCollOfBaselineables, WTContainerRef sandboxContainer) throws WTException, SandboxValidationException
Note that any iterations passed for which another iteration from the same master is a latest, non-terminal sandbox working iteration will be silently ignored as such iterations should never be added to the sandbox baseline.
Same as calling other version of addToSandboxBaseline() and passing
a value of 'true' for the last, i.e. 'replaceEntriesFromSameMasters',
argument.
Supported API: false
addToSandboxBaseline
in interface SandboxService
wtCollOfBaselineables
- collection of baselinable objects to be added to the specified sandbox container's baselinesandboxContainer
- reference to sandbox container
WTException
SandboxValidationException
public SandboxBaseline addToSandboxBaseline(WTCollection wtCollOfBaselineables, WTContainerRef sandboxContainer, boolean replaceEntriesFromSameMasters) throws WTException, SandboxValidationException
Note that any iterations passed for which another iteration from the
same master is a latest, non-terminal sandbox working iteration will
be silently ignored as such iterations should never be added to the
sandbox baseline.
Supported API: false
addToSandboxBaseline
in interface SandboxService
wtCollOfBaselineables
- collection of baselinable objects to be added to the specified sandbox container's baselinesandboxContainer
- reference to sandbox containerreplaceEntriesFromSameMasters
- whether entries already in the baseline should be replaced when 'baselineables' contains other iterations from masters with iterations already in 'sandboxContainer's' baseline; if 'false', such entries will be ignored
WTException
SandboxValidationException
public void removeObjects(WTCollection objectsToRemove) throws WTException, WTPropertyVetoException
removeObjects
in interface SandboxService
objectsToRemove
- set of objects to remove from sandbox
WTException
WTPropertyVetoException
private ObjectReference getSandboxBaselineRef(WTContainerRef containerRef) throws WTException
WTException
private static boolean isWorkingCopyBranchId(long versionBranchId) throws WTException
WTException
private static Map getIterRefToSandboxRefMap(QueryResult results, Map idsToReferences, int keyMask, int valueMask) throws WTException
WTException
private static Map getWorkingCopyToOriginalCopyRefMap(Collection wtColl, boolean lockDatabaseRows, boolean allowOrigCopyInputs) throws WTException
WTException
private static Map getOriginalCopyToWorkingCopyRefMap(Collection wtColl, boolean lockDatabaseRows, boolean allowWorkingCopyInputs) throws WTException
WTException
private static Collection getWorkingCopyOriginalCopyPairs(Collection wtColl, boolean lockDatabaseRows, boolean allowWorkingCopyInputs, boolean allowOrigCopyInputs, boolean allowWorkingCopyOutputAsVerRefs) throws WTException
WTException
private static Collection getSandboxCopyCheckedInCopyPairs(Collection wtColl, boolean inputsAreSandboxCopies) throws WTException
WTException
private static Map getSandboxToBaselineRefMapIgnoreLocalCache(Collection wtCollOfSandboxRefs, boolean inflateBaselineRefs) throws WTException
WTException
private static Map getMapToBaselineEntries(Collection wtColl, long baselineId, boolean restrictToSameBranch) throws WTException
WTException
private static Map getMapToBaselineEntries(Collection wtColl, long baselineId, boolean restrictToSameBranch, boolean useDummyEntries) throws WTException
WTException
private SandboxBaseline getOrCreateSandboxBaseline(WTContainerRef sandboxContainerRef) throws WTException
WTException
private static Set getSubsetWithWorkingCopyInSandbox(Collection wtColl, WTContainerRef sandboxContainer) throws WTException
WTException
private static Set getBaselinedSubset(Collection wtColl, long baselineId, boolean restrictToSameBranch) throws WTException
WTException
private void removeObsoleteSharesFromSandboxBaselines(WTCollection shareMapsColl) throws WTException
WTException
private void removeAllIterationsFromBaseline(Collection baselineableRefColl, WTContainerRef sandboxContainerRef, boolean byVersion, SandboxBaseline inSandboxBaseline) throws WTException
If inSandboxBaseline is non-null it will be used under the assumption that it is the sandbox baseline for sandboxContainerRef.
WTException
private static Collection getCorrespondingBaselineEntries(Collection wtColl, long baselineId, boolean restrictToSameBranch) throws WTException
WTException
private static WTSet getContainersWithActiveWorkingCopies(WTCollection wtContainerRefColl) throws WTException
WTException
private void validateCheckoutInputs(WTCollection wtOrigCopiesSet, WTContainerRef targetContainerRef) throws WTException
WTException
private static WTSet getObjsWithoutPriv(WTCollection objsToCheck, AccessPermission permission) throws WTException
WTException
private static WTSet getMastersWithMultiItersInColl(WTCollection iterColl) throws WTException
WTException
private Set undoCheckout(WTCollection inputRefs, boolean returnOriginalCopies, boolean shareOriginalToSandbox, boolean skipInitialRefreshAndLock) throws WTException, WTPropertyVetoException, SandboxValidationException
WTException
WTPropertyVetoException
SandboxValidationException
private static void validateUndoCheckoutInputs(WTCollection inputRefs, WTValuedMap workingToOriginalRefMap, Map sandboxContRefToWorkingCopyRefsMap) throws WTException
WTException
private static void sharePDMCopiesToSandbox(WTValuedMap sandboxCopyToPDMCopyMap, Map sandboxContRefToSandboxCopyRefsMap) throws WTException
WTException
private void addToSandboxBaseline(Map sandboxToOtherVersionRefMap, Map contRefToSandboxVersionRefCollMap) throws WTException
WTException
private static WTValuedMap getRefreshedLockedWorkingToOrigCopyWTMap(WTCollection inputRefs, boolean forceObjRefsForOrigCopies) throws WTException
WTException
private static WTSet getOriginalCopiesUserCannotUnlock(WTValuedMap workingToOriginalRefMap, Map sandboxContRefToWorkingCopyRefsMap) throws WTException
WTException
private static WTKeyedMap getContainerRefToContainedObjRefMap(Collection refColl) throws WTException
WTException
private static WTSet getSandboxCheckoutlinks(WTValuedMap workingToOriginalRefMap) throws WTException
WTException
private static void validateCheckinInputs(WTSet workingCopies, WTKeyedMap initialCheckinToDataMap, WTValuedMap workingToOriginalRefMap, WTKeyedMap sandboxContRefToWorkingCopyRefsMap, WTSet initialCheckinsWithoutData) throws WTException
WTException
private static void correctVersionSeries(WTValuedMap workingCopyToInitialCheckinMap) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void applyInitialCheckinData(WTKeyedMap initialCheckinWorkingCopyToDataMap, WTValuedMap workingCopyToInitialCheckinMap, InitialCheckinDataApplicator applicator) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void modifyMastersOf(WTCollection wtColl) throws WTException
WTException
private static void swapOneOffVersionLabels(WTValuedMap verToVerMap) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void zeroOutOneOffVersionLabels(WTCollection versions) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void nullOutOneOffVersionLabels(WTCollection versions) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static void zeroOutOneOffVersionLabels(WTCollection versions, boolean nullOutRatherThanZeroOut) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private void addWorkableFolderChildren(WTSet outputSet, Collection inputCollection) throws WTException
WTException
private void addWorkableFolderChildren(WTSet outputSet, Folder folder) throws WTException
WTException
private static void addOriginalCopyShareRefs(WTCollection sandboxWorkingCopyRefs, WTCollection originalCopyShareRefs, boolean bypassAccessControl) throws WTException
WTException
private static WTSet undoWipCheckouts(WTSet wipCheckouts, boolean validateAndRefreshRefs) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private WTSet undoSBCheckouts(WTSet sandboxWorkingCopyRefs, boolean validateAndRefreshRefs) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static WTSet deleteObjects(WTSet objectsToDelete, boolean validateAndRefreshRefs) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private static WTSet removeShares(WTSet sharesToRemove, boolean validateAndRefreshRefs) throws WTException, WTPropertyVetoException
WTException
WTPropertyVetoException
private void processMultiPreDeletionEvent(PersistenceManagerEvent preDeleteEvent) throws WTException
WTException
private void processPreDeletionOfObjectsWithTerminalDescendents(WTCollection sandboxObjectsBeingDeleted) throws WTException
WTException
private void vetoDeletionOfUnresolvedSandboxBaselineMembers(WTCollection interestingObjectsBeingDeleted) throws WTException
WTException
private void vetoDeletionOfActiveWorkingCopies(WTCollection interestingObjectsBeingDeleted) throws WTException
WTException
private void processPreDeletionOfCheckedInCopies(WTCollection interestingObjectsBeingDeleted) throws WTException
This should possibly be moved later in the deletion process to avoid repeated queries upon flat-lined single-object deletion calls.
WTException
private static Set getSubsetWithSuccessorIterations(WTCollection iteratedObjColl) throws WTException
WTException
private static boolean couldBeSandboxWorkingCopy(Persistable version, boolean doInstanceOfChecks, boolean requireLatestActiveIter)
private static boolean couldBeSandboxWorkable(Object obj)
private static boolean isSandboxWorkableClass(Class cls)
private static void processSandboxWorkables(Collection wtColl, Utilities.PerClassProcessor processor) throws WTException
WTException
private static void processSandboxWorkablesAndMasters(Collection wtColl, Utilities.PerClassCollectionProcessorMastersSeparate processor) throws WTException
WTException
private static void processSandboxBaselineableWorkablesAndMasters(Collection wtColl, Utilities.PerClassCollectionProcessorMastersSeparate processor) throws WTException
WTException
private Versioned getSandboxCopyOf(Versioned version, boolean bypassAccessControl) throws WTException
WTException
private Versioned getWorkingCopyOf(Versioned version, boolean bypassAccessControl) throws WTException
WTException
private static Collection getCorrespondingBaselineEntries(Collection wtColl, long baselineId, boolean restrictToSameBranch, boolean bypassAccessControl) throws WTException
WTException
private Map getCheckedInCopyToSandboxCopyRefMapNoAcl(Collection wtCollOfCheckedInCopies) throws WTException
WTException
private Map getWorkingCopyToOriginalCopyRefMapNoAcl(Collection wtCollOfWorkingCopies) throws WTException
WTException
private void resetControlBranchUntrustedBusinessFields(WTSet set) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |