org.apache.cocoon.components.modules.input
Class PropertiesFileModule

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.components.modules.input.AbstractInputModule
          extended byorg.apache.cocoon.components.modules.input.AbstractJXPathModule
              extended byorg.apache.cocoon.components.modules.input.PropertiesFileModule
All Implemented Interfaces:
Configurable, Disposable, InputModule, LogEnabled, Serviceable, ThreadSafe

public class PropertiesFileModule
extends AbstractJXPathModule
implements InputModule, Serviceable, Configurable, ThreadSafe

Input module for accessing properties in a properties file.

The properties file can only be configured statically and is resolved via the SourceResolver system.

Author:
Unico Hommes

Field Summary
 
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractJXPathModule
configuration, parameter
 
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
settings
 
Fields inherited from interface org.apache.cocoon.components.modules.input.InputModule
ROLE
 
Constructor Summary
PropertiesFileModule()
           
 
Method Summary
 void configure(Configuration configuration)
          Configure the location of the properties file: <file src="resource://my.properties" />
 void dispose()
          dispose
protected  Object getContextObject(Configuration modeConf, Map objectModel)
          Returns the object which should be used as JXPath context.
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractJXPathModule
getAttribute, getAttributeNames, getAttributeValues
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.modules.input.InputModule
getAttribute, getAttributeNames, getAttributeValues
 

Constructor Detail

PropertiesFileModule

public PropertiesFileModule()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

dispose

public void dispose()
Description copied from class: AbstractInputModule
dispose

Specified by:
dispose in interface Disposable
Overrides:
dispose in class AbstractInputModule

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Configure the location of the properties file:

<file src="resource://my.properties" />

Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractJXPathModule
Parameters:
configuration - a Configuration value
Throws:
ConfigurationException - if an error occurs

getContextObject

protected Object getContextObject(Configuration modeConf,
                                  Map objectModel)
                           throws ConfigurationException
Description copied from class: AbstractJXPathModule
Returns the object which should be used as JXPath context. Descendants should override this method to return a specific object that is requried by the implementing class. Examples are: request, session and application context objects.

Specified by:
getContextObject in class AbstractJXPathModule
Throws:
ConfigurationException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.