Skip navigation links


oracle.iam.notification.api
Interface NotificationService


public interface NotificationService

Method Summary
 long addLocaleToTemplate(long templateid, java.util.Locale locale, java.util.HashMap mapLocaleTemplate)
          Add a Locale to the existing notification template
 long addLocaleToTemplate(java.lang.String templateNameString, java.util.Locale locale, java.util.HashMap mapLocaleTemplate)
          Add a Locale to the existing notification template
 long addTemplate(NotificationTemplate template)
          Add a new template and save that in RDBMS
 long addTemplate(java.lang.String eventName, java.lang.String templatename, java.lang.String description, boolean snmpSupported)
          Add a new template and save that in RDBMS
 long deleteTemplate(long templateid, java.util.Date timestamp)
          Removes a template from repository based on template ID
 long deleteTemplate(java.lang.String templateName, java.util.Date timestamp)
          Removes a template from repository based on template name
 java.util.List getAvailableData(java.lang.String eventType, java.util.Map map)
          To retrieve the available data associated with an event
 EventXMLObject getEventDetails(java.lang.String eventType)
          To get event details specific to a given event-type It aims to retrieve the dynamic parameters related to an event
 java.util.List getEventList()
          Retrieve list of all the notification events existing in the system
 java.util.Set getListedNotificationProviders()
          Get all the notification providers
 java.util.List getStaticData(java.lang.String eventType)
          To retrieve static data associated with an event
 NotificationTemplate lookupTemplate(long templateid, java.util.Locale locale)
          Retrieves a template based on given templateid and locale
 NotificationTemplate lookupTemplate(java.lang.String templateName, java.util.Locale locale)
          Retrieves a template based on given template name and locale
 long modifyTemplate(long templateid, java.util.HashMap values, java.util.Locale locale, java.util.Date timestamp)
          Modifies an existing template
 long modifyTemplate(java.lang.String templateName, java.util.HashMap values, java.util.Locale locale, java.util.Date timestamp)
          Modifies an existing template
 boolean notify(NotificationEvent event)
          Notifies a user/system against the event passed.
 boolean notify(NotificationEvent event, java.lang.String providerName)
          Notifies a user/system against the event passed.
 long removeLocalefromTemplate(long templateid, java.util.Locale locale, java.util.Date timestamp)
          Remove a specific locale support from a template
 long removeLocalefromTemplate(java.lang.String templateName, java.util.Locale locale, java.util.Date timestamp)
          Remove a specific locale support from a template
 java.util.List search(SearchCriteria criteria, java.util.Set retAttrs, java.util.HashMap configParams)
          Retrieves list of templates based on the search criteria
 java.util.List search(SearchCriteria criteria, java.util.Set retAttrs, java.util.HashMap configParams, java.util.Map resBundleMap)
          Retrieves list of templates based on the search criteria
 java.util.List searchTemplate(SearchCriteria searchCriteria, long start, long end)
          Retrieves list of templates based on the search criteria

 

Method Detail

addTemplate

long addTemplate(NotificationTemplate template)
                 throws TemplateAlreadyExistsException,
                        NotificationManagementException
Add a new template and save that in RDBMS
Parameters:
template - Notification Template to be saved
Returns:
long templateid
Throws:
TemplateAlreadyExistsException
NotificationManagementException - Access related exception

addTemplate

long addTemplate(java.lang.String eventName,
                 java.lang.String templatename,
                 java.lang.String description,
                 boolean snmpSupported)
                 throws TemplateAlreadyExistsException,
                        NotificationManagementException
Add a new template and save that in RDBMS
Parameters:
eventName - Name of the event to which the template is to be associated
templatename - Name of the Template
description - Description of the Template
snmpSupported - boolean to specify if SNMP is supported or not
Returns:
long templateid
Throws:
TemplateAlreadyExistsException
NotificationManagementException - Access related exception

addLocaleToTemplate

long addLocaleToTemplate(java.lang.String templateNameString,
                         java.util.Locale locale,
                         java.util.HashMap mapLocaleTemplate)
                         throws TemplateNotFoundException,
                                MultipleTemplateException,
                                NotificationManagementException
Add a Locale to the existing notification template
Parameters:
templateNameString - name of the template where new locale support is being added
locale - Locale
mapLocaleTemplate - Hashmap of attribute names and corresponding values keys' name of HashMap: "SHORTMESSAGEBODY" "LONGMESSAGEBODY" "MESSAGESUBJECT" "ENCODING" "TYPE"
Returns:
long templateid
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationManagementException - Access related exception

addLocaleToTemplate

long addLocaleToTemplate(long templateid,
                         java.util.Locale locale,
                         java.util.HashMap mapLocaleTemplate)
                         throws TemplateNotFoundException,
                                NotificationManagementException
Add a Locale to the existing notification template
Parameters:
templateid - id of the template where new locale support is being added
locale - Locale
mapLocaleTemplate - Hashmap of attribute names and corresponding values keys' name of HashMap: "SHORTMESSAGEBODY" "LONGMESSAGEBODY" "MESSAGESUBJECT" "ENCODING" "TYPE"
Returns:
long templateid
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
NotificationManagementException - Access related exception

searchTemplate

java.util.List searchTemplate(SearchCriteria searchCriteria,
                              long start,
                              long end)
                              throws InvalidSearchOptionException,
                                     NotificationManagementException
Retrieves list of templates based on the search criteria
Parameters:
searchCriteria - For specifying searchcriteria use templatename, eventname and locale as parameters only By default, the results will be sorted based on id column Calls can be made in the following manner SearchCriteria sc1 = new SearchCriteria("templateName", templateName, SearchCriteria.Operator.EQUAL); SearchCriteria sc2 = new SearchCriteria("eventName", eventName, SearchCriteria.Operator.EQUAL); SearchCriteria sc3 = new SearchCriteria("locale", locale, SearchCriteria.Operator.EQUAL); SearchCriteria sc4 = new SearchCriteria(sc1, sc2, SearchCriteria.Operator.AND); SearchCriteria sc5 = new SearchCriteria(sc4, sc3, SearchCriteria.Operator.AND); long start=1, end=4; List<SearchResult> list = notificationService.searchTemplate(sc5, start, end);
start - specifies starting of the subset of the complete search result to be fetched
end - specifies end of the subset of the complete search result to be fetched
Returns:
A list of matching templates
Throws:
InvalidSearchOptionException
NotificationManagementException - Access related exception

lookupTemplate

NotificationTemplate lookupTemplate(long templateid,
                                    java.util.Locale locale)
                                    throws TemplateNotFoundException,
                                           MultipleTemplateException,
                                           NotificationManagementException
Retrieves a template based on given templateid and locale
Parameters:
templateid - id of the template for which data is to be loaded
locale - Locale
Returns:
Notification Template Data
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationManagementException - Access related exception

lookupTemplate

NotificationTemplate lookupTemplate(java.lang.String templateName,
                                    java.util.Locale locale)
                                    throws TemplateNotFoundException,
                                           MultipleTemplateException,
                                           NotificationManagementException
Retrieves a template based on given template name and locale
Parameters:
templateName - name of the template for which data is to be loaded
locale - Locale
Returns:
Notification Template Data
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationManagementException - Access related exception

deleteTemplate

long deleteTemplate(long templateid,
                    java.util.Date timestamp)
                    throws TemplateNotFoundException,
                           NotificationManagementException,
                           LastModifyDateNotSetException,
                           oracle.iam.platform.kernel.StaleDataException,
                           MultipleTemplateException
Removes a template from repository based on template ID
Parameters:
templateid - id of the template to be deleted
timestamp - last timestamp for the template
Returns:
status of the operation with success as 0 and rest as failure
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
LastModifyDateNotSetException - This exception is thrown if timestamp is not set.
oracle.iam.platform.kernel.StaleDataException - This exception is thrown if notification is already updated.
NotificationManagementException - Access related exception
MultipleTemplateException

deleteTemplate

long deleteTemplate(java.lang.String templateName,
                    java.util.Date timestamp)
                    throws TemplateNotFoundException,
                           MultipleTemplateException,
                           NotificationManagementException,
                           LastModifyDateNotSetException,
                           oracle.iam.platform.kernel.StaleDataException
Removes a template from repository based on template name
Parameters:
templateName - name of the template to be deleted
timestamp - last timestamp for the template
Returns:
status of the operation with success as 0 and rest as failure
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationManagementException - Access related exception
LastModifyDateNotSetException - This exception is thrown if timestamp is not set.
oracle.iam.platform.kernel.StaleDataException - This exception is thrown if notification is already updated.

removeLocalefromTemplate

long removeLocalefromTemplate(long templateid,
                              java.util.Locale locale,
                              java.util.Date timestamp)
                              throws TemplateNotFoundException,
                                     NotificationManagementException,
                                     MultipleTemplateException,
                                     LastModifyDateNotSetException,
                                     oracle.iam.platform.kernel.StaleDataException
Remove a specific locale support from a template
Parameters:
templateid - id of the template to be deleted
locale - Locale
timestamp - Will be used for Optimistic Locking *
Returns:
status of the operation with success as 0 and rest as failure
Throws:
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
LastModifyDateNotSetException
NotificationManagementException - Access related exception
oracle.iam.platform.kernel.StaleDataException

removeLocalefromTemplate

long removeLocalefromTemplate(java.lang.String templateName,
                              java.util.Locale locale,
                              java.util.Date timestamp)
                              throws TemplateNotFoundException,
                                     MultipleTemplateException,
                                     NotificationManagementException,
                                     LastModifyDateNotSetException,
                                     oracle.iam.platform.kernel.StaleDataException
Remove a specific locale support from a template
Parameters:
templateName - name of the template to be deleted
locale - Locale
timestamp - Will be used for Optimistic Locking
Returns:
status of the operation with success as 0 and rest as failure
Throws:
MultipleTemplateException
TemplateNotFoundException - occurs when corresponding template is not found
LastModifyDateNotSetException
NotificationManagementException - Access related exception
oracle.iam.platform.kernel.StaleDataException

modifyTemplate

long modifyTemplate(long templateid,
                    java.util.HashMap values,
                    java.util.Locale locale,
                    java.util.Date timestamp)
                    throws TemplateNotFoundException,
                           MultipleTemplateException,
                           NotificationManagementException,
                           LastModifyDateNotSetException,
                           oracle.iam.platform.kernel.StaleDataException
Modifies an existing template
Parameters:
templateid - id of the notification template
values - Hashmap of attribute names and corresponding new values
locale - Locale, needed if any parameter specific to the local associated with the template is to be modified. If is null, then only parameters associated with the template can be modified
timestamp - Will be used for Optimistic Locking
Returns:
status of the operation with success as 0 and rest as failure
Throws:
MultipleTemplateException
TemplateNotFoundException - occurs when corresponding template is not found
NotificationManagementException - Access related exception
LastModifyDateNotSetException
oracle.iam.platform.kernel.StaleDataException

modifyTemplate

long modifyTemplate(java.lang.String templateName,
                    java.util.HashMap values,
                    java.util.Locale locale,
                    java.util.Date timestamp)
                    throws TemplateNotFoundException,
                           MultipleTemplateException,
                           NotificationManagementException,
                           LastModifyDateNotSetException,
                           oracle.iam.platform.kernel.StaleDataException
Modifies an existing template
Parameters:
templateName - name of the notification template
values - Hashmap of attribute names and corresponding new values
locale - Locale, needed if any parameter specific to the local associated with the template is to be modified. If is null, then only parameters associated with the template can be modified
timestamp - Will be used for Optimistic Locking
Returns:
status of the operation with success as 0 and rest as failure
Throws:
MultipleTemplateException
TemplateNotFoundException - occurs when corresponding template is not found
LastModifyDateNotSetException
NotificationManagementException - Access related exception
oracle.iam.platform.kernel.StaleDataException

notify

boolean notify(NotificationEvent event)
               throws EventException,
                      UnresolvedNotificationDataException,
                      TemplateNotFoundException,
                      MultipleTemplateException,
                      NotificationResolverNotFoundException,
                      UserDetailsNotFoundException,
                      NotificationException
Notifies a user/system against the event passed.
Parameters:
event - Carries information on which template to use, which userid initiated it so as to pick up User preferences later from UserPreference Service From the User Preferences, it finds out the preferred providers to send notification
Returns:
boolean to show success or failure
Throws:
EventException - occurs when event is not found
UnresolvedNotificationDataExceptionoccurs - when Template data is not resolvable
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationResolverNotFoundException
UserDetailsNotFoundException
NotificationException
UnresolvedNotificationDataException

notify

boolean notify(NotificationEvent event,
               java.lang.String providerName)
               throws EventException,
                      UnresolvedNotificationDataException,
                      TemplateNotFoundException,
                      MultipleTemplateException,
                      NotificationResolverNotFoundException,
                      UserDetailsNotFoundException,
                      NotificationException,
                      ProviderNotFoundException,
                      ProviderNotEnabledException,
                      NotificationProviderException
Notifies a user/system against the event passed.
Parameters:
event - Carries information on which template to use, which userid initiated it so as to pick up User preferences later from UserPreference Service From the User Preferences, it finds out the preferred providers to send notification
providerName -
Returns:
boolean to show success or failure
Throws:
EventException - occurs when event is not found
UnresolvedNotificationDataExceptionoccurs - when Template data is not resolvable
TemplateNotFoundException - occurs when corresponding template is not found
MultipleTemplateException
NotificationResolverNotFoundException
UserDetailsNotFoundException
NotificationException
ProviderNotFoundException
ProviderNotEnabledException
NotificationProviderException
UnresolvedNotificationDataException
Since:
11.1.2.0.0

getStaticData

java.util.List getStaticData(java.lang.String eventType)
                             throws EventException
To retrieve static data associated with an event
Parameters:
eventType - type of the particular found
Returns:
list containing static data associated with the event
Throws:
EventException - occurs when event is not resolved

getAvailableData

java.util.List getAvailableData(java.lang.String eventType,
                                java.util.Map map)
                                throws EventException,
                                       UnresolvedNotificationDataException
To retrieve the available data associated with an event
Parameters:
eventType - type of the particular event
map - map which has the entity name and the corresponding value for which available data is to be fetched.For instance, map.put("Resource", "r1"); will fetch the fields associated with resource r1.
Returns:
list containing available data associated with the event
Throws:
EventException - occurs when corresponding event is not found
UnresolvedNotificationDataException - occurs when Template data is not resolvable

getEventList

java.util.List getEventList()
Retrieve list of all the notification events existing in the system
Returns:
list of all the notification events existing in the system

getEventDetails

EventXMLObject getEventDetails(java.lang.String eventType)
                               throws EventException
To get event details specific to a given event-type It aims to retrieve the dynamic parameters related to an event
Parameters:
eventType - type of the particular event
Throws:
EventException - occurs when corresponding event is not found

search

java.util.List search(SearchCriteria criteria,
                      java.util.Set retAttrs,
                      java.util.HashMap configParams,
                      java.util.Map resBundleMap)
                      throws InvalidSearchOptionException
Retrieves list of templates based on the search criteria
Parameters:
criteria - For specifying searchcriteria use templatename, eventname and locale as parameters only By default, the results will be sorted based on id column Calls can be made in the following manner SearchCriteria sc1 = new SearchCriteria("templateName", templateName, SearchCriteria.Operator.EQUAL); SearchCriteria sc2 = new SearchCriteria("eventName", eventName, SearchCriteria.Operator.EQUAL); SearchCriteria sc3 = new SearchCriteria("locale", locale, SearchCriteria.Operator.EQUAL); SearchCriteria sc4 = new SearchCriteria(sc1, sc2, SearchCriteria.Operator.AND); SearchCriteria sc5 = new SearchCriteria(sc4, sc3, SearchCriteria.Operator.AND); long start=1, end=4; List<SearchResult> list = notificationService.searchTemplate(sc5, start, end);
retAttrs - The list of attributes which are to be returned for each user.
configParams - Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.

The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.

The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional and is set to TEMPLATE_NAME by default.

The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING. This parameter is optional and is set to SortOrder.ASCENDING by default.

Returns:
A list of matching templates
Throws:
InvalidSearchOptionException

search

java.util.List search(SearchCriteria criteria,
                      java.util.Set retAttrs,
                      java.util.HashMap configParams)
                      throws InvalidSearchOptionException
Retrieves list of templates based on the search criteria
Parameters:
criteria - For specifying searchcriteria use templatename, eventname and locale as parameters only By default, the results will be sorted based on id column Calls can be made in the following manner SearchCriteria sc1 = new SearchCriteria("templateName", templateName, SearchCriteria.Operator.EQUAL); SearchCriteria sc2 = new SearchCriteria("eventName", eventName, SearchCriteria.Operator.EQUAL); SearchCriteria sc3 = new SearchCriteria("locale", locale, SearchCriteria.Operator.EQUAL); SearchCriteria sc4 = new SearchCriteria(sc1, sc2, SearchCriteria.Operator.AND); SearchCriteria sc5 = new SearchCriteria(sc4, sc3, SearchCriteria.Operator.AND); long start=1, end=4; List<SearchResult> list = notificationService.searchTemplate(sc5, start, end);
retAttrs - The list of attributes which are to be returned for each user.
configParams - Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.

The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.

The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional and is set to TEMPLATE_NAME by default.

The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING. This parameter is optional and is set to SortOrder.ASCENDING by default.

Returns:
A list of matching templates
Throws:
InvalidSearchOptionException

getListedNotificationProviders

java.util.Set getListedNotificationProviders()
Get all the notification providers
Returns:
A list of Notification Providers
Since:
11.1.2.0.0

Skip navigation links


Copyright © 2014, Oracle and/or its affiliates. All rights reserved.