AHA
Class Messages

java.lang.Object
  |
  +--AHA.Messages

public class Messages
extends java.lang.Object

Messages contains common routines for creating headers, footers, and error messages.


Constructor Summary
Messages()
          The default constructor does nothing.
Messages(AHA AHA)
          The standard constructor only initializes the AHA context.
 
Method Summary
static void dumpFatal(java.io.PrintWriter out, java.lang.String message)
           
 void Error(java.lang.String message)
          This method prints out an error message (after a minimal header).
 void Fatal(java.lang.String message)
          This method prints out a fatal error message, after a minimal header.
 void initHeader()
          This method generates the required header for every HTML page.
 java.lang.StringBuffer printBodyTag()
          This method generates the body tag in case we do not wish to print a header.
 java.lang.StringBuffer printEndBodyTag()
          This method generates a /body tag, for the case where no visible footer is desired.
 void printSimpleFooter()
          This method dumps a HTML-close (/html) tag.
 void printSimpleHeader()
          This method generates a minimal HTML header with a title for an error message.
 void relocation(java.lang.String Url)
          This method generates an HTTP relocation header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
The default constructor does nothing. It is not allowed but at this stage nothing is set up to throw exceptions yet.

Messages

public Messages(AHA AHA)
The standard constructor only initializes the AHA context. All other fields must be set later.
Method Detail

printSimpleHeader

public void printSimpleHeader()
This method generates a minimal HTML header with a title for an error message.

printSimpleFooter

public void printSimpleFooter()
This method dumps a HTML-close (/html) tag.

initHeader

public void initHeader()
This method generates the required header for every HTML page. It does not show visible output in the BODY of the document. It needs the user model to initialize the style sheet with link colors. The Course, HtDocs, Icons and Background are needed to set the background image. The Title is needed in the header. This method is only called by AhaServlet, because it must be done for all servlets.

printBodyTag

public java.lang.StringBuffer printBodyTag()
This method generates the body tag in case we do not wish to print a header.

printEndBodyTag

public java.lang.StringBuffer printEndBodyTag()
This method generates a /body tag, for the case where no visible footer is desired.

relocation

public void relocation(java.lang.String Url)
This method generates an HTTP relocation header. It may be used by the CGI version but not by the Servlet version.

Error

public void Error(java.lang.String message)
This method prints out an error message (after a minimal header).

Fatal

public void Fatal(java.lang.String message)
This method prints out a fatal error message, after a minimal header.

dumpFatal

public static void dumpFatal(java.io.PrintWriter out,
                             java.lang.String message)