Java Doc for RetainArticlesPlugIn.java in  » RSS-RDF » curn » org » clapper » curn » plugins » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » curn » org.clapper.curn.plugins 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.clapper.curn.plugins.RetainArticlesPlugIn

RetainArticlesPlugIn
public class RetainArticlesPlugIn implements MainConfigItemPlugIn,FeedConfigItemPlugIn,ForceFeedDownloadPlugIn,PostFeedParsePlugIn(Code)
The RetainArticlesPlugIn can be used to force articles in a feed (or in all feeds) to be displayed more than once. It looks for a default (main-configuration section) "ShowArticlesFor" parameter, and it permits a per-feed "ShowArticlesFor" parameter to override the default. The configuration parameter takes a time interval, expressed in a natural language string. (The IgnoreOldArticlesPlugIn class uses the same time interval form.) Examples:
  • 3 days
  • 1 week
  • 365 days
  • 12 hours, 30 minutes
Valid interval names (in English) are:
  • "millisecond", "milliseconds", "ms"
  • "second", "seconds", "sec", "secs"
  • "minutes", "minutes", "min", "mins"
  • "hour", "hours", "hr", "hrs"
  • "day", "days"
  • "week", "weeks"

This plug-in uses the org.clapper.util library's Duration class to parse the age/duration values. See that class for more details.

This plug-in intercepts the following configuration parameters.

Section Parameter Meaning Default
[curn] ShowArticlesFor Global default specifying how long to retain an article. Applies to all feeds that don't explicitly override this parameter. None. (Articles displayed only once.)
[Feedxxx] IgnoreArticlesOlderThan Per-feed parameter specifying how long to retain an article. The global IgnoreArticlesOlderThan setting. If there is no global setting, then the default is to display articles only once.

WARNING: Beware of interactions with the IgnoreOldArticlesPlugIn class. For instance, if you use "ShowArticlesFor" to show articles for 5 days, but you also use "IgnoreArticlesOlderThan" to discard articles older than 2 days, the "IgnoreArticlesOlderThan parameter takes precedence.
version:
   $Revision: 7041 $




Constructor Summary
public  RetainArticlesPlugIn()
    

Method Summary
public  booleanforceFeedDownload(FeedInfo feedInfo, FeedCache feedCache)
     This method determines (based on some internal criteria) whether a given feed should be downloaded even if it hasn't changed.
public  StringgetPlugInName()
     Get a displayable name for the plug-in.
public  StringgetPlugInSortKey()
     Get the sort key for this plug-in.
public  voidinitPlugIn()
     Initialize the plug-in.
public  booleanrunFeedConfigItemPlugIn(String sectionName, String paramName, CurnConfig config, FeedInfo feedInfo)
     Called immediately after curn has read and processed a configuration item in a "feed" configuration section.
public  voidrunMainConfigItemPlugIn(String sectionName, String paramName, CurnConfig config)
     Called immediately after curn has read and processed a configuration item in the main [curn] configuration section.
public  booleanrunPostFeedParsePlugIn(FeedInfo feedInfo, FeedCache feedCache, RSSChannel channel)
     Called immediately after a feed is parsed, but before it is otherwise processed.


Constructor Detail
RetainArticlesPlugIn
public RetainArticlesPlugIn()(Code)
Creates a new instance of RetainArticlesPlugIn




Method Detail
forceFeedDownload
public boolean forceFeedDownload(FeedInfo feedInfo, FeedCache feedCache) throws CurnException(Code)
This method determines (based on some internal criteria) whether a given feed should be downloaded even if it hasn't changed. If multiple plug-ins implement this interface, then only one needs to return true for the feed download to be forced.
Parameters:
  feedInfo - the FeedInfo object for the feed thathas been downloaded and parsed.
Parameters:
  feedCache - the feed cache, or null if there isn't one true if the feed should be downloaded and parsedeven if it's not out of date; false if curn'snormal downloading rules should apply.
throws:
  CurnException - on error



getPlugInName
public String getPlugInName()(Code)
Get a displayable name for the plug-in. the name



getPlugInSortKey
public String getPlugInSortKey()(Code)
Get the sort key for this plug-in. the sort key string.



initPlugIn
public void initPlugIn() throws CurnException(Code)
Initialize the plug-in. This method is called before any of the plug-in methods are called.
throws:
  CurnException - on error



runFeedConfigItemPlugIn
public boolean runFeedConfigItemPlugIn(String sectionName, String paramName, CurnConfig config, FeedInfo feedInfo) throws CurnException(Code)
Called immediately after curn has read and processed a configuration item in a "feed" configuration section. All configuration items are passed, one by one, to each loaded plug-in. If a plug-in class is not interested in a particular configuration item, this method should simply return without doing anything. Note that some configuration items may simply be variable assignment; there's no real way to distinguish a variable assignment from a blessed configuration item.
Parameters:
  sectionName - the name of the configuration section wherethe item was found
Parameters:
  paramName - the name of the parameter
Parameters:
  config - the active configuration
Parameters:
  feedInfo - partially complete FeedInfo objectfor the feed. The URL is guaranteed to bepresent, but no other fields are. true to continue processing the feed,false to skip it
throws:
  CurnException - on error
See Also:   CurnConfig
See Also:   FeedInfo
See Also:   FeedInfo.getURL



runMainConfigItemPlugIn
public void runMainConfigItemPlugIn(String sectionName, String paramName, CurnConfig config) throws CurnException(Code)
Called immediately after curn has read and processed a configuration item in the main [curn] configuration section. All configuration items are passed, one by one, to each loaded plug-in. If a plug-in class is not interested in a particular configuration item, this method should simply return without doing anything. Note that some configuration items may simply be variable assignment; there's no real way to distinguish a variable assignment from a blessed configuration item.
Parameters:
  sectionName - the name of the configuration section wherethe item was found
Parameters:
  paramName - the name of the parameter
Parameters:
  config - the CurnConfig object
throws:
  CurnException - on error
See Also:   CurnConfig



runPostFeedParsePlugIn
public boolean runPostFeedParsePlugIn(FeedInfo feedInfo, FeedCache feedCache, RSSChannel channel) throws CurnException(Code)
Called immediately after a feed is parsed, but before it is otherwise processed. This method can return false to signal curn that the feed should be skipped. For instance, a plug-in that filters on the parsed feed data could use this method to weed out non-matching feeds before they are downloaded. Similarly, a plug-in that edits the parsed data (removing or editing individual items, for instance) could use method to do so.
Parameters:
  feedInfo - the FeedInfo object for the feed thathas been downloaded and parsed.
Parameters:
  feedCache - the feed cache
Parameters:
  channel - the parsed channel data true if curn should continue to process thefeed, false to skip the feed. A return value offalse aborts all further processing on the feed.In particular, curn will not pass the feed along toother plug-ins that have yet to be notified of this event.
throws:
  CurnException - on error
See Also:   RSSChannel
See Also:   FeedInfo



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.