com.zphinx.spine.message
Class DisplayError

java.lang.Object
  extended by com.zphinx.spine.message.DisplayMessage
      extended by com.zphinx.spine.message.DisplayError
All Implemented Interfaces:
ErrorMessages

public class DisplayError
extends DisplayMessage
implements ErrorMessages

DisplayError serves as a nominal error object generated within the spine framework. It use the concept of a message severity based on the following:

As with displayMessage it accepts both string and an Object[] arguments which it uses to fetch the appropriate string representation of the message key persisted in the DisplayError object

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Field Summary
 
Fields inherited from interface com.zphinx.spine.message.ErrorMessages
ERROR_EXCEPTION, ERROR_NONE, ERROR_PROCESS, ERROR_SYSTEM, ERROR_WARNING
 
Constructor Summary
DisplayError()
          Public Constructor
DisplayError(int severity)
          Public Constructor which sets the severity of the error
DisplayError(int severity, String message)
          Public Constructor which sets a message and severity of the error
DisplayError(int severity, String message, Object[] arguments)
          Constructs a DisplayError with parametric replacements
DisplayError(String message, Object[] arguments)
          Constructs a DisplayError with parametric replacements
 
Method Summary
 int getSeverity()
          Gets the severity
 void setMessage(int severity, String message)
          Sets a message and it's severity
 void setSeverity(int severity)
          Sets the severity of this error
 String toString()
          Returns the string representation of this object
 
Methods inherited from class com.zphinx.spine.message.DisplayMessage
getArguments, getMessage, setArguments, setMessage, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayError

public DisplayError()
Public Constructor


DisplayError

public DisplayError(int severity)
Public Constructor which sets the severity of the error

Parameters:
severity - The severity of this error can be one of the values defined above

DisplayError

public DisplayError(String message,
                    Object[] arguments)
Constructs a DisplayError with parametric replacements

Parameters:
message - The string which represents the key by which this message is discovered
arguments - The arguments to use for parametric replacements

DisplayError

public DisplayError(int severity,
                    String message)
Public Constructor which sets a message and severity of the error

Parameters:
severity - The severity of this error can be one of those defined above
message - The string which represents the key by which this message is discovered

DisplayError

public DisplayError(int severity,
                    String message,
                    Object[] arguments)
Constructs a DisplayError with parametric replacements

Parameters:
severity - The severity of this error
message - The string which represents the key by which this message is discovered
arguments - The arguments to use for parametric replacements
Method Detail

getSeverity

public int getSeverity()
Gets the severity

Returns:
the severity

setSeverity

public void setSeverity(int severity)
Sets the severity of this error

Parameters:
severity - the severity to set

setMessage

public void setMessage(int severity,
                       String message)
Sets a message and it's severity

Parameters:
severity - The severity of this error
message - The message or key to be set

toString

public String toString()
Returns the string representation of this object

Overrides:
toString in class DisplayMessage