org.codehaus.cargo.container.spi.configuration
Class AbstractConfiguration

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by 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 of ContainerConfiguration that can be specialized for any type of configuration.

Version:
$Id: AbstractConfiguration.java 1106 2006-07-20 22:41:00Z vmassol $

Constructor Summary
AbstractConfiguration()
          Default setup.
 
Method Summary
 java.util.Map getProperties()
          
 java.lang.String getPropertyValue(java.lang.String name)
          
 void setProperty(java.lang.String name, java.lang.String value)
          A property is a configuration value for the container (eg the web port, the number of executing threads, etc).
 void verify()
          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
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 

Constructor Detail

AbstractConfiguration

public AbstractConfiguration()
Default setup.

Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
A property is a configuration value for the container (eg the web port, the number of executing threads, etc).

Specified by:
setProperty in interface Configuration
Parameters:
name - the property name
value - the property value
See Also:
Configuration.setProperty(String, String)

getProperties

public java.util.Map getProperties()

Specified by:
getProperties in interface Configuration
Returns:
the list of properties set
See Also:
Configuration.getProperties()

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String name)

Specified by:
getPropertyValue in interface Configuration
Parameters:
name - the property name for which to return the value
Returns:
the property's value
See Also:
Configuration.getPropertyValue(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:
verify in interface ContainerConfiguration
See Also:
ContainerConfiguration.verify()


Copyright © 2004-2011 Codehaus. All Rights Reserved.