Package org.opennms.systemreport
Interface SystemReportFormatter
-
- All Superinterfaces:
Comparable<SystemReportFormatter>
- All Known Implementing Classes:
AbstractSystemReportFormatter
,FtpSystemReportFormatter
,FullTextSystemReportFormatter
,TextSystemReportFormatter
,XmlSystemReportFormatter
,ZipSystemReportFormatter
public interface SystemReportFormatter extends Comparable<SystemReportFormatter>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
begin()
Indicates that report output will begin.boolean
canStdout()
Whether this formatter should be allowed to write to STDOUT.void
end()
Indicates that report output will end.String
getContentType()
The Content-Type that this formatter outputs.String
getDescription()
A short description of the format.String
getExtension()
The default extension to use when creating files if no output is specified.String
getName()
A short name for this format for use by UIs when presenting an option of which formatter to choose.boolean
needsOutputStream()
Whether or not this formatter needs to be given an output stream.void
setOutput(String output)
The output string as passed on the command-line.void
setOutputStream(OutputStream stream)
The output stream to use when writing data.void
write(SystemReportPlugin plugin)
Write the data from the specifiedSystemReportPlugin
.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getName
String getName()
A short name for this format for use by UIs when presenting an option of which formatter to choose.- Returns:
- the format name (eg, "text", "xml", etc.)
-
getDescription
String getDescription()
A short description of the format.- Returns:
- the description
-
getContentType
String getContentType()
The Content-Type that this formatter outputs. This can be null if the formatter does not produce a file (like the FtpSystemReportFormatter).- Returns:
- the content-type the formatter writes.
-
getExtension
String getExtension()
The default extension to use when creating files if no output is specified.- Returns:
- the extension
-
needsOutputStream
boolean needsOutputStream()
Whether or not this formatter needs to be given an output stream.
-
setOutput
void setOutput(String output)
The output string as passed on the command-line.
-
setOutputStream
void setOutputStream(OutputStream stream)
The output stream to use when writing data.- Parameters:
stream
-
-
write
void write(SystemReportPlugin plugin)
Write the data from the specifiedSystemReportPlugin
.- Parameters:
plugin
- the system report plugin which contains the data to write
-
begin
void begin()
Indicates that report output will begin.
-
end
void end()
Indicates that report output will end.
-
canStdout
boolean canStdout()
Whether this formatter should be allowed to write to STDOUT.
-
-