com.jp.protection.priv.pro.parser
Class OrderParser.Error

java.lang.Object
  extended by com.jp.protection.priv.pro.parser.OrderParser.Error
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
OrderParser.PropertyError
Enclosing class:
OrderParser

public static class OrderParser.Error
extends java.lang.Object
implements java.lang.Comparable

Represents an error which occurred during the order parsing


Field Summary
protected  java.lang.String fHTMLMessage
           
protected  java.lang.String fMessage
           
protected  int fSeverity
           
static int SEVERITY_HIGH
          Defines high severity constant
static int SEVERITY_LOW
          Defines low severity constant
static int SEVERITY_MEDIUM
          Defines medium severity constant
 
Constructor Summary
OrderParser.Error(java.lang.String aMessage)
          Creates and initializes an new Error instance with default SEVERITY_MEDIUM severity value
OrderParser.Error(java.lang.String aMessage, int aSeverity)
          Creates and initializes an new Error instance
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String getHTMLMessage()
          Returns HTML representation of the error
 java.lang.String getMessage()
          Returns message
 int getSeverity()
          Returns severity value
 void setHTMLMessage(java.lang.String aHTMLMessage)
          Specifies HTML representation of the error
 java.lang.String toHTML()
          Formats and returns message as HTML if HTML message was not specified; otherwise simply returns HTML message value
 java.lang.String toString()
          Returns textual representation of the error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEVERITY_LOW

public static final int SEVERITY_LOW
Defines low severity constant

See Also:
Constant Field Values

SEVERITY_MEDIUM

public static final int SEVERITY_MEDIUM
Defines medium severity constant

See Also:
Constant Field Values

SEVERITY_HIGH

public static final int SEVERITY_HIGH
Defines high severity constant

See Also:
Constant Field Values

fMessage

protected java.lang.String fMessage

fSeverity

protected int fSeverity

fHTMLMessage

protected java.lang.String fHTMLMessage
Constructor Detail

OrderParser.Error

public OrderParser.Error(java.lang.String aMessage,
                         int aSeverity)
Creates and initializes an new Error instance

Parameters:
aMessage - an error message
aSeverity - an error severity

OrderParser.Error

public OrderParser.Error(java.lang.String aMessage)
Creates and initializes an new Error instance with default SEVERITY_MEDIUM severity value

Parameters:
aMessage - an error message
Method Detail

getSeverity

public int getSeverity()
Returns severity value

Returns:
severity value

getMessage

public java.lang.String getMessage()
Returns message

Returns:
message

toString

public java.lang.String toString()
Returns textual representation of the error

Overrides:
toString in class java.lang.Object
Returns:
textual representation of the error

getHTMLMessage

public java.lang.String getHTMLMessage()
Returns HTML representation of the error

Returns:
HTML representation of the error

setHTMLMessage

public void setHTMLMessage(java.lang.String aHTMLMessage)
Specifies HTML representation of the error

Parameters:
aHTMLMessage - HTML representation of the error

toHTML

public java.lang.String toHTML()
Formats and returns message as HTML if HTML message was not specified; otherwise simply returns HTML message value

Returns:
HTML representation of the error

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable