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
           
static int CONFLICT_SORT_CODE
           
static int ID_SORT_CODE
           
static int STATUS_SORT_CODE
           
static int TYPE_SORT_CODE
           
 
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.
 java.util.Collection findWorkingReferencesToAsset(AssetVersion assetVersion)
          Find working versions in this workspace that reference the given asset.
 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)
           
 long getCheckInTime()
          Workspaces have a check-in time
 java.lang.String getComment()
          Workspaces have a comment.
 java.util.List<WorkingVersion> getFilteredWorkingVersions(int pFilterCode)
          Get the working versions for this workspace filtered by the specified filter code.
 java.util.Set getPreloadedAssetsChanged(int whichOnes, boolean filterDeleted, boolean preloadItems)
          Returns the items checked in with this Workspace.
 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.
 java.util.Set getWorkingVersions(java.util.Collection pReps, java.util.Collection pVFSReps)
          Get all the currently checked-out working versions for this workspace for the specified repositories.
 java.util.List<WorkingVersion> getWorkingVersions(int pSortCode)
          Get all the currently checked-out working versions for this workspace sorted by the specified code.
 boolean isCheckedIn()
          Returns true if the workspace has had all of its contents checked in.
 boolean isCheckedOut(Asset pAsset)
          This method checks to see if the specified asset has been checked out in the current workspace.
 boolean isCheckedOut(Asset pAsset, boolean pCheckCache)
          This method checks to see if the specified asset has been checked out in the current workspace.
 boolean isCheckedOut(VersionManagerURI pURI)
          This method checks to see if the asset specified by the VersionManagerURI has been checked out in the current workspace.
 boolean isCheckedOut(VersionManagerURI pURI, boolean pCheckCache)
          This method checks to see if the asset specified by the VersionManagerURI has been checked out in the current workspace.
 boolean isEditable()
          Can assets in this workspace be checked out and those already checked out be modified.
 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 setComment(java.lang.String comment)
          Set the comment describing what this workspace is changing.
 void setEditable(boolean pEditable)
          Sets a workspace editable or not editable.
 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

TYPE_SORT_CODE

static final int TYPE_SORT_CODE
See Also:
Constant Field Values

STATUS_SORT_CODE

static final int STATUS_SORT_CODE
See Also:
Constant Field Values

ID_SORT_CODE

static final int ID_SORT_CODE
See Also:
Constant Field Values

CONFLICT_SORT_CODE

static final int CONFLICT_SORT_CODE
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

getWorkingVersions

java.util.Set getWorkingVersions(java.util.Collection pReps,
                                 java.util.Collection pVFSReps)
Get all the currently checked-out working versions for this workspace for the specified repositories.

Returns:
unmodifiable set of WorkingVersion

getFilteredWorkingVersions

java.util.List<WorkingVersion> getFilteredWorkingVersions(int pFilterCode)
Get the working versions for this workspace filtered by the specified filter code.

Parameters:
pSortCode - Filter code specifying the working versions to be returned.
Returns:
A list of WorkingVersion items filtered by the specified status.

getWorkingVersions

java.util.List<WorkingVersion> getWorkingVersions(int pSortCode)
Get all the currently checked-out working versions for this workspace sorted by the specified code.

Parameters:
pSortCode - Sort code specifying the order in which the working versions are to be returned.
Returns:
List of WorkingVersion items filtered by the specified status.

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

isEditable

boolean isEditable()
Can assets in this workspace be checked out and those already checked out be modified. A checked in workspace is not editable.

Returns:
true if workspace is editable

setEditable

void setEditable(boolean pEditable)
                 throws VersionException
Sets a workspace editable or not editable.

Throws:
VersionException

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

findWorkingReferencesToAsset

java.util.Collection findWorkingReferencesToAsset(AssetVersion assetVersion)
                                                  throws VersionException
Find working versions in this workspace that reference the given asset. Note that this method does not return assets which have been deleted in this workspace.

Parameters:
version - finds references to this asset version
pLine -
Returns:
A collection of WorkingVersions
Throws:
VersionException

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

isCheckedOut

boolean isCheckedOut(Asset pAsset)
                     throws VersionException
This method checks to see if the specified asset has been checked out in the current workspace. If the workspace has been checked in, this method will determine if the asset had been checked out in this workspace.

Parameters:
pAsset - Asset to check
Returns:
true if the specified asset is checked out in this workspace.
Throws:
VersionException

isCheckedOut

boolean isCheckedOut(Asset pAsset,
                     boolean pCheckCache)
                     throws VersionException
This method checks to see if the specified asset has been checked out in the current workspace. If the workspace has been checked in, this method will determine if the asset had been checked out in this workspace.

Parameters:
pAsset - Asset to check
pCheckCache - Flag indicating whether the cache should be checked first when determining this information.
Returns:
true if the specified asset is checked out in this workspace.
Throws:
VersionException

isCheckedOut

boolean isCheckedOut(VersionManagerURI pURI)
                     throws VersionException
This method checks to see if the asset specified by the VersionManagerURI has been checked out in the current workspace. If the workspace has been checked in, this method will determine if the asset had been checked out in this workspace.

Parameters:
pURI - The VersionManagerURI of the asset to check
Returns:
true if the specified VersionManagerURI is checked out in this workspace.
Throws:
VersionException

isCheckedOut

boolean isCheckedOut(VersionManagerURI pURI,
                     boolean pCheckCache)
                     throws VersionException
This method checks to see if the asset specified by the VersionManagerURI has been checked out in the current workspace. If the workspace has been checked in, this method will determine if the asset had been checked out in this workspace.

Parameters:
pURI - The VersionManagerURI of the asset to check
pCheckCache - Flag indicating whether the cache should be checked first when determining this information.
Returns:
true if the specified VersionManagerURI is checked out in this workspace.
Throws:
VersionException