info.magnolia.cms.util
Class AlertUtil

java.lang.Object
  extended by info.magnolia.cms.util.AlertUtil

public class AlertUtil
extends java.lang.Object

Stores a message in the request. This message can get alerted from the interface. This is used for example to alert activation errors.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
philipp

Method Summary
static java.lang.Exception getException()
           
static java.lang.Exception getException(Context ctx)
           
static java.lang.String getExceptionMessage(java.lang.Exception e)
          Creates a string message out of an exception.
static java.lang.String getMessage()
          Returns the currently set message.
static java.lang.String getMessage(Context ctx)
           
static boolean isExceptionSet()
          Checks if an exception is set.
static boolean isExceptionSet(Context ctx)
           
static boolean isMessageSet()
          Checks if a message is set.
static boolean isMessageSet(Context ctx)
           
static void setException(java.lang.Exception e)
          Store the exception.
static void setException(java.lang.Exception e, Context ctx)
           
static void setException(java.lang.String msg, java.lang.Exception e)
           
static void setException(java.lang.String msg, java.lang.Exception e, Context ctx)
           
static void setMessage(java.lang.String msg)
          Store the message.
static void setMessage(java.lang.String msg, Context ctx)
           
static void setMessage(java.lang.String msg, java.lang.Exception e)
          Creates a message containing the exception message.
static void setMessage(java.lang.String msg, java.lang.Exception e, Context ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setMessage

public static void setMessage(java.lang.String msg)
Store the message. Does not overwrite an already existing message.

Parameters:
msg -

setMessage

public static void setMessage(java.lang.String msg,
                              Context ctx)

setMessage

public static void setMessage(java.lang.String msg,
                              java.lang.Exception e)
Creates a message containing the exception message.


setMessage

public static void setMessage(java.lang.String msg,
                              java.lang.Exception e,
                              Context ctx)

setException

public static void setException(java.lang.String msg,
                                java.lang.Exception e)

setException

public static void setException(java.lang.String msg,
                                java.lang.Exception e,
                                Context ctx)

isMessageSet

public static boolean isMessageSet()
Checks if a message is set.


isMessageSet

public static boolean isMessageSet(Context ctx)

setException

public static void setException(java.lang.Exception e)
Store the exception. Does not overwrite an already existing one.


setException

public static void setException(java.lang.Exception e,
                                Context ctx)

isExceptionSet

public static boolean isExceptionSet()
Checks if an exception is set.


isExceptionSet

public static boolean isExceptionSet(Context ctx)

getMessage

public static java.lang.String getMessage()
Returns the currently set message.


getMessage

public static java.lang.String getMessage(Context ctx)

getExceptionMessage

public static java.lang.String getExceptionMessage(java.lang.Exception e)
Creates a string message out of an exception. Handles nested exceptions.

Parameters:
e -
Returns:
the message

getException

public static java.lang.Exception getException()

getException

public static java.lang.Exception getException(Context ctx)


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.