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
  • Field Details

    • data

      protected StatusData data
    • charset

      protected java.lang.String charset
      Charset, UTF-8 by default.
    • isAuth

      protected boolean isAuth
  • Constructor Details

    • StatusPage

      public StatusPage​(StatusData statusData, boolean isAuth)
      Constructor
      Parameters:
      statusData - StatusData object
  • Method Details

    • print

      public void print​(java.io.OutputStream os) throws java.io.IOException
      Print the status page into the given output stream. This function creates a PrintWriter for the output stream and calls print(PrintWriter).
      Parameters:
      os - Output stream
      Throws:
      java.io.IOException
    • print

      public void print​(java.io.PrintWriter pr) throws java.io.IOException
      Print 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)