|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectConfiguration
org.clapper.curn.CurnConfig
public class CurnConfig
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.
| Field Summary | |
|---|---|
static java.lang.String |
CFG_ALLOW_EMBEDDED_HTML
Configuration variable: allow embedded HTML. |
static int |
DEF_DAYS_TO_CACHE
Default values |
static int |
DEF_MAX_THREADS
|
static boolean |
DEF_NO_CACHE_UPDATE
|
static java.lang.String |
DEF_PARSER_CLASS_NAME
|
static boolean |
DEF_SAVE_ONLY
|
static boolean |
DEF_SHOW_RSS_VERSION
|
static java.lang.String |
MAIN_SECTION
Main section name |
static java.lang.String |
NO_LIMIT_VALUE
Others |
static java.lang.String |
VAR_CLASS
|
static java.lang.String |
VAR_DAYS_TO_CACHE
|
static java.lang.String |
VAR_DISABLED
|
static java.lang.String |
VAR_FEED_URL
|
static java.lang.String |
VAR_FORCE_CHAR_ENCODING
|
static java.lang.String |
VAR_FORCE_ENCODING
|
static java.lang.String |
VAR_MAIL_SUBJECT
|
static java.lang.String |
VAR_MAX_THREADS
|
static java.lang.String |
VAR_NO_CACHE_UPDATE
Variable names |
static java.lang.String |
VAR_PARSER_CLASS_NAME
|
static java.lang.String |
VAR_SHOW_RSS_VERSION
|
| Method Summary | |
|---|---|
java.lang.String |
getDeprecatedParamMessage(java.lang.String badParam,
java.lang.String goodParam)
Utility method that retrieves a "deprecated parameter" warning. |
java.util.Map<java.net.URL,FeedInfo> |
getFeedInfoMap()
Get the FeedInfo map. |
java.util.Collection<FeedInfo> |
getFeeds()
Get the configured RSS feeds. |
int |
getMaxThreads()
Get the maximum number of concurrent threads to spawn when retrieving RSS feeds. |
java.util.Collection<ConfiguredOutputHandler> |
getOutputHandlers()
Gets the list of output handlers from the configuration, in the order they appeared in the configuration. |
java.lang.String |
getRSSParserClassName()
Get the name of the RSS parser class to use. |
boolean |
hasFeed(java.net.URL url)
Determine whether the specified URL is one of the configured RSS feeds. |
void |
load(java.io.File file)
Load configuration from a file. |
void |
load(java.io.InputStream iStream)
Load configuration from an open InputStream. |
void |
load(java.lang.String path)
Load configuration from a path. |
void |
load(java.net.URL url)
Load configuration from a URL. |
boolean |
mustUpdateFeedMetadata()
Determine whether the cache should be updated. |
void |
setMaxThreads(int newValue)
Set the maximum number of concurrent threads to spawn when retrieving RSS feeds. |
void |
setMustUpdateFeedMetadata(boolean val)
Change the "update cache" flag. |
void |
setShowRSSVersionFlag(boolean val)
Set the value of the "show RSS version" flag. |
boolean |
showRSSVersion()
Return the value of "show RSS version" flag. |
int |
totalOutputHandlers()
Return the total number of configured output handlers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VAR_NO_CACHE_UPDATE
public static final java.lang.String VAR_MAIL_SUBJECT
public static final java.lang.String VAR_DAYS_TO_CACHE
public static final java.lang.String VAR_PARSER_CLASS_NAME
public static final java.lang.String VAR_SHOW_RSS_VERSION
public static final java.lang.String VAR_FEED_URL
public static final java.lang.String VAR_CLASS
public static final java.lang.String VAR_MAX_THREADS
public static final java.lang.String VAR_FORCE_ENCODING
public static final java.lang.String VAR_FORCE_CHAR_ENCODING
public static final java.lang.String VAR_DISABLED
public static final java.lang.String CFG_ALLOW_EMBEDDED_HTML
public static final int DEF_DAYS_TO_CACHE
public static final boolean DEF_NO_CACHE_UPDATE
public static final boolean DEF_SHOW_RSS_VERSION
public static final boolean DEF_SAVE_ONLY
public static final java.lang.String DEF_PARSER_CLASS_NAME
public static final int DEF_MAX_THREADS
public static final java.lang.String NO_LIMIT_VALUE
public static final java.lang.String MAIN_SECTION
| Method Detail |
|---|
public java.lang.String getRSSParserClassName()
public java.util.Collection<ConfiguredOutputHandler> getOutputHandlers()
public int totalOutputHandlers()
public boolean mustUpdateFeedMetadata()
setMustUpdateFeedMetadata(boolean)public int getMaxThreads()
setMaxThreads(int)
public void setMaxThreads(int newValue)
throws ConfigurationException
newValue - the maximum number of threads
ConfigurationException - bad valuegetMaxThreads()public void setMustUpdateFeedMetadata(boolean val)
val - true if the cache should be updated, false
if it should notmustUpdateFeedMetadata()public boolean showRSSVersion()
setShowRSSVersionFlag(boolean)public void setShowRSSVersionFlag(boolean val)
val - true to set the flag,
false to clear itshowRSSVersion()public java.util.Collection<FeedInfo> getFeeds()
hasFeed(java.net.URL),
getFeedInfoMap()public boolean hasFeed(java.net.URL url)
url - the URL
getFeeds(),
getFeedInfoMap()public java.util.Map<java.net.URL,FeedInfo> getFeedInfoMap()
FeedInfo map.
FeedInfo objects, indexed by
channel (or feed) URL.getFeeds(),
hasFeed(java.net.URL),
FeedInfo
public java.lang.String getDeprecatedParamMessage(java.lang.String badParam,
java.lang.String goodParam)
badParam - the deprecated parametergoodParam - the parameter that should be used, or null for none
public void load(java.lang.String path)
throws java.io.FileNotFoundException,
java.io.IOException,
ConfigurationException
path - the path
java.io.IOException - read error
ConfigurationException - parse error
java.io.FileNotFoundException
public void load(java.io.InputStream iStream)
throws java.io.IOException,
ConfigurationException
iStream - open input stream
java.io.IOException - read error
ConfigurationException - parse error
public void load(java.net.URL url)
throws java.io.IOException,
ConfigurationException
url - the URL
java.io.IOException - read error
ConfigurationException - parse error
public void load(java.io.File file)
throws java.io.IOException,
ConfigurationException
file - the file
java.io.IOException - read error
ConfigurationException - parse error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||