ch.elca.el4j.services.monitoring.notification
Class CoreNotificationHelper

java.lang.Object
  extended by ch.elca.el4j.services.monitoring.notification.CoreNotificationHelper

public final class CoreNotificationHelper
extends Object

This class is used to notify on events which are core based.

Author:
Martin Zeltner (MZE)
File-location:
CoreNotificationHelper
Last check-in date:
2009-10-19 17:44:35 +0200 (Mo, 19. Okt 2009) by swismer for revision 3951

Method Summary
static void notifyIfEssentialPropertyIsEmpty(Object essentialProperty, String propertyName, Object concernedBean)
          Method to check if an essential property is not null.
static void notifyIfEssentialPropertyIsEmpty(String essentialStringProperty, String propertyName, Object concernedBean)
          Method to check if an essential property string is has text.
static void notifyLackingEssentialProperty(String propertyName, Object concernedBean)
          Method to notify that an essential property of a bean is lacking.
static void notifyMisconfiguration(String message)
          Method to log that a misconfiguration has occurred.
static void notifyMisconfiguration(String message, Object... parameters)
          Replaces place holders in the message with the values provided as parameters.
static void notifyMisconfiguration(String message, Throwable cause)
          Logs the message and the Exception cause and translates it to a MisconfigurationRTException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notifyLackingEssentialProperty

public static void notifyLackingEssentialProperty(String propertyName,
                                                  Object concernedBean)
                                           throws MisconfigurationRTException
Method to notify that an essential property of a bean is lacking. In every case a MissconfigurationRTException will be thrown.

Parameters:
propertyName - Is the name of the lacking property.
concernedBean - Is the bean where the property is missing.
Throws:
MisconfigurationRTException - Will be thrown everytime.

notifyIfEssentialPropertyIsEmpty

public static void notifyIfEssentialPropertyIsEmpty(Object essentialProperty,
                                                    String propertyName,
                                                    Object concernedBean)
                                             throws MisconfigurationRTException
Method to check if an essential property is not null.

Parameters:
essentialProperty - Is the property which should not be null.
propertyName - Is the name of the lacking property.
concernedBean - Is the bean where the property is missing.
Throws:
MisconfigurationRTException - If essential property is misconfigured.

notifyIfEssentialPropertyIsEmpty

public static void notifyIfEssentialPropertyIsEmpty(String essentialStringProperty,
                                                    String propertyName,
                                                    Object concernedBean)
                                             throws MisconfigurationRTException
Method to check if an essential property string is has text.

Parameters:
essentialStringProperty - Is the property which should have text.
propertyName - Is the name of the lacking property.
concernedBean - Is the bean where the property is missing.
Throws:
MisconfigurationRTException - If essential property is misconfigured.
See Also:
StringUtils.hasText(java.lang.String)

notifyMisconfiguration

public static void notifyMisconfiguration(String message)
                                   throws MisconfigurationRTException
Method to log that a misconfiguration has occurred. This method will always throw an exception.

Parameters:
message - Is the message which explains the misconfiguration.
Throws:
MisconfigurationRTException - Will be thrown in every case.

notifyMisconfiguration

public static void notifyMisconfiguration(String message,
                                          Throwable cause)
                                   throws MisconfigurationRTException
Logs the message and the Exception cause and translates it to a MisconfigurationRTException.

Parameters:
message - describes the misconfiguration.
cause - the cause exception.
Throws:
MisconfigurationRTException - Will be thrown in every case.

notifyMisconfiguration

public static void notifyMisconfiguration(String message,
                                          Object... parameters)
                                   throws MisconfigurationRTException
Replaces place holders in the message with the values provided as parameters.

Parameters:
message - message that contains place holders.
parameters - list of parameters that replace the place holders.
Throws:
MisconfigurationRTException - Will be thorwn in every case.
See Also:
MessageFormat


Copyright © 2005-2011 ELCA. All Rights Reserved.