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

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

public class ErrorHelperWeb2
extends java.lang.Object

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

 

Field Summary
protected static java.lang.String CLASS_NAME
          class name.
 
Method Summary
static IErrorService2 getErrorService2()
          This method returns the IErrorService2 unique instance.
static boolean isEmpty(javax.servlet.http.HttpServletRequest _request)
          This method checks if an error is already stored.
static boolean isEmpty(javax.servlet.http.HttpSession _session)
          This method checks if an error is already stored.
static void saveError(javax.servlet.http.HttpServletRequest _request, java.lang.Throwable _throwable, java.lang.String _className)
          This method records the error messages and displays them.
static void saveError(javax.servlet.http.HttpSession _session, java.lang.Throwable _throwable, java.lang.String _className)
          This method records the error messages and displays them.
static void saveErrors(javax.servlet.http.HttpServletRequest _request, java.util.Collection _errors, java.lang.String _className)
          This method records the list of error messages and displays them.
static void saveErrors(javax.servlet.http.HttpSession _session, java.util.Collection _errors, java.lang.String _className)
          This method 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, javax.servlet.http.HttpServletRequest _request)
          This method records the error messages and displays them.
static void saveMessage(java.lang.String _key, java.lang.Object[] _parameters, java.lang.String _type, java.lang.Integer _indent, javax.servlet.http.HttpSession _session)
          This method records the error messages and displays them.
static void saveMessage(java.lang.Throwable _throwable, java.lang.String _className, javax.servlet.http.HttpServletRequest _request, java.lang.Integer _indent)
          This method records the error messages and displays them.
static void saveMessage(java.lang.Throwable _throwable, java.lang.String _className, javax.servlet.http.HttpSession _session, java.lang.Integer _indent)
          This method 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
class name.

Method Detail

isEmpty

public static boolean isEmpty(javax.servlet.http.HttpServletRequest _request)
This method checks if an error is already stored.

Parameters:
_request - the current request.
Returns:
true if there is no stored error, else false.

isEmpty

public static boolean isEmpty(javax.servlet.http.HttpSession _session)
This method checks if an error is already stored.

Parameters:
_session - the current session.
Returns:
true if there is no stored error, else false.

getErrorService2

public static IErrorService2 getErrorService2()
This method returns the IErrorService2 unique instance.

Returns:
the IErrorService2 unique instance.

saveError

public static void saveError(javax.servlet.http.HttpServletRequest _request,
                             java.lang.Throwable _throwable,
                             java.lang.String _className)
This method records the error messages and displays them.

Parameters:
_request - the current request.
_throwable - the exception where the error comes from.
_className - name of the class that raised the error.

saveError

public static void saveError(javax.servlet.http.HttpSession _session,
                             java.lang.Throwable _throwable,
                             java.lang.String _className)
This method records the error messages and displays them.

Parameters:
_session - the current session.
_throwable - the exception where the error comes from.
_className - name of the class that raised the error.

saveErrors

public static void saveErrors(javax.servlet.http.HttpServletRequest _request,
                              java.util.Collection _errors,
                              java.lang.String _className)
This method records the list of error messages and displays them.

Parameters:
_request - the current request.
_errors - the collection of ActionMessage to save.
_className - name of the class that raised the list of errors.

saveErrors

public static void saveErrors(javax.servlet.http.HttpSession _session,
                              java.util.Collection _errors,
                              java.lang.String _className)
This method records the list of error messages and displays them.

Parameters:
_session - the current session.
_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,
                               javax.servlet.http.HttpServletRequest _request,
                               java.lang.Integer _indent)
This method 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.
_request - the request.
_indent - indentation level.

saveMessage

public static void saveMessage(java.lang.Throwable _throwable,
                               java.lang.String _className,
                               javax.servlet.http.HttpSession _session,
                               java.lang.Integer _indent)
This method 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.
_session - the session.
_indent - indentation level.

saveMessage

public static void saveMessage(java.lang.String _key,
                               java.lang.Object[] _parameters,
                               java.lang.String _type,
                               java.lang.Integer _indent,
                               javax.servlet.http.HttpServletRequest _request)
This method records the error messages and displays them.

Parameters:
_key - key of the message to display.
_parameters - message parameters (maybe is null).
_type - message type : ActionMessage.ERROR, ActionMessage.MESSAGE, ActionMessage.WARNING.
_indent - indentation level : ActionMessage.LEVEL_0, ActionMessage.LEVEL_1, ActionMessage.LEVEL_2.
_request - the current session.

saveMessage

public static void saveMessage(java.lang.String _key,
                               java.lang.Object[] _parameters,
                               java.lang.String _type,
                               java.lang.Integer _indent,
                               javax.servlet.http.HttpSession _session)
This method records the error messages and displays them.

Parameters:
_key - key of the message to display.
_parameters - message parameters (maybe is null).
_type - message type : ActionMessage.ERROR, ActionMessage.MESSAGE, ActionMessage.WARNING.
_indent - indentation level : ActionMessage.LEVEL_0, ActionMessage.LEVEL_1, ActionMessage.LEVEL_2.
_session - the current session.