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

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.cocoon.components.modules.input.AbstractInputModule
              |
              +--org.apache.cocoon.components.modules.input.AbstractMetaModule
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, InputModule, org.apache.avalon.framework.logger.LogEnabled
Direct Known Subclasses:
ChainMetaModule, CollectionMetaModule, DateMetaInputModule, DigestMetaModule, JXPathMetaModule, MapMetaModule, SimpleMappingMetaModule, XMLMetaModule

public abstract class AbstractMetaModule
extends AbstractInputModule
implements org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable

AbstractMetaModule gives you the infrastructure for easily deploying more "meta" InputModules i.e. InputModules that are composed of other InputModules. In order to get at the Logger, use getLogger().

Version:
CVS $Id: AbstractMetaModule.java,v 1.3.2.1 2002/11/17 19:12:49 haul Exp $
Author:
Christian Haul

Field Summary
protected  java.lang.String defaultInput
          The default InputModule name / shorthand.
protected  java.lang.Boolean initialized
          Is this instance initialized?
protected  InputModule input
          The cached default InputModule
protected static java.lang.String INPUT_MODULE_SELECTOR
           
protected  org.apache.avalon.framework.configuration.Configuration inputConf
          The default InputModule configuration
protected  org.apache.avalon.framework.component.ComponentSelector inputSelector
          The cached InputModule-Selector
protected  org.apache.avalon.framework.component.ComponentManager manager
          The component manager instance
 
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
AbstractMetaModule()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Set the current ComponentManager instance used by this Composable.
 void dispose()
          Dispose exactly one cached InputModule.
protected  java.util.Iterator getNames(java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf)
           
protected  java.util.Iterator getNames(java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf, InputModule modB, java.lang.String modBName, org.apache.avalon.framework.configuration.Configuration modBConf)
          If two modules are specified, the second one is used if the name is not null.
protected  java.lang.Object getValue(java.lang.String attr, java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf)
           
protected  java.lang.Object getValue(java.lang.String attr, java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf, InputModule modB, java.lang.String modBName, org.apache.avalon.framework.configuration.Configuration modBConf)
          If two modules are specified, the second one is used if the name is not null.
protected  java.lang.Object[] getValues(java.lang.String attr, java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf)
           
protected  java.lang.Object[] getValues(java.lang.String attr, java.util.Map objectModel, InputModule modA, java.lang.String modAName, org.apache.avalon.framework.configuration.Configuration modAConf, InputModule modB, java.lang.String modBName, org.apache.avalon.framework.configuration.Configuration modBConf)
          If two modules are specified, the second one is used if the name is not null.
 void initialize()
          Initialize the meta module with exactly one other input module.
protected  InputModule obtainModule(java.lang.String type)
          Obtain a permanent reference to an InputModule.
protected  void releaseModule(InputModule module)
          release a permanent reference to an InputModule.
 
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
configure
 
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
 

Field Detail

manager

protected org.apache.avalon.framework.component.ComponentManager manager
The component manager instance

inputSelector

protected org.apache.avalon.framework.component.ComponentSelector inputSelector
The cached InputModule-Selector

input

protected InputModule input
The cached default InputModule

defaultInput

protected java.lang.String defaultInput
The default InputModule name / shorthand. Defaults to 'request-param'

inputConf

protected org.apache.avalon.framework.configuration.Configuration inputConf
The default InputModule configuration

initialized

protected java.lang.Boolean initialized
Is this instance initialized?

INPUT_MODULE_SELECTOR

protected static final java.lang.String INPUT_MODULE_SELECTOR
Constructor Detail

AbstractMetaModule

public AbstractMetaModule()
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Set the current ComponentManager instance used by this Composable.
Specified by:
compose in interface org.apache.avalon.framework.component.Composable

initialize

public void initialize()
Initialize the meta module with exactly one other input module. Override this method and dispose() to keep references to more than one module.
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable

dispose

public void dispose()
Dispose exactly one cached InputModule. To work on more than one, override this method and initialize().
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable
Overrides:
dispose in class AbstractInputModule

obtainModule

protected InputModule obtainModule(java.lang.String type)
Obtain a permanent reference to an InputModule.

releaseModule

protected void releaseModule(InputModule module)
release a permanent reference to an InputModule.

getNames

protected java.util.Iterator getNames(java.util.Map objectModel,
                                      InputModule modA,
                                      java.lang.String modAName,
                                      org.apache.avalon.framework.configuration.Configuration modAConf)

getNames

protected java.util.Iterator getNames(java.util.Map objectModel,
                                      InputModule modA,
                                      java.lang.String modAName,
                                      org.apache.avalon.framework.configuration.Configuration modAConf,
                                      InputModule modB,
                                      java.lang.String modBName,
                                      org.apache.avalon.framework.configuration.Configuration modBConf)
If two modules are specified, the second one is used if the name is not null.

getValue

protected java.lang.Object getValue(java.lang.String attr,
                                    java.util.Map objectModel,
                                    InputModule modA,
                                    java.lang.String modAName,
                                    org.apache.avalon.framework.configuration.Configuration modAConf)

getValue

protected java.lang.Object getValue(java.lang.String attr,
                                    java.util.Map objectModel,
                                    InputModule modA,
                                    java.lang.String modAName,
                                    org.apache.avalon.framework.configuration.Configuration modAConf,
                                    InputModule modB,
                                    java.lang.String modBName,
                                    org.apache.avalon.framework.configuration.Configuration modBConf)
If two modules are specified, the second one is used if the name is not null.

getValues

protected java.lang.Object[] getValues(java.lang.String attr,
                                       java.util.Map objectModel,
                                       InputModule modA,
                                       java.lang.String modAName,
                                       org.apache.avalon.framework.configuration.Configuration modAConf)

getValues

protected java.lang.Object[] getValues(java.lang.String attr,
                                       java.util.Map objectModel,
                                       InputModule modA,
                                       java.lang.String modAName,
                                       org.apache.avalon.framework.configuration.Configuration modAConf,
                                       InputModule modB,
                                       java.lang.String modBName,
                                       org.apache.avalon.framework.configuration.Configuration modBConf)
If two modules are specified, the second one is used if the name is not null.


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.