Class AbstractXpathSearchModuleGenerator
- 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
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
EventSearchModuleGenerator
,TaskSearchModuleGenerator
,ThreadSearchModuleGenerator
public abstract class AbstractXpathSearchModuleGenerator extends AbstractSearchModuleGenerator
Abstract generator for search module in the repository
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.workspaces.search.module.AbstractSearchModuleGenerator
_categoryHelper, _categoryProviderEP, _currentUserProvider, _projectManager, _projectMembers, _resolver, _rightManager, _siteManager, _userHelper, _workspaceModuleEP
-
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 AbstractXpathSearchModuleGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
getProjectXPathQuery(List<Project> projects)
Get the xpath query on projectprotected abstract String
getXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit)
Get the Xpath queryprotected void
saxHits(String siteName, String lang, String textfield, Request request, int offset, int limit, int minLimit)
Sax the results-
Methods inherited from class org.ametys.plugins.workspaces.search.module.AbstractSearchModuleGenerator
filterProjectsForModule, generate, getCategories, getProject, getProjects, saxCategory, saxCategoryColor, saxHit, saxHits, saxProject, saxUser, service
-
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
-
-
-
-
Constructor Detail
-
AbstractXpathSearchModuleGenerator
public AbstractXpathSearchModuleGenerator()
-
-
Method Detail
-
saxHits
protected void saxHits(String siteName, String lang, String textfield, Request request, int offset, int limit, int minLimit) throws SAXException, ProcessingException
Description copied from class:AbstractSearchModuleGenerator
Sax the results- Specified by:
saxHits
in classAbstractSearchModuleGenerator
- Parameters:
siteName
- the current site namelang
- the current languagetextfield
- the search inputsrequest
- the requestoffset
- the start of searchlimit
- the max number of resultsminLimit
- the min number of results- Throws:
SAXException
- if an error occurred while saxingProcessingException
- if the search failed
-
getProjectXPathQuery
protected String getProjectXPathQuery(List<Project> projects)
Get the xpath query on project- Parameters:
projects
- the targeted projects- Returns:
- the xpath query
-
getXPathQuery
protected abstract String getXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit) throws Exception
Get the Xpath query- 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
-
-