DBWeb
Class ErrRecord

java.lang.Object
  |
  +--DBWeb.ErrRecord

public class ErrRecord
extends java.lang.Object

A utility class that represents errors accumulated in checking a user's input form. In addition, it also stores warnings, separately. Every warning or error has a (String) key and a (String) value. Multiple values for the same key are collected together.


Constructor Summary
ErrRecord()
           
 
Method Summary
 void add(java.lang.String field, java.lang.Exception e)
           
 void add(java.lang.String field, java.lang.String msg)
          Adds the msg to messages associated with field.
 void addWarning(java.lang.String field, java.lang.String msg)
          Adds (as warning) the msg to messages associated with field.
 boolean isEmpty()
           
 boolean isOK()
          isOK() says whether there are no errors accumulated.
 java.lang.String toHtml()
           
 java.lang.String toHtml(java.lang.String colorSpec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrRecord

public ErrRecord()
Method Detail

isOK

public boolean isOK()
isOK() says whether there are no errors accumulated. Note: Warnings do not count as errors.


isEmpty

public boolean isEmpty()

add

public void add(java.lang.String field,
                java.lang.String msg)
Adds the msg to messages associated with field. If there is already an entry for field, we simply expand it. Otherwise, create one.


add

public void add(java.lang.String field,
                java.lang.Exception e)

addWarning

public void addWarning(java.lang.String field,
                       java.lang.String msg)
Adds (as warning) the msg to messages associated with field. If there is already an entry for field, we simply expand it. Otherwise, create one.


toHtml

public java.lang.String toHtml()

toHtml

public java.lang.String toHtml(java.lang.String colorSpec)