|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.components.language.markup.xsp.XSPModuleHelper
Helper class that caches references to InputModules for use in XSPs. Works in conjunction with the input.xsl logicsheet. References are obtained the first time a module is accessed and kept until the page is completely displayed.
Field Summary | |
protected static java.lang.String |
INPUT_MODULE_SELECTOR
|
Constructor Summary | |
XSPModuleHelper()
|
Method Summary | |
java.lang.Object |
getAttribute(java.util.Map objectModel,
java.lang.String module,
java.lang.String name,
java.lang.Object deflt)
Get a single attribute value from a module. |
void |
getAttributeNames(java.util.Map objectModel,
org.xml.sax.ContentHandler contentHandler,
java.lang.String module)
Output attribute names for a given request |
java.util.Iterator |
getAttributeNames(java.util.Map objectModel,
java.lang.String module)
Get an iterator to a collection of attribute names from a module. |
void |
getAttributeValues(java.util.Map objectModel,
org.xml.sax.ContentHandler contentHandler,
java.lang.String module,
java.lang.String name)
Output the request attribute values for a given name to the content handler. |
java.lang.Object[] |
getAttributeValues(java.util.Map objectModel,
java.lang.String module,
java.lang.String name,
java.lang.Object[] deflt)
Get an array of values from a module. |
void |
releaseAll()
Releases all obtained module references. |
void |
setup(org.apache.avalon.framework.component.ComponentManager manager)
Initializes the instance for first use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String INPUT_MODULE_SELECTOR
Constructor Detail |
public XSPModuleHelper()
Method Detail |
public void setup(org.apache.avalon.framework.component.ComponentManager manager) throws java.lang.RuntimeException
manager
- a ComponentManager
value
java.lang.RuntimeException
- if an error occurspublic java.lang.Object getAttribute(java.util.Map objectModel, java.lang.String module, java.lang.String name, java.lang.Object deflt) throws java.lang.RuntimeException
objectModel
- a Map
valuemodule
- a String
value holding the module namename
- a String
value holding the attribute namedeflt
- an Object
value holding a default value
Object
value
java.lang.RuntimeException
- if an error occurspublic java.lang.Object[] getAttributeValues(java.util.Map objectModel, java.lang.String module, java.lang.String name, java.lang.Object[] deflt) throws java.lang.RuntimeException
objectModel
- a Map
valuemodule
- a String
value holding the module namename
- a String
value holding the attribute namedeflt
- an Object[]
value holding a default value
Object[]
value
java.lang.RuntimeException
- if an error occurspublic void getAttributeValues(java.util.Map objectModel, org.xml.sax.ContentHandler contentHandler, java.lang.String module, java.lang.String name) throws org.xml.sax.SAXException, java.lang.RuntimeException
objectModel
- The Map objectModelcontentHandler
- The SAX content handlermodule
- a String
value holding the module namename
- a String
value holding the attribute name
org.xml.sax.SAXException
- If a SAX error occurs
java.lang.RuntimeException
- if an error occurspublic java.util.Iterator getAttributeNames(java.util.Map objectModel, java.lang.String module) throws java.lang.RuntimeException
objectModel
- a Map
valuemodule
- the module's name
Iterator
value
java.lang.RuntimeException
- if an error occurspublic void getAttributeNames(java.util.Map objectModel, org.xml.sax.ContentHandler contentHandler, java.lang.String module) throws org.xml.sax.SAXException, java.lang.RuntimeException
objectModel
- The Map objectModelcontentHandler
- The SAX content handlermodule
- the module's name
org.xml.sax.SAXException
- If a SAX error occurs
java.lang.RuntimeException
- if an error occurspublic void releaseAll() throws java.lang.RuntimeException
java.lang.RuntimeException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |