|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.notification.Notifier
Interface for an object that can perform notifications.
Field Summary | |
static java.lang.String |
code_id
|
static java.lang.String |
TYPE_EMAIL
Cannonical names for certain built-in notifier classes. |
static java.lang.String |
TYPE_TEST
|
Constructor Summary | |
Notifier()
|
Method Summary | |
java.lang.String |
getFilterDomain()
Return a domain that should be ignored when emails are sent from idm. |
java.lang.String |
getNotificationFile()
Returns the notification redirect file. |
static Notifier |
getNotifier(java.lang.String type)
Create a notifier of the given type. |
abstract WavesetResult |
notify(LighthouseContext context,
java.util.Map paramaeters,
VariableResolver resolver)
Sends notification given a set of parmaters specified in a Map. |
WavesetResult |
notify(java.util.Map parameters,
ObjectCache cache)
Sends notification given a set of parmaters specified in a Map. |
static void |
setTestFile(java.lang.String filename)
Sets the notifier test file. |
static void |
setTestNotifier(java.lang.String filename)
Sets or clears the forced use of a TestNotifier object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String TYPE_EMAIL
public static final java.lang.String TYPE_TEST
Constructor Detail |
public Notifier()
Method Detail |
public WavesetResult notify(java.util.Map parameters, ObjectCache cache) throws WavesetException
The "cache" argument should be passed if the Notifier needs to resolve references to other objects. This is currently the case for EmailNotifier which might need to find EmailTemplate objects.
WavesetException
public abstract WavesetResult notify(LighthouseContext context, java.util.Map paramaeters, VariableResolver resolver) throws ServiceNotResponding, WavesetException
A VariableResolver may be passed to resolve references to things not passed in the map.
The context argument should be passed if the Notifier needs to resolve references to other objects. This is currently the case for EmailNotifier which might need to find EmailTemplate objects. If the implementation can determine that the connection parameters were correct, but the service was not responding it will throw the exception ServiceNotReponding. This may be used to determine if it makes sense to attempt a retry of the notification.
ServiceNotResponding
WavesetException
public static Notifier getNotifier(java.lang.String type) throws WavesetException
Currently recognized type names are:
Type may also be the fully qualified name of a class that extends the Notifier class.
If the forceTestNotifier() method has been used, we will always return a TestNotifier object regardless of the specified type.
WavesetException
public static void setTestNotifier(java.lang.String filename)
This controls the type of object returned by the getNotifier factory method. If the filename argument is non-null, we will create a TestNotifier object that sends notification parameters to the indicated file. This object will always be returned by getNotifier, regardless of the requested type.
If the filename argument is null, we will stop forcing the TestNotifier object, and return to normal operation.
public static void setTestFile(java.lang.String filename)
An alternative to setTestNotifier that results in better output messages for certain notifiers.
public java.lang.String getNotificationFile()
public java.lang.String getFilterDomain()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |