atg.versionmanager
Interface WorkingVersion

All Superinterfaces:
AssetVersion, ManagedElement

public interface WorkingVersion
extends AssetVersion

An editable resource created by checking out an asset version in a workspace. A working version is used to modify the asset, and then either abandoned by reverting, or made permanent by check-in.

A working version has an identifier which is only unique within the enclosing Asset. A workspace can only have one checked-out working version for each asset.

The parent version is the original version that was checked-out to create the working version.

A working version is modified if any of the asset's values have been changed. This includes setting a property value, setting or getting a new live resource reference, and deleting or un-deleting the resource.

A working version can be marked as deleted. When checked in, the new head version of the asset will be marked deleted.

A working version is released when it is checked-in or unchecked-out. It is an error to try to use a released working version.


Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String STATUS_ADDED
           
static int STATUS_ADDED_CODE
           
 
Fields inherited from interface atg.versionmanager.AssetVersion
STATUS_DELETED, STATUS_DELETED_CODE, STATUS_MODIFIED, STATUS_MODIFIED_CODE
 
Method Summary
 Workspace getWorkspace()
          Working versions exist within a workspace, which is a development line supporting check-outs.
 boolean isAdded()
          An added working version is one whose underlying asset does not exist in the parent development line.
 boolean isRevertedOrCheckedIn()
          Test if the working version has been released.
 boolean isUpToDate()
          Check to see if a resolve() is needed before this version can be checked in.
 void move(Workspace pWorkspace)
          Move this WorkingVersion to a new Workspace.
 void resetParentVersion()
          Reset a working version's parent version to the current head-of-branch version.
 void revert()
          Discard a checked-out working version and revert the content of the workspace to the original unmodified value.
 void setDeleted(boolean delete)
          Mark this resource as deleted.
 
Methods inherited from interface atg.versionmanager.AssetVersion
getAllParentVersions, getAsset, getCreatedInWorkspace, getDevelopmentLine, getLaterVersions, getParentVersion, getRepositoryItem, getResourceType, getStatus, getStatusCode, getVersion, getVirtualFile, getVirtualFileSystem, getWorkingVersion, getWorkingVersions, hasLaterVersion, hasParentVersion, isCheckedOut, isDeleted, isHeadOfLine
 
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

STATUS_ADDED_CODE

static final int STATUS_ADDED_CODE
See Also:
Constant Field Values

STATUS_ADDED

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

getWorkspace

Workspace getWorkspace()
Working versions exist within a workspace, which is a development line supporting check-outs.


revert

void revert()
            throws VersionException
Discard a checked-out working version and revert the content of the workspace to the original unmodified value. To edit this resource again it needs to be checked out.

Throws:
VersionException

resetParentVersion

void resetParentVersion()
                        throws VersionException
Reset a working version's parent version to the current head-of-branch version.

Throws:
VersionException

setDeleted

void setDeleted(boolean delete)
                throws VersionException
Mark this resource as deleted. When this is checked in the new version will return "true" when isDeleted() is called.

Throws:
VersionException

isUpToDate

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

Returns:

isAdded

boolean isAdded()
                throws VersionException
An added working version is one whose underlying asset does not exist in the parent development line. The added flag is only true for the first checked-out working version returned by createVersionHistory. The first check-in will add the new version to the underlying development line. A working version can be both added and deleted, because deleted flag is a local decision about the content, but the added flag is relative to existence in the underlying development line.

Returns:
true if the history does not yet exist in the underlying layer
Throws:
VersionException

isRevertedOrCheckedIn

boolean isRevertedOrCheckedIn()
Test if the working version has been released.


move

void move(Workspace pWorkspace)
          throws VersionException
Move this WorkingVersion to a new Workspace.

Parameters:
pWorkspace - The new Workspace to move to
Throws:
VersionException