|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiruss.repository.server.RepositoryObjectBase
org.xiruss.repository.server.SnapshotBase
public class SnapshotBase
Implements the access-only methods for snapshots. This class should be used for all snapshots that have been committed to the repository and are therefore fixed.
| Field Summary | |
|---|---|
protected Branch |
branch
|
protected VersionByResourceMap |
createdVersions
|
protected java.util.Date |
creationTime
|
protected VersionByResourceMap |
effectiveVersions
|
protected VersionByResourceMap |
excludedVersions
|
protected boolean |
isFixed
|
protected Snapshot |
nextSnapshot
|
protected Snapshot |
previousSnapshot
|
protected VersionByResourceMap |
versionsByResource
|
protected VersionMap |
visibleVersions
|
| Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase |
|---|
id, name, objectTypeConstant, properties, rep |
| Constructor Summary | |
|---|---|
SnapshotBase()
Create a new read-onlyl Snapshot. |
|
| Method Summary | |
|---|---|
void |
accept(RepositoryVisitor visitor)
|
void |
checkIsNotFixed()
Throws an exception is the snapshot is fixed. |
Branch |
getBranch()
|
VersionByResourceMap |
getCreatedVersions()
|
protected java.util.Set |
getCreatedVersionsSet()
|
VersionByResourceMap |
getEffectiveVersions()
Returns a copy of the effective versions map. |
VersionByResourceMap |
getExcludedVersions()
Returns a copy of the excluded versions map. |
Snapshot |
getNext()
Returns the snapshot that follows this one on the branch, if any. |
Snapshot |
getPrevious()
Returns the previous snapshot on the snapshot's branch, if any. |
Version |
getVersion(Resource res)
Given a resource, returns the version of that resource that has been created on or is effective on the snapshot. |
Version |
getVersionById(java.lang.String verKey)
|
VersionMap |
getVersionsByPropertyValue(java.lang.String propertyName,
java.lang.Object testValue)
Returns the set of versions that exhibit the specified value for the specified property. |
VersionByResourceMap |
getVersionsByResource()
|
long |
getVisibleVersionCount()
Returns the number of versions that are visible on the snapshot. |
VersionByResourceMap |
getVisibleVersions()
Returns a VersionMap of the versions visible on this snapshot. |
void |
initialize(MutableSnapshot baseSnapshot,
java.lang.String objId,
java.util.Date commitTime)
Initialize a mutable or immutable snapshot using an existing snapshot as the base. |
boolean |
isFixed()
If true, indicates that the snapshot is fixed and committed to the repository. |
boolean |
resourceIsVisible(Resource res)
|
void |
setBranch(Branch branch)
|
Snapshot |
setNext(Snapshot snap)
Sets the next snapshot. |
boolean |
versionIsVisible(java.lang.String versionId)
Returns true if the specified version is visible on the snapshot, meaning that it is a created or effective version. |
boolean |
versionIsVisible(Version ver)
Returns true if the specified version is visible on the snapshot, meaning that it is a created or effective version. |
| 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.RepositoryObject |
|---|
compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString |
| Field Detail |
|---|
protected boolean isFixed
protected Branch branch
protected VersionMap visibleVersions
protected VersionByResourceMap createdVersions
protected VersionByResourceMap effectiveVersions
protected VersionByResourceMap excludedVersions
protected VersionByResourceMap versionsByResource
protected Snapshot nextSnapshot
protected Snapshot previousSnapshot
protected java.util.Date creationTime
| Constructor Detail |
|---|
public SnapshotBase()
| Method Detail |
|---|
public void setBranch(Branch branch)
public void initialize(MutableSnapshot baseSnapshot,
java.lang.String objId,
java.util.Date commitTime)
throws ObjectMutationException
Snapshot
initialize in interface SnapshotbaseSnapshot - Snapshot to use as the initialization source.objId - Object ID of the newly-created snapshot.
ObjectMutationExceptionpublic Snapshot getPrevious()
getPrevious in interface Snapshotpublic Version getVersion(Resource res)
getVersion in interface Snapshotcd1Res -
public void checkIsNotFixed()
throws ObjectMutationException
checkIsNotFixed in interface SnapshotObjectMutationException
public VersionMap getVersionsByPropertyValue(java.lang.String propertyName,
java.lang.Object testValue)
getVersionsByPropertyValue in interface SnapshotpropertyName - The name of the property to check.testValue - The property value to check for.
public VersionByResourceMap getVisibleVersions()
getVisibleVersions in interface Snapshotpublic boolean isFixed()
isFixed in interface Snapshotpublic Version getVersionById(java.lang.String verKey)
getVersionById in interface SnapshotverKey - String key for a version
public Branch getBranch()
getBranch in interface Snapshotpublic Snapshot getNext()
getNext in interface Snapshotpublic VersionByResourceMap getCreatedVersions()
getCreatedVersions in interface Snapshotprotected java.util.Set getCreatedVersionsSet()
public VersionByResourceMap getEffectiveVersions()
getEffectiveVersions in interface Snapshotpublic VersionByResourceMap getExcludedVersions()
getExcludedVersions in interface Snapshotpublic boolean versionIsVisible(java.lang.String versionId)
versionIsVisible in interface SnapshotversionId - ID of the version to check for
public boolean versionIsVisible(Version ver)
versionIsVisible in interface Snapshotver - The version to check for
public boolean resourceIsVisible(Resource res)
resourceIsVisible in interface Snapshot
public void accept(RepositoryVisitor visitor)
throws java.lang.Throwable
accept in interface RepositoryObjectaccept in class RepositoryObjectBasejava.lang.Throwablepublic long getVisibleVersionCount()
getVisibleVersionCount in interface Snapshotpublic Snapshot setNext(Snapshot snap)
setNext in interface Snapshotpublic VersionByResourceMap getVersionsByResource()
getVersionsByResource in interface Snapshot
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||