org.clapper.curn.plugins
Class EmailOutputPlugIn

java.lang.Object
  extended by org.clapper.curn.plugins.EmailOutputPlugIn
All Implemented Interfaces:
MainConfigItemPlugIn, PlugIn, PostOutputPlugIn

public class EmailOutputPlugIn
extends java.lang.Object
implements MainConfigItemPlugIn, PostOutputPlugIn

The EmailOutputPlugIn handles emailing the output from a curn run, if one or more email addresses are specified in the configuration file. It intercepts the following main ([curn]) section configuration parameters:

Parameter Meaning Default
MailOutputTo One or more comma- or blank-separated email addresses to receive an email containing the output. None
MailFrom The email address to use as the sender of the message. The user running curn, and the current machine.
MailSubject The subject to use for email messages. "RSS Feeds"

Version:
$Revision: 6491 $

Constructor Summary
EmailOutputPlugIn()
          Default constructor (required).
 
Method Summary
 java.lang.String getPlugInName()
          Get a displayable name for the plug-in.
 java.lang.String getPlugInSortKey()
          Get the sort key for this plug-in.
 void initPlugIn()
          Initialize the plug-in.
 void runMainConfigItemPlugIn(java.lang.String sectionName, java.lang.String paramName, CurnConfig config)
          Called immediately after curn has read and processed a configuration item in the main [curn] configuration section.
 void runPostOutputPlugIn(java.util.Collection<OutputHandler> outputHandlers)
          Called after curn has flushed all output handlers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailOutputPlugIn

public EmailOutputPlugIn()
Default constructor (required).

Method Detail

getPlugInName

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

Specified by:
getPlugInName in interface PlugIn
Returns:
the name

getPlugInSortKey

public java.lang.String getPlugInSortKey()
Get the sort key for this plug-in.

Specified by:
getPlugInSortKey in interface PlugIn
Returns:
the sort key string.

initPlugIn

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

Specified by:
initPlugIn in interface PlugIn
Throws:
CurnException - on error

runMainConfigItemPlugIn

public void runMainConfigItemPlugIn(java.lang.String sectionName,
                                    java.lang.String paramName,
                                    CurnConfig config)
                             throws CurnException
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.

Specified by:
runMainConfigItemPlugIn in interface MainConfigItemPlugIn
Parameters:
sectionName - the name of the configuration section where the item was found
paramName - the name of the parameter
config - the CurnConfig object
Throws:
CurnException - on error
See Also:
CurnConfig

runPostOutputPlugIn

public void runPostOutputPlugIn(java.util.Collection<OutputHandler> outputHandlers)
                         throws CurnException
Called after curn has flushed all output handlers. A post-output plug-in is a useful place to consolidate the output from all output handlers. For instance, such a plug-in might pack all the output into a zip file, or email it.

Specified by:
runPostOutputPlugIn in interface PostOutputPlugIn
Parameters:
outputHandlers - a Collection of the OutputHandler objects (useful for obtaining the output files, for instance).
Throws:
CurnException - on error
See Also:
OutputHandler


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.