Class EventSearchModuleGenerator
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.workspaces.search.module.AbstractSearchModuleGenerator
org.ametys.plugins.workspaces.search.module.AbstractXpathSearchModuleGenerator
org.ametys.plugins.workspaces.search.module.EventSearchModuleGenerator
- All Implemented Interfaces:
Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
Generator for calendar events search module
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CalendarColorsComponentThe color componentprotected CalendarWorkspaceModuleCalendar moduleFields inherited from class org.ametys.plugins.workspaces.search.module.AbstractSearchModuleGenerator
_categoryHelper, _categoryProviderEP, _currentUserProvider, _projectManager, _projectMembers, _resolver, _rightManager, _siteManager, _userHelper, _workspaceModuleEPFields inherited from class org.apache.cocoon.generation.ServiceableGenerator
managerFields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, sourceFields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CalendargetCalendar(CalendarEvent event) Get the parent calendarprotected StringgetXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit) Get the Xpath queryprotected voidsaxCalendar(Calendar calendar) SAX the calendarprotected voidsaxHit(AmetysObject object, String lang) Sax the content hitvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.workspaces.search.module.AbstractXpathSearchModuleGenerator
getProjectXPathQuery, saxHitsMethods inherited from class org.ametys.plugins.workspaces.search.module.AbstractSearchModuleGenerator
filterProjectsForModule, generate, getCategories, getProject, getProjects, saxCategory, saxCategoryColor, saxHits, saxProject, saxUserMethods inherited from class org.apache.cocoon.generation.ServiceableGenerator
disposeMethods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setupMethods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandlerMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Field Details
-
_calendarModule
Calendar module -
_calendarColors
The color component
-
-
Constructor Details
-
EventSearchModuleGenerator
public EventSearchModuleGenerator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSearchModuleGenerator- Throws:
ServiceException
-
getXPathQuery
protected String getXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit) throws Exception Description copied from class:AbstractXpathSearchModuleGeneratorGet the Xpath query- Specified by:
getXPathQueryin classAbstractXpathSearchModuleGenerator- Parameters:
siteName- the current site namelang- the current languagetextfield- the search inputrequest- the requestoffset- the search offsetlimit- the max number of results- Returns:
- the search results
- Throws:
Exception- if the search failed
-
saxHit
Description copied from class:AbstractSearchModuleGeneratorSax the content hit- Specified by:
saxHitin classAbstractSearchModuleGenerator- Parameters:
object- the AmetysObjectlang- the language- Throws:
Exception- if an error occurred while saxing result
-
getCalendar
Get the parent calendar- Parameters:
event- the event- Returns:
- the parent calendar or null if not found
-
saxCalendar
SAX the calendar- Parameters:
calendar- the calendar- Throws:
SAXException- if an error occurred while saxing
-