org.ocltf.common
Class Contexts

java.lang.Object
  extended byorg.ocltf.common.Contexts

public class Contexts
extends java.lang.Object

Dictionary of configurable Context objects. Context objects are used for configuring Plugin instances.

Author:
Chad Brandon
See Also:
Context

Field Summary
static java.lang.String DEFAULT
          This is passed as the cartridge name for the lookupContext method if we wish to use a 'default' Context for Plugins.
 
Constructor Summary
Contexts()
          Constructs an instance of Contexts.
 
Method Summary
 void addContext(Context context)
          Adds a mapping for a contexts name to a physical directory.
static Contexts instance()
          Returns the singleton instance of this Contexts
 java.lang.String lookupContextProperty(java.lang.String contextName, java.lang.String propertyName)
          Retrieves a property from the Context with the contextName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final java.lang.String DEFAULT
This is passed as the cartridge name for the lookupContext method if we wish to use a 'default' Context for Plugins. This is so we don't need to define a specific mapping for each Plugin if we don't want. If a contextName exists with a specific Plugin name, then that will be used instead of the 'default'

See Also:
Constant Field Values
Constructor Detail

Contexts

public Contexts()
Constructs an instance of Contexts.

Method Detail

instance

public static Contexts instance()
Returns the singleton instance of this Contexts

Returns:
instance.

addContext

public void addContext(Context context)
Adds a mapping for a contexts name to a physical directory.

Parameters:
context - the Context to add to this instance.

lookupContextProperty

public java.lang.String lookupContextProperty(java.lang.String contextName,
                                              java.lang.String propertyName)
Retrieves a property from the Context with the contextName.

Parameters:
contextName - name of the Plugin to which the contexdt applies
propertyName - name of the context property to find.
Returns:
String the context property value.


Copyright © 2003-2004 Chad Brandon. All Rights Reserved.