|
||||||||||
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.VersionBase
public class VersionBase
A SnapCM version.
Field Summary | |
---|---|
(package private) boolean |
isFixed
|
(package private) static org.apache.log4j.Logger |
logger
|
(package private) VersionMap |
nextVersions
|
(package private) VersionMap |
previousVersions
|
(package private) Resource |
resource
|
Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase |
---|
id, name, objectTypeConstant, properties, rep |
Constructor Summary | |
---|---|
VersionBase()
|
Method Summary | |
---|---|
void |
accept(RepositoryVisitor visitor)
|
void |
addDependency(DependencyLink dependency)
|
void |
addNextVersion(Version nextVer)
Adds a version as being a next version of this version. |
void |
addPreviousVersion(Version prevVer)
Adds a version as being a previous version of this version. |
void |
checkIsNotFixed()
|
void |
collectTargetVersions(VersionMap members,
Snapshot snapshot,
java.lang.String dependencyTypeName)
Gets all the versions on which this version is dependent for a given dependency class. |
int |
compareTo(java.lang.Object arg0)
|
boolean |
dependsOn(Resource resource)
Returns true if the version has one or more dependency relationships of any type to the specified resource. |
boolean |
dependsOn(Resource resource,
java.lang.String dependencyTypeName)
Returns true if the version has one or more dependency relationships to the specified resource. |
DependencyMap |
getDependencies()
Returns the set of dependency |
DependencyMap |
getDependenciesByType(java.lang.String typeName)
Returns a collection of dependencies of the specififed type, if any. |
VersionMap |
getNext()
Gets the previous versions for this version. |
VersionMap |
getPrevious()
Gets the previous versions for this version. |
Resource |
getResource()
|
void |
initialize(java.lang.String versionId,
java.lang.String versionName,
Resource res)
Initialize the core properties of the version. |
void |
initialize(java.lang.String versionId,
java.lang.String versionName,
java.util.Set previousVersions,
Resource res)
|
boolean |
isFixed()
|
void |
setAsFixed()
Sets the version as "fixed", meaning that it cannot be mutated further. |
void |
setPrevious(VersionMap previousVersions)
Sets the previous versions for this version. |
protected void |
setResource(Resource res)
|
Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase |
---|
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 |
---|
getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString |
Field Detail |
---|
static org.apache.log4j.Logger logger
Resource resource
VersionMap nextVersions
VersionMap previousVersions
boolean isFixed
Constructor Detail |
---|
public VersionBase()
Method Detail |
---|
public void initialize(java.lang.String versionId, java.lang.String versionName, Resource res) throws VersionMutationException
initialize
in interface Version
versionName
- res
-
VersionMutationException
public void initialize(java.lang.String versionId, java.lang.String versionName, java.util.Set previousVersions, Resource res) throws VersionMutationException
initialize
in interface Version
versionName
- previousVersions
- res
-
VersionMutationException
public void setAsFixed()
setAsFixed
in interface Version
public boolean isFixed()
isFixed
in interface Version
public void checkIsNotFixed() throws VersionMutationException
checkIsNotFixed
in interface Version
VersionMutationException
public void addDependency(DependencyLink dependency) throws VersionMutationException
addDependency
in interface Version
VersionMutationException
public DependencyMap getDependencies()
getDependencies
in interface Version
public DependencyMap getDependenciesByType(java.lang.String typeName)
getDependenciesByType
in interface Version
typeName
- The fully-qualified type name for the dependency (the
Java class name for the dependency type.
public Resource getResource()
getResource
in interface Version
protected void setResource(Resource res)
public boolean dependsOn(Resource resource)
dependsOn
in interface Version
resource
-
public boolean dependsOn(Resource resource, java.lang.String dependencyTypeName)
dependsOn
in interface Version
resource
- dependencyTypeName
- The name of the dependency type to check. If null,
checks all dependency types.
public void collectTargetVersions(VersionMap members, Snapshot snapshot, java.lang.String dependencyTypeName)
Version
collectTargetVersions
in interface Version
members
- The version map to which the target versions are addedsnapshot
- The snapshot on which to resolve the dependenciesdependencyTypeName
- The class name of the dependency typepublic VersionMap getPrevious()
getPrevious
in interface Version
public VersionMap getNext()
getNext
in interface Version
public void setPrevious(VersionMap previousVersions) throws VersionMutationException
setPrevious
in interface Version
previousVersions
- Versionmap of previous versions.
VersionMutationException
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
compareTo
in interface RepositoryObject
compareTo
in class RepositoryObjectBase
public void addPreviousVersion(Version prevVer)
addPreviousVersion
in interface Version
prevVer
- previous versionpublic void addNextVersion(Version nextVer)
addNextVersion
in interface Version
nextVer
- public void accept(RepositoryVisitor visitor) throws java.lang.Throwable
accept
in interface RepositoryObject
accept
in class RepositoryObjectBase
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |