Save This Page
Home » cocoon-2.1.11-src » org.apache.cocoon.components.modules » input » [javadoc | source]
org.apache.cocoon.components.modules.input
public class: XMLMetaModule [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.components.modules.input.AbstractInputModule
         org.apache.cocoon.components.modules.input.AbstractMetaModule
            org.apache.cocoon.components.modules.input.XMLMetaModule

All Implemented Interfaces:
    org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable, InputModule, org.apache.avalon.framework.configuration.Configurable

Meta module that obtains values from other module and returns all parameters as XML.

Config

<!-- in cocoon.xconf -->
<ignore>do-</ignore>
<strip>user.</strip>
<input-module name="request-param"/>

<!-- e.g. in database.xml -->
<mode type="all" name="xmlmeta"/>
<ignore>foo.</ignore>
<strip>f</strip>
<use>foo</use>
<root>my-root</root>
<input-module name="request-param"/>
</mode>

If present, "ignore" gives a prefix of parameters to ignore, ignore has precedence over the "use" attribute, "strip" a prefix that will be removed from the final parameter names in the produced XML, "use" is a prefix for parameters to include in the XML, and "root" is the name of the root element in the created XML.

Input

foo.one = ['abc']
foo.two = ['def']
foo1 = ['bar']
foo2 = ['one','two','three']
bar = ['rubber duck']

Output

<my-root>
<item name="oo1">bar</item>
<item name="oo2">
<value>one</value>
<value>two</value>
<value>three</value>
</item>
</my-root>

Produces Objects of type DocumentWrapper

Field Summary
protected  String rootName     
protected  String ignore     
protected  String use     
protected  String strip     
protected  Object config     
protected  XPathProcessor xpathProcessor     
protected static final  String CACHE_OBJECT_NAME     
static final  Vector returnNames     
Fields inherited from org.apache.cocoon.components.modules.input.AbstractMetaModule:
manager,  inputSelector,  input,  defaultInput,  inputConf,  initialized,  INPUT_MODULE_SELECTOR
Fields inherited from org.apache.cocoon.components.modules.input.AbstractInputModule:
returnNames,  settings
Method from org.apache.cocoon.components.modules.input.XMLMetaModule Summary:
compose,   configure,   dispose,   getAttribute,   getAttributeNames,   getAttributeValues
Methods from org.apache.cocoon.components.modules.input.AbstractMetaModule:
compose,   dispose,   getNames,   getNames,   getValue,   getValue,   getValue,   getValue,   getValues,   getValues,   getValues,   getValues,   lazy_initialize,   obtainModule,   releaseModule
Methods from org.apache.cocoon.components.modules.input.AbstractInputModule:
configure,   dispose,   getAttribute,   getAttributeNames,   getAttributeValues
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.components.modules.input.XMLMetaModule Detail:
 public  void compose(ComponentManager manager) throws ComponentException 
 public  void configure(Configuration config) throws ConfigurationException 
 public  void dispose() 
 public Object getAttribute(String name,
    Configuration modeConf,
    Map objectModel) throws ConfigurationException 
 public Iterator getAttributeNames(Configuration modeConf,
    Map objectModel) throws ConfigurationException 
 public Object[] getAttributeValues(String name,
    Configuration modeConf,
    Map objectModel) throws ConfigurationException