[
http://jira.magnolia-cms.com/browse/MGNLRSSAGG-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21075#action_21075
]
robvdlv edited comment on MGNLRSSAGG-10 at 2/4/09 1:03 PM:
-----------------------------------------------------------------------------
Hi, thanks for providing the RSS Aggregate Module in the first place ;-).
I attached a sample configuration of custom news aggregation (our other use
case).
As for required steps to syndicate <your-JCR-content-here> as RSS, the current
steps required are:
1) Implement a SyndFeedGenerator by extending the SyndFeedGenerator base class,
that maps it to a list of feed entries. A typical usecase obviously, would be
to query and map content nodes to feed entries. To achieve this in a simple
fashion, have a look at the MagnoliaTemplate and ContentMapper.
2) Implement a SyndFeedGeneratorFactory for your Generator that will create a
configured Generator instance based on given request parameters. (See remark R1)
3) Map a logical name of a generator to a SyndFeedGeneratorFactory that is
capable of constructing that generator.
Mappings are registered with the SyndFeedGeneratorResolver; The registration of
this mapping currently happens in the ProduceFeed.jsp, but as you suggest there
will be more elegant ways. (See R2)
4) Make a request (in this case on the JSP) with the appropriate parameters on
which the Generator to use can be resolved to see the feed syndication work
R1: Typically I think creating a new instance of your generator won't require
any parameters. In the case of the RSSModuleFeedGenerator however, the path to
the blog aggregate definition in the JCR was required. This was the reason for
introduce factories for Generator construction.
R2: Ideally -as you mentioned- the mappings in the SyndFeedGeneratorResolver
are done by means of configuration in the admin interface.
I hope this confirms/clarifies the perspective on the patch where needed. If
not, let me know.
was (Author: robvdlv):
Thanks. Was about to ask you if you can provide this update;
It would be great if you can maybe provide sample of configuration for your
other use case? You use it to generate feed from small articles like news on
your site or something similar? Or do you use it to generate feeds from other
data types in data module?
Looking at your solution it seems flexible enough to generate feed from just
about anything.
If I understood it correctly you just extend SyndFeedGenerator and implement
all the abstract methods. And then you just have to specify that name of the
feed generator in the call to ProduceFeed.jsp. Correct?
Regarding your comment in the JSP - yes, absolutely. JSP should go away
completely and be replaced by either filter or servlet registered in
/server/filters respectively /server/filters/servlets. JSP was just a
poor-man's-hack to see if the POC will work out or not.
Filters are normally registered from the bootstrap files, and reodered to
proper position using FilterOrderingTask Have a look at magnolia-module-cache
for example of that.
Servlets can be registered in directly in module deployment descriptors.
magnolia-module-dms is nice example of how to do this.
Personally this feels more like the kind of work I would do in servlet rather
then filter, but no strong preference either way.
As for the resolving different feed generators I think it would be more
flexible to have them configured via admin interface, for example under
/modules/rssaggregator/config/feedGenerators rather then having to add
generator mapping on the fly in jsp page.
BTW, contrary to Philipp, I think it should stay with RSSAggregator module. It
looks like a great extension to the module. Thanks.
---
Hi, thanks for providing the RSS Aggregate Module in the first place ;-).
I attached a sample configuration of custom news aggregation (our other use
case).
As for required steps to syndicate <your-JCR-content-here> as RSS, the current
steps required are:
1) Implement a SyndFeedGenerator by extending the SyndFeedGenerator base class,
that maps it to a list of feed entries. A typical usecase obviously, would be
to query and map content nodes to feed entries. To achieve this in a simple
fashion, have a look at the MagnoliaTemplate and ContentMapper.
2) Implement a SyndFeedGeneratorFactory for your Generator that will create a
configured Generator instance based on given request parameters. (See remark R1)
3) Map a logical name of a generator to a SyndFeedGeneratorFactory that is
capable of constructing that generator.
Mappings are registered with the SyndFeedGeneratorResolver; The registration of
this mapping currently happens in the ProduceFeed.jsp, but as you suggest there
will be more elegant ways. (See R2)
4) Make a request (in this case on the JSP) with the appropriate parameters on
which the Generator to use can be resolved to see the feed syndication work
R1: Typically I think creating a new instance of your generator won't require
any parameters. In the case of the RSSModuleFeedGenerator however, the path to
the blog aggregate definition in the JCR was required. This was the reason for
introduce factories for Generator construction.
R2: Ideally -as you mentioned- the mappings in the SyndFeedGeneratorResolver
are done by means of configuration in the admin interface.
I hope this confirms/clarifies the perspective on the patch where needed. If
not, let me know.
> Enable easy syndication of any Magnolia content
> -----------------------------------------------
>
> Key: MGNLRSSAGG-10
> URL: http://jira.magnolia-cms.com/browse/MGNLRSSAGG-10
> Project: Magnolia RSS Aggregator Module
> Issue Type: Improvement
> Affects Versions: 1.0
> Reporter: Rob van der Linden Vooren
> Assignee: Jan Haderka
> Attachments: MGNLRSSAGG-10_for_rev22223.patch,
> MGNLRSSAGG-10_for_rev22223_v2.patch
>
>
> We encountered a use case of needing to syndicate other content than just the
> aggregate feeds defined in the RSS Module.
> As such, I rewrote the FeedGenerator class and the ProduceFeed.jsp to enable
> us to syndicate any content in the Magnolia repository easily.
> Please have a look at the patch and let me know what you think.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------