|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.toolforge.karma.core.manifest.AbstractManifest
General stuff for a manifest.
Check the package documentation for more information on the concepts behind Karma.
| Field Summary |
| Fields inherited from interface nl.toolforge.karma.core.manifest.Manifest |
DEVELOPMENT_MANIFEST, HISTORY_KEY, RELEASE_MANIFEST |
| Constructor Summary | |
AbstractManifest(WorkingContext workingContext,
ManifestStructure structure)
A manifest is created based on its ManifestStructure, which can be loaded by the
ManifestLoader. |
|
AbstractManifest(WorkingContext workingContext,
java.lang.String name)
Constructs a manifest instance; name is mandatory. |
|
| Method Summary | |
protected abstract void |
applyWorkingContext(WorkingContext context,
Module module)
A specific Manifest implementation may have to apply specific actions to modules per working context. |
boolean |
equals(java.lang.Object o)
A manifest is equal to another manifest if their names are equal. |
java.util.Map |
getAllModules()
Gets all modules defined in this manifest including all modules for all child manifests. |
java.io.File |
getBaseDirectory()
The base location of the manifest within the current working context. |
java.io.File |
getBuildBaseDirectory()
The build default child directory of the getBaseDirectory(). |
java.lang.String |
getDescription()
|
java.util.Collection |
getIncludes()
Retrieves all included manifests. |
java.util.Map |
getInterdependencies()
Calculates interdepencies between modules in the manifest; interdependencies are inverse relationships between a module and other modules (being SourceModule instances). |
Module |
getModule(java.lang.String moduleName)
|
java.io.File |
getModuleBaseDirectory()
The modules default child directory of the getBaseDirectory(). |
java.util.Collection |
getModuleInterdependencies(Module module)
|
java.util.Map |
getModulesForManifest()
Gets all modules defined in this manifest (excluding includedManifests). |
java.lang.String |
getName()
Gets a manifests' name (the <name>-attribute) from the manifest XML file. |
java.io.File |
getReportsBaseDirectory()
The reports default child directory of the getBaseDirectory(). |
Module.State |
getState(Module module)
|
java.io.File |
getTempDirectory()
The base location of a temp directory the manifest within the current working context. |
abstract java.lang.String |
getType()
|
java.lang.String |
getVersion()
Gets a manifests' version (the <version>-attribute) from the manifest XML file. |
int |
hashCode()
|
boolean |
isLocal()
|
boolean |
isLocal(Module module)
|
void |
save()
Saves the manifest to disk, including all its included manifests. |
void |
setDescription(java.lang.String description)
|
void |
setState(Module module,
Module.State state)
Sets a modules' state when the module is locally available. |
void |
setVersion(java.lang.String version)
Sets the manifests' version. |
int |
size()
Counts all modules for a manifest, also counting all modules of all included manifests. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractManifest(WorkingContext workingContext,
java.lang.String name)
throws ManifestException,
LocationException
name is mandatory.
public AbstractManifest(WorkingContext workingContext,
ManifestStructure structure)
throws LocationException
ManifestStructure, which can be loaded by the
ManifestLoader. The ManifestStructure is the basis for the Manifest; a number of checks
are applied to it, including a linking of the manifest to the WorkingContext.
workingContext - The current working context.structure - The ManifestStructure, which is the basis for the manifest.| Method Detail |
protected abstract void applyWorkingContext(WorkingContext context,
Module module)
Manifest implementation may have to apply specific actions to modules per working context.
Each implementation should therefor implement this method and do what it has to do.
context - The current WorkingContext.module - The module to which context should be applied.public final java.io.File getBaseDirectory()
Manifest
getBaseDirectory in interface ManifestFile reference to the manifest base directory.public java.io.File getBuildBaseDirectory()
Manifestbuild default child directory of the Manifest.getBaseDirectory(). This location stores a
manifests' build output.
getBuildBaseDirectory in interface Manifestbuild default child directory of the Manifest.getBaseDirectory().public java.io.File getReportsBaseDirectory()
Manifestreports default child directory of the Manifest.getBaseDirectory(). This location stores
the output of commands that generate reports.
getReportsBaseDirectory in interface Manifestreports default child directory of the Manifest.getBaseDirectory().public java.io.File getModuleBaseDirectory()
Manifestmodules default child directory of the Manifest.getBaseDirectory(). This location stores a
manifests' modules.
getModuleBaseDirectory in interface Manifestmodules default child directory of the Manifest.getBaseDirectory().public final java.io.File getTempDirectory()
Manifest
getTempDirectory in interface ManifestFile reference to the Manifest.getBaseDirectory() + "/tmp"public final java.lang.String getName()
getName in interface Manifestfor the time beingpublic abstract java.lang.String getType()
getType in interface Manifestpublic final java.lang.String getVersion()
getVersion in interface Manifestfor the time beingpublic final void setVersion(java.lang.String version)
version - The manifests' version (<version>-attribute); may be null.public final java.lang.String getDescription()
public final void setDescription(java.lang.String description)
public final java.util.Map getModulesForManifest()
Map with Module instances.getAllModules()public final java.util.Map getAllModules()
getAllModules in interface ManifestMap with Module instances.getModulesForManifest()public final int size()
public final Module getModule(java.lang.String moduleName)
throws ManifestException
getModule in interface ManifestmoduleName -
ManifestExceptionfor the time beingpublic final boolean isLocal()
public final boolean isLocal(Module module)
isLocal in interface Manifestpublic final java.util.Collection getIncludes()
getIncludes in interface ManifestCollection of AbstractManifest instances, or an empty collection if no included
manifests are available.
public void save()
throws ManifestException
ManifestExceptionpublic final boolean equals(java.lang.Object o)
o - A AbstractManifest instance.public int hashCode()
public final java.util.Collection getModuleInterdependencies(Module module)
throws ManifestException
getModuleInterdependencies in interface Manifestmodule -
module or an empty Collection.
ManifestExceptionfor the time being
public final java.util.Map getInterdependencies()
throws ManifestException
Calculates interdepencies between modules in the manifest; interdependencies are inverse relationships
between a module and other modules (being SourceModule instances).
If a module B has a dependency on module A, then this method will return a map, with
a key A and its value a Collection of interdependencies (in this case, B).
getInterdependencies in interface ManifestManifestExceptionfor the time being
public final void setState(Module module,
Module.State state)
setState in interface Manifestmodule - state - public final Module.State getState(Module module)
getState in interface Manifestpublic final java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||