com.ibm.commerce.beans
Class ErrorDataBean

java.lang.Object
  |
  +--com.ibm.commerce.beans.InputDataBeanImpl
        |
        +--com.ibm.commerce.beans.SmartDataBeanImpl
              |
              +--com.ibm.commerce.beans.ErrorDataBean
All Implemented Interfaces:
DataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class ErrorDataBean
extends SmartDataBeanImpl

The bean is for displaying error information on a JSP.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
 
Fields inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
commandContext
 
Fields inherited from class com.ibm.commerce.beans. InputDataBeanImpl
requestProperties
 
Fields inherited from interface com.ibm.commerce.beans. DataBean
emptyString
 
Constructor Summary
ErrorDataBean()
          Creates a Error DataBean.
 
Method Summary
 java.lang.String getCorrectiveActionMessage()
          Return the corrective action error message text.
 java.lang.String getCorrectiveActionMessage(java.util.Locale loc)
          Return the corrective action message in the locale specified.
  ECMessage getECCorrectiveActionMessage()
          Return the corrective ECMessage object associated with the exception.
  ECMessage getECMessage()
          Return the ECMessage object associated with the exception.
 java.lang.String getErrorCode()
          Return the error code if one exists.
 java.lang.Throwable getException()
          Return the actual exception assocated with this error
  TypedProperty getExceptionData()
          Return the user error message data
 java.lang.String getExceptionType()
          Return the exception type
 java.lang.String getMessage()
          Return the user error message text.
 java.lang.String getMessage(java.util.Locale loc)
          Return the user error message text.
 java.lang.String getMessageKey()
          Return the exception message key.
 java.lang.Object[] getMessageParam()
          Return the error message parameters.
 java.lang.String getOriginatingCommand()
          Return the command that originated the exception.
  TypedProperty getRequestProperties()
          Return the inputProperties associated with the Error DataBean.
 java.lang.String getStackTrace()
          Return the exception stack if there is an exception associated with the error
 java.lang.String getSystemMessage()
          Return the system error message text.
 java.lang.String getSystemMessage(java.util.Locale loc)
          Return the system error message text.
 boolean hasErrorCode(java.lang.String code)
          Return true if the exception data contains the input error code, returns false otherwise.
 void populate()
          Populate the error data bean.
 void populate( ECException e)
          Populate the error data bean.
 void setECCorrectiveActionMessage( ECMessage newValue)
          Sets the corrective action error message.
 void setECMessage(ECMessage newValue)
          Sets the exception message.
 void setExceptionType(java.lang.String newValue)
          Sets the exception type.
 void setOriginatingCommand(java.lang.String newValue)
          Sets the originating command for the error.
 java.lang.String toString()
          Returns the string representation of the object.
 
Methods inherited from class com.ibm.commerce.beans. SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
 
Methods inherited from class com.ibm.commerce.beans. InputDataBeanImpl
setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.beans. InputDataBean
setRequestProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values
Constructor Detail

ErrorDataBean

public ErrorDataBean()
Creates a Error DataBean.
Method Detail

getCorrectiveActionMessage

public java.lang.String getCorrectiveActionMessage()
Return the corrective action error message text. The locale of the text is based on the negotiated locale for the user.
Returns:
The correct action message associated with the error.

getCorrectiveActionMessage

public java.lang.String getCorrectiveActionMessage(java.util.Locale loc)
Return the corrective action message in the locale specified.
Parameters:
loc - the locale for the message.
Returns:
The corrective action message.

getECCorrectiveActionMessage

public ECMessage getECCorrectiveActionMessage()
Return the corrective ECMessage object associated with the exception.
Returns:
The corrective action message.

getECMessage

public ECMessage getECMessage()
Return the ECMessage object associated with the exception.
Returns:
The error message.

getErrorCode

public java.lang.String getErrorCode()
Return the error code if one exists.
Returns:
The error code.

getException

public java.lang.Throwable getException()
Return the actual exception assocated with this error
Returns:
The underlying exception of the databean.

getExceptionData

public TypedProperty getExceptionData()
Return the user error message data
Returns:
The data accociated with the exception.

getExceptionType

public java.lang.String getExceptionType()
Return the exception type
Returns:
The exception type.

getMessage

public java.lang.String getMessage()
Return the user error message text. The locale of the text is based on the negotiated locale for the user.
Returns:
The message of the exception.

getMessage

public java.lang.String getMessage(java.util.Locale loc)
Return the user error message text.
Parameters:
loc - the locale for the message text.
Returns:
The message of the exception in the specified locale.

getMessageKey

public java.lang.String getMessageKey()
Return the exception message key.
Returns:
The message key of the exception.

getMessageParam

public java.lang.Object[] getMessageParam()
Return the error message parameters.
Returns:
The message parameters of the exception message.

getOriginatingCommand

public java.lang.String getOriginatingCommand()
Return the command that originated the exception.
Returns:
The command causing the exception.

getRequestProperties

public TypedProperty getRequestProperties()
Return the inputProperties associated with the Error DataBean.
Specified by:
getRequestProperties in interface InputDataBean
Overrides:
getRequestProperties in class InputDataBeanImpl
Returns:
The request properties.

getStackTrace

public java.lang.String getStackTrace()
Return the exception stack if there is an exception associated with the error
Returns:
The stack trace of the exception.

getSystemMessage

public java.lang.String getSystemMessage()
Return the system error message text. The locale of the text is based on the negotiated locale for the user.
Returns:
The system exception message.

getSystemMessage

public java.lang.String getSystemMessage(java.util.Locale loc)
Return the system error message text.
Parameters:
loc - the locale for the message text.
Returns:
The system exception message in the specified locale.

hasErrorCode

public boolean hasErrorCode(java.lang.String code)
Return true if the exception data contains the input error code, returns false otherwise.
Returns:
Whether there is an error code associated with the exception.

populate

public void populate()
Populate the error data bean. The bean properties will be populated from the requestProperties associated with the bean.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl

populate

public void populate(ECException e)
Populate the error data bean. The bean properties will be populated from the requestProperties associated with the bean.

setECCorrectiveActionMessage

public void setECCorrectiveActionMessage(ECMessage newValue)
Sets the corrective action error message.

setECMessage

public void setECMessage(ECMessage newValue)
Sets the exception message.

setExceptionType

public void setExceptionType(java.lang.String newValue)
Sets the exception type.

setOriginatingCommand

public void setOriginatingCommand(java.lang.String newValue)
Sets the originating command for the error.

toString

public java.lang.String toString()
Returns the string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
The string representation of the object.