|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.toolforge.karma.core.module.BaseModule
The name says it all. This class is the base (template) for a module.
Nested Class Summary |
Nested classes inherited from class nl.toolforge.karma.core.module.Module |
Module.State, Module.Type |
Field Summary | |
protected static org.apache.commons.logging.Log |
logger
|
Fields inherited from interface nl.toolforge.karma.core.module.Module |
DYNAMIC, JAVA_ENTERPRISE_APPLICATION, JAVA_SOURCE_MODULE, JAVA_WEB_APPLICATION, LIBRARY_MODULE, MODULE_DESCRIPTOR, OTHER_MODULE, STATIC, UNKNOWN, WORKING |
Constructor Summary | |
BaseModule(java.lang.String name,
Location location)
|
|
BaseModule(java.lang.String name,
Location location,
Version version)
|
Method Summary | |
void |
createRemote(Authenticator authenticator,
java.lang.String createComment)
|
boolean |
equals(java.lang.Object obj)
|
java.io.File |
getBaseDir()
The base directory of the module relative to the active manifest. |
java.util.Set |
getDependencies()
See Module.getDependencies() . |
abstract ModuleLayoutTemplate |
getLayoutTemplate()
Returns the correct layout template for the module. |
Location |
getLocation()
Gets the modules' location. |
java.lang.String |
getName()
Gets the modules' name. |
DevelopmentLine |
getPatchLine()
Returns the PatchLine for this module, if the module matches the correct criteria as specified in
markPatchLine(boolean) . |
Module.Type |
getType()
Reads module-descriptor.xml -file from the module base directory. |
Version |
getVersion()
If a module has a <version>-attribute, this method returns a Version instance representing the version number of the module. |
java.lang.String |
getVersionAsString()
If the module element in the manifest contains a version attribute, this method will return the
value of that attribute. |
boolean |
hasDevelopmentLine()
Future functionality. |
int |
hashCode()
|
boolean |
hasPatchLine()
Checks if this module has been patched (and is thus part of a ReleaseManifest ). |
boolean |
hasVersion()
Checks if a module has a <version>-attribute. |
void |
markDevelopmentLine(boolean mark)
Marks this modules as being developed in a DevelopmentLine . |
void |
markPatchLine(boolean mark)
Marks this module as being developed in a PatchLine . |
void |
setBaseDir(java.io.File baseDir)
When initialized by AbstractManifest , a module is assigned its base directory, relative to the manifest. |
java.lang.String |
toString()
Returns the module name. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log logger
Constructor Detail |
public BaseModule(java.lang.String name, Location location, Version version)
public BaseModule(java.lang.String name, Location location)
Method Detail |
public final java.lang.String getName()
getName
in interface Module
Module.getName()
public final Location getLocation()
getLocation
in interface Module
Location
, and all implementing classes.public boolean equals(java.lang.Object obj)
public int hashCode()
public final boolean hasDevelopmentLine()
false
.
hasDevelopmentLine
in interface Module
false
.public final void markDevelopmentLine(boolean mark)
Module
DevelopmentLine
. This feature is NOT supported as yet.
markDevelopmentLine
in interface Module
public final DevelopmentLine getPatchLine()
Module
PatchLine
for this module, if the module matches the correct criteria as specified in
Module.markPatchLine(boolean)
.
getPatchLine
in interface Module
null
if a PatchLine does not exist for this module, otherwise the PatchLine
instance for this module.Module.markPatchLine(boolean)
public final void markPatchLine(boolean mark)
Module
PatchLine
. This can only happen when the manifest in which
the module is used is a ReleaseManifest
and the module has a STATIC
state. When the
manifest is loaded, this method will be called when the module matches the criteria.
markPatchLine
in interface Module
public final Version getVersion()
Module
getVersion
in interface Module
public final java.lang.String getVersionAsString()
version
attribute, this method will return the
value of that attribute.
getVersionAsString
in interface Module
N/A
, when no version number exists.public final boolean hasVersion()
Module
hasVersion
in interface Module
false
if it hasn't.public final boolean hasPatchLine()
ReleaseManifest
).
hasPatchLine
in interface Module
true
when this module has a PatchLine
attached to it, false
if it
hasn't.public final void setBaseDir(java.io.File baseDir)
AbstractManifest
, a module is assigned its base directory, relative to the manifest. The
base directory is used internally for base-directory-aware methods.
setBaseDir
in interface Module
baseDir
- public final java.io.File getBaseDir()
Module
getBaseDir
in interface Module
public abstract ModuleLayoutTemplate getLayoutTemplate()
Module
getLayoutTemplate
in interface Module
ModuleLayoutTemplate
for the specific module type.public final void createRemote(Authenticator authenticator, java.lang.String createComment) throws AuthenticationException, VersionControlException
createRemote
in interface Module
createComment
-
VersionControlException
AuthenticationException
public final Module.Type getType() throws ModuleTypeException
module-descriptor.xml
-file from the module base directory. If the base directory does not exist,
Module.UNKNOWN
is returned.
getType
in interface Module
ModuleTypeException
- When module-descriptor
is non-existing. This is possible when the
module is not locally available.public final java.util.Set getDependencies()
Module.getDependencies()
. This implementation throws a KarmaRuntimeException
when the
modules' dependencies.xml
could not be parsed properly. When no dependencies have been specified, or
when the file does not exist, the method returns an empty Set
.
getDependencies
in interface Module
Set
containing ModuleDependency
instances.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |