Keel 2.1RC2

org.apache.excalibur.configuration
Class ContextFactory

java.lang.Object
  extended byorg.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:

Constructor Summary
ContextFactory()
           
 
Method Summary
static Context createContextFromConfiguration(Configuration config)
          Create context-attributes from entrys within <context/>-tag in config
static Context createContextFromConfiguration(Context parent, Configuration config)
          Create context-attributes from entrys within <context/>-tag in config
static Context createContextFromConfiguration(Context parent, Configuration config, Logger log)
          Create context-attributes from entrys within <context/>-tag in config
private static java.lang.String getContextValue(java.util.Map map, java.lang.String rawValue)
          Resolving an attribute value by replacing ${context-param} with the corresponding param out of current context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextFactory

public ContextFactory()
Method Detail

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

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.