info.magnolia.module.rssaggregator.generator
Class CollectStatisticsCommand
java.lang.Object
info.magnolia.commands.MgnlCommand
info.magnolia.module.rssaggregator.generator.CollectStatisticsCommand
- All Implemented Interfaces:
- info.magnolia.commands.chain.Command, Cloneable
public class CollectStatisticsCommand
- extends info.magnolia.commands.MgnlCommand
Collects and generates statistics for imported RSS feed data.
- Author:
- lfischer
Fields inherited from interface info.magnolia.commands.chain.Command |
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Method Summary |
protected void |
createMapEntry(org.apache.commons.collections.map.MultiKeyMap mkm,
javax.jcr.Node blogEntry)
Add blog entries from the planet archive to a multi key map. |
protected void |
createStatisticsNodes(org.apache.commons.collections.map.MultiKeyMap statEntries,
javax.jcr.Node topNode)
Store collected statistics in JCR tree. |
boolean |
execute(info.magnolia.context.Context context)
|
protected Date |
getStatisticsStartDate()
Get relevant date for statistics from Magnolia config workspace. |
Methods inherited from class info.magnolia.commands.MgnlCommand |
clone, execute, isEnabled, release, setEnabled |
CollectStatisticsCommand
public CollectStatisticsCommand()
execute
public boolean execute(info.magnolia.context.Context context)
throws Exception
- Specified by:
execute
in class info.magnolia.commands.MgnlCommand
- Throws:
Exception
getStatisticsStartDate
protected Date getStatisticsStartDate()
- Get relevant date for statistics from Magnolia config workspace.
- Returns:
- Date relevant for inclusion of blog entries in statistics.
createMapEntry
protected void createMapEntry(org.apache.commons.collections.map.MultiKeyMap mkm,
javax.jcr.Node blogEntry)
- Add blog entries from the planet archive to a multi key map.
- Parameters:
mkm
- Map with blog entries stored with a key consisting of author name and rss feed link.blogEntry
- Single blog entry retrieved from planet archive.
createStatisticsNodes
protected void createStatisticsNodes(org.apache.commons.collections.map.MultiKeyMap statEntries,
javax.jcr.Node topNode)
- Store collected statistics in JCR tree.
- Parameters:
statEntries
- Map with author and feed key containing blog entries.topNode
- Top node for the planet statistics feed.
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.