com.wrq.apptrieve.agent
Class ApptrieveException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.wrq.apptrieve.agent.ApptrieveException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AppConnException, ChannelException, ServerException

public class ApptrieveException
extends java.lang.Exception

The ApptrieveException class provides information on errors that occur during the use of a Host Integrator Server.

See Also:
Serialized Form

Constructor Summary
ApptrieveException(ErrorMessage errorMesg)
          Create using an ErrorMessage object.
ApptrieveException(java.util.List errorList)
          Create using a list of ErrorMessage objects.
ApptrieveException(java.util.List mesgs, java.util.List localizedMesgs)
          Create using a list of error descriptions.
ApptrieveException(java.lang.String mesg)
          Create using a simple string message.
ApptrieveException(java.lang.String mesg, java.lang.String localizedMesg)
          Create using an error description string.
 
Method Summary
 void appendMessage(ErrorMessage mesg)
          Append an error message to the list of errors in the exception.
 void appendMessage(java.lang.String mesg)
          Append an error message string to the list of error descriptions in this exception.
 void appendMessage(java.lang.String mesg, java.lang.String localizedMesg)
          Append an error message string to the list of error descriptions in this exception.
 ErrorMessage getErrorMessage()
          Gets the first error message in the exception.
 java.util.List getErrorMessageList()
          Gets all error messages in the exception.
 TerminalScreen getErrorScreen()
           
 java.lang.String getLocalizedMessage()
          Gets the text of the first error in the exception in the default locale.
 java.util.List getLocalizedMessageList()
          Gets the text of all error messages in the exception in the default locale.
 java.lang.String getMessage()
          Gets the text of the first error in the exception.
 java.util.List getMessageList()
          Gets the text of all error messages in the exception.
 void setErrorScreen(TerminalScreen ts)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApptrieveException

public ApptrieveException(ErrorMessage errorMesg)
Create using an ErrorMessage object.

Parameters:
errorMesg - error message

ApptrieveException

public ApptrieveException(java.util.List errorList)
Create using a list of ErrorMessage objects.

Parameters:
errorList - a list of ErrorMessage objects

ApptrieveException

public ApptrieveException(java.lang.String mesg)
Create using a simple string message.

Parameters:
mesg - error text

ApptrieveException

public ApptrieveException(java.lang.String mesg,
                          java.lang.String localizedMesg)
Create using an error description string.

Parameters:
mesg - generic message string
localizedMesg - localized message string

ApptrieveException

public ApptrieveException(java.util.List mesgs,
                          java.util.List localizedMesgs)
Create using a list of error descriptions.

Parameters:
mesgs - list of generic message strings
localizedMesgs - list of localized message strings
Method Detail

appendMessage

public void appendMessage(ErrorMessage mesg)
Append an error message to the list of errors in the exception.

Parameters:
mesg - error message

appendMessage

public void appendMessage(java.lang.String mesg)
Append an error message string to the list of error descriptions in this exception. The messages added will use ErrorMessage.USER_GENERIC as their integer error identifier.

Parameters:
mesg - generic message string

appendMessage

public void appendMessage(java.lang.String mesg,
                          java.lang.String localizedMesg)
Append an error message string to the list of error descriptions in this exception. The messages added will use ErrorMessage.USER_GENERIC as their integer error identifier.

Parameters:
mesg - generic message string
localizedMesg - localized message string

getMessage

public java.lang.String getMessage()
Gets the text of the first error in the exception.

Overrides:
getMessage in class java.lang.Throwable
Returns:
error text

getMessageList

public java.util.List getMessageList()
Gets the text of all error messages in the exception.

Returns:
list of java.lang.String containing the text all contained error messages

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Gets the text of the first error in the exception in the default locale.

Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
localized error text

getLocalizedMessageList

public java.util.List getLocalizedMessageList()
Gets the text of all error messages in the exception in the default locale.

Returns:
list of java.lang.String containing the localized text all contained error messages

getErrorMessage

public ErrorMessage getErrorMessage()
Gets the first error message in the exception.

Returns:
error message

getErrorMessageList

public java.util.List getErrorMessageList()
Gets all error messages in the exception.

Returns:
list of ErrorMessage objects

setErrorScreen

public void setErrorScreen(TerminalScreen ts)

getErrorScreen

public TerminalScreen getErrorScreen()