public class CommentsGenerator extends ServiceableGenerator
Modifier and Type | Field and Description |
---|---|
protected Repository |
_repository
The repository.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
static int |
RSS_MAX_COMMENTS
RSS max number of comments.
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
CommentsGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generate() |
protected Map<Comment,Content> |
getComments(String siteName,
int max)
Get a site's latest comments.
|
void |
service(ServiceManager serviceManager) |
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
public static final int RSS_MAX_COMMENTS
protected AmetysObjectResolver _resolver
protected Repository _repository
public CommentsGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
protected Map<Comment,Content> getComments(String siteName, int max)
siteName
- the site name.max
- the maximum number of comments.