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
public class ActionResultGenerator extends AbstractGenerator
This generator generates an ActionResult tag surrounding parameters.
Useful for pipeline that needs no generator.
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAP_REQUEST_ATTR
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
Constructors Constructor Description ActionResultGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
saxParams()
Sax the sitemap parametersprotected void
saxSource()
Take the url in the source and sax it the request parameters are converted into jsParameters-
Methods 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 Detail
-
MAP_REQUEST_ATTR
public static final String MAP_REQUEST_ATTR
Request attribute name containing the map to use.
-
-
Constructor Detail
-
ActionResultGenerator
public ActionResultGenerator()
-
-
Method Detail
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
saxSource
protected void saxSource() throws IOException, SAXException, ProcessingException
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
protected void saxParams() throws IOException, SAXException, ProcessingException
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
protected void saxMap() throws IOException, SAXException, ProcessingException
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
-
-