Class AbstractConfiguration
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.configuration.AbstractConfiguration
-
- All Implemented Interfaces:
Configuration,ContainerConfiguration,Loggable
- Direct Known Subclasses:
AbstractLocalConfiguration,AbstractRuntimeConfiguration
public abstract class AbstractConfiguration extends LoggedObject implements ContainerConfiguration, Configuration
Base implementation ofContainerConfigurationthat can be specialized for any type of configuration.
-
-
Constructor Summary
Constructors Constructor Description AbstractConfiguration()Default setup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getProperties()StringgetPropertyValue(String name)protected StringgetPropertyValueIgnoreSystemProperties(String name)voidsetProperty(String name, String value)A property is a configuration value for the container (eg the web port, the number of executing threads, etc).voidverify()Verify that the configuration is valid.-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.configuration.Configuration
getCapability, getType
-
-
-
-
Method Detail
-
setProperty
public void setProperty(String name, String value)
A property is a configuration value for the container (eg the web port, the number of executing threads, etc).- Specified by:
setPropertyin interfaceConfiguration- Parameters:
name- the property namevalue- the property value, setting tonullwill remove the associated property from the internal map.
-
getProperties
public Set<String> getProperties()
- Specified by:
getPropertiesin interfaceConfiguration- Returns:
- the list of properties set
- See Also:
Configuration.setProperty(String, String)
-
getPropertyValue
public String getPropertyValue(String name)
- Specified by:
getPropertyValuein interfaceConfiguration- Parameters:
name- the property name for which to return the value- Returns:
- the property's value
- See Also:
Configuration.setProperty(String, String)
-
getPropertyValueIgnoreSystemProperties
protected String getPropertyValueIgnoreSystemProperties(String name)
- Parameters:
name- the property name for which to return the value- Returns:
- the property's value, ignoring any system properties
- See Also:
setProperty(String, String)
-
verify
public void verify()
Verify that the configuration is valid. The checks to be performed may vay whether this is standalone or existing configuration. This method should also be used to verify that the configuration properties specified by the user are valid and that the required ones are set.- Specified by:
verifyin interfaceContainerConfiguration
-
-