Package org.ametys.core.cocoon
Class ActionResultGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.ametys.core.cocoon.ActionResultGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
SummaryMailNotifierGenerator
This generator generates an ActionResult tag surrounding parameters.
Useful for pipeline that needs no generator.
Useful for pipeline that needs no generator.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Request attribute name containing the map to use.Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generate()
protected void
saxMap()
Sax the map in request attribute MAP_REQUEST_ATTR.protected void
saxMapItem
(String key, Object value) Used by saxMap to sax one itemprotected void
Sax the sitemap parametersprotected void
Take the url in the source and sax it the request parameters are converted into jsParametersMethods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
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.xml.XMLProducer
setConsumer
-
Field Details
-
MAP_REQUEST_ATTR
Request attribute name containing the map to use.
-
-
Constructor Details
-
ActionResultGenerator
public ActionResultGenerator()
-
-
Method Details
-
generate
-
saxSource
Take the url in the source and sax it the request parameters are converted into jsParameters- Throws:
IOException
- on errorSAXException
- on errorProcessingException
- on error
-
saxParams
Sax the sitemap parameters- Throws:
IOException
- on errorSAXException
- on errorProcessingException
- on error
-
saxMapItem
protected void saxMapItem(String key, Object value) throws IOException, SAXException, ProcessingException Used by saxMap to sax one item- Parameters:
key
- The key of the itemvalue
- The item to sax- Throws:
IOException
- on errorSAXException
- on errorProcessingException
- on error
-
saxMap
Sax the map in request attribute MAP_REQUEST_ATTR. Should be a Map>String, Object> where values are saxed depending on their type : >ul> as string using toString except for <li>Errors : each error is saxed </li> <li>I18nizableText : saxed using toSAX method </li> <li>Collection : each item is saxed used the same key. Note that Collection with inside Collection will have all its item with the same key at root </li> <li>Object : a simple <key>value.toString()</key> </li> >/ul>- Throws:
IOException
- on errorSAXException
- on errorProcessingException
- on error
-