Package org.ametys.cms.explorer
Class SearchResourcesGenerator
- java.lang.Object
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
public class SearchResourcesGenerator extends SearchGenerator
Search resources in a specific explorer node.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
SearchResourcesGenerator.ResourceCreatorQuery
Represents aQuery
testing the resource creator.
-
Field Summary
Fields Modifier and Type Field Description protected JSONUtils
_jsonUtils
The JSON utilsprotected SearcherFactory
_searcherFactory
The searcher factory.protected UserHelper
_userHelper
The user helper-
Fields inherited from class org.ametys.plugins.explorer.resources.generators.ResourcesExplorerGenerator
_explorerApplicationEP, _resolver, _userManager, RESOURCE, RESOURCE_COLLECTION
-
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 SearchResourcesGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate()
protected Query
getQuery(Request request, ExplorerNode explorerNode, String rootId)
Build the query object corresponding to the user search.void
service(ServiceManager sManager)
-
Methods inherited from class org.ametys.plugins.explorer.resources.generators.SearchGenerator
getMetadataExpression, getResourceAttributes
-
Methods inherited from class org.ametys.plugins.explorer.resources.generators.ResourcesExplorerGenerator
_matchFilter, getAdditionalAttributes, getExplorerNodeAttributes, getResourcesIconCls, saxCollection, saxCollection, saxCollection, saxCollection, saxCollection, saxExplorerNode, saxExplorerNode, saxResource
-
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
-
_searcherFactory
protected SearcherFactory _searcherFactory
The searcher factory.
-
_jsonUtils
protected JSONUtils _jsonUtils
The JSON utils
-
_userHelper
protected UserHelper _userHelper
The user helper
-
-
Constructor Detail
-
SearchResourcesGenerator
public SearchResourcesGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager sManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classResourcesExplorerGenerator
- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
- Specified by:
generate
in interfaceGenerator
- Overrides:
generate
in classSearchGenerator
- Throws:
IOException
SAXException
ProcessingException
-
getQuery
protected Query getQuery(Request request, ExplorerNode explorerNode, String rootId)
Build the query object corresponding to the user search.- Parameters:
request
- The user request.explorerNode
- The explorer node to search into.rootId
- The root ID, can be null to search all resources.- Returns:
- the query object.
-
-