|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xiruss.repository.server.RepositoryObjectBase org.xiruss.repository.server.SnapshotBase org.xiruss.repository.server.MutableSnapshotBase
public class MutableSnapshotBase
A snapshot that can have its various version lists modified until it is committed. The commit operation can be performed directly on the mutable snapshot instance in this implementation but it should really be used to initialize a new read-only snapshot.
Field Summary |
---|
Fields inherited from class org.xiruss.repository.server.SnapshotBase |
---|
branch, createdVersions, creationTime, effectiveVersions, excludedVersions, isFixed, nextSnapshot, previousSnapshot, versionsByResource, visibleVersions |
Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase |
---|
id, name, objectTypeConstant, properties, rep |
Constructor Summary | |
---|---|
MutableSnapshotBase()
|
Method Summary | |
---|---|
void |
addCreatedVersion(Version createdVer)
Adds a newly-created version to the snapshot. |
void |
addEffectiveVersion(Version ver)
Adds an existing version to the snapshot as an effective version. |
void |
excludeVersion(java.lang.String versionId)
Excludes the version from the set of visible versions on the snapshot. |
void |
excludeVersion(Version ver)
|
void |
initialize(Branch br,
java.lang.String objId,
java.lang.String objName)
Initialize a newly-created mutable snapshot. |
void |
initialize(MutableSnapshot baseSnapshot,
java.lang.String objId)
|
void |
removeCreatedVersion(Resource resource)
Removes the version for the specified resource from the created versions list. |
void |
removeCreatedVersion(Version version)
Removes the version for the specified resource from the created versions list. |
protected void |
setCreatedVersionsSet(java.util.Set createdVersionsSet)
|
void |
setPreviousSnapshot(Snapshot snap)
Sets the previous snapshot. |
Methods inherited from class org.xiruss.repository.server.SnapshotBase |
---|
accept, checkIsNotFixed, getBranch, getCreatedVersions, getCreatedVersionsSet, getEffectiveVersions, getExcludedVersions, getNext, getPrevious, getVersion, getVersionById, getVersionsByPropertyValue, getVersionsByResource, getVisibleVersionCount, getVisibleVersions, initialize, isFixed, resourceIsVisible, setBranch, setNext, versionIsVisible, versionIsVisible |
Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase |
---|
compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, initialize, isNull, setId, setName, setProperties, setProperty, setRepository, setType, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xiruss.snapcm.api.MutableSnapshot |
---|
setBranch |
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 |
Constructor Detail |
---|
public MutableSnapshotBase()
Method Detail |
---|
public void initialize(Branch br, java.lang.String objId, java.lang.String objName) throws ObjectMutationException
MutableSnapshot
initialize
in interface MutableSnapshot
ObjectMutationException
public void initialize(MutableSnapshot baseSnapshot, java.lang.String objId) throws ObjectMutationException
ObjectMutationException
public void excludeVersion(java.lang.String versionId) throws SnapshotException
excludeVersion
in interface MutableSnapshot
versionId
- ID of the version to be excluded.
SnapshotException
- If version is neither effective nor createdpublic void excludeVersion(Version ver) throws SnapshotException
SnapshotException
protected void setCreatedVersionsSet(java.util.Set createdVersionsSet)
public void setPreviousSnapshot(Snapshot snap)
setPreviousSnapshot
in interface MutableSnapshot
latest
- public void addCreatedVersion(Version createdVer) throws SnapCMException
MutableSnapshot
addCreatedVersion
in interface MutableSnapshot
createdVer
- Version to add. The version must be new, meaning it
is unfixed.
VersionException
SnapshotException
SnapCMException
public void removeCreatedVersion(Resource resource)
MutableSnapshot
removeCreatedVersion
in interface MutableSnapshot
resource
- Resource of the version to be removed.public void removeCreatedVersion(Version version) throws SnapCMException
MutableSnapshot
removeCreatedVersion
in interface MutableSnapshot
version
- Version to be removed.
SnapCMException
public void addEffectiveVersion(Version ver)
addEffectiveVersion
in interface MutableSnapshot
ver
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |