com.cafesoft.cams
Class StandardConfig

java.lang.Object
  |
  +--com.cafesoft.cams.StandardConfig
All Implemented Interfaces:
Config

public class StandardConfig
extends Object
implements Config

Provides general access to Cams configuration parameters, logging, services, and other resources.

Since:
4/11/02

Constructor Summary
StandardConfig(Properties params, String home, ServiceFinder serviceFinder, Logger logger)
          Create a new StandardConfig.
 
Method Summary
 Context getContext()
          Returns a reference to the Context in which a Component is executing.
 String getInitParameter(String name)
          Returns a String containing the value of the named initialization parameter.
 String getInitParameter(String name, String defaultValue)
          Returns a String containing the value of the named initialization parameter or the default value.
 Iterator getInitParameterNames()
          Returns the names of the Security Domains's initialization parameters as an Iterator of String objects, or an empty Iterator if the Security Domain has no initialization parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardConfig

public StandardConfig(Properties params,
                      String home,
                      ServiceFinder serviceFinder,
                      Logger logger)
Create a new StandardConfig.

Parameters:
params - a Properties object containing the parameters to be made available via the getInitParameter(name) method.
home - the root directory to be associated with the Context within this Config.
serviceFinder - the ServiceFinder associated with the execution Context within this Config.
logger - the destination for log messages.
Method Detail

getContext

public Context getContext()
Returns a reference to the Context in which a Component is executing.

Specified by:
getContext in interface Config
Returns:
the Context
See Also:
Context

getInitParameter

public String getInitParameter(String name)
Returns a String containing the value of the named initialization parameter.

Specified by:
getInitParameter in interface Config
Parameters:
name - a String specifying the name of the initialization parameter.
Returns:
a String containing the value of the initialization parameter or null if the parameter does not exist.

getInitParameter

public String getInitParameter(String name,
                               String defaultValue)
Returns a String containing the value of the named initialization parameter or the default value.

Specified by:
getInitParameter in interface Config
Parameters:
name - a String specifying the name of the initialization parameter.
defaultValue - the default value to be returned if the initialization parameter does not exist or it's value is null.
Returns:
a String containing the value of the initialization parameter or null if the parameter does not exist.

getInitParameterNames

public Iterator getInitParameterNames()
Returns the names of the Security Domains's initialization parameters as an Iterator of String objects, or an empty Iterator if the Security Domain has no initialization parameters.

Specified by:
getInitParameterNames in interface Config
Returns:
an Iterator of String objects containing the names of the s's initialization parameters


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.