|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConfiguration
interface to embody overall settings and parameters for the validation process. Implementations of this interface will build configuration objects from a variety of sources such as files on the file system, serialized data, database queries, and the like.
ACTF configuration instances consist of symbol pools, each pool containing a set of symbols and their corresponding values. There are two types of symbol pools:
Note: Clients who wish to form configuration instances from other sources than the default source (i.e. xml files) should extend
AbstractConfiguration
rather than implementing this interface. Also, the RuntimeContextFactory
should always be used to instantiate configuration objects.
Important: The current implementations packaged with ACTF are not thread-safe.
AbstractConfiguration
,
XmlConfiguration
,
org.eclipse.actf.core.runtime.RuntimeContextFactory
Field Summary | |
---|---|
static String |
ACTF_ID
pool id for main actf pool - value is 'actf' |
static String |
ALIASES_ID
|
static String |
FILTER_CLASSNAME_ATTRIBUTE
|
static String |
FILTER_ID
|
static String |
FILTER_MODEL_ATTRIBUTE
|
static String |
FILTER_NODEIDS_ATTRIBUTE
|
static String |
FILTER_NODENAMES_ATTRIBUTE
|
static String |
MODEL_ADAPTOR_FACTORY
|
static String |
MODEL_BASE_TYPE
|
static String |
MODEL_ID
pool id and model pool id for models - value is 'model' |
static String |
MODEL_IGNOREIDS
|
static String |
MODEL_IGNORENODENAMES
|
static String |
MODEL_LOCATOR
|
static String |
MODEL_LOCATORIDS_POOL
|
static char |
MODEL_POOL_ID_DELIMITER
model pool ids are denoted with the model name followed by this delimiter followed by the actual pool id |
static long |
serialVersionUID
|
static String |
SHOW_INVISIBLE_KEY
|
static String |
SHOW_ITEMS_KEY
|
static String |
TRACE_LEVEL_KEY
|
static String |
TRACE_STREAM_KEY
|
static String |
WORKING_DIR_KEY
|
Method Summary | |
---|---|
void |
addConfigurationData(Object data)
add data to this configuration object |
boolean |
getBooleanParameter(String key)
retrieve a boolean parameter from the current symbol pool |
Class |
getClassParameter(String key)
retrieve a class parameter from the current symbol pool |
double |
getDoubleParameter(String key)
retrieve a double parameter from the current symbol pool |
int |
getIntParameter(String key)
retrieve an int parameter from the current symbol pool |
String[] |
getModelTypes()
returns the model supported within this configuration object. |
Object |
getParameter(String key)
get a parameter of an undetermined type in the current symbol pool |
String |
getParameterAsString(String key)
get the parameter with the given key as a string |
String[] |
getParameterNames()
retrieve list of parameters from the current symbol pool |
String |
getStringParameter(String key)
retrieve a string parameter from the current symbol pool |
String |
getSymbolPool()
get the current symbol pool. |
Map |
getSymbolPoolContents(String poolID)
get the contents of the specified symbol pool |
String[] |
getSymbolPools()
get all available symbol pools. |
void |
setParameter(String key,
boolean val)
set a boolean parameter in the current symbol pool |
void |
setParameter(String key,
Class val)
set a class parameter in the current symbol pool |
void |
setParameter(String key,
double val)
set a double parameter in the current symbol pool |
void |
setParameter(String key,
int val)
set an int parameter in the current symbol pool |
void |
setParameter(String key,
Object val)
set a parameter of an undetermined type in the current symbol pool |
void |
setParameter(String key,
String val)
set a string parameter in the current symbol pool |
void |
setSymbolPool(String id)
set the symbol pool to be used in subsequent set/getParameter calls. |
Field Detail |
---|
static final long serialVersionUID
static final char MODEL_POOL_ID_DELIMITER
static final String MODEL_ID
static final String ACTF_ID
static final String WORKING_DIR_KEY
static final String TRACE_LEVEL_KEY
static final String TRACE_STREAM_KEY
static final String MODEL_LOCATORIDS_POOL
static final String MODEL_ADAPTOR_FACTORY
static final String MODEL_IGNORENODENAMES
static final String MODEL_IGNOREIDS
static final String MODEL_LOCATOR
static final String MODEL_BASE_TYPE
static final String SHOW_INVISIBLE_KEY
static final String SHOW_ITEMS_KEY
static final String FILTER_ID
static final String FILTER_MODEL_ATTRIBUTE
static final String FILTER_CLASSNAME_ATTRIBUTE
static final String FILTER_NODENAMES_ATTRIBUTE
static final String FILTER_NODEIDS_ATTRIBUTE
static final String ALIASES_ID
Method Detail |
---|
void setSymbolPool(String id)
Symbol pool ids can have two forms:
<modelName>MODEL_POOL_ID_DELIMITER
<poolId>
The symbol pool is the pool that is queried for all get/setXXXParameter methods. Thus, this method should always be called prior to a set/getXXXParameter method to insure that the correct pool is being accessed.
id
- -
id of symbol poolString getSymbolPool()
setSymbolPool(String)
String[] getSymbolPools()
setSymbolPool(String)
Map getSymbolPoolContents(String poolID)
poolID
- -
id of symbol pool
null
if pool
does not existsetSymbolPool(String)
String getStringParameter(String key)
key
- -
name or key of parameter
null
if no
such key existssetSymbolPool(String)
void setParameter(String key, String val)
key
- -
name of parameterval
- -
string value corresponding to this keysetSymbolPool(String)
int getIntParameter(String key)
key
- -
name or key of parameter
null
if no
such key existssetSymbolPool(String)
void setParameter(String key, int val)
key
- -
name of parameterval
- -
int value corresponding to this keysetSymbolPool(String)
double getDoubleParameter(String key)
key
- -
name or key of parameter
null
if no
such key existssetSymbolPool(String)
void setParameter(String key, double val)
key
- -
name of parameterval
- -
double value corresponding to this keysetSymbolPool(String)
boolean getBooleanParameter(String key)
key
- -
name or key of parameter
null
if
no such key existssetSymbolPool(String)
void setParameter(String key, boolean val)
key
- -
name of parameterval
- -
boolean value corresponding to this keysetSymbolPool(String)
Class getClassParameter(String key)
key
- -
name or key of parameter
null
if no
such key existssetSymbolPool(String)
void setParameter(String key, Class val)
key
- -
name of parameterval
- -
Class object corresponding to this keysetSymbolPool(String)
void setParameter(String key, Object val)
key
- -
name of parameterval
- -
object corresponding to this keysetSymbolPool(String)
Object getParameter(String key)
key
- -
name of parameter to retrieve
setSymbolPool(String)
String[] getParameterNames()
setSymbolPool(String)
String getParameterAsString(String key)
key
- -
key of desired parameter
null
if
parameter is not foundsetSymbolPool(String)
String[] getModelTypes()
Models are always introduced in the main symbol pool, ACTF_ID
and
should be retrieved via the MODEL_ID
symbol pool. Indeed, this method will usually be short-hand for:
setSymbolPool(MODEL_ID); return getParameterNames();
getParameterNames()
,
setSymbolPool(String)
void addConfigurationData(Object data) throws ConfigurationException
data
- the data to be added
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |