org.mule.impl.container
Class PropertiesContainerContext

java.lang.Object
  extended by org.mule.impl.container.AbstractContainerContext
      extended by org.mule.impl.container.PropertiesContainerContext
All Implemented Interfaces:
Disposable, Initialisable, UMOContainerContext

public class PropertiesContainerContext
extends AbstractContainerContext

Provides a facade for accessing System properties and properties on the ManagementContext. This container context serves 3 functions -

  1. Allows System properties to be set in Mule Xml (by setting the #systemProperties Map)
  2. Allows one to load System properties into the mule context so that MuleXml templates referring to System properties can be used (i.e. ${os.name}).
  3. Provides a consistent way to set abitary properties on the Management Context. Setting properties on this container context is equivilent to using the element in Mule Xml. The latter element may be removed in the future.


Field Summary
protected  boolean enableTemplates
           
protected  boolean loadSystemProperties
           
protected  Map properties
           
protected  Map systemProperties
           
protected  TemplateParser templateParser
           
 
Fields inherited from class org.mule.impl.container.AbstractContainerContext
logger
 
Constructor Summary
PropertiesContainerContext()
           
 
Method Summary
 void configure(Reader configuration)
           
 Object getComponent(Object key)
          Queries a component from the underlying container.
 Map getProperties()
           
 Map getSystemProperties()
           
 void setProperties(Map properties)
           
 void setSystemProperties(Map properties)
           
 
Methods inherited from class org.mule.impl.container.AbstractContainerContext
configure, dispose, getDefaultDocType, getDefaultEncoding, getName, getXmlDeclaration, initialise, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemProperties

protected Map systemProperties

properties

protected Map properties

loadSystemProperties

protected boolean loadSystemProperties

enableTemplates

protected boolean enableTemplates

templateParser

protected TemplateParser templateParser
Constructor Detail

PropertiesContainerContext

public PropertiesContainerContext()
Method Detail

configure

public void configure(Reader configuration)
               throws ContainerException
Specified by:
configure in class AbstractContainerContext
Throws:
ContainerException

getComponent

public Object getComponent(Object key)
                    throws ObjectNotFoundException
Queries a component from the underlying container. For this container it will look up a property on the Mule Management Context.

Parameters:
key - the key fo find the component with. It's up to the individual implementation to check the type of this key and look up objects accordingly
Returns:
the component found in the container
Throws:
ObjectNotFoundException - if the component is not found

getSystemProperties

public Map getSystemProperties()

setSystemProperties

public void setSystemProperties(Map properties)

getProperties

public Map getProperties()

setProperties

public void setProperties(Map properties)


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.