Class AbstractEventGenerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.xml.AbstractXMLProducer
-
- org.apache.cocoon.generation.AbstractGenerator
-
- org.apache.cocoon.generation.ServiceableGenerator
-
- org.ametys.plugins.calendar.events.AbstractEventGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
EventGenerator
,EventsGenerator
public abstract class AbstractEventGenerator extends ServiceableGenerator
Abstract generator provinding methods to sax an event content
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentFilterHelper
_filterHelper
The content filter helper.protected SourceResolver
_resolver
The source resolver.-
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
-
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 AbstractEventGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_getFormatedDateAttribute(Content content, String attributePath)
Retrieves the formated value of the date attribute of the given contentvoid
saxContent(ContentHandler handler, Content content, boolean saxContentItSelf, WebContentFilter filter, boolean checkUserAccess)
SAX a contentvoid
saxXMLContent(ContentHandler handler, Content content, String metadataSetName)
SAX a content in XML mode.void
service(ServiceManager serviceManager)
-
Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
-
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
-
_resolver
protected SourceResolver _resolver
The source resolver.
-
_filterHelper
protected ContentFilterHelper _filterHelper
The content filter helper.
-
-
Constructor Detail
-
AbstractEventGenerator
public AbstractEventGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
saxContent
public void saxContent(ContentHandler handler, Content content, boolean saxContentItSelf, WebContentFilter filter, boolean checkUserAccess) throws SAXException, IOException
SAX a content- Parameters:
handler
- The content handler to SAX intocontent
- The content.saxContentItSelf
- true to sax the content, false will only sax some metafilter
- The filter. Can be null if saxContentItSelf is falsecheckUserAccess
- True to check user access when saxing the content itself- Throws:
SAXException
- If an error occurs while SAXingIOException
- If an error occurs while retrieving content.
-
_getFormatedDateAttribute
protected String _getFormatedDateAttribute(Content content, String attributePath)
Retrieves the formated value of the date attribute of the given content- Parameters:
content
- the contentattributePath
- the path of the attribute. The attribute must be date or date time- Returns:
- the formated value
-
saxXMLContent
public void saxXMLContent(ContentHandler handler, Content content, String metadataSetName) throws SAXException, IOException
SAX a content in XML mode.- Parameters:
handler
- The content handler to SAX intocontent
- The content to SAXmetadataSetName
- The metadata set to use- Throws:
SAXException
- If an error occurs while SAXingIOException
- If an error occurs while retrieving content.
-
-