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_categoryHelperThe category helperprotected CategoryProviderExtensionPoint_categoryProviderEPThe category providerprotected CurrentUserProvider_currentUserProviderThe current user providerprotected ProjectManager_projectManagerThe project managerprotected ProjectMemberManager_projectMemberManagerThe project member managerprotected SearchModuleExtensionPoint_searchModuleEPSearch Module Extension Pointprotected SourceResolver_sourceResolverSource 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 private Category_getRootCategory(Category category)voidgenerate()protected List<Project>getAvailableProjects()Get the available projects (the user's project)protected voidsaxCategories(List<Project> projects)SAX the categoriesprotected voidsaxFilters(Request request)SAX the active filtersprotected voidsaxProjects(List<Project> projects)SAX the available projectsprotected voidsaxSearchModule(SearchModule searchModule, boolean withResults, int offset)SAX the existing search moduleprotected voidsaxSearchModuleResults(SearchModule searchModule, int offset)Sax the results of a search moduleprotected voidsaxSearchModules(boolean withResults)SAX the existing search modulevoidservice(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:
servicein interfaceServiceable- Overrides:
servicein 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
-
_getRootCategory
private Category _getRootCategory(Category category)
-
-