| java.lang.Object org.clapper.curn.plugins.RawFeedSaveAsPlugIn
RawFeedSaveAsPlugIn | public class RawFeedSaveAsPlugIn implements FeedConfigItemPlugIn,PostConfigPlugIn,PostFeedDownloadPlugIn(Code) | | The RawFeedSaveAsPlugIn handles saving a feed to a known location.
It intercepts the following per-feed configuration parameters:
SaveAs |
Path to file where raw XML should be saved. |
SaveOnly |
If set to "true", this parameter indicates that raw XML should be
saved, but not parsed. This parameter can only be specified if
SaveAs is also specified. |
SaveAsEncoding |
The character set encoding to use when saving the file. Default:
"utf-8" |
version: $Revision: 7041 $ |
Inner Class :class FeedSaveInfo | |
RawFeedSaveAsPlugIn | public RawFeedSaveAsPlugIn()(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 |
runPostFeedDownloadPlugIn | public boolean runPostFeedDownloadPlugIn(FeedInfo feedInfo, File feedDataFile, String encoding) throws CurnException(Code) | | Called immediately after a feed is downloaded. This method can
return false to signal curn that the feed should be
skipped. For instance, a plug-in that filters on the unparsed XML
feed content could use this method to weed out non-matching feeds
before they are downloaded.
Parameters: feedInfo - the FeedInfo object for the feed thathas been downloaded Parameters: feedDataFile - the file containing the downloaded, unparsed feedXML. curn may delete this file after allplug-ins are notified! Parameters: encoding - the encoding used to store the data in the file,or null for the default 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: FeedInfo |
|
|