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) classSearchResourcesGenerator.ResourceCreatorQueryRepresents aQuerytesting the resource creator.
-
Field Summary
Fields Modifier and Type Field Description protected JSONUtils_jsonUtilsThe JSON utilsprotected SearcherFactory_searcherFactoryThe searcher factory.protected UserHelper_userHelperThe 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 voidgenerate()protected QuerygetQuery(Request request, ExplorerNode explorerNode, String rootId)Build the query object corresponding to the user search.voidservice(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:
servicein interfaceServiceable- Overrides:
servicein classResourcesExplorerGenerator- Throws:
ServiceException
-
generate
public void generate() throws IOException, SAXException, ProcessingException
- Specified by:
generatein interfaceGenerator- Overrides:
generatein classSearchGenerator- Throws:
IOExceptionSAXExceptionProcessingException
-
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.
-
-