org.apache.excalibur.configuration
Class ContextFactory
java.lang.Object
org.apache.excalibur.configuration.ContextFactory
- public class ContextFactory
- extends java.lang.Object
ContextFactory is a utility class that provides support for the creation context instances based on a XML context desciption.
- Version:
- $Id: ContextFactory.java,v 1.10 2004/02/28 11:47:32 cziegeler Exp $
- Author:
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextFactory
public ContextFactory()
createContextFromConfiguration
public static Context createContextFromConfiguration(Configuration config)
throws ConfigurationException
-
Create context-attributes from entrys within <context/>-tag in config
-
- Parameters:
config - the context configuration
- Returns:
- Context a context instance
- Throws:
ConfigurationException - if a context related error occurs
createContextFromConfiguration
public static Context createContextFromConfiguration(Context parent,
Configuration config)
throws ConfigurationException
-
Create context-attributes from entrys within <context/>-tag in config
-
- Parameters:
parent - the parent context
config - the configuration element describing the context parameters
- Returns:
- Context a context instance
- Throws:
ConfigurationException - if a context related error occurs
createContextFromConfiguration
public static Context createContextFromConfiguration(Context parent,
Configuration config,
Logger log)
throws ConfigurationException
-
Create context-attributes from entrys within <context/>-tag in config
-
- Parameters:
parent - the parent context
config - the configuration element describing the context parameters
log - a logging channel
- Returns:
- Context a context instance
- Throws:
ConfigurationException - if a context related error occurs
getContextValue
private static java.lang.String getContextValue(java.util.Map map,
java.lang.String rawValue)
throws ConfigurationException
-
Resolving an attribute value by replacing ${context-param} with the corresponding param out of current context.
-
- Parameters:
map - a map
rawValue - a raw value
- Returns:
- String the context attribute value
- Throws:
ConfigurationException - if context-param does not exists
Please see keelframework.org for information about new Keel releases.