atg.versionmanager
Class VersionManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.versionmanager.VersionManager
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.versionmanager.Constants, atg.versionmanager.event.VersionEventSource, atg.versionmanager.factories.AssetFactory, atg.versionmanager.factories.AssetVersionFactory, atg.versionmanager.factories.BranchFactory, atg.versionmanager.factories.DevelopmentLineFactory, atg.versionmanager.factories.Factory, atg.versionmanager.factories.SnapshotFactory, atg.versionmanager.factories.WorkspaceFactory, java.io.Serializable, java.util.EventListener

public class VersionManager
extends GenericService
implements atg.versionmanager.factories.AssetFactory, atg.versionmanager.factories.AssetVersionFactory, atg.versionmanager.factories.BranchFactory, atg.versionmanager.factories.DevelopmentLineFactory, atg.versionmanager.factories.SnapshotFactory, atg.versionmanager.factories.WorkspaceFactory, atg.versionmanager.event.VersionEventSource, java.io.Serializable, atg.versionmanager.Constants

Services for managing a collection of resources under version control.

The version manager is the central factory for creating, storing, persisting, and querying all versioning objects. The objects include assets, asset versions, development lines, working versions, and branches.

The version manager sends event notifications for significant versioning events. Clients can register to receive all events, or just those relevant to a particular development line.

The version manager is responsible for managing transactions, instrumenting for performance monitoring and logging messages.

Version managers are not constructed directly, since they are a Nucleus service.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.versionmanager.Constants
ALL, ASSET_LOCK_TYPE_NAME, BRANCH_TYPE_NAME, CHANGED_ASSET_URI_CACHE_PROPERTY, CHECKED_IN_PROPERTY, CHECKIN_TIME_PROPERTY, COMMENT_PROPERTY, DATE_CREATED_PROPERTY, DESCRIPTOR_PROPERTY, ERR_ADD_ASSET_NO_WORKING, ERR_ADD_ASSET_WS_CHECKED_IN, ERR_ADD_ASSET_WS_DIFFERENT, ERR_ALREADY_CHECKED_IN, ERR_ALREADY_LOCKED, ERR_BRANCH_EXISTS, ERR_CANNOT_REVERT_DELETE_REQUIRED, ERR_CANNOT_REVERT_DELETE_REQUIRED_SINGULAR, ERR_CANNOT_REVERT_FOLDER_NOT_EMPTY, ERR_CANNOT_REVERT_REQUIRED_BY_OTHER_ACTIVE_ASSETS, ERR_CANNOT_REVERT_REQUIRED_BY_OTHER_ACTIVE_ASSETS_SINGULAR, ERR_CANNOT_USE_OPTIMIZED_REPLICATION, ERR_CANT_GET_ASSET_EDIT_LOCK, ERR_CANT_GET_LOCK, ERR_CHECKIN_FAILED, ERR_COUNT_ALL_ASSET_VERSIONS, ERR_COUNT_ALL_ASSETS, ERR_CREATE_BRANCH, ERR_CREATE_LINE, ERR_CREATE_LINE_NULL_NAME, ERR_CREATE_LINE_SNAPSHOT_FROM_ANOTHER_SNAPSHOT_NOT_ALLOWED, ERR_CREATE_LINE_WORKSPACE_CANNOT_BE_PARENT, ERR_CREATE_LINE_WRAPPER, ERR_CREATE_LINE_WRAPPER_INVALID_TYPE, ERR_CREATE_SNAPSHOT, ERR_CREATE_SNAPSHOT_PARENT_NOT_BRANCH, ERR_CREATE_URI_FAILED, ERR_CREATE_WORKSPACE_FAILED, ERR_DELETE_WORKSPACE_FAILED, ERR_DEV_LINE_IS_NULL, ERR_DIFF_BRANCHES_NOT_EQUAL, ERR_DUPLICATE_REPOSITORY, ERR_FIRE_VER_EVENT, ERR_FIRE_VER_EVENT_SEND, ERR_GET_ITEM_FAILED, ERR_GET_VERSION, ERR_GET_VIRTUAL_FILE_FAILED, ERR_GET_WORKING_ON_CHECKED_IN, ERR_GET_WV_FAILED, ERR_GETREPOSITORYITEM_FAILED, ERR_GETVERSION_FAILED, ERR_GETWORKSPACE_FAILED, ERR_INVALID_VR_PROP, ERR_ITEM_NOT_CONTENT, ERR_LOCK_ALL_CHECKED_IN, ERR_MERGE_FAILED, ERR_MERGE_SAME_BRANCH, ERR_NAME_NOT_NULL, ERR_NOT_REPOSITORY, ERR_NOT_VFS_ITEM, ERR_NULL_BRANCH, ERR_NULL_BRANCH_ID, ERR_NULL_GSR, ERR_NULL_PARENT_BRANCH, ERR_NULL_PARENT_LINE, ERR_NULL_SNAPSHOT_ID, ERR_PURGE_FAILED, ERR_REMOVE_BRANCH, ERR_REMOVE_BRANCH_CHILDREN, ERR_REMOVE_BRANCH_IS_MAIN, ERR_REMOVE_SNAPSHOT_FAILED, ERR_REMOVE_SNAPSHOT_USED_BY_BRANCH, ERR_REP_NOT_IN_VM, ERR_REPOSITORY_METHOD_FAILED, ERR_RESET_FAILED, ERR_REVERT_BRANCHES_MISMATCH, ERR_REVERT_FAILED, ERR_REVERT_OPEN_WORKSPACE, ERR_SET_COMMENT, ERR_SET_VM_UNSUPPORTED, ERR_SNAPSHOT_DIFF_FAILED, ERR_SNAPSHOT_EXISTS, ERR_TRANSACTION_FAILED, ERR_UNABLE_TO_DELETE_CHECKED_IN, ERR_UNABLE_TO_DELETE_NOT_EMPTY, ERR_UNABLE_TO_RESOLVE, ERR_UNLOCK_ALL_CHECKED_IN, ERR_UNLOCK_FAILED, ERR_URI_NULL_VFS_NAME, ERR_URI_WRONG_VM, ERR_VERMAN_START_FAILURE, ERR_VERSION_MISMATCH, ERR_VERSION_NOT_IN_CODELINE, ERR_VM_IS_MISCONFIGURED, ERR_VM_SECURED_REPOSITORY_MISCONFIGURED, ERR_WORKSPACE_EXISTS, ERR_WORKSPACE_NOT_CHECKED_IN, ERR_WS_REVERT_FAILED, FILE_ASSETS, INITIAL_VERSION, IS_LOCKED_PROPERTY, LINE_TYPE_NAME, MAIN_BRANCH_NAME, MSG_CANNOT_USE_OPTIMIZED_REPLICATION, MSG_CHECKIN_ALL, MSG_CREATE_ASSET_VERSION, MSG_CREATE_LINE_WRAPPER_TYPE, MSG_CREATE_SNAPSHOT_DIFF, MSG_CREATE_SSDIFF_COUNT, MSG_CREATE_SSDIFF_FOUND, MSG_CREATE_SSDIFF_NO_TYPE, MSG_CREATE_SSDIFF_NONE, MSG_CREATE_SSDIFF_TYPE, MSG_CREATE_WORKSPACE, MSG_CREATED_ASSET, MSG_CREATED_FILE, MSG_DIFF_ADDED, MSG_DIFF_CHANGED, MSG_DIFF_DELETED, MSG_FILE_DELETED, MSG_FILE_ITEM_NOT_VER, MSG_FOUND_VERSION, MSG_GENERATE_DEPENDENCY_CACHE, MSG_GET_ALL_ASSET_VERSIONS, MSG_GET_ASSET_BY_URI, MSG_GET_ASSET_VERSION, MSG_GET_ASSET_VERSION_CREATED, MSG_GET_ASSETS, MSG_GET_ASSETS_BY_TYPE, MSG_GET_CURR_ASSET_VERSIONS, MSG_GET_DEL_ASSET_VERSIONS, MSG_GET_FILE, MSG_GET_FILE_SUCCESS, MSG_GET_FOUND_ITEM, MSG_GET_GENERAL_CASE, MSG_GET_ITEM, MSG_GET_ITEM_SUCCESS, MSG_GET_LINE, MSG_GET_LINE_BY_NAME, MSG_GET_LINE_WRAPPER, MSG_GET_PROCESS_VFS, MSG_GET_REP_LOOP, MSG_GET_VER_REP, MSG_GET_VFS_LOOP, MSG_GET_VVFS, MSG_GET_WORKING_VERSION, MSG_HEAD_VER, MSG_INITIALIZING_MAIN, MSG_ITEM_PATH, MSG_LINE_HEAD_VER, MSG_LOCK_ALL_ASSETS, MSG_MERGE_COMMENT, MSG_NEED_SECURE_VERSION_REP, MSG_NO_REPOSITORY, MSG_PARENT_VER, MSG_PROCESSING_DESCRIPTOR, MSG_PROCESSING_VFS, MSG_PROCESSING_VFS_ITEM, MSG_PURGE_BRANCH, MSG_REMOVE_BRANCH, MSG_REMOVE_SNAPSHOT, MSG_REMOVE_SNAPSHOT_REP, MSG_REMOVE_WORKSPACE, MSG_REVERT_COMMENT, MSG_REVERT_TO_WS, MSG_SET_DELETED, MSG_TYPE_NOT_IN_VFS, MSG_UNLOCK_ALL_ASSETS, MSG_URI_IS_DEVLINE, MSG_URI_IS_FILE, MSG_URI_IS_REPITEM, MSG_VFS_NOT_FOUND_FOR_TYPE, MSG_VFS_WITH_ITEM_DESC, MSG_WORKING_VERSION_HISTORY, NAME_PROPERTY, PARENT_PROPERTY, REFERENCED_ASSET_URI_CACHE_PROPERTY, REPOSITORY_ASSETS, REPOSITORY_ID_PROPERTY, REPOSITORY_PROPERTY, SNAPSHOT_TYPE_NAME, USERID_PROPERTY, WORKSPACE_PROPERTY, WORKSPACE_TYPE_NAME
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
VersionManager()
           
 
Method Summary
 boolean acquireGlobalAssetEditLock(boolean pWriteLock)
          Acquire a lock to prevent any edits to version manager assets including checkouts and checkins.
 boolean acquireGlobalAssetEditLock(boolean pWriteLock, long pLockTimeout)
          Acquire a lock to prevent any edits to version manager assets including checkouts and checkins.
 void addVersionListener(VersionListener listener)
           
 Branch createBranch(java.lang.String name, Branch parent)
          Create a branch with the given name, using the non-deleted assets in the given parent branch.
 Branch createBranch(VersionManagerURI id, Branch parent)
          Create a branch using the non-deleted assets in the given parent branch.
 Snapshot createSnapshot(java.lang.String name)
          Create a new snapshot with the given name based on the current development line stored in the WorkingContext.
 Snapshot createSnapshot(java.lang.String name, Branch parent)
          Create a snapshot using the non-deleted assets on the given branch.
 Snapshot createSnapshot(VersionManagerURI id)
          Create a new snapshot.
 Snapshot createSnapshot(VersionManagerURI id, Branch parent)
          Create a new snapshot using the assets on the given branch.
 Workspace createWorkspace(java.lang.String name, Branch parent)
          Create a workspace based on a branch.
 Workspace createWorkspace(VersionManagerURI id, Branch parent)
          Create a workspace from another development line.
 void doStartService()
          Validate the configured values.
 atg.adapter.version.RepositoryVersionContainer findVersionContainer(Repository pRepository)
          This method will return the repository version container given a repository.
 void fireVersionEvent(VersionEvent event)
           
 java.util.Set getActiveWorkspaces()
          Find active (not checked in) workspaces.
 java.util.Set getAllLines()
          Set of all branches, baselines, workspaces.
 Asset getAsset(RepositoryItem ri)
          Look up an asset that matches a given repository item.
 Asset getAsset(atg.vfs.repository.RepositoryVirtualFile vf)
          Look up an asset that matches a given virtual file.
 Asset getAsset(VersionManagerURI id)
          Look-up an asset by URI.
 java.util.Set getAssets(VersionManagerURI prefix)
          Gets the set of assets under control of this version manager which belong to the given development line.
 java.util.Set getAssets(VersionManagerURI prefix, int whichOnes)
           
static java.lang.String getAssetTypeName(int pWhichOnes)
           
 AssetVersion getAssetVersion(Asset asset)
          Get an AssetVersion corresponding to the named Asset for the development line specified by the current thread.
 AssetVersion getAssetVersion(Asset asset, DevelopmentLine line)
          Get an asset version corresponding to the named asset for the specified line.
 AssetVersion getAssetVersion(Asset asset, VersionManagerURI developmentLineURI)
          Get an asset version corresponding to the named asset for the specified line.
 AssetVersion getAssetVersion(VersionManagerURI assetURI)
          Get an AssetVersion corresponding to the named Asset for the development line specified by the current thread.
 AssetVersion getAssetVersion(VersionManagerURI assetURI, VersionManagerURI developmentLineURI)
          Get the version of the asset for the given development line.
 Branch getBranch(VersionManagerURI id)
          Look-up a branch by its id.
 Branch getBranchByID(java.lang.String id)
          Look up the branch with the given unique ID in this version manager.
 Branch getBranchByName(java.lang.String name)
          Look up the branch with the given name in this version manager.
 java.util.Set getBranches()
          Get an unmodifiable set of all branches.
 java.util.Set getBranchesByParent(Branch parent)
          Find all child branches given a parent branch.
 ClientLockManager getClientLockManager()
           
 int getCountOfAllAssets()
          Get the count of total number of assets under this version manager's control.
 int getCountOfAllAssetVersions()
          Get the count of total number of asset versions under this version manager's control.
 java.util.Set getCurrentAssetVersions(VersionManagerURI developmentLineURI)
          Gets the set of current head versions of all assets in the given development line.
 java.util.Set getCurrentAssetVersions(VersionManagerURI devlineURI, int whichOnes)
           
 java.lang.String getGlobalAssetEditLockName()
          The name of the global lock name that must be used for aquiring locks when all edits to asset including checkins must be prevented.
 long getGlobalAssetEditLockTimeout()
          Get the maximum time we wait for a global checkin write lock, in milliseconds.
 DevelopmentLine getLine(VersionManagerURI id)
          Look up any development line (branch, baseline, workspace).
 DevelopmentLine getLineByID(java.lang.String id)
          Look up the development line using the unique identifier returned from getID().
 DevelopmentLine getLineByName(java.lang.String name)
          Look up the development line with the given name in this version manager.
 Branch getMainBranch()
          Get the main branch for this VersionManager.
 int getMergeOptimizationThresholdCount()
          Threshold number of assets in the source workspace when a merge operation starts using the optimized version of the operation.
 atg.versionmanager.messaging.MessageSender getMessageSender()
          Get the message sender
 MutableRepository getRepository()
          Get the metadata repository
 java.lang.String getRepositoryNameInVersionManager(java.lang.String nucleusPath)
          Given a nucleus path, return the name of the repository as configured in the VersionManager (for use in a VersionManagerURI).
 int getRevertOptimizationThresholdCount()
          Threshold number of assets in the source workspace when a Branch.revertToWorkspace() operation starts using the optimized version of the operation.
 boolean getSendCheckinEvents()
           
 boolean getSendCheckoutEvents()
           
 Snapshot getSnapshot(VersionManagerURI uri)
          Look-up a snapshot by its id.
 Snapshot getSnapshotByID(java.lang.String id)
          Look up a snapshot using the unique ID returned from getID().
 Snapshot getSnapshotByName(java.lang.String name)
          Look up a Snapshot of the given name in this version manager.
 java.util.Set getSnapshots()
          Get an unmodifiable set of all snapshots.
 java.util.Set getSnapshotsByParent(Branch branch)
          Find all child snapshots given a parent branch.
 javax.transaction.TransactionManager getTransactionManager()
          Get the transaction manager.
 int getUnlockAllAssetsOptimizationThresholdCount()
          Number of asset locks in a workspace when optimized SQL should be used for better performance to release asset locks.
 VersionManagerURI getURI()
          Returns the URI for this version manager instance.
 java.util.Map getVersionedRepositories()
           
 java.util.Set getVersionedRepositoriesOnlySet()
          Gets the VersionRepositories that are used by this VersionManager, without the ones that are also exposed as VFSes.
 java.util.Set getVersionedRepositoriesSet()
          Gets the set of all VersionRepositories that are managed by this VersionManager.
 atg.adapter.version.RepositoryVersionContainer getVersionedRepository(java.lang.String name)
          Get the versioned repository of the given name.
 atg.vfs.repository.RepositoryVirtualFileSystem getVersionedVirtualFileSystem(java.lang.String name)
          Get the versioned virtual file system of the given name.
 java.lang.String getVersionedVirtualFileSystemPath(java.lang.String name)
          Get the versioned virtual file system nucleus path of the given name.
 java.util.Map getVersionedVirtualFileSystems()
           
 java.util.Set getVersionedVirtualFileSystemsSet()
          Gets the VersionedVirtualFileSystems that are used by this VersionManager
 VersionManager getVersionManager()
           
 java.lang.String getVFSNameByItemDescriptor(java.lang.String pRepositoryPath, java.lang.String pDescriptorName)
          Get the Version Manager's name for a versioned VFS that is backed by a particular repository and item type
 java.lang.String getVFSNameInVersionManager(java.lang.String nucleusPath)
          Given a nucleus path of a VFS, return the name of a VFS as configured in the VersionManager
 java.util.Set getVVFSVersionedRepositories()
          Get the VersionRepositories that are exposed as VVFSes.
 Workspace getWorkspace(VersionManagerURI id)
          Look-up a workspace by its id.
 Workspace getWorkspaceByID(java.lang.String uniqueid)
          Gets the workspace matching the given unique id, which was retrieved using getID()
 Workspace getWorkspaceByName(java.lang.String name)
          Gets the workspace matching the given name from this version manager.
 int getWorkspaceMergeTransactionBatchSize()
          For large merges this is the batch size refferred to when performing batched merges.
 int getWorkspaceOptimizationThresholdAssetCount()
          When to kick the optimized version of operations to prevent aggressive memory usage or large iterations on repository items when doing those operations.
 java.util.Set getWorkspaces()
          Get an unmodifiable set of current workspaces.
 java.util.Set getWorkspacesByParent(Branch parent)
          Find all child workspaces given a parent branch.
 boolean hasVersionListeners()
           
 boolean isEnableProtectivePurge()
           
 boolean isEnableWorkspaceDependencyCache()
          Get property m_enableWorkspaceDependencyCache If file system cache for dependency check should be enabled.
 boolean isUseOptimizedReplicationForMerge()
          Get property m_useOptimizedReplicationForMerge Set to false if optimized merging should never be used, even when there are more assets in the source workspace than the mergeOptimizationThreshold count set on this component.
 boolean isUseOptimizedReplicationForRevert()
          Get property m_useOptimizedReplicationForRevert Set to false if optimized merging should never be used, even when there are more assets in the source workspace than the revertOptimizationThresholdCount count set on this component.
 boolean isVVFSRepository(atg.adapter.version.RepositoryVersionContainer pRepository)
          Does this repository back a VVFS
 Workspace lockedBy(VersionManagerURI pAssetURI)
          Get the workspace that has asset locked, if it is locked.
 atg.versionmanager.PurgeResult purge(Branch branch, long pExpirationTime)
          Permanently remove versions which were checked in on or before the given date from the given branch.
 atg.versionmanager.PurgeResult purge(Branch branch, long pExpirationTime, boolean pDryRun)
          Permanently remove versions which were checked in on or before the given date from the given branch.
 atg.versionmanager.PurgeResult purge(Branch branch, long pExpirationTime, boolean pDryRun, java.util.Collection pIgnorableChildBranches)
          Permanently remove versions which were checked in on or before the given date from the given branch.
 atg.versionmanager.RemoveBranchResult removeBranch(Branch branch)
          Remove a branch and all versions owned by that branch.
 atg.versionmanager.RemoveBranchResult removeBranch(Branch branch, boolean pDryRun)
          Remove a branch and all versions owned by that branch.
 void removeSnapshot(Snapshot snapshot)
          Remove a snapshot.
 void removeVersionListener(VersionListener listener)
           
 void setAssetFactory(atg.versionmanager.factories.AssetFactory factory)
           
 void setAssetVersionFactory(atg.versionmanager.factories.AssetVersionFactory factory)
           
 void setBranchFactory(atg.versionmanager.factories.BranchFactory factory)
           
 void setClientLockManager(ClientLockManager pClientLockManager)
          Sets the property ClientLockManager.
 void setDevelopmentLineFactory(atg.versionmanager.factories.DevelopmentLineFactory factory)
           
 void setEnableProtectivePurge(boolean pEnableProtectivePurge)
           
 void setEnableWorkspaceDependencyCache(boolean pEnableWorkspaceDependencyCache)
          Set property m_enableWorkspaceDependencyCache
 void setGlobalAssetEditLockName(java.lang.String pGlobalAssetEditLockName)
           
 void setGlobalAssetEditLockTimeout(long pGlobalAssetEditLockTimeout)
          Set the maximum time we wait for a global checkin write lock, in milliseconds.
 void setMergeOptimizationThresholdCount(int mergeOptimizationThresholdCount)
          Threshold number of assets in the source workspace when a merge operation starts using the optimized version of the operation.
 void setMessageSender(atg.versionmanager.messaging.MessageSender sender)
          Set the sender
 void setRepository(MutableRepository repository)
          Set the metadata repository
 void setRevertOptimizationThresholdCount(int revertOptimizationThresholdCount)
          Threshold number of assets in the source workspace when a Branch.revertToWorkspace() operation starts using the optimized version of the operation.
 void setSendCheckinEvents(boolean b)
          Sets whether JMS messages should be sent for checkin events.
 void setSendCheckoutEvents(boolean b)
          Sets whether JMS messages should be sent for checkout events.
 void setSnapshotFactory(atg.versionmanager.factories.SnapshotFactory factory)
           
 void setUnlockAllAssetsOptimizationThresholdCount(int unlockAllAssetsOptimizationThresholdCount)
          Number of asset locks in a workspace when optimized SQL should be used for better performance to release asset locks.
 void setUseOptimizedReplicationForMerge(boolean useOptimizedReplicationForMerge)
          Set property useOptimizedReplicationForMerge
 void setUseOptimizedReplicationForRevert(boolean useOptimizedReplicationForRevert)
          Set property useOptimizedReplicationForRevert
 void setVersionedRepositories(java.util.Map map)
           
 void setVersionedVirtualFileSystems(java.util.Map map)
           
 void setVersionManager(VersionManager vm)
           
 void setWorkspaceFactory(atg.versionmanager.factories.WorkspaceFactory factory)
           
 void setWorkspaceMergeTransactionBatchSize(int workspaceMergeTransactionBatchSize)
          For large merges this is the batch size refferred to when performing batched merges.
 void setWorkspaceOptimizationThresholdAssetCount(int workspaceOptimizationThresholdAssetCount)
          When to kick the optimized version of operations to prevent aggressive memory usage or large iterations on repository items when doing those operations.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

VersionManager

public VersionManager()
Method Detail

isEnableProtectivePurge

public boolean isEnableProtectivePurge()

setEnableProtectivePurge

public void setEnableProtectivePurge(boolean pEnableProtectivePurge)

getURI

public VersionManagerURI getURI()
Returns the URI for this version manager instance.

Returns:
The URI for this version manager.

lockedBy

public Workspace lockedBy(VersionManagerURI pAssetURI)
                   throws VersionException
Get the workspace that has asset locked, if it is locked.

Specified by:
lockedBy in interface atg.versionmanager.factories.AssetFactory
Returns:
Workspace that has locked this asset or null if not locked.
Throws:
VersionException

getAsset

public Asset getAsset(VersionManagerURI id)
Look-up an asset by URI.

Specified by:
getAsset in interface atg.versionmanager.factories.AssetFactory
Parameters:
id - a version manager unique identifier
Returns:
the Asset, or null

getAsset

public Asset getAsset(RepositoryItem ri)
               throws VersionException
Look up an asset that matches a given repository item.

Specified by:
getAsset in interface atg.versionmanager.factories.AssetFactory
Parameters:
ri -
Returns:
the matching Asset
Throws:
VersionException

getAsset

public Asset getAsset(atg.vfs.repository.RepositoryVirtualFile vf)
               throws VersionException
Look up an asset that matches a given virtual file.

Specified by:
getAsset in interface atg.versionmanager.factories.AssetFactory
Parameters:
vf -
Returns:
the matching Asset
Throws:
VersionException

getAssets

public java.util.Set getAssets(VersionManagerURI prefix)
                        throws VersionException
Gets the set of assets under control of this version manager which belong to the given development line.

Specified by:
getAssets in interface atg.versionmanager.factories.AssetFactory
Parameters:
prefix -
Returns:
an unmodifiable Set of Assets which are "under" the given URI
Throws:
VersionException

getAssets

public java.util.Set getAssets(VersionManagerURI prefix,
                               int whichOnes)
                        throws VersionException
Specified by:
getAssets in interface atg.versionmanager.factories.AssetFactory
Throws:
VersionException

getAssetVersion

public AssetVersion getAssetVersion(VersionManagerURI assetURI,
                                    VersionManagerURI developmentLineURI)
                             throws VersionException
Get the version of the asset for the given development line. If the development line is a Workspace and the asset is being edited, the returned AssetVersion will be a WorkingVersion.

Specified by:
getAssetVersion in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
assetURI -
developmentLineURI -
Returns:
the AssetVersion that matches the given asset uri and development line uri
Throws:
VersionException

getAssetVersion

public AssetVersion getAssetVersion(Asset asset,
                                    VersionManagerURI developmentLineURI)
                             throws VersionException
Get an asset version corresponding to the named asset for the specified line. This will be an instance of WorkingVersion if the asset has been modified in that line, otherwise it will be an instance of AssetVersion.

Specified by:
getAssetVersion in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
asset -
developmentLineURI -
Returns:
AssetVersion
Throws:
VersionException

getAssetVersion

public AssetVersion getAssetVersion(Asset asset,
                                    DevelopmentLine line)
                             throws VersionException
Get an asset version corresponding to the named asset for the specified line. This will be an instance of WorkingVersion if the asset has been modified in that line, otherwise it will be an instance of AssetVersion.

Specified by:
getAssetVersion in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
asset -
developmentLineURI -
Returns:
AssetVersion
Throws:
VersionException

getAssetVersion

public AssetVersion getAssetVersion(VersionManagerURI assetURI)
                             throws VersionException
Get an AssetVersion corresponding to the named Asset for the development line specified by the current thread. This will be an instance of WorkingVersion if the asset has been modified in that development line, otherwise it will be an instance of AssetVersion.

Specified by:
getAssetVersion in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
historyURI -
Returns:
AssetVersion
Throws:
VersionException

getAssetVersion

public AssetVersion getAssetVersion(Asset asset)
                             throws VersionException
Get an AssetVersion corresponding to the named Asset for the development line specified by the current thread. This will be an instance of WorkingVersion if the asset has been modified in that line, otherwise it will be an instance of AssetVersion.

Specified by:
getAssetVersion in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
history -
Returns:
AssetVersion
Throws:
VersionException

getCurrentAssetVersions

public java.util.Set getCurrentAssetVersions(VersionManagerURI developmentLineURI)
                                      throws VersionException
Gets the set of current head versions of all assets in the given development line.

Specified by:
getCurrentAssetVersions in interface atg.versionmanager.factories.AssetVersionFactory
Parameters:
developmentLineURI -
Returns:
an unmodifiable Set of AssetVersion
Throws:
VersionException

getCurrentAssetVersions

public java.util.Set getCurrentAssetVersions(VersionManagerURI devlineURI,
                                             int whichOnes)
                                      throws VersionException
Specified by:
getCurrentAssetVersions in interface atg.versionmanager.factories.AssetVersionFactory
Throws:
VersionException

createBranch

public Branch createBranch(VersionManagerURI id,
                           Branch parent)
                    throws VersionException
Create a branch using the non-deleted assets in the given parent branch.

Specified by:
createBranch in interface atg.versionmanager.factories.BranchFactory
Parameters:
id - The URI for the new branch
parent - branch to derive from, not null
Returns:
Branch
Throws:
VersionException

createBranch

public Branch createBranch(java.lang.String name,
                           Branch parent)
                    throws VersionException
Create a branch with the given name, using the non-deleted assets in the given parent branch.

Specified by:
createBranch in interface atg.versionmanager.factories.BranchFactory
Parameters:
name -
parent -
Returns:
Throws:
VersionException

getMainBranch

public Branch getMainBranch()
                     throws VersionException
Get the main branch for this VersionManager.

Specified by:
getMainBranch in interface atg.versionmanager.factories.BranchFactory
Returns:
main branch, never null
Throws:
VersionException

getBranch

public Branch getBranch(VersionManagerURI id)
                 throws VersionException
Look-up a branch by its id.

Specified by:
getBranch in interface atg.versionmanager.factories.BranchFactory
Returns:
requested branch, or null if the id does not exist or belongs to another version manager.
Throws:
VersionException

getBranchByName

public Branch getBranchByName(java.lang.String name)
                       throws VersionException
Look up the branch with the given name in this version manager.

Specified by:
getBranchByName in interface atg.versionmanager.factories.BranchFactory
Parameters:
name -
Returns:
Throws:
VersionException

getBranchByID

public Branch getBranchByID(java.lang.String id)
                     throws VersionException
Look up the branch with the given unique ID in this version manager.

Specified by:
getBranchByID in interface atg.versionmanager.factories.BranchFactory
Parameters:
id -
Returns:
Throws:
VersionException

getBranches

public java.util.Set getBranches()
Get an unmodifiable set of all branches.

Specified by:
getBranches in interface atg.versionmanager.factories.BranchFactory
Returns:
an unmodifable Set of Branch

getBranchesByParent

public java.util.Set getBranchesByParent(Branch parent)
                                  throws VersionException
Find all child branches given a parent branch.

Specified by:
getBranchesByParent in interface atg.versionmanager.factories.BranchFactory
Parameters:
branch - parent
Returns:
branches that have the branch as their parent
Throws:
VersionException

getAllLines

public java.util.Set getAllLines()
Set of all branches, baselines, workspaces.

Specified by:
getAllLines in interface atg.versionmanager.factories.DevelopmentLineFactory
Returns:
an unmodifiable Set of all development lines known to this version manager.

getLine

public DevelopmentLine getLine(VersionManagerURI id)
                        throws VersionException
Look up any development line (branch, baseline, workspace). If the given URI does not belong to this version manager this method will return null.

Specified by:
getLine in interface atg.versionmanager.factories.DevelopmentLineFactory
Parameters:
id - the URI of the development line
Returns:
the development line, or null if the id is not in use.
Throws:
VersionException

getLineByName

public DevelopmentLine getLineByName(java.lang.String name)
                              throws VersionException
Look up the development line with the given name in this version manager.

Specified by:
getLineByName in interface atg.versionmanager.factories.DevelopmentLineFactory
Parameters:
name -
Returns:
Throws:
VersionException

getLineByID

public DevelopmentLine getLineByID(java.lang.String id)
                            throws VersionException
Look up the development line using the unique identifier returned from getID().

Specified by:
getLineByID in interface atg.versionmanager.factories.DevelopmentLineFactory
Throws:
VersionException

createSnapshot

public Snapshot createSnapshot(VersionManagerURI id)
                        throws VersionException
Create a new snapshot.

Specified by:
createSnapshot in interface atg.versionmanager.factories.SnapshotFactory
Parameters:
id - for the new snapshot
Returns:
new snapshot
Throws:
VersionException
See Also:
VersionUtils#createSnapshot

createSnapshot

public Snapshot createSnapshot(VersionManagerURI id,
                               Branch parent)
                        throws VersionException
Create a new snapshot using the assets on the given branch.

Specified by:
createSnapshot in interface atg.versionmanager.factories.SnapshotFactory
Throws:
VersionException

createSnapshot

public Snapshot createSnapshot(java.lang.String name)
                        throws VersionException
Create a new snapshot with the given name based on the current development line stored in the WorkingContext. Snapshots do not include deleted assets by default.

Specified by:
createSnapshot in interface atg.versionmanager.factories.SnapshotFactory
Parameters:
name -
Returns:
Throws:
VersionException

createSnapshot

public Snapshot createSnapshot(java.lang.String name,
                               Branch parent)
                        throws VersionException
Create a snapshot using the non-deleted assets on the given branch.

Specified by:
createSnapshot in interface atg.versionmanager.factories.SnapshotFactory
Throws:
VersionException

getSnapshots

public java.util.Set getSnapshots()
Get an unmodifiable set of all snapshots.

Specified by:
getSnapshots in interface atg.versionmanager.factories.SnapshotFactory
Returns:
unmodifiable Set of Snapshots

getSnapshot

public Snapshot getSnapshot(VersionManagerURI uri)
                     throws VersionException
Look-up a snapshot by its id.

Specified by:
getSnapshot in interface atg.versionmanager.factories.SnapshotFactory
Returns:
requested snapshot, or null if the id does not exist
Throws:
VersionException

getSnapshotByName

public Snapshot getSnapshotByName(java.lang.String name)
                           throws VersionException
Look up a Snapshot of the given name in this version manager.

Specified by:
getSnapshotByName in interface atg.versionmanager.factories.SnapshotFactory
Parameters:
name -
Returns:
Throws:
VersionException

getSnapshotByID

public Snapshot getSnapshotByID(java.lang.String id)
                         throws VersionException
Look up a snapshot using the unique ID returned from getID().

Specified by:
getSnapshotByID in interface atg.versionmanager.factories.SnapshotFactory
Throws:
VersionException

getSnapshotsByParent

public java.util.Set getSnapshotsByParent(Branch branch)
                                   throws VersionException
Find all child snapshots given a parent branch.

Specified by:
getSnapshotsByParent in interface atg.versionmanager.factories.SnapshotFactory
Parameters:
branch - parent
Returns:
snapshots thave have the branch as their parent
Throws:
VersionException

createWorkspace

public Workspace createWorkspace(VersionManagerURI id,
                                 Branch parent)
                          throws VersionException
Create a workspace from another development line.

Specified by:
createWorkspace in interface atg.versionmanager.factories.WorkspaceFactory
Parameters:
id - for the new workspace
parent - development line to start from, cannot be null
Returns:
new workspace
Throws:
VersionException

createWorkspace

public Workspace createWorkspace(java.lang.String name,
                                 Branch parent)
                          throws VersionException
Create a workspace based on a branch.

Specified by:
createWorkspace in interface atg.versionmanager.factories.WorkspaceFactory
Parameters:
unique - name of workspace. Use null value to auto-generate name
parent - branch of workspsace
Returns:
new workspace
Throws:
VersionException

getWorkspaces

public java.util.Set getWorkspaces()
Get an unmodifiable set of current workspaces.

Specified by:
getWorkspaces in interface atg.versionmanager.factories.WorkspaceFactory
Returns:
an unmodifiable set of Workspace

getWorkspace

public Workspace getWorkspace(VersionManagerURI id)
                       throws VersionException
Look-up a workspace by its id.

Specified by:
getWorkspace in interface atg.versionmanager.factories.WorkspaceFactory
Returns:
requested workspace, or null if the id does not exist or does not belong to this version manager.
Throws:
VersionException

getWorkspaceByName

public Workspace getWorkspaceByName(java.lang.String name)
                             throws VersionException
Gets the workspace matching the given name from this version manager.

Specified by:
getWorkspaceByName in interface atg.versionmanager.factories.WorkspaceFactory
Parameters:
name -
Returns:
the matching workspace or null if a workspace of the given name doesn't exist in this version manager.
Throws:
VersionException

getWorkspaceByID

public Workspace getWorkspaceByID(java.lang.String uniqueid)
                           throws VersionException
Gets the workspace matching the given unique id, which was retrieved using getID()

Specified by:
getWorkspaceByID in interface atg.versionmanager.factories.WorkspaceFactory
Throws:
VersionException

getWorkspacesByParent

public java.util.Set getWorkspacesByParent(Branch parent)
                                    throws VersionException
Find all child workspaces given a parent branch.

Specified by:
getWorkspacesByParent in interface atg.versionmanager.factories.WorkspaceFactory
Parameters:
branch - parent
Returns:
workspaces that have the branch as their parent
Throws:
VersionException

getActiveWorkspaces

public java.util.Set getActiveWorkspaces()
                                  throws VersionException
Find active (not checked in) workspaces.

Specified by:
getActiveWorkspaces in interface atg.versionmanager.factories.WorkspaceFactory
Returns:
workspaces that are not checked in
Throws:
VersionException

findVersionContainer

public atg.adapter.version.RepositoryVersionContainer findVersionContainer(Repository pRepository)
This method will return the repository version container given a repository. Ideally the repository it is handed will implement RepositoryVersionContainer via one of the secure version repository implementations.


removeSnapshot

public void removeSnapshot(Snapshot snapshot)
                    throws VersionException
Remove a snapshot.

Parameters:
snapshot - to remove
Throws:
VersionException

removeBranch

public atg.versionmanager.RemoveBranchResult removeBranch(Branch branch)
                                                   throws VersionException
Remove a branch and all versions owned by that branch.

Parameters:
branch -
Throws:
VersionException

removeBranch

public atg.versionmanager.RemoveBranchResult removeBranch(Branch branch,
                                                          boolean pDryRun)
                                                   throws VersionException
Remove a branch and all versions owned by that branch.

Parameters:
branch -
Throws:
VersionException

purge

public atg.versionmanager.PurgeResult purge(Branch branch,
                                            long pExpirationTime)
                                     throws VersionException
Permanently remove versions which were checked in on or before the given date from the given branch. Also removes any versioning meta data rendered defunt as a result of the purge operation i.e workspace and snapshot no longer valid.

Parameters:
branch - branch on which to perform the purge.
pExpirationTime - Expiration time in milliseconds after January 1, 1970 00:00:00 GMT. Items checked-in on or before this time will be purged from the given branch.
pIgnorableChildBranches -
Throws:
VersionException

purge

public atg.versionmanager.PurgeResult purge(Branch branch,
                                            long pExpirationTime,
                                            boolean pDryRun)
                                     throws VersionException
Permanently remove versions which were checked in on or before the given date from the given branch. Also removes any versioning meta data rendered defunt as a result of the purge operation i.e workspace and snapshot no longer valid.

Parameters:
branch - branch on which to perform the purge.
pDryRun - simulate a purge (to get the results) without doing the actual purge.
pExpirationTime - Expiration time in milliseconds after January 1, 1970 00:00:00 GMT. Items checked-in on or before this time will be purged from the given branch.
Throws:
VersionException

purge

public atg.versionmanager.PurgeResult purge(Branch branch,
                                            long pExpirationTime,
                                            boolean pDryRun,
                                            java.util.Collection pIgnorableChildBranches)
                                     throws VersionException
Permanently remove versions which were checked in on or before the given date from the given branch. Also removes any versioning meta data rendered defunt as a result of the purge operation i.e workspace and snapshot no longer valid.

Parameters:
branch - branch on which to perform the purge.
pDryRun - simulate a purge (to get the results) without doing the actual purge.
pExpirationTime - Expiration time in milliseconds after January 1, 1970 00:00:00 GMT. Items checked-in on or before this time will be purged from the given branch.
pIgnorableChildBranches - child branches which can be ignored for the purpose of purge, note this should be either an empty collection or null when pDryRun is false. For an actual run child branches are not allowed to be ignored.
Throws:
VersionException

getCountOfAllAssetVersions

public int getCountOfAllAssetVersions()
                               throws VersionException
Get the count of total number of asset versions under this version manager's control.

Throws:
VersionException

getCountOfAllAssets

public int getCountOfAllAssets()
                        throws VersionException
Get the count of total number of assets under this version manager's control.

Throws:
VersionException

isVVFSRepository

public boolean isVVFSRepository(atg.adapter.version.RepositoryVersionContainer pRepository)
Does this repository back a VVFS

Parameters:
pRepository - repository to check
Returns:
true if the version repository backs a VVFS

getVersionedRepositoriesSet

public java.util.Set getVersionedRepositoriesSet()
Gets the set of all VersionRepositories that are managed by this VersionManager. This set also includes repositories that back VirtualFileSystems. If you don't want those, use getVersionedRepositoriesOnlySet.

Returns:
an unmodifiable Collection of VersionRepositories

getVersionedRepositoriesOnlySet

public java.util.Set getVersionedRepositoriesOnlySet()
Gets the VersionRepositories that are used by this VersionManager, without the ones that are also exposed as VFSes.

Returns:
an unmodifiable Collection of VersionRepositories

getVersionedRepository

public atg.adapter.version.RepositoryVersionContainer getVersionedRepository(java.lang.String name)
Get the versioned repository of the given name.

Parameters:
name -
Returns:

getVersionedVirtualFileSystemsSet

public java.util.Set getVersionedVirtualFileSystemsSet()
Gets the VersionedVirtualFileSystems that are used by this VersionManager

Returns:
an unmodifiable Collection of VersionedVirtualFileSystems

getVVFSVersionedRepositories

public java.util.Set getVVFSVersionedRepositories()
Get the VersionRepositories that are exposed as VVFSes. These may also be in the set of repositories returned by getVersionedRepositories().

Returns:
VVFS Versioned Repository set

getVersionedVirtualFileSystem

public atg.vfs.repository.RepositoryVirtualFileSystem getVersionedVirtualFileSystem(java.lang.String name)
Get the versioned virtual file system of the given name.

Parameters:
VFS - name as configured for this version manager
Returns:
VFS

getVersionedVirtualFileSystemPath

public java.lang.String getVersionedVirtualFileSystemPath(java.lang.String name)
Get the versioned virtual file system nucleus path of the given name.

Parameters:
VFS - name as configured for this version manager
Returns:
VFS nucleus path

getRepositoryNameInVersionManager

public java.lang.String getRepositoryNameInVersionManager(java.lang.String nucleusPath)
Given a nucleus path, return the name of the repository as configured in the VersionManager (for use in a VersionManagerURI).

Parameters:
nucleusPath -
Returns:
repository name as configured in VM

getVFSNameInVersionManager

public java.lang.String getVFSNameInVersionManager(java.lang.String nucleusPath)
Given a nucleus path of a VFS, return the name of a VFS as configured in the VersionManager

Parameters:
nucleusPath -
Returns:
VFS name as configured in VM

getVFSNameByItemDescriptor

public java.lang.String getVFSNameByItemDescriptor(java.lang.String pRepositoryPath,
                                                   java.lang.String pDescriptorName)
Get the Version Manager's name for a versioned VFS that is backed by a particular repository and item type

Parameters:
Absolute - path of repository
String - descriptor name
Returns:
name of versioned Virtual File System

doStartService

public void doStartService()
                    throws ServiceException
Validate the configured values.

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up
See Also:
GenericService.doStartService()

getAssetTypeName

public static final java.lang.String getAssetTypeName(int pWhichOnes)

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Get the transaction manager.


setAssetFactory

public void setAssetFactory(atg.versionmanager.factories.AssetFactory factory)

setAssetVersionFactory

public void setAssetVersionFactory(atg.versionmanager.factories.AssetVersionFactory factory)

setBranchFactory

public void setBranchFactory(atg.versionmanager.factories.BranchFactory factory)

setDevelopmentLineFactory

public void setDevelopmentLineFactory(atg.versionmanager.factories.DevelopmentLineFactory factory)

setSnapshotFactory

public void setSnapshotFactory(atg.versionmanager.factories.SnapshotFactory factory)

setWorkspaceFactory

public void setWorkspaceFactory(atg.versionmanager.factories.WorkspaceFactory factory)

setVersionedRepositories

public void setVersionedRepositories(java.util.Map map)

getVersionedRepositories

public java.util.Map getVersionedRepositories()

setVersionedVirtualFileSystems

public void setVersionedVirtualFileSystems(java.util.Map map)

getVersionedVirtualFileSystems

public java.util.Map getVersionedVirtualFileSystems()

getRepository

public MutableRepository getRepository()
Get the metadata repository

Returns:
metadata repository

setRepository

public void setRepository(MutableRepository repository)
Set the metadata repository

Parameters:
repository -

getMessageSender

public atg.versionmanager.messaging.MessageSender getMessageSender()
Get the message sender

Returns:
MessageSender for this component

setMessageSender

public void setMessageSender(atg.versionmanager.messaging.MessageSender sender)
Set the sender

Parameters:
sender - MessageSender for this component

setSendCheckinEvents

public void setSendCheckinEvents(boolean b)
Sets whether JMS messages should be sent for checkin events.

Parameters:
b -

getSendCheckinEvents

public boolean getSendCheckinEvents()

setSendCheckoutEvents

public void setSendCheckoutEvents(boolean b)
Sets whether JMS messages should be sent for checkout events.

Parameters:
b -

getSendCheckoutEvents

public boolean getSendCheckoutEvents()

getWorkspaceOptimizationThresholdAssetCount

public int getWorkspaceOptimizationThresholdAssetCount()
When to kick the optimized version of operations to prevent aggressive memory usage or large iterations on repository items when doing those operations. This number usually will be the number of assets taking part in the operation.

Returns:
int

setWorkspaceOptimizationThresholdAssetCount

public void setWorkspaceOptimizationThresholdAssetCount(int workspaceOptimizationThresholdAssetCount)
When to kick the optimized version of operations to prevent aggressive memory usage or large iterations on repository items when doing those operations. This number usually will be the number of assets taking part in the operation.


getUnlockAllAssetsOptimizationThresholdCount

public int getUnlockAllAssetsOptimizationThresholdCount()
Number of asset locks in a workspace when optimized SQL should be used for better performance to release asset locks.

Returns:
int

setUnlockAllAssetsOptimizationThresholdCount

public void setUnlockAllAssetsOptimizationThresholdCount(int unlockAllAssetsOptimizationThresholdCount)
Number of asset locks in a workspace when optimized SQL should be used for better performance to release asset locks.


isUseOptimizedReplicationForMerge

public boolean isUseOptimizedReplicationForMerge()
Get property m_useOptimizedReplicationForMerge Set to false if optimized merging should never be used, even when there are more assets in the source workspace than the mergeOptimizationThreshold count set on this component.

Returns:
useOptimizedReplicationForMerge

setUseOptimizedReplicationForMerge

public void setUseOptimizedReplicationForMerge(boolean useOptimizedReplicationForMerge)
Set property useOptimizedReplicationForMerge

Parameters:
useOptimizedReplicationForMerge - new value to set

getMergeOptimizationThresholdCount

public int getMergeOptimizationThresholdCount()
Threshold number of assets in the source workspace when a merge operation starts using the optimized version of the operation. If this is set too low there will be frequent cache invalidation which may hurt performance temporarily after merge has finished. If this is too high, merges can take considerably longer time to finish.

Returns:
int

setMergeOptimizationThresholdCount

public void setMergeOptimizationThresholdCount(int mergeOptimizationThresholdCount)
Threshold number of assets in the source workspace when a merge operation starts using the optimized version of the operation. If this is set too low there will be frequent cache invalidation which may hurt performance temporarily after merge has finished. If this is too high, merges can take considerably longer time to finish.


isUseOptimizedReplicationForRevert

public boolean isUseOptimizedReplicationForRevert()
Get property m_useOptimizedReplicationForRevert Set to false if optimized merging should never be used, even when there are more assets in the source workspace than the revertOptimizationThresholdCount count set on this component.

Returns:
useOptimizedReplicationForRevert

setUseOptimizedReplicationForRevert

public void setUseOptimizedReplicationForRevert(boolean useOptimizedReplicationForRevert)
Set property useOptimizedReplicationForRevert

Parameters:
useOptimizedReplicationForRevert - new value to set

getRevertOptimizationThresholdCount

public int getRevertOptimizationThresholdCount()
Threshold number of assets in the source workspace when a Branch.revertToWorkspace() operation starts using the optimized version of the operation. If this is set too low there will be frequent cache invalidation which may hurt performance temporarily after merge has finished. If this is too high, merges can take considerably longer time to finish.

Returns:
int

setRevertOptimizationThresholdCount

public void setRevertOptimizationThresholdCount(int revertOptimizationThresholdCount)
Threshold number of assets in the source workspace when a Branch.revertToWorkspace() operation starts using the optimized version of the operation. If this is set too low there will be frequent cache invalidation which may hurt performance temporarily after merge has finished. If this is too high, merges can take considerably longer time to finish.


getWorkspaceMergeTransactionBatchSize

public int getWorkspaceMergeTransactionBatchSize()
For large merges this is the batch size refferred to when performing batched merges. A zero or a negetive value signifies no batching.

Returns:
int

setWorkspaceMergeTransactionBatchSize

public void setWorkspaceMergeTransactionBatchSize(int workspaceMergeTransactionBatchSize)
For large merges this is the batch size refferred to when performing batched merges. A zero or a negetive value signifies no batching.


isEnableWorkspaceDependencyCache

public boolean isEnableWorkspaceDependencyCache()
Get property m_enableWorkspaceDependencyCache If file system cache for dependency check should be enabled. For large workspaces this cache can be useful to quickly find if assets in a workspace depend on another assets in another workspace.

Returns:
m_enableWorkspaceDependencyCache

setEnableWorkspaceDependencyCache

public void setEnableWorkspaceDependencyCache(boolean pEnableWorkspaceDependencyCache)
Set property m_enableWorkspaceDependencyCache

Parameters:
pEnableWorkspaceDependencyCache - new value to set

getGlobalAssetEditLockName

public java.lang.String getGlobalAssetEditLockName()
The name of the global lock name that must be used for aquiring locks when all edits to asset including checkins must be prevented.

Returns:

setGlobalAssetEditLockName

public void setGlobalAssetEditLockName(java.lang.String pGlobalAssetEditLockName)
Parameters:
pGlobalAssetEditLockName -

setGlobalAssetEditLockTimeout

public void setGlobalAssetEditLockTimeout(long pGlobalAssetEditLockTimeout)
Set the maximum time we wait for a global checkin write lock, in milliseconds.


getGlobalAssetEditLockTimeout

public long getGlobalAssetEditLockTimeout()
Get the maximum time we wait for a global checkin write lock, in milliseconds. The default value is zero, meaning wait forever for global checkin write lock if necessary.


setClientLockManager

public void setClientLockManager(ClientLockManager pClientLockManager)
Sets the property ClientLockManager.

Parameters:
pLockManager - new value to set

getClientLockManager

public ClientLockManager getClientLockManager()
Returns:
The value of the property LockManager.

getVersionManager

public VersionManager getVersionManager()
Specified by:
getVersionManager in interface atg.versionmanager.factories.Factory

setVersionManager

public void setVersionManager(VersionManager vm)
Specified by:
setVersionManager in interface atg.versionmanager.factories.Factory

addVersionListener

public void addVersionListener(VersionListener listener)
Specified by:
addVersionListener in interface atg.versionmanager.event.VersionEventSource
See Also:
VersionEventSource.addVersionListener(atg.versionmanager.event.VersionListener)

hasVersionListeners

public boolean hasVersionListeners()
Specified by:
hasVersionListeners in interface atg.versionmanager.event.VersionEventSource
See Also:
VersionEventSource.hasVersionListeners()

removeVersionListener

public void removeVersionListener(VersionListener listener)
Specified by:
removeVersionListener in interface atg.versionmanager.event.VersionEventSource
See Also:
VersionEventSource.removeVersionListener(atg.versionmanager.event.VersionListener)

fireVersionEvent

public void fireVersionEvent(VersionEvent event)
Specified by:
fireVersionEvent in interface atg.versionmanager.event.VersionEventSource
See Also:
VersionEventSource.fireVersionEvent(atg.versionmanager.event.VersionEvent)

acquireGlobalAssetEditLock

public boolean acquireGlobalAssetEditLock(boolean pWriteLock)
                                   throws VersionException,
                                          TimeExceededException
Acquire a lock to prevent any edits to version manager assets including checkouts and checkins. A TimeExceededException is thrown when a read lock is requested and it cannot be obtained after a timeout of five seconds. A transaction must be in place when this method is called otherwise an exception will be thrown. Uses globalAssetEditLockTimeout for lock timeout when aquiring a write lock otherwise uses five seconds as lock timeout.

Parameters:
mWriteLock - if a write lock should be obtained as opposed to a read lock
Returns:
true if a lock was taken false if this thread already has the same lock (read or write)
Throws:
VersionException
TimeExceededException

acquireGlobalAssetEditLock

public boolean acquireGlobalAssetEditLock(boolean pWriteLock,
                                          long pLockTimeout)
                                   throws VersionException,
                                          TimeExceededException
Acquire a lock to prevent any edits to version manager assets including checkouts and checkins. A TimeExceededException is thrown when a read lock is requested and it cannot be obtained after a timeout. A transaction must be in place when this method is called otherwise an exception will be thrown.

Parameters:
pWriteLock - if a write lock should be obtained as opposed to a read lock
pLockTimeout - how long to wait for the lock
Returns:
true if a lock was taken false if this thread already has the same lock (read or write)
Throws:
VersionException
TimeExceededException