public class EventsGenerator extends AbstractEventGenerator
| Modifier and Type | Field and Description | 
|---|---|
| protected AmetysObjectResolver | _ametysResolverThe ametys object resolver. | 
| protected EventsFilterHelper | _eventsFilterHelperThe events helper | 
_filterHelper, _resolvermanagerobjectModel, parameters, resolver, sourcecontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer| Constructor and Description | 
|---|
| EventsGenerator() | 
| Modifier and Type | Method and Description | 
|---|---|
| private void | _sax(LocalDate today,
    int monthsBefore,
    int monthsAfter,
    int year,
    int month,
    int day,
    Set<String> filteredCategoryTags,
    Page page,
    ZoneItem zoneItem,
    ZonedDateTime dateTime,
    String title,
    String rangeType,
    boolean maskOrphan,
    boolean pdfDownload,
    boolean icalDownload,
    String link,
    String linkTitle,
    boolean doRetrieveView,
    Set<String> tags,
    Set<Tag> categories,
    String pagePath,
    EventsFilter eventsFilter,
    EventsFilterHelper.DateRange dateRange,
    AmetysObjectIterable<Content> eventContents) | 
| protected void | _saxCategories(Collection<Tag> categories)Generate the list of selected tags that act as categories and their descendant tags. | 
| protected void | _saxDays(ZonedDateTime 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,
                ZonedDateTime current,
                ZonedDateTime previousDay,
                ZonedDateTime 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, saxXMLContentdisposerecycle, setupsetConsumer, setContentHandler, setLexicalHandlerenableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConsumerprotected AmetysObjectResolver _ametysResolver
protected EventsFilterHelper _eventsFilterHelper
public EventsGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class AbstractEventGeneratorServiceExceptionpublic void generate() throws IOException, SAXException, ProcessingException
private void _sax(LocalDate today, int monthsBefore, int monthsAfter, int year, int month, int day, Set<String> filteredCategoryTags, Page page, ZoneItem zoneItem, ZonedDateTime dateTime, String title, String rangeType, boolean maskOrphan, boolean pdfDownload, boolean icalDownload, String link, String linkTitle, boolean doRetrieveView, Set<String> tags, Set<Tag> categories, String pagePath, EventsFilter eventsFilter, EventsFilterHelper.DateRange dateRange, AmetysObjectIterable<Content> eventContents) throws SAXException, IOException
SAXExceptionIOExceptionprivate void _saxRssUrl(ZoneItem zoneItem) throws SAXException
SAXExceptionpublic 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(ZonedDateTime 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, ZonedDateTime current, ZonedDateTime previousDay, ZonedDateTime 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