atg.versionmanager
Interface Workspace

All Superinterfaces:
DevelopmentLine, ManagedElement

public interface Workspace
extends DevelopmentLine

A DevelopmentLine that controls changes to versioned resources. Workspaces contain some combination of:

They also implicitly include all of the other assets in the parent development line.

A workspace creates a new asset and an initial version of that asset when a resource is put under version control.

A new editable working version is created by checking out an existing version, either the current head version of the asset, or some other arbitrary version (e.g. a deleted version that is not normally accessible as the current version). A workspace can only have one checked-out working version for each asset. The rest of the editing cycle is usually invoked through the working version, but the workspace contains some batch utilities for reverting or checking-in all the outstanding working versions.

A workspace can be deleted, if it does not have any any outstanding checked-out working versions. When a workspace is deleted, any references to it become invalid and can no longer be used.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 void addNewAsset(int type, atg.adapter.version.RepositoryWorkingVersionItem item, java.lang.String repositoryName, java.lang.String itemDescriptor, java.lang.Integer version)
          This method is not for use by client code.
 void checkInAll(java.lang.String username, java.lang.String comment)
          Check-in all the checked-out working versions in the workspace.
 WorkingVersion checkOut(Asset asset)
          Check-out an asset into this workspace.
 WorkingVersion checkOut(AssetVersion version)
          Check-out a specific version into this workspace.
 WorkingVersion checkOut(VersionManagerURI uri)
          Check-out a specific version into this workspace.
 void delete()
          Delete a workspace.
 void generateDependencyCaches()
          Generated caches that are useful in calculating one workspace's dependency on another workspace.
 java.util.Set getAssetsChanged()
          Returns the assets changed by this Workspace.
 java.util.Set getAssetsChanged(int whichOnes)
           
 java.util.Set getAssetsChanged(atg.versionmanager.impl.VersionContainerIncludeChecker containerIncludeChecker)
           
 java.util.Set getChangedAssetURIs()
          Returns the set of version manager URIs of assets changed by this Workspace.
 long getCheckInTime()
          Workspaces have a check-in time
 java.lang.String getComment()
          Workspaces have a comment.
 java.util.Set getPreloadedAssetsChanged(int whichOnes, boolean filterDeleted, boolean preloadItems)
          Returns the items checked in with this Workspace.
 java.util.Set getReferencedAssetURIs()
          Returns the set of URIs that assets changed in this URI reference.
 java.lang.String getUser()
          Workspaces have a creator.
 WorkingVersion getWorkingVersion(Asset asset)
          Get the currently checked-out working version for an asset in this workspace.
 WorkingVersion getWorkingVersion(AssetVersion asset)
           
 WorkingVersion getWorkingVersion(VersionManagerURI assetURI)
           
 java.util.Set getWorkingVersions()
          Get all the currently checked-out working versions for this workspace.
 boolean isCheckedIn()
          Returns true if the workspace has had all of its contents checked in.
 boolean isLocked()
          Are all assets in this workspace locked
 boolean isUpToDate()
          Check to see if a resolve() is needed before the versions can be checked in.
 boolean lockAllAssets()
          Lock all assets in this workspace for deployment
 void resetParentVersionForAll()
          Reset all working versions' predecessor version to the current head-of-branch version.
 void revert(java.util.Collection pWorkingVersions)
          Revert given working versions
 void revert(WorkingVersion version)
          Revert changes to the asset that have been made in this workspace.
 void revertAll()
          Discard all the working versions in the workspace without saving any changes.
 void setChangedAssetURIs(java.util.Set pSet)
           
 void setComment(java.lang.String comment)
          Set the comment describing what this workspace is changing.
 void setReferencedAssetURIs(java.util.Set pSet)
           
 void unlockAllAssets()
          Unlock all assets in this workspace
 
Methods inherited from interface atg.versionmanager.DevelopmentLine
getAllAssetVersions, getAllAssetVersions, getAllAssetVersions, getAllAssetVersions, getAllAssetVersionsCount, getAsset, getAssets, getAssets, getAssetVersion, getChildLines, getCountOfChildLines, getCurrentAssetVersions, getCurrentAssetVersions, getCurrentAssetVersions, getCurrentAssetVersions, getCurrentAssetVersionsCount, getDateCreated, getDeletedAssetVersions, getDeletedAssetVersions, getDeletedAssetVersions, getDeletedAssetVersions, getDeletedAssetVersionsCount, getID, getParentBranch, getParentLine
 
Methods inherited from interface atg.versionmanager.ManagedElement
getDisplayName, getName, getURI, getVersionManager
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getWorkingVersions

java.util.Set getWorkingVersions()
Get all the currently checked-out working versions for this workspace.

Returns:
unmodifiable set of WorkingVersion

getWorkingVersion

WorkingVersion getWorkingVersion(Asset asset)
Get the currently checked-out working version for an asset in this workspace. The return value is null, if the asset does not exist in this workspace, or if it is not checked-out in this workspace.

Returns:
working version, or null

getWorkingVersion

WorkingVersion getWorkingVersion(AssetVersion asset)

getWorkingVersion

WorkingVersion getWorkingVersion(VersionManagerURI assetURI)

checkOut

WorkingVersion checkOut(Asset asset)
                        throws RepositoryException,
                               VersionException
Check-out an asset into this workspace.

Parameters:
history - to check-out
Returns:
working version
Throws:
RepositoryException
VersionException

checkOut

WorkingVersion checkOut(AssetVersion version)
                        throws RepositoryException,
                               VersionException
Check-out a specific version into this workspace.

Parameters:
asset - to check-out
Returns:
working version
Throws:
RepositoryException
VersionException

checkOut

WorkingVersion checkOut(VersionManagerURI uri)
                        throws RepositoryException,
                               VersionException
Check-out a specific version into this workspace.

Parameters:
uri - The uri of the asset to check-out
Returns:
working version
Throws:
RepositoryException
VersionException

revertAll

void revertAll()
               throws VersionException
Discard all the working versions in the workspace without saving any changes.

Throws:
VersionException

revert

void revert(java.util.Collection pWorkingVersions)
            throws VersionException
Revert given working versions

Parameters:
pWorkingVersions -
Throws:
VersionException

resetParentVersionForAll

void resetParentVersionForAll()
                              throws VersionException
Reset all working versions' predecessor version to the current head-of-branch version.

Throws:
VersionException

checkInAll

void checkInAll(java.lang.String username,
                java.lang.String comment)
                throws VersionException
Check-in all the checked-out working versions in the workspace.

Parameters:
comment - applied to check-ins
Throws:
VersionVetoException - if a checkin is vetoed
VersionException

delete

void delete()
            throws VersionException
Delete a workspace. It is an error if there are any outstanding checked-out working versions.

Throws:
VersionException

isCheckedIn

boolean isCheckedIn()
Returns true if the workspace has had all of its contents checked in.


getComment

java.lang.String getComment()
Workspaces have a comment.


setComment

void setComment(java.lang.String comment)
Set the comment describing what this workspace is changing.

Parameters:
comment -

getUser

java.lang.String getUser()
Workspaces have a creator.


getCheckInTime

long getCheckInTime()
Workspaces have a check-in time


getAssetsChanged

java.util.Set getAssetsChanged()
                               throws VersionException
Returns the assets changed by this Workspace.

Returns:
An unmodifiable set of AssetVersions
Throws:
VersionException

getAssetsChanged

java.util.Set getAssetsChanged(int whichOnes)
                               throws VersionException
Throws:
VersionException

getAssetsChanged

java.util.Set getAssetsChanged(atg.versionmanager.impl.VersionContainerIncludeChecker containerIncludeChecker)
                               throws VersionException
Throws:
VersionException

getPreloadedAssetsChanged

java.util.Set getPreloadedAssetsChanged(int whichOnes,
                                        boolean filterDeleted,
                                        boolean preloadItems)
                                        throws VersionException
Returns the items checked in with this Workspace.

Returns:
An unmodifiable set of RepositoryVersionItems
Throws:
VersionException

revert

void revert(WorkingVersion version)
            throws VersionException
Revert changes to the asset that have been made in this workspace.

Parameters:
version - The asset version to revert.
Throws:
VersionException

lockAllAssets

boolean lockAllAssets()
                      throws VersionException
Lock all assets in this workspace for deployment

Returns:
true if lock succeeded, false if any asset already locked in another workspace
Throws:
VersionException - thrown if problem creating locks

unlockAllAssets

void unlockAllAssets()
                     throws VersionException
Unlock all assets in this workspace

Throws:
VersionException - thrown if problem remove locks

isLocked

boolean isLocked()
                 throws VersionException
Are all assets in this workspace locked

Returns:
true if assets locked
Throws:
VersionException - thrown if problem determining lock status

isUpToDate

boolean isUpToDate()
                   throws VersionException
Check to see if a resolve() is needed before the versions can be checked in. This will return true when the head of the branch is newer than the version used to create any WorkingVersion in this workspace.

Returns:
Throws:
VersionException

getChangedAssetURIs

java.util.Set getChangedAssetURIs()
                                  throws VersionException
Returns the set of version manager URIs of assets changed by this Workspace. note: this set is not available before checkin

Returns:
An unmodifiable set of VersionManagerURI, this method will return null to indicate that the property has not been set. An empty collection would mean no entries.
Throws:
VersionException

setChangedAssetURIs

void setChangedAssetURIs(java.util.Set pSet)
                         throws VersionException
Throws:
VersionException

getReferencedAssetURIs

java.util.Set getReferencedAssetURIs()
                                     throws VersionException
Returns the set of URIs that assets changed in this URI reference. note: this set is not available before checkin

Returns:
An unmodifiable set of VersionManagerURI, this method will return null to indicate that the property has not been set.An empty collection would mean no entries.
Throws:
VersionException

setReferencedAssetURIs

void setReferencedAssetURIs(java.util.Set pSet)
                            throws VersionException
Throws:
VersionException

generateDependencyCaches

void generateDependencyCaches()
                              throws VersionException
Generated caches that are useful in calculating one workspace's dependency on another workspace. An asset used in one workspace is dependency on another workspace where this asset may have been created.

Throws:
VersionException - thrown if there is a problem generating this cache

addNewAsset

void addNewAsset(int type,
                 atg.adapter.version.RepositoryWorkingVersionItem item,
                 java.lang.String repositoryName,
                 java.lang.String itemDescriptor,
                 java.lang.Integer version)
                 throws VersionException
This method is not for use by client code. Only the VersionManager and the VersionRepository may call it.

Parameters:
type - Is this a repository item or a file
versionItem - working version of new asset
repositoryName - repository adding this asset
itemDescriptor - asset's descriptor
version - version of asset (should be 0)
Throws:
VersionException - thrown if problem adding asset