Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Implement a notifier class

Each notification plugin requires a Notifier class that must implement the interface com.idera.change.notifications.api.INotifier. To do this, you subclass com.idera.change.notifications.api.AbstractNotifier and customize it.

Info

If AbstractNotifier or INotifier cannot be found in Eclipse, the target platform or plugin dependencies are not configured properly. Ensure that you have configured these prerequisites and then search again for the notifier classes.

To implement a notifier class

  1. Right-click on your project, and then select New > Class.
    The New Java Class dialog appears.
    Image Added
  2. Enter the appropriate information in the fields provided to define the new Java class:
    1. In the Name field, type “DirectoryNotifier”.
    2. In the Package field, type “org.acme.directorynotifier”.
    3. In the Superclass field, type “com.idera.change.notifications.api.AbstractNotifier”.
  3. Click Finish to create the new class.

Once you have defined the DirectoryNotifier class, two methods require implementation:

  • isReportSupported returns a Boolean value indicating if the notification can include a report. The directory notifier returns true, because reports can be replaced in a directory, but a notification may not support reports. This method is called when creating job editors to determine if the reporting section is shown for this type of notification.
  • sendNotification is called after a job runs and is responsible for the notification. The three parameters are as follows:

    ParameterTypeDescription
    notifierDataiNotifierDataThis instance contains the configuration for the notification of the job just run.
    jobMetaDataMap<String, String>

    This map contains information about the job execution. The keys in the map correspond to entries in the NotificationPropertyEnum.

    For example, to get the data and time of the execution, you would code:

    “jobMetaData.get(NotificationPropertyEnum.DATE_TIME.getTag())

    notificationInfoiReportGenerator


Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
 
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
 
|
 
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
 
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse