Class TagCloudOnTagsGenerator
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.tagcloud.generators.AbstractTagCloudGenerator
org.ametys.plugins.tagcloud.generators.TagCloudOnTagsGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Component
,Contextualizable
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
Generates a tag cloud based upon content tags
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.tagcloud.generators.AbstractTagCloudGenerator
AbstractTagCloudGenerator.ItemOccurrenceComparator, AbstractTagCloudGenerator.TagCloudItem
-
Field Summary
Fields inherited from class org.ametys.plugins.tagcloud.generators.AbstractTagCloudGenerator
_cacheManager, _context, _resolver, _solrClient, _solrClientProvider, OCCURRENCE_COMPARATOR
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Sax additional attributes for itemprotected Query
Get the queryprotected List<AbstractTagCloudGenerator.TagCloudItem>
getTagCloudItems
(String siteName, String lang, ModelAwareDataHolder serviceParameters) Get the tag cloud itemsvoid
service
(ServiceManager serviceManager) Methods inherited from class org.ametys.plugins.tagcloud.generators.AbstractTagCloudGenerator
_addContentTypeQuery, _addPagesQuery, _getFontSize, _saxContentTypeCriteria, _saxFormParameters, _saxSitemapCriteria, build, contextualize, generate, saxTagCloudItem
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 Details
-
_tagExtPt
-
-
Constructor Details
-
TagCloudOnTagsGenerator
public TagCloudOnTagsGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractTagCloudGenerator
- Throws:
ServiceException
-
getTagCloudItems
protected List<AbstractTagCloudGenerator.TagCloudItem> getTagCloudItems(String siteName, String lang, ModelAwareDataHolder serviceParameters) throws IOException, ProcessingException Description copied from class:AbstractTagCloudGenerator
Get the tag cloud items- Specified by:
getTagCloudItems
in classAbstractTagCloudGenerator
- Parameters:
siteName
- The site namelang
- The languageserviceParameters
- The service parameters- Returns:
- The list og tag cloud item
- Throws:
IOException
- if an error occurs when manipulating filesProcessingException
- if an error occurs during the retrieving of the tag cloud items
-
_saxAdditionalAttributes
protected void _saxAdditionalAttributes(AbstractTagCloudGenerator.TagCloudItem item, AttributesImpl attrs) throws SAXException Description copied from class:AbstractTagCloudGenerator
Sax additional attributes for item- Overrides:
_saxAdditionalAttributes
in classAbstractTagCloudGenerator
- Parameters:
item
- The tag cloud itemattrs
- The attributes- Throws:
SAXException
- if an error occurs while saxing
-
getQuery
protected Query getQuery(String siteName, String language, String tagName, String[] contentTypes, String[] pages) Get the query- Parameters:
siteName
- The site name.language
- The current language.tagName
- The tag namecontentTypes
- The content typespages
- The pages- Returns:
- the query
- Throws:
IllegalArgumentException
- If the search field is invalid
-