Versions Compared

Key

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

...

  • 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

    NOTE: The keys are the tag of the enum entries, so ensure that getTag() is called when accessing jobMetaData.

    notificationInfoiReportGeneratorUsed to generate the report and access any DDL or sync script output.

Implement a viewer contribution

Each notifier can be configured for a job in DB Change Manager.

The notifier enables a user to select a target directory in which to put results. The email notifier that is supplied with the application enables users to select the email template that will be used to generate the message as well as the addresses of those who will receive it.

In order to add a directory field to the job editor, you write a class that implements the interface named com.idera.change.notifications.api.INotifierViewerContribution.

  • Create a new class named “DirectoryNotifierViewerContribution” and follow the same steps you used to create the DirectoryNotifier class. The exception to this process is that you need to leave the Superclass parameter set to “java.lang.Object”, as well as adding the interface INotifierViewerContribution to the list of implemented interfaces.

Specify setup constants

The notifier only allows users to select a directory in which reports and outcomes are written whenever jobs are executed.

The DirectoryNotifierConstants class is a small constants class that stores the property name for storage and retrieval purposes.

  1. Create a new class named DirectoryNotifierConstants.
  2. Enter the following code for the class definition:
    /**
              * Constantsforthisnetworksharenotifier
              */
              publicfinalclassDirectoryNotifierConstants
              {
                         //Overviewfilename publicstatisfinalString OVERVIEW_FILE_NAME=“outcome.txt”;
                        //PersistedJobSettingsKey publicstatisfinalSTringTARGET_DIRECTORY=“directorynotifier.targetdir”;
              /**
              * Constantutilityclasscannotbeinstantiated
              */
              privateDirectoryNotifierConstants()
              {
              }
    }

Implement the DirectoryNotifier class


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