org.apache.empire.struts2.actionsupport
Class ActionError

java.lang.Object
  extended by org.apache.empire.struts2.actionsupport.ActionError
All Implemented Interfaces:
ErrorInfo

public class ActionError
extends Object
implements ErrorInfo


Constructor Summary
ActionError(EmpireException e)
           
ActionError(ErrorInfo other)
           
ActionError(ErrorType errType)
           
ActionError(ErrorType errType, String param)
           
ActionError(ErrorType errType, String[] params)
           
ActionError(Throwable e)
           
 
Method Summary
protected  void clear()
           
 String getErrorMessage()
          Returns the message associated with the last error.
 String[] getErrorParams()
          Returns the parameters used to build the error text.
 ErrorType getErrorType()
          Returns the last error code.
 boolean hasError()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionError

public ActionError(ErrorInfo other)
See Also:
ErrorObject#error(ErrorInfo)

ActionError

public ActionError(EmpireException e)

ActionError

public ActionError(Throwable e)

ActionError

public ActionError(ErrorType errType,
                   String[] params)
See Also:
ErrorObject#error(ErrorType, Object[])

ActionError

public ActionError(ErrorType errType,
                   String param)
See Also:
ErrorObject#error(ErrorType, Object)

ActionError

public ActionError(ErrorType errType)
See Also:
ErrorObject#error(ErrorType)
Method Detail

clear

protected void clear()

hasError

public boolean hasError()

getErrorType

public ErrorType getErrorType()
Description copied from interface: ErrorInfo
Returns the last error code.

Specified by:
getErrorType in interface ErrorInfo
Returns:
the error code of ERR_NONE if no error has been set.

getErrorParams

public String[] getErrorParams()
Description copied from interface: ErrorInfo
Returns the parameters used to build the error text.

Specified by:
getErrorParams in interface ErrorInfo
Returns:
the error message or null if no error has been set.

getErrorMessage

public String getErrorMessage()
Description copied from interface: ErrorInfo
Returns the message associated with the last error.

Specified by:
getErrorMessage in interface ErrorInfo
Returns:
the error message or an empty string if no error has been set.

toString

public String toString()
Overrides:
toString in class Object
Returns:
the error message for this Action Error


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.