Class FtpSystemReportFormatter
- java.lang.Object
-
- org.opennms.systemreport.formatters.AbstractSystemReportFormatter
-
- org.opennms.systemreport.formatters.FtpSystemReportFormatter
-
- All Implemented Interfaces:
java.lang.Comparable<SystemReportFormatter>
,SystemReportFormatter
public class FtpSystemReportFormatter extends AbstractSystemReportFormatter implements SystemReportFormatter
-
-
Field Summary
-
Fields inherited from class org.opennms.systemreport.formatters.AbstractSystemReportFormatter
m_outputStream
-
-
Constructor Summary
Constructors Constructor Description FtpSystemReportFormatter()
-
Method Summary
All Methods Instance Methods Concrete 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.java.lang.String
getContentType()
The Content-Type that this formatter outputs.java.lang.String
getDescription()
A short description of the format.java.lang.String
getExtension()
The default extension to use when creating files if no output is specified.java.lang.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
write(SystemReportPlugin plugin)
Write the data from the specifiedSystemReportPlugin
.-
Methods inherited from class org.opennms.systemreport.formatters.AbstractSystemReportFormatter
compareTo, getOutput, getOutputStream, getResourceText, hasDisplayable, isDisplayable, isFile, setOutput, setOutputStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.systemreport.SystemReportFormatter
setOutput, setOutputStream
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:SystemReportFormatter
A short name for this format for use by UIs when presenting an option of which formatter to choose.- Specified by:
getName
in interfaceSystemReportFormatter
- Overrides:
getName
in classAbstractSystemReportFormatter
- Returns:
- the format name (eg, "text", "xml", etc.)
-
getDescription
public java.lang.String getDescription()
Description copied from interface:SystemReportFormatter
A short description of the format.- Specified by:
getDescription
in interfaceSystemReportFormatter
- Overrides:
getDescription
in classAbstractSystemReportFormatter
- Returns:
- the description
-
getContentType
public java.lang.String getContentType()
Description copied from interface:SystemReportFormatter
The Content-Type that this formatter outputs. This can be null if the formatter does not produce a file (like the FtpSystemReportFormatter).- Specified by:
getContentType
in interfaceSystemReportFormatter
- Returns:
- the content-type the formatter writes.
-
getExtension
public java.lang.String getExtension()
Description copied from interface:SystemReportFormatter
The default extension to use when creating files if no output is specified.- Specified by:
getExtension
in interfaceSystemReportFormatter
- Returns:
- the extension
-
canStdout
public boolean canStdout()
Description copied from interface:SystemReportFormatter
Whether this formatter should be allowed to write to STDOUT.- Specified by:
canStdout
in interfaceSystemReportFormatter
-
needsOutputStream
public boolean needsOutputStream()
Description copied from interface:SystemReportFormatter
Whether or not this formatter needs to be given an output stream.- Specified by:
needsOutputStream
in interfaceSystemReportFormatter
- Overrides:
needsOutputStream
in classAbstractSystemReportFormatter
-
begin
public void begin()
Description copied from interface:SystemReportFormatter
Indicates that report output will begin.- Specified by:
begin
in interfaceSystemReportFormatter
- Overrides:
begin
in classAbstractSystemReportFormatter
-
write
public void write(SystemReportPlugin plugin)
Description copied from interface:SystemReportFormatter
Write the data from the specifiedSystemReportPlugin
.- Specified by:
write
in interfaceSystemReportFormatter
- Overrides:
write
in classAbstractSystemReportFormatter
- Parameters:
plugin
- the system report plugin which contains the data to write
-
end
public void end()
Description copied from interface:SystemReportFormatter
Indicates that report output will end.- Specified by:
end
in interfaceSystemReportFormatter
- Overrides:
end
in classAbstractSystemReportFormatter
-
-