| java.lang.Object org.clapper.curn.plugins.SaveAsRSSPlugIn
SaveAsRSSPlugIn | public class SaveAsRSSPlugIn implements FeedConfigItemPlugIn,PostConfigPlugIn,PostFeedParsePlugIn(Code) | | The SaveAsRSSPlugIn acts sort of like a single-feed output
handler: It takes a feed that's been parsed, converts the parsed data to RSS
or Atom format, and writes it to a file. It differs from an output handler in
that an output handler must handle multiple feeds, whereas this plug-in
handles a single feed at a time.
This plug-in intercepts the following per-feed configuration
parameters:
SaveAsRSS [options] path |
path is the path to the file to receive the RSS output.
Options:
- -t type (or --type type)
is the type of RSS output to generate. Currently, the legal
values for the type argument are: "rss1", "rss2", "atom".
If not specified, this option defaults to "atom".
- -b backups (or --backups backups)
specifies how many backups of path to retain. Default: 0
- -e encoding (or --encoding encoding
is encoding to use for the file. It defaults to "utf-8".
Examples:
SaveAsRSS: -t rss1 -b 3 -e iso-8859-1 ${user.home:.curn}/rss/foo.xml
SaveAsRSS: --type atom --encoding utf16 C:/temp/foo.xml
|
SaveRSSOnly |
If set to "true", this parameter indicates that the RSS file should
generated, but that all further processing on the feed should be
skip. In particular, the feed won't be passed to any other plug-ins,
and it won't be passed to any output handlers. This parameter cannot
be specified unless SaveAsRSS is also specified. |
Note: If this plug-in is used in conjunction with the
RawFeedSaveAsPlugIn class, and the
RawFeedSaveAsPlugIn class's SaveOnly parameter is specified, this plug-in will
not be invoked.
version: $Revision: 7041 $ |
Inner Class :class FeedSaveInfo | |
Constructor Summary | |
public | SaveAsRSSPlugIn() Default constructor (required). |
SaveAsRSSPlugIn | public SaveAsRSSPlugIn()(Code) | | Default constructor (required).
|
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 |
runPostConfigPlugIn | public void runPostConfigPlugIn(CurnConfig config) throws CurnException(Code) | | Called after the entire configuration has been read and parsed, but
before any feeds are processed. Intercepting this event is useful
for plug-ins that want to adjust the configuration. For instance,
the curn command-line wrapper intercepts this plug-in event
so it can adjust the configuration to account for command line
options.
Parameters: config - the parsed CurnConfig object throws: CurnException - on error See Also: CurnConfig |
runPostFeedParsePlugIn | public boolean runPostFeedParsePlugIn(FeedInfo feedInfo, FeedCache feedCache, RSSChannel channel) throws CurnException(Code) | | Called just after the feed has been parsed, but before it is
otherwise processed.
Parameters: feedInfo - the FeedInfo object for the feed Parameters: feedCache - the feed cache Parameters: channel - the parsed feed data true if curn should continue to process thefeed, false to skip the feed throws: CurnException - on error See Also: FeedInfo See Also: RSSChannel |
|
|