public class ChameleonConfiguration extends HashMap<String,String>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
ChameleonConfiguration(File baseDirectory)
Constructor for ChameleonConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key,
String defaultValue)
Retrieves the value from the configuration.
|
File |
getBaseDirectory()
Gets the base directory.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Retrieves the value from the configuration.
|
File |
getDirectory(String key,
boolean create)
Retrieves a directory from the configuration.
|
File |
getFile(String key,
boolean create)
Retrieves a file from the configuration.
|
int |
getInt(String key,
int defaultValue)
Retrieves the value from the configuration.
|
File |
getRelativeFile(String path)
Gets a relative file from the the base directory.
|
void |
initFrameworkConfiguration()
Initializes the framework configuration.
|
void |
initialize(Map<String,Object> userProperties)
Initializes the configuration.
|
boolean |
isInteractiveModeEnabled()
Is the interactive mode enabled?
|
void |
loadChameleonProperties()
Loads the chameleon properties file.
|
void |
loadSystemProperties()
Loads system properties.
|
void |
loadSystemPropertiesSpecifiedByTheUser(Map<String,Object> userProperties)
Loads the system properties specified by the user.
|
String |
scanLibsDirectory()
Scans the jar file of the 'libs' directory to retrieve the packages to be exported.
|
void |
setInteractiveModeEnabled(boolean interactiveModeEnabled)
enables/ disables the interactive mode.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic void initialize(Map<String,Object> userProperties) throws IOException
userProperties - a Map object.IOException - if any.public void loadChameleonProperties()
throws IOException
IOException - if any.public String get(String key, String defaultValue)
key - the keydefaultValue - the default value if the key is not present in the configurationpublic File getDirectory(String key, boolean create)
key - the key associated to the directory namecreate - create the directory if it does not existpublic boolean getBoolean(String key, boolean defaultValue)
key - the keydefaultValue - the default value if the key is not present in the configurationpublic int getInt(String key, int defaultValue)
key - the keydefaultValue - the default value if the key is not present in the configurationpublic File getFile(String key, boolean create)
key - the key associated to the file namecreate - create the file if it does not existpublic void initFrameworkConfiguration()
public void loadSystemProperties()
throws IOException
IOException - if the system.properties file cannot be read.public File getBaseDirectory()
public boolean isInteractiveModeEnabled()
public void setInteractiveModeEnabled(boolean interactiveModeEnabled)
interactiveModeEnabled - whether or not the interactive mode has to be enabled.public File getRelativeFile(String path)
path - the path to the file.public void loadSystemPropertiesSpecifiedByTheUser(Map<String,Object> userProperties)
userProperties - the properties set by the user from the command line.public String scanLibsDirectory()
Copyright © 2009–2014 OW2 Chameleon. All rights reserved.