|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.specrunner.features.core.FeatureManagerImpl
public class FeatureManagerImpl
Default feature manager implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
protected IConfiguration |
configuration
The current configuration. |
protected Map<String,Boolean> |
overrides
Set of overrides information. |
| Constructor Summary | |
|---|---|
FeatureManagerImpl()
|
|
| Method Summary | |
|---|---|
IFeatureManager |
add(String key,
Object value)
Set a feature to a value. |
IFeatureManager |
add(String key,
Object value,
boolean override)
Set a feature to a value. |
Object |
get(Object key)
|
Object |
get(String key,
Object defaultValue)
Get a value from map, if not found, result is 'defaultValue'. |
IConfiguration |
getConfiguration()
Gets the configuration. |
protected String |
getField(String feature)
Recover the property name for the feature. |
Object |
put(String key,
Object value)
|
void |
set(String feature,
Object target)
Sets a feature to an object if the feature exists and the type is compatible. |
void |
setConfiguration(IConfiguration configuration)
Set a set of local configuration as complementary information to feature settings. |
void |
setStrict(String feature,
Object target)
Sets a feature to an object if the feature exists and the type is compatible. |
protected void |
setValue(String feature,
Object value,
Object target,
String field,
IAccess access)
Set the value. |
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, remove, size, values |
| Field Detail |
|---|
protected Map<String,Boolean> overrides
protected IConfiguration configuration
| Constructor Detail |
|---|
public FeatureManagerImpl()
| Method Detail |
|---|
public Object put(String key,
Object value)
put in interface Map<String,Object>put in class HashMap<String,Object>
public IFeatureManager add(String key,
Object value)
IFeatureManager
add in interface IFeatureManagerkey - The feature name.value - The value.
public IFeatureManager add(String key,
Object value,
boolean override)
IFeatureManager
add in interface IFeatureManagerkey - The feature name.value - The value.override - true, if the value should overwrite previous values, false,
otherwise.
public Object get(Object key)
get in interface Map<String,Object>get in class HashMap<String,Object>
public void set(String feature,
Object target)
IFeatureManager
set in interface IFeatureManagerfeature - The feature name.target - The object where the feature must be set.
public void setStrict(String feature,
Object target)
throws FeatureManagerException
IFeatureManager
setStrict in interface IFeatureManagerfeature - The feature name.target - The object where the feature must be set.
FeatureManagerException - On object setup.
protected String getField(String feature)
throws FeatureManagerException
feature - The feature name.
FeatureManagerException - On field name recovery errors.
protected void setValue(String feature,
Object value,
Object target,
String field,
IAccess access)
throws FeatureManagerException
feature - The feature name.value - The feature value.target - The target object.field - The target field.access - The field access.
FeatureManagerException - On setting error.public IConfiguration getConfiguration()
public void setConfiguration(IConfiguration configuration)
IFeatureManagerISpecRunner received a
IConfiguration, this is set here as local and at the
beginning of a new test execution it can be just replaced.
setConfiguration in interface IFeatureManagerconfiguration - Set configuration features.
public Object get(String key,
Object defaultValue)
IFeatureManager
get in interface IFeatureManagerkey - A name.defaultValue - The default value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||