public class EventsGenerator extends AbstractEventGenerator
Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_ametysResolver
The ametys object resolver.
|
protected EventsFilterHelper |
_eventsFilterHelper
The events helper
|
protected ContentFilterExtensionPoint |
_filterExtPt
The filter extension point.
|
_filterHelper, _resolver
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
EventsGenerator() |
Modifier and Type | Method and Description |
---|---|
protected void |
_saxCategories(Collection<Tag> categories)
Generate the list of selected tags that act as categories and their descendant tags.
|
protected void |
_saxDays(Date date,
String type)
Generate days to build a "calendar" view.
|
protected void |
_saxDaysNew(EventsFilterHelper.DateRange dateRange,
String rangeType)
Generate days to build a "calendar" view.
|
protected void |
_saxMonths(EventsFilterHelper.DateRange dateRange)
SAX information on the months spanning the date range.
|
private void |
_saxRssUrl(ZoneItem zoneItem) |
protected void |
_saxTags(Collection<String> tags)
Generate the list of selected tags.
|
protected void |
addNavAttributes(AttributesImpl attrs,
DateTime current,
DateTime previousDay,
DateTime nextDay)
Add nav attributes.
|
void |
generate() |
void |
saxMatchingContents(ContentHandler handler,
WebContentFilter filter,
AmetysObjectIterable<Content> contents,
Page currentPage,
boolean saxContentItSelf)
SAX all contents matching the given filter
|
void |
service(ServiceManager serviceManager) |
saxContent, saxXMLContent
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected AmetysObjectResolver _ametysResolver
protected ContentFilterExtensionPoint _filterExtPt
protected EventsFilterHelper _eventsFilterHelper
public EventsGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractEventGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
private void _saxRssUrl(ZoneItem zoneItem) throws SAXException
SAXException
public void saxMatchingContents(ContentHandler handler, WebContentFilter filter, AmetysObjectIterable<Content> contents, Page currentPage, boolean saxContentItSelf) throws SAXException, IOException
handler
- The content handler to SAX intofilter
- The filtercontents
- iterator on the contents.currentPage
- The current page.saxContentItSelf
- true to sax the content, false will only sax some metaSAXException
- If an error occurs while SAXingIOException
- If an error occurs while retrieving content.protected void _saxMonths(EventsFilterHelper.DateRange dateRange) throws SAXException
dateRange
- the date range.SAXException
- if a error occurs while saxingprotected void _saxDaysNew(EventsFilterHelper.DateRange dateRange, String rangeType) throws SAXException
dateRange
- a date belonging to the time span to generate.rangeType
- the range type, "month" or "week".SAXException
- if an error occurs while saxingprotected void _saxDays(Date date, String type) throws SAXException
date
- a date belonging to the time span to generate.type
- the range type, "month" or "week".SAXException
- if an error occurs while saxingprotected void addNavAttributes(AttributesImpl attrs, DateTime current, DateTime previousDay, DateTime nextDay)
attrs
- the attributes object to fill in.current
- the current date.previousDay
- the previous date.nextDay
- the next date.protected void _saxTags(Collection<String> tags) throws SAXException
tags
- the list of tags.SAXException
- if an error occurs while saxingprotected void _saxCategories(Collection<Tag> categories) throws SAXException
categories
- the list of categories to generate.SAXException
- if an error occurs while saxing