info.magnolia.cms.util
Class AlertUtil

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

public class AlertUtil
extends 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 Exception getException()
           
static Exception getException(Context ctx)
           
static String getExceptionMessage(Exception e)
          Creates a string message out of an exception.
static String getMessage()
          Returns the currently set message.
static 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(Exception e)
          Store the exception.
static void setException(Exception e, Context ctx)
           
static void setException(String msg, Exception e)
           
static void setException(String msg, Exception e, Context ctx)
           
static void setMessage(String msg)
          Store the message.
static void setMessage(String msg, Context ctx)
           
static void setMessage(String msg, Exception e)
          Creates a message containing the exception message.
static void setMessage(String msg, 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(String msg)
Store the message. Does not overwrite an already existing message.

Parameters:
msg -

setMessage

public static void setMessage(String msg,
                              Context ctx)

setMessage

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


setMessage

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

setException

public static void setException(String msg,
                                Exception e)

setException

public static void setException(String msg,
                                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(Exception e)
Store the exception. Does not overwrite an already existing one.


setException

public static void setException(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 String getMessage()
Returns the currently set message.


getMessage

public static String getMessage(Context ctx)

getExceptionMessage

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

Parameters:
e -
Returns:
the message

getException

public static Exception getException()

getException

public static Exception getException(Context ctx)


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