Class ModularSearchGenerator
- 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.ModularSearchGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
public class ModularSearchGenerator extends ServiceableGenerator
Generator for modular search service
-
-
Field Summary
Fields Modifier and Type Field Description protected CategoryHelper
_categoryHelper
The category helperprotected CategoryProviderExtensionPoint
_categoryProviderEP
The category providerprotected CurrentUserProvider
_currentUserProvider
The current user providerprotected ProjectManager
_projectManager
The project managerprotected ProjectMemberManager
_projectMemberManager
The project member managerprotected SearchModuleExtensionPoint
_searchModuleEP
Search Module Extension Pointprotected SourceResolver
_sourceResolver
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 ModularSearchGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate()
protected List<Project>
getAvailableProjects()
Get the available projects (the user's project)protected void
saxCategories(List<Project> projects)
SAX the categoriesprotected void
saxFilters(Request request)
SAX the active filtersprotected void
saxProjects(List<Project> projects)
SAX the available projectsprotected void
saxSearchModule(SearchModule searchModule, boolean withResults, int offset)
SAX the existing search moduleprotected void
saxSearchModuleResults(SearchModule searchModule, int offset)
Sax the results of a search moduleprotected void
saxSearchModules(boolean withResults)
SAX the existing search modulevoid
service(ServiceManager smanager)
-
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
-
_searchModuleEP
protected SearchModuleExtensionPoint _searchModuleEP
Search Module Extension Point
-
_sourceResolver
protected SourceResolver _sourceResolver
Source Resolver
-
_projectManager
protected ProjectManager _projectManager
The project manager
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
_projectMemberManager
protected ProjectMemberManager _projectMemberManager
The project member manager
-
_categoryProviderEP
protected CategoryProviderExtensionPoint _categoryProviderEP
The category provider
-
_categoryHelper
protected CategoryHelper _categoryHelper
The category helper
-
-
Constructor Detail
-
ModularSearchGenerator
public ModularSearchGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
-
saxSearchModules
protected void saxSearchModules(boolean withResults) throws SAXException
SAX the existing search module- Parameters:
withResults
- true to set results- Throws:
SAXException
- if an error occurred while saxing
-
saxSearchModule
protected void saxSearchModule(SearchModule searchModule, boolean withResults, int offset) throws SAXException
SAX the existing search module- Parameters:
searchModule
- The search modulewithResults
- true to set resultsoffset
- the offset search- Throws:
SAXException
- if an error occurred while saxing
-
saxSearchModuleResults
protected void saxSearchModuleResults(SearchModule searchModule, int offset)
Sax the results of a search module- Parameters:
searchModule
- the search moduleoffset
- the offset search
-
getAvailableProjects
protected List<Project> getAvailableProjects()
Get the available projects (the user's project)- Returns:
- the available projects for search
-
saxFilters
protected void saxFilters(Request request) throws SAXException
SAX the active filters- Parameters:
request
- the request- Throws:
SAXException
- if an error occurred while saxing
-
saxProjects
protected void saxProjects(List<Project> projects) throws SAXException
SAX the available projects- Parameters:
projects
- the projects to sax- Throws:
SAXException
- if an error occurred while saxing
-
saxCategories
protected void saxCategories(List<Project> projects) throws SAXException
SAX the categories- Parameters:
projects
- the available projects- Throws:
SAXException
- if an error occurred while saxing
-
-