|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A module is a collection of files, representing some block of functionality. This definition is probably highly
subjective, but for Karma, that's what it is. A module is part of a container, called a
Manifest
. System's theory tells us that a system is separated into subsystems. Well, that's what we
do in the Karma context as well. An application system consists of one or more (generally more) modules.
Karma Module
s are maintained in a version management system and grouped together in a
Manifest
. The manifest is managing the modules.
Nested Class Summary | |
static class |
Module.State
Inner class representing the 'state' of a module. |
static class |
Module.Type
Inner class representing the type of the module, which is determined at runtime by reading the module-descriptor.xml file from the module base directory. |
Field Summary | |
static Module.State |
DYNAMIC
|
static Module.Type |
JAVA_ENTERPRISE_APPLICATION
Represents <type>JAVA_ENTERPRISE_APPLICATION</type> . |
static Module.Type |
JAVA_SOURCE_MODULE
Represents <type>JAVA_SOURCE_MODULE</type> . |
static Module.Type |
JAVA_WEB_APPLICATION
Represents <type>JAVA_WEB_APPLICATION</type> . |
static Module.Type |
LIBRARY_MODULE
Represents <type>LIBRARY_MODULE</type> . |
static java.lang.String |
MODULE_DESCRIPTOR
String identifying the file name for the module descriptor. |
static Module.Type |
OTHER_MODULE
Represents <type>OTHER-MODULE</type> . |
static Module.State |
STATIC
|
static Module.Type |
UNKNOWN
UNKNOWN applies to module which have no local presence. |
static Module.State |
WORKING
|
Method Summary | |
void |
createRemote(Authenticator authenticator,
java.lang.String createComment)
|
java.io.File |
getBaseDir()
The base directory of the module relative to the active manifest. |
java.util.Set |
getDependencies()
Gets a Set of ModuleDependency objects. |
ModuleLayoutTemplate |
getLayoutTemplate()
Returns the correct layout template for the module. |
Location |
getLocation()
Returns the Location instance, which is derived from the location -attribute. |
java.lang.String |
getName()
Retrieves a modules' name, the name attribute of the module in the manifest XML file. |
DevelopmentLine |
getPatchLine()
Returns the PatchLine for this module, if the module matches the correct criteria as specified in
markPatchLine(boolean) . |
Module.Type |
getType()
Determines the type of the module. |
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()
Checks if the module - within the current manifest - has development line configuration. |
boolean |
hasPatchLine()
|
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)
A module has a base directory, which is relative to the manifest that requires it. |
Field Detail |
public static final Module.Type UNKNOWN
UNKNOWN
applies to module which have no local presence. The actual type can only be determined when
the module-descriptor.xml
file is available, which is the case after a checkout of the module.
public static final Module.Type LIBRARY_MODULE
<type>LIBRARY_MODULE</type>
.
public static final Module.Type JAVA_SOURCE_MODULE
<type>JAVA_SOURCE_MODULE</type>
.
public static final Module.Type JAVA_WEB_APPLICATION
<type>JAVA_WEB_APPLICATION</type>
.
public static final Module.Type OTHER_MODULE
<type>OTHER-MODULE</type>
.
public static final Module.Type JAVA_ENTERPRISE_APPLICATION
<type>JAVA_ENTERPRISE_APPLICATION</type>
.
public static final Module.State WORKING
public static final Module.State DYNAMIC
public static final Module.State STATIC
public static final java.lang.String MODULE_DESCRIPTOR
Method Detail |
public java.lang.String getName()
name
attribute of the module in the manifest XML file.
public Module.Type getType() throws ModuleTypeException
Module
).
ModuleTypeException
public Location getLocation()
Location
instance, which is derived from the location
-attribute.
public void setBaseDir(java.io.File baseDir)
baseDir
- The base directory of the module relative to the active manifest.public java.io.File getBaseDir()
public DevelopmentLine getPatchLine()
PatchLine
for this module, if the module matches the correct criteria as specified in
markPatchLine(boolean)
.
null
if a PatchLine does not exist for this module, otherwise the PatchLine
instance for this module.markPatchLine(boolean)
public void markPatchLine(boolean mark)
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.
public boolean hasPatchLine()
public boolean hasDevelopmentLine()
ReleaseManifest
, this is true when a PatchLine
exists. When the manifest is a
DevelopmentManifest
, this method returns false, as this feature is not supported.
public void markDevelopmentLine(boolean mark)
DevelopmentLine
. This feature is NOT supported as yet.
public Version getVersion()
public java.lang.String getVersionAsString()
version
attribute, this method will return the
value of that attribute.
N/A
, when no version number exists.public boolean hasVersion()
false
if it hasn't.public java.util.Set getDependencies()
Set
of ModuleDependency
objects. This method should return an empty set if no
dependencies have been specified. Dependencies are not checked to be available.
Set
containing all dependencies as ModuleDependency
objects.public ModuleLayoutTemplate getLayoutTemplate()
ModuleLayoutTemplate
for the specific module type.public void createRemote(Authenticator authenticator, java.lang.String createComment) throws VersionControlException, AuthenticationException
VersionControlException
AuthenticationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |