Class ThreadSearchModuleGenerator
- 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
-
- org.ametys.plugins.workspaces.search.module.ThreadSearchModuleGenerator
-
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
public class ThreadSearchModuleGenerator extends AbstractXpathSearchModuleGenerator
Generator for threads search module
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentTypeExtensionPoint
_cTypeEP
The content type extension pointprotected ThreadWorkspaceModule
_threadModule
Thread Moduleprotected UserDirectoryHelper
_userDirectoryHelper
The user directory-
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 ThreadSearchModuleGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit)
Get the Xpath queryprotected void
saxAuthorInfos(UserIdentity author, String lang)
SAX the author informationprotected void
saxHit(AmetysObject object, String lang)
Sax the content hitvoid
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.plugins.workspaces.search.module.AbstractXpathSearchModuleGenerator
getProjectXPathQuery, saxHits
-
Methods inherited from class org.ametys.plugins.workspaces.search.module.AbstractSearchModuleGenerator
filterProjectsForModule, generate, getCategories, getProject, getProjects, saxCategory, saxCategoryColor, saxHits, saxProject, saxUser
-
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
-
_threadModule
protected ThreadWorkspaceModule _threadModule
Thread Module
-
_userDirectoryHelper
protected UserDirectoryHelper _userDirectoryHelper
The user directory
-
_cTypeEP
protected ContentTypeExtensionPoint _cTypeEP
The content type extension point
-
-
Constructor Detail
-
ThreadSearchModuleGenerator
public ThreadSearchModuleGenerator()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractSearchModuleGenerator
- Throws:
ServiceException
-
getXPathQuery
protected String getXPathQuery(String siteName, String lang, String textfield, Request request, int offset, int limit) throws Exception
Description copied from class:AbstractXpathSearchModuleGenerator
Get the Xpath query- Specified by:
getXPathQuery
in classAbstractXpathSearchModuleGenerator
- 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
-
saxHit
protected void saxHit(AmetysObject object, String lang) throws Exception
Description copied from class:AbstractSearchModuleGenerator
Sax the content hit- Specified by:
saxHit
in classAbstractSearchModuleGenerator
- Parameters:
object
- the AmetysObjectlang
- the language- Throws:
Exception
- if an error occurred while saxing result
-
saxAuthorInfos
protected void saxAuthorInfos(UserIdentity author, String lang) throws SAXException, BadItemTypeException, IOException
SAX the author information- Parameters:
author
- the authorlang
- the current language- Throws:
SAXException
- if an error occurredIOException
- if an error occurredBadItemTypeException
- if an error occurred
-
-