Package de.elo.utils.webapp.status
Class StatusPage
java.lang.Object
de.elo.utils.webapp.status.StatusPage
- Direct Known Subclasses:
StatusPageHtml,StatusPageText
public abstract class StatusPage
extends java.lang.Object
This class provides general functionality to print an StatusData object.
- See Also:
StatusPageHtml,StatusPageText
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classStatusPage.PrintList<T>This collection class that provides functions to print the items.protected classStatusPage.PrintListOfActionsprotected classStatusPage.PrintListOfInfosprotected classStatusPage.PrintListOfPropertiesprotected static classStatusPage.PrintModePrint mode. -
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcharsetCharset, UTF-8 by default.protected StatusDatadataprotected booleanisAuth -
Constructor Summary
Constructors Constructor Description StatusPage(StatusData statusData, boolean isAuth)Constructor -
Method Summary
Modifier and Type Method Description protected voidclose(java.io.OutputStreamWriter wr, java.io.PrintWriter pr)java.lang.StringgetCharset()Character set.protected voidopen(java.io.OutputStream os, java.io.OutputStreamWriter[] rWriter, java.io.PrintWriter[] rPrinter)voidprint(java.io.OutputStream os)Print the status page into the given output stream.voidprint(java.io.PrintWriter pr)Print status page with the given printer.protected voidprintAction(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Action v)protected voidprintActions(java.io.PrintWriter pr, StatusPage.PrintMode pstate)protected voidprintBody(java.io.PrintWriter pr, StatusPage.PrintMode pstate)protected voidprintDocument(java.io.PrintWriter pr, StatusPage.PrintMode pstate)protected voidprintInfo(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info v, StatusData.Info.Severity severity)protected voidprintInfos(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info.Severity severity)protected voidprintProperties(java.io.PrintWriter pr, StatusPage.PrintMode pstate)protected voidprintProperty(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Property v)protected voidprintStatus(java.io.PrintWriter pr, StatusPage.PrintMode pstate)protected voidprintTitle(java.io.PrintWriter pr, StatusPage.PrintMode pstate)voidsetCharset(java.lang.String v)Character set.
-
Field Details
-
Constructor Details
-
StatusPage
Constructor- Parameters:
statusData- StatusData object
-
-
Method Details
-
print
public void print(java.io.OutputStream os) throws java.io.IOExceptionPrint the status page into the given output stream. This function creates aPrintWriterfor the output stream and callsprint(PrintWriter).- Parameters:
os- Output stream- Throws:
java.io.IOException
-
print
public void print(java.io.PrintWriter pr) throws java.io.IOExceptionPrint status page with the given printer.- Parameters:
pr- PrintWriter- Throws:
java.io.IOException
-
getCharset
public java.lang.String getCharset()Character set. Default: UTF-8- Returns:
- value
-
setCharset
public void setCharset(java.lang.String v)Character set. Default: UTF-8- Parameters:
v- value
-
printDocument
protected void printDocument(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
printBody
protected void printBody(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
printStatus
protected void printStatus(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
printTitle
protected void printTitle(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
printProperty
protected void printProperty(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Property v) throws java.io.IOException- Throws:
java.io.IOException
-
printProperties
protected void printProperties(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
printInfo
protected void printInfo(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info v, StatusData.Info.Severity severity) throws java.io.IOException- Throws:
java.io.IOException
-
printInfos
protected void printInfos(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info.Severity severity) throws java.io.IOException- Throws:
java.io.IOException
-
printAction
protected void printAction(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Action v) throws java.io.IOException- Throws:
java.io.IOException
-
printActions
protected void printActions(java.io.PrintWriter pr, StatusPage.PrintMode pstate) throws java.io.IOException- Throws:
java.io.IOException
-
open
protected void open(java.io.OutputStream os, java.io.OutputStreamWriter[] rWriter, java.io.PrintWriter[] rPrinter) throws java.io.UnsupportedEncodingException- Throws:
java.io.UnsupportedEncodingException
-
close
protected void close(java.io.OutputStreamWriter wr, java.io.PrintWriter pr)
-