org.xiruss.xirussrepository.client
Class MutableSnapshotProxy
java.lang.Object
org.xiruss.xirussrepository.client.RepositoryObjectProxy
org.xiruss.xirussrepository.client.SnapshotProxy
org.xiruss.xirussrepository.client.MutableSnapshotProxy
- All Implemented Interfaces:
- MutableSnapshot, RepositoryObject, Snapshot
public class MutableSnapshotProxy
- extends SnapshotProxy
- implements MutableSnapshot
Methods inherited from class org.xiruss.xirussrepository.client.SnapshotProxy |
checkIsNotFixed, getBranch, getCreatedVersions, getEffectiveVersions, getExcludedVersions, getNext, getPrevious, getVersion, getVersionById, getVersionsByPropertyValue, getVersionsByResource, getVisibleVersionCount, getVisibleVersions, initialize, initialize, isFixed, resourceIsVisible, setNext, versionIsVisible, versionIsVisible |
Methods inherited from class org.xiruss.xirussrepository.client.RepositoryObjectProxy |
accept, compareTo, doPost, doStringReturnPost, equals, getBooleanValue, getId, getName, getOriginalClassName, getPathToMe, getProperties, getProperty, getPropertyNames, getRepository, getStringReturnValue, getStringSetReturnValue, getType, hasProperty, initialize, initialize, isNull, loadRepositoryObjectData, setId, setName, setProperty, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xiruss.snapcm.api.Snapshot |
checkIsNotFixed, getBranch, getCreatedVersions, getEffectiveVersions, getExcludedVersions, getNext, getPrevious, getVersion, getVersionById, getVersionsByPropertyValue, getVersionsByResource, getVisibleVersionCount, getVisibleVersions, initialize, isFixed, resourceIsVisible, setNext, versionIsVisible, versionIsVisible |
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject |
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString |
MutableSnapshotProxy
public MutableSnapshotProxy(XirussHttpApiClientHelper helper,
org.w3c.dom.Element dataSource)
throws XirussRepositoryException
- Throws:
XirussRepositoryException
addCreatedVersion
public void addCreatedVersion(Version ver)
throws SnapCMException
- Description copied from interface:
MutableSnapshot
- Adds a newly-created version to the snapshot.
- Specified by:
addCreatedVersion
in interface MutableSnapshot
- Parameters:
ver
- Version to add. The version must be new, meaning it
is unfixed.
- Throws:
VersionException
SnapshotException
SnapCMException
removeCreatedVersion
public void removeCreatedVersion(Resource resource)
throws SnapshotException
- Description copied from interface:
MutableSnapshot
- Removes the version for the specified resource from the
created versions list. It is not an error to remove
a version that is not in the list.
- Specified by:
removeCreatedVersion
in interface MutableSnapshot
- Parameters:
resource
- Resource of the version to be removed.
- Throws:
SnapshotException
removeCreatedVersion
public void removeCreatedVersion(Version version)
throws SnapshotException
- Description copied from interface:
MutableSnapshot
- Removes the version for the specified resource from the
created versions list. It is not an error to remove
a version that is not in the list.
- Specified by:
removeCreatedVersion
in interface MutableSnapshot
- Parameters:
version
- Version to be removed.
- Throws:
SnapshotException
setPreviousSnapshot
public void setPreviousSnapshot(Snapshot snap)
- Description copied from interface:
MutableSnapshot
- Sets the previous snapshot. Can only be set if
the snapshot is not fixed.
- Specified by:
setPreviousSnapshot
in interface MutableSnapshot
excludeVersion
public void excludeVersion(java.lang.String versionId)
throws SnapshotException
- Description copied from interface:
MutableSnapshot
- Excludes the version from the set of visible versions on the snapshot.
The version may be an effective or created version; however, excluding
a created version has the effect of removing it entirely from the snapshot,
while an effective version will be listed in the excluded versions list.
This reflects the fact that a version is not known to the repository
until the snapshot is committed, so it would not make sense to keep
a list of versions that were added and then removed from the snapshot
before it was committed. That is, the repository does not itself maintain
any record of the mutation history of a mutable snapshot before it
is committed and made immutable.
- Specified by:
excludeVersion
in interface MutableSnapshot
- Parameters:
versionId
- ID of the version to be excluded.
- Throws:
SnapshotException
- If version is neither effective nor created
setBranch
public void setBranch(Branch branch)
- Specified by:
setBranch
in interface MutableSnapshot
addEffectiveVersion
public void addEffectiveVersion(Version ver)
throws SnapshotException
- Description copied from interface:
MutableSnapshot
- Adds an effective version to the sandbox.
- Specified by:
addEffectiveVersion
in interface MutableSnapshot
- Throws:
SnapshotException