|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnl.toolforge.karma.core.boot.WorkingContextConfiguration
Configuration class for a WorkingContext. A WorkingContextConfiguration consists of the
following configuration:
project.baseDir, indicating the directory where projects for a working context are stored.
manifest-store.module, which is the module name for the manifest store in a version control
system. Note that the format of the module name might be version control system dependent.
location-store.module, which is the module name for the location store in a version control
system. Note that the format of the module name might be version control system dependent.
Location, describing the version control system where the
manifest-store.module module can be found.
Location, describing the version control system where the
location-store.module module can be found.
The configuration is not loaded automatically. By calling the load()-method the configuration will be
loaded.
| Field Summary | |
static ErrorCode |
CONFIGURATION_LOAD_ERROR
|
| Constructor Summary | |
WorkingContextConfiguration(WorkingContext workingContext)
Creates a configuration object using configFile as the configuration file. |
|
| Method Summary | |
ErrorCode |
check()
Thorough checks of this configuration is valid, and if it is not, returns the ErrorCode to indicate
what went wrong or null if nothing went wrong, and this configuration is ready to use. |
LocationStore |
getLocationStore()
Returns the LocationStore for this configuration. |
ManifestStore |
getManifestStore()
Returns the ManifestStore for this configuration. |
java.lang.String |
getProperty(java.lang.String key)
|
boolean |
load()
Loads the configuration from working-context.xml. |
void |
setLocationStore(LocationStore locationStore)
Sets the location store for this configuration. |
void |
setManifestStore(ManifestStore manifestStore)
Sets the manifest store for this configuration. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Adds or changes a property in the current configuration. |
void |
store()
Stores the all configuration items in configuration in the working-context.xml file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final ErrorCode CONFIGURATION_LOAD_ERROR
| Constructor Detail |
public WorkingContextConfiguration(WorkingContext workingContext)
configFile as the configuration file. The configuration is
loaded by calling load().
workingContext - The WorkingContext for this configuration.| Method Detail |
public LocationStore getLocationStore()
LocationStore for this configuration. Can be null if not configured properly.
LocationStore for this configuration. Can be null if not configured properly.public ManifestStore getManifestStore()
ManifestStore for this configuration. Can be null if not configured properly.
ManifestStore for this configuration. Can be null if not configured properly.public void setManifestStore(ManifestStore manifestStore)
nulls are allowed.
manifestStore - The manifest store for this configuration.public void setLocationStore(LocationStore locationStore)
nulls are allowed.
locationStore - The location store for this configuration.public java.lang.String getProperty(java.lang.String key)
key -
null if the property is not found.
public void setProperty(java.lang.String name,
java.lang.String value)
name exists, its
value is overwritten with value.
public ErrorCode check()
ErrorCode to indicate
what went wrong or null if nothing went wrong, and this configuration is ready to use.
ErrorCode indicating the exact failure or null of nothing it wrong.
public boolean load()
throws WorkingContextException
Loads the configuration from working-context.xml. When the file did not exists, false
will be returned. Otherwise, this method returns true and the configuration succeeded. Note that
this method performs no validation on the configuration itself. This is left to the user.
When the configuration could be loaded, this method returns true. This is not to say that the
configuration is correct. The configuration should still be checked for correctness by the client.
Calling this method overwrites any properties already set for this configuration.
true when the configuration could be loaded, false if it
couldn't.
WorkingContextException - When an IOException or SAXException occurs, indicating
an error when reading a configuration file, which could result by the client in
specific actions (thus the exception and not the true or
false.
public void store()
throws WorkingContextException
configuration in the working-context.xml file.
WorkingContextException - When storing failed.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||