com.waveset.notification
Class TestNotifier

java.lang.Object
  extended bycom.waveset.notification.Notifier
      extended bycom.waveset.notification.TestNotifier

public class TestNotifier
extends Notifier

An implementation of the Notifier class that dumps its arguments to a file. Used for unit testing notifications performed by workflow and the provisioning engine.

The object is normally created with a specified output file, but this can be overridden with an input parameter named "file" if desired.

The parameters are printed to this file in the form:

 		name = value
 

Each block of parameters will be preceeded by a line containing '#'. We will always append to the file, so it may contain more than one parameter block.


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.notification.Notifier
TYPE_EMAIL, TYPE_TEST
 
Constructor Summary
TestNotifier()
           
 
Method Summary
 WavesetResult notify(LighthouseContext context, java.util.Map parameters, VariableResolver resolver)
          Handle a notification request.
static void setErrorCount(int c)
           
 void setFile(java.lang.String file)
          Set the TestNotifier output file.
 void TestNotifier()
          Construct a TestNotifier object.
 
Methods inherited from class com.waveset.notification.Notifier
getFilterDomain, getNotificationFile, getNotifier, notify, setTestFile, setTestNotifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

TestNotifier

public TestNotifier()
Method Detail

TestNotifier

public void TestNotifier()
Construct a TestNotifier object.


setFile

public void setFile(java.lang.String file)
Set the TestNotifier output file.


setErrorCount

public static void setErrorCount(int c)

notify

public WavesetResult notify(LighthouseContext context,
                            java.util.Map parameters,
                            VariableResolver resolver)
                     throws WavesetException
Handle a notification request.

Here we just dump the parameters to the file. Note that with the introduction of the "template" parameter for EmailNotifier, many of the parameters will now be hidden. Could do an expansion of that here, but its rather type specific.

Specified by:
notify in class Notifier
Throws:
WavesetException