Package org.ametys.plugins.blog.posts
Class CommentsGenerator
- 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.blog.posts.CommentsGenerator
 
 
 
 
 
 
- 
- All Implemented Interfaces:
 Poolable,Recyclable,Disposable,Component,LogEnabled,Serviceable,Generator,SitemapModelComponent,XMLProducer
public class CommentsGenerator extends ServiceableGenerator
Generate the latest comments. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected Repository_repositoryThe repository.protected AmetysObjectResolver_resolverThe ametys object resolver.protected UnversionedDataTypeExtensionPoint_unversionedDataTypeExtensionPointthe the extension point with available data types for unversioned datastatic intRSS_MAX_COMMENTSRSS max number of comments.- 
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 CommentsGenerator() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate()protected Map<Comment,Content>getComments(String siteName, int max)Get a site's latest comments.voidservice(ServiceManager serviceManager)- 
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
- 
RSS_MAX_COMMENTS
public static final int RSS_MAX_COMMENTS
RSS max number of comments.- See Also:
 - Constant Field Values
 
 
- 
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver. 
- 
_repository
protected Repository _repository
The repository. 
- 
_unversionedDataTypeExtensionPoint
protected UnversionedDataTypeExtensionPoint _unversionedDataTypeExtensionPoint
the the extension point with available data types for unversioned data 
 - 
 
- 
Constructor Detail
- 
CommentsGenerator
public CommentsGenerator()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classServiceableGenerator- Throws:
 ServiceException
 
- 
generate
public void generate() throws IOException, SAXException, ProcessingException
 
- 
getComments
protected Map<Comment,Content> getComments(String siteName, int max)
Get a site's latest comments.- Parameters:
 siteName- the site name.max- the maximum number of comments.- Returns:
 - the comments.
 
 
 - 
 
 -