|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.curn.ReadOnlyOutputHandler
public class ReadOnlyOutputHandler
Wrapper for an OutputHandler that renders it read-only, for
passing to plug-ins.
Curn,
OutputHandler,
PlugIn| Constructor Summary | |
|---|---|
ReadOnlyOutputHandler(OutputHandler outputHandler)
Create a new ReadOnlyOutputHandler that wraps the specified output handler. |
|
| Method Summary | |
|---|---|
void |
displayChannel(RSSChannel channel,
FeedInfo feedInfo)
Display the list of RSSItem news items to whatever output is defined for the underlying class. |
void |
flush()
Flush any buffered-up output and close the underlying output stream(s), if any. |
java.lang.String |
getContentType()
Get the content (i.e., MIME) type for output produced by this output handler. |
java.io.File |
getGeneratedOutput()
Get the File that represents the output produced by the handler, if applicable. |
java.lang.String |
getName()
Get the name of this output handler. |
java.lang.String |
getOutputEncoding()
Get the output encoding. |
boolean |
hasGeneratedOutput()
Determine whether this handler has produced any actual output (i.e., whether getGeneratedOutput() will return a non-null
InputStream if called). |
void |
init(CurnConfig config,
ConfiguredOutputHandler cfgHandler)
Initializes the output handler for another set of RSS channels. |
void |
setName(java.lang.String name)
Set the name of this output handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadOnlyOutputHandler(OutputHandler outputHandler)
outputHandler - the OutputHandler to wrap.| Method Detail |
|---|
public java.lang.String getName()
getName in interface OutputHandler
public void setName(java.lang.String name)
throws CurnException
setName in interface OutputHandlername - the name
CurnException - on error
public void init(CurnConfig config,
ConfiguredOutputHandler cfgHandler)
throws org.clapper.util.config.ConfigurationException,
CurnException
init in interface OutputHandlerconfig - the parsed curn configuration data. The
output handler is responsible for retrieving its
own parameters from the configuration, by calling
config.getOutputHandlerSpecificVariables()cfgHandler - the ConfiguredOutputHandler wrapper
containing this object; the wrapper has some useful
metadata, such as the object's configuration section
name and extra variables.
org.clapper.util.config.ConfigurationException - configuration error
CurnException - some other initialization errorCurnConfig,
ConfiguredOutputHandler
public void displayChannel(RSSChannel channel,
FeedInfo feedInfo)
throws CurnException
init() method.
Note: This version of init() throws an unconditional
exception.
displayChannel in interface OutputHandlerchannel - The parsed channel datafeedInfo - The feed.
CurnException - unable to write output
public void flush()
throws CurnException
flush in interface OutputHandlerCurnException - unable to write outputpublic java.lang.String getContentType()
getContentType in interface OutputHandlerhasGeneratedOutput(),
getGeneratedOutput()
public java.io.File getGeneratedOutput()
throws CurnException
getGeneratedOutput in interface OutputHandlerCurnException - an error occurredpublic java.lang.String getOutputEncoding()
getOutputEncoding in interface OutputHandlerpublic boolean hasGeneratedOutput()
getGeneratedOutput() will return a non-null
InputStream if called).
hasGeneratedOutput in interface OutputHandlergetGeneratedOutput(),
getContentType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||