com.ideo.sweetdev.presentation.service.error
Class ErrorHelper

java.lang.Object
  extended bycom.ideo.sweetdev.presentation.service.error.ErrorHelper

Deprecated. use ErrorHelper2 instead.

public class ErrorHelper
extends java.lang.Object

The class ErrorHelper class allows to use the Error service of SweetDev framework.

 

Field Summary
protected static java.lang.String CLASS_NAME
          Deprecated. nom de la classe
 
Method Summary
static IErrorService getErrorService()
          Deprecated. get the IErrorService unique instance
static boolean isEmpty(IUser _user)
          Deprecated. check if an error is already stored
static void saveError(IUser _user, java.lang.Throwable _throwable, java.lang.String _className)
          Deprecated. records the error messages and displays them
static void saveErrors(IUser _user, java.util.Collection _errors, java.lang.String _className)
          Deprecated. records the list of error messages and displays them
static void saveMessage(java.lang.String _key, java.lang.Object[] _parameters, java.lang.String _type, java.lang.Integer _indent, IUser _user)
          Deprecated. records the error messages and displays them
static void saveMessage(java.lang.Throwable _throwable, java.lang.String _className, IUser _user, java.lang.Integer _indent)
          Deprecated. records the error messages and displays them
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

protected static final java.lang.String CLASS_NAME
Deprecated. 
nom de la classe

Method Detail

isEmpty

public static boolean isEmpty(IUser _user)
Deprecated. 
check if an error is already stored

Parameters:
_user - a user
Returns:
true if there is no stored error, else false

getErrorService

public static IErrorService getErrorService()
Deprecated. 
get the IErrorService unique instance

Returns:
IErrorService

saveError

public static void saveError(IUser _user,
                             java.lang.Throwable _throwable,
                             java.lang.String _className)
Deprecated. 
records the error messages and displays them

Parameters:
_user - the user
_throwable - the exception where the error comes from
_className - name of the class that raised the error

saveErrors

public static void saveErrors(IUser _user,
                              java.util.Collection _errors,
                              java.lang.String _className)
Deprecated. 
records the list of error messages and displays them

Parameters:
_user - the user
_errors - the collection of ActionMessage to save
_className - name of the class that raised the list of errors

saveMessage

public static void saveMessage(java.lang.Throwable _throwable,
                               java.lang.String _className,
                               IUser _user,
                               java.lang.Integer _indent)
Deprecated. 
records the error messages and displays them

Parameters:
_throwable - the exception where the error comes from
_className - name of the class that raised the error
_user - the user
_indent - indentation level.

saveMessage

public static void saveMessage(java.lang.String _key,
                               java.lang.Object[] _parameters,
                               java.lang.String _type,
                               java.lang.Integer _indent,
                               IUser _user)
Deprecated. 
records the error messages and displays them

Parameters:
_key - key of the message to display
_parameters - message parameters (peut etre null)
_type - message type : ActionMessage.ERROR, ActionMessage.MESSAGE, ActionMessage.WARNING
_indent - indentation level : ActionMessage.LEVEL_0, ActionMessage.LEVEL_1, ActionMessage.LEVEL_2,
_user - the user