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 class
StatusPage.PrintList<T>
This collection class that provides functions to print the items.protected class
StatusPage.PrintListOfActions
protected class
StatusPage.PrintListOfInfos
protected class
StatusPage.PrintListOfProperties
protected static class
StatusPage.PrintMode
Print mode. -
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
charset
Charset, UTF-8 by default.protected StatusData
data
protected boolean
isAuth
-
Constructor Summary
Constructors Constructor Description StatusPage(StatusData statusData, boolean isAuth)
Constructor -
Method Summary
Modifier and Type Method Description protected void
close(java.io.OutputStreamWriter wr, java.io.PrintWriter pr)
java.lang.String
getCharset()
Character set.protected void
open(java.io.OutputStream os, java.io.OutputStreamWriter[] rWriter, java.io.PrintWriter[] rPrinter)
void
print(java.io.OutputStream os)
Print the status page into the given output stream.void
print(java.io.PrintWriter pr)
Print status page with the given printer.protected void
printAction(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Action v)
protected void
printActions(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
protected void
printBody(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
protected void
printDocument(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
protected void
printInfo(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info v, StatusData.Info.Severity severity)
protected void
printInfos(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Info.Severity severity)
protected void
printProperties(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
protected void
printProperty(java.io.PrintWriter pr, StatusPage.PrintMode pstate, StatusData.Property v)
protected void
printStatus(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
protected void
printTitle(java.io.PrintWriter pr, StatusPage.PrintMode pstate)
void
setCharset(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 aPrintWriter
for 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)
-