Java Doc for CurnConfig.java in  » RSS-RDF » curn » org » clapper » curn » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.clapper.curn.CurnConfig

CurnConfig
public class CurnConfig extends Configuration (Code)

CurnConfig uses the Configuration class (part of the clapper.org Java Utility library) to parse and validate the curn configuration file, holding the results in memory for easy access.


version:
   $Revision: 7041 $


Field Summary
final public static  StringCFG_ALLOW_EMBEDDED_HTML
     Configuration variable: allow embedded HTML.
final public static  intDEF_DAYS_TO_CACHE
    
final public static  intDEF_MAX_THREADS
    
final public static  booleanDEF_NO_CACHE_UPDATE
    
final public static  StringDEF_PARSER_CLASS_NAME
    
final public static  booleanDEF_SAVE_ONLY
    
final public static  booleanDEF_SHOW_RSS_VERSION
    
final public static  StringMAIN_SECTION
    
final public static  StringNO_LIMIT_VALUE
    
final public static  StringVAR_CLASS
    
final public static  StringVAR_DAYS_TO_CACHE
    
final public static  StringVAR_DISABLED
    
final public static  StringVAR_FEED_URL
    
final public static  StringVAR_FORCE_CHAR_ENCODING
    
final public static  StringVAR_FORCE_ENCODING
    
final public static  StringVAR_MAIL_SUBJECT
    
final public static  StringVAR_MAX_THREADS
    
final public static  StringVAR_NO_CACHE_UPDATE
    
final public static  StringVAR_PARSER_CLASS_NAME
    
final public static  StringVAR_SHOW_RSS_VERSION
    

Constructor Summary
 CurnConfig(PrintWriter err)
     Construct an CurnConfig object.

Method Summary
public  StringgetDeprecatedParamMessage(String badParam, String goodParam)
     Utility method that retrieves a "deprecated parameter" warning.
public  Map<URL, FeedInfo>getFeedInfoMap()
     Get the FeedInfo map.
public  Collection<FeedInfo>getFeeds()
     Get the configured RSS feeds.
public  intgetMaxThreads()
     Get the maximum number of concurrent threads to spawn when retrieving RSS feeds.
public  Collection<ConfiguredOutputHandler>getOutputHandlers()
     Gets the list of output handlers from the configuration, in the order they appeared in the configuration. an unmodifiable Collection ofConfiguredOutputHandler objects.
public  StringgetRSSParserClassName()
     Get the name of the RSS parser class to use.
public  booleanhasFeed(URL url)
     Determine whether the specified URL is one of the configured RSS feeds.
public  voidload(String path)
     Load configuration from a path.
public  voidload(InputStream iStream)
     Load configuration from an open InputStream.
public  voidload(URL url)
     Load configuration from a URL.
public  voidload(File file)
     Load configuration from a file.
public  booleanmustUpdateFeedMetadata()
     Determine whether the cache should be updated.
public  voidsetMaxThreads(int newValue)
     Set the maximum number of concurrent threads to spawn when retrieving RSS feeds.
public  voidsetMustUpdateFeedMetadata(boolean val)
     Change the "update cache" flag.
public  voidsetShowRSSVersionFlag(boolean val)
     Set the value of the "show RSS version" flag.
public  booleanshowRSSVersion()
     Return the value of "show RSS version" flag.
public  inttotalOutputHandlers()
     Return the total number of configured output handlers.

Field Detail
CFG_ALLOW_EMBEDDED_HTML
final public static String CFG_ALLOW_EMBEDDED_HTML(Code)
Configuration variable: allow embedded HTML. Not used here. Used by a plug-in and by output handlers.



DEF_DAYS_TO_CACHE
final public static int DEF_DAYS_TO_CACHE(Code)
Default values



DEF_MAX_THREADS
final public static int DEF_MAX_THREADS(Code)



DEF_NO_CACHE_UPDATE
final public static boolean DEF_NO_CACHE_UPDATE(Code)



DEF_PARSER_CLASS_NAME
final public static String DEF_PARSER_CLASS_NAME(Code)



DEF_SAVE_ONLY
final public static boolean DEF_SAVE_ONLY(Code)



DEF_SHOW_RSS_VERSION
final public static boolean DEF_SHOW_RSS_VERSION(Code)



MAIN_SECTION
final public static String MAIN_SECTION(Code)
Main section name



NO_LIMIT_VALUE
final public static String NO_LIMIT_VALUE(Code)
Others



VAR_CLASS
final public static String VAR_CLASS(Code)



VAR_DAYS_TO_CACHE
final public static String VAR_DAYS_TO_CACHE(Code)



VAR_DISABLED
final public static String VAR_DISABLED(Code)



VAR_FEED_URL
final public static String VAR_FEED_URL(Code)



VAR_FORCE_CHAR_ENCODING
final public static String VAR_FORCE_CHAR_ENCODING(Code)



VAR_FORCE_ENCODING
final public static String VAR_FORCE_ENCODING(Code)



VAR_MAIL_SUBJECT
final public static String VAR_MAIL_SUBJECT(Code)



VAR_MAX_THREADS
final public static String VAR_MAX_THREADS(Code)



VAR_NO_CACHE_UPDATE
final public static String VAR_NO_CACHE_UPDATE(Code)
Variable names



VAR_PARSER_CLASS_NAME
final public static String VAR_PARSER_CLASS_NAME(Code)



VAR_SHOW_RSS_VERSION
final public static String VAR_SHOW_RSS_VERSION(Code)




Constructor Detail
CurnConfig
CurnConfig(PrintWriter err)(Code)
Construct an CurnConfig object. You must call one of the CurnConfig.load(File) methods to load the configuration.
Parameters:
  err - where to write errors




Method Detail
getDeprecatedParamMessage
public String getDeprecatedParamMessage(String badParam, String goodParam)(Code)
Utility method that retrieves a "deprecated parameter" warning.
Parameters:
  badParam - the deprecated parameter
Parameters:
  goodParam - the parameter that should be used, or null for none the message



getFeedInfoMap
public Map<URL, FeedInfo> getFeedInfoMap()(Code)
Get the FeedInfo map. A Map of FeedInfo objects, indexed bychannel (or feed) URL.
See Also:   CurnConfig.getFeeds
See Also:   CurnConfig.hasFeed
See Also:   FeedInfo



getFeeds
public Collection<FeedInfo> getFeeds()(Code)
Get the configured RSS feeds. The feeds are returned in the order they were specified in the configuration file. a Collection of FeedInfo objects.
See Also:   CurnConfig.hasFeed
See Also:   CurnConfig.getFeedInfoMap



getMaxThreads
public int getMaxThreads()(Code)
Get the maximum number of concurrent threads to spawn when retrieving RSS feeds. the maximum number of threads
See Also:   CurnConfig.setMaxThreads



getOutputHandlers
public Collection<ConfiguredOutputHandler> getOutputHandlers()(Code)
Gets the list of output handlers from the configuration, in the order they appeared in the configuration. an unmodifiable Collection ofConfiguredOutputHandler objects. The collection willbe empty, but never null, if no output handlers were configured.



getRSSParserClassName
public String getRSSParserClassName()(Code)
Get the name of the RSS parser class to use. The caller is responsible for loading the returned class name and verifying that it implements the appropriate interface(s). the full class name



hasFeed
public boolean hasFeed(URL url)(Code)
Determine whether the specified URL is one of the configured RSS feeds.
Parameters:
  url - the URL true if it's there, false if not
See Also:   CurnConfig.getFeeds
See Also:   CurnConfig.getFeedInfoMap()



load
public void load(String path) throws FileNotFoundException, IOException, ConfigurationException(Code)
Load configuration from a path. Any existing data is discarded.
Parameters:
  path - the path
throws:
  IOException - read error
throws:
  ConfigurationException - parse error



load
public void load(InputStream iStream) throws IOException, ConfigurationException(Code)
Load configuration from an open InputStream. Any existing data is discarded.
Parameters:
  iStream - open input stream
throws:
  IOException - read error
throws:
  ConfigurationException - parse error



load
public void load(URL url) throws IOException, ConfigurationException(Code)
Load configuration from a URL. Any existing data is discarded.
Parameters:
  url - the URL
throws:
  IOException - read error
throws:
  ConfigurationException - parse error



load
public void load(File file) throws IOException, ConfigurationException(Code)
Load configuration from a file. Any existing data is discarded.
Parameters:
  file - the file
throws:
  IOException - read error
throws:
  ConfigurationException - parse error



mustUpdateFeedMetadata
public boolean mustUpdateFeedMetadata()(Code)
Determine whether the cache should be updated. true if the cache should be updated, falseif it should not.
See Also:   CurnConfig.setMustUpdateFeedMetadata



setMaxThreads
public void setMaxThreads(int newValue) throws ConfigurationException(Code)
Set the maximum number of concurrent threads to spawn when retrieving RSS feeds.
Parameters:
  newValue - the maximum number of threads
throws:
  ConfigurationException - bad value
See Also:   CurnConfig.getMaxThreads



setMustUpdateFeedMetadata
public void setMustUpdateFeedMetadata(boolean val)(Code)
Change the "update cache" flag.
Parameters:
  val - true if the cache should be updated, falseif it should not
See Also:   CurnConfig.mustUpdateFeedMetadata



setShowRSSVersionFlag
public void setShowRSSVersionFlag(boolean val)(Code)
Set the value of the "show RSS version" flag.
Parameters:
  val - true to set the flag,false to clear it
See Also:   CurnConfig.showRSSVersion



showRSSVersion
public boolean showRSSVersion()(Code)
Return the value of "show RSS version" flag. true if flag is set, false if it isn't
See Also:   CurnConfig.setShowRSSVersionFlag



totalOutputHandlers
public int totalOutputHandlers()(Code)
Return the total number of configured output handlers. the total number of configured output handlers, or 0 if therearen't any



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