Interface NotificationService
-
Method Summary
Modifier and TypeMethodDescriptionlongaddLocaleToTemplate(long templateid, Locale locale, HashMap<String, Object> mapLocaleTemplate) Add a new localized template to the existing notification templatelongaddLocaleToTemplate(String templateNameString, Locale locale, HashMap<String, Object> mapLocaleTemplate) Add a new localized template to the existing notification templatelongaddTemplate(String eventName, String templatename, String description, boolean snmpSupported) Add a new template in OIM RepositorylongaddTemplate(NotificationTemplate template) Add a new template in OIM RepositorylongdeleteTemplate(long templateid, Date timestamp) Removes a template from repository based on template IDlongdeleteTemplate(String templateName, Date timestamp) Removes a template from repository based on template namegetAvailableData(String eventType, Map<String, Object> map) To retrieve the available data associated with an eventgetEventDetails(String eventType) To get event details specific to a given event-type It aims to retrieve the dynamic parameters related to an eventRetrieve list of all the notification events existing in the systemGet all the notification providersgetStaticData(String eventType) To retrieve static data associated with an eventlookupTemplate(long templateid, Locale locale) Retrieves a template based on given templateid and localelookupTemplate(String templateName, Locale locale) Retrieves a template based on given template name and localelongModifies an existing templatelongModifies an existing templatebooleannotify(BulkNotificationEvent event) Notifies a list of users/system against the event passed.booleannotify(NotificationEvent event) Notifies a user/system against the event passed.booleannotify(NotificationEvent event, String providerName) Notifies a user/system against the event passed.longremoveLocalefromTemplate(long templateid, Locale locale, Date timestamp) Remove a specific locale support from a templatelongremoveLocalefromTemplate(String templateName, Locale locale, Date timestamp) Remove a specific locale support from a templateRetrieves list of templates based on the search criteriasearch(SearchCriteria criteria, Set<String> retAttrs, HashMap<String, Object> configParams, Map<String, Object> resBundleMap) Retrieves list of templates based on the search criteriasearchTemplate(SearchCriteria searchCriteria, long start, long end) Retrieves list of templates based on the search criteria
-
Method Details
-
addTemplate
long addTemplate(NotificationTemplate template) throws TemplateAlreadyExistsException, NotificationManagementException Add a new template in OIM Repository- Parameters:
template- Notification Template to be saved- Returns:
- long templateid
- Throws:
TemplateAlreadyExistsExceptionNotificationManagementException
-
addTemplate
long addTemplate(String eventName, String templatename, String description, boolean snmpSupported) throws TemplateAlreadyExistsException, NotificationManagementException Add a new template in OIM Repository- Parameters:
eventName- Name of the event to which the template is to be associatedtemplatename- Name of the Templatedescription- Description of the TemplatesnmpSupported- boolean to specify if SNMP is supported or not- Returns:
- long templateid
- Throws:
TemplateAlreadyExistsExceptionNotificationManagementException
-
addLocaleToTemplate
long addLocaleToTemplate(String templateNameString, Locale locale, HashMap<String, Object> mapLocaleTemplate) throws TemplateNotFoundException, MultipleTemplateException, NotificationManagementExceptionAdd a new localized template to the existing notification template- Parameters:
templateNameString- name of the template where new locale support is being addedlocale- LocalemapLocaleTemplate- Hashmap of attribute names and corresponding values keys' name of HashMap: "SHORTMESSAGEBODY" "LONGMESSAGEBODY" "MESSAGESUBJECT" "ENCODING" "TYPE"- Returns:
- long templateid
- Throws:
TemplateNotFoundExceptionMultipleTemplateExceptionNotificationManagementException
-
addLocaleToTemplate
long addLocaleToTemplate(long templateid, Locale locale, HashMap<String, Object> mapLocaleTemplate) throws TemplateNotFoundException, NotificationManagementExceptionAdd a new localized template to the existing notification template- Parameters:
templateid- id of the template where new locale support is being addedlocale- LocalemapLocaleTemplate- Hashmap of attribute names and corresponding values keys' name of HashMap: "SHORTMESSAGEBODY" "LONGMESSAGEBODY" "MESSAGESUBJECT" "ENCODING" "TYPE"- Returns:
- long templateid
- Throws:
TemplateNotFoundExceptionNotificationManagementException
-
searchTemplate
List<SearchResult> 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; Listlist = notificationService.searchTemplate(sc5, start, end); start- specifies starting of the subset of the complete search result to be fetchedend- specifies end of the subset of the complete search result to be fetched- Returns:
- A list of matching templates
- Throws:
InvalidSearchOptionExceptionNotificationManagementException
-
lookupTemplate
NotificationTemplate lookupTemplate(long templateid, 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 loadedlocale- Locale- Returns:
- Notification Template Data
- Throws:
TemplateNotFoundExceptionMultipleTemplateExceptionNotificationManagementException
-
lookupTemplate
NotificationTemplate lookupTemplate(String templateName, 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 loadedlocale- Locale- Returns:
- Notification Template Data
- Throws:
TemplateNotFoundExceptionMultipleTemplateExceptionNotificationManagementException
-
deleteTemplate
long deleteTemplate(long templateid, 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 deletedtimestamp- last timestamp for the template- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
TemplateNotFoundExceptionLastModifyDateNotSetExceptionoracle.iam.platform.kernel.StaleDataExceptionNotificationManagementExceptionMultipleTemplateException
-
deleteTemplate
long deleteTemplate(String templateName, 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 deletedtimestamp- last timestamp for the template- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
TemplateNotFoundExceptionMultipleTemplateExceptionNotificationManagementExceptionLastModifyDateNotSetExceptionoracle.iam.platform.kernel.StaleDataException
-
removeLocalefromTemplate
long removeLocalefromTemplate(long templateid, Locale locale, 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 deletedlocale- Localetimestamp- Will be used for Optimistic Locking- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
TemplateNotFoundExceptionMultipleTemplateExceptionLastModifyDateNotSetExceptionNotificationManagementExceptionoracle.iam.platform.kernel.StaleDataException
-
removeLocalefromTemplate
long removeLocalefromTemplate(String templateName, Locale locale, 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 deletedlocale- Localetimestamp- Will be used for Optimistic Locking- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
MultipleTemplateExceptionTemplateNotFoundExceptionLastModifyDateNotSetExceptionNotificationManagementExceptionoracle.iam.platform.kernel.StaleDataException
-
modifyTemplate
long modifyTemplate(long templateid, HashMap<String, Object> values, Locale locale, Date timestamp) throws TemplateNotFoundException, MultipleTemplateException, NotificationManagementException, LastModifyDateNotSetException, oracle.iam.platform.kernel.StaleDataExceptionModifies an existing template- Parameters:
templateid- id of the notification templatevalues- Hashmap of attribute names and corresponding new valueslocale- 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 modifiedtimestamp- Will be used for Optimistic Locking- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
MultipleTemplateExceptionTemplateNotFoundExceptionNotificationManagementExceptionLastModifyDateNotSetExceptionoracle.iam.platform.kernel.StaleDataException
-
modifyTemplate
long modifyTemplate(String templateName, HashMap<String, Object> values, Locale locale, Date timestamp) throws TemplateNotFoundException, MultipleTemplateException, NotificationManagementException, LastModifyDateNotSetException, oracle.iam.platform.kernel.StaleDataExceptionModifies an existing template- Parameters:
templateName- name of the notification templatevalues- Hashmap of attribute names and corresponding new valueslocale- 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 modifiedtimestamp- Will be used for Optimistic Locking- Returns:
- status of the operation with success as 0 and rest as failure
- Throws:
MultipleTemplateExceptionTemplateNotFoundExceptionLastModifyDateNotSetExceptionNotificationManagementExceptionoracle.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 regarding 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:
EventExceptionUnresolvedNotificationDataExceptionoccursTemplateNotFoundExceptionMultipleTemplateExceptionNotificationResolverNotFoundExceptionUserDetailsNotFoundExceptionNotificationExceptionUnresolvedNotificationDataException
-
notify
boolean notify(NotificationEvent event, 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 regarding 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 notificationproviderName- - Represents Notification provider name e.g. EmailServiceProvider, UMSEmailServiceProvider- Returns:
- boolean to show success or failure
- Throws:
EventExceptionUnresolvedNotificationDataExceptionoccursTemplateNotFoundExceptionMultipleTemplateExceptionNotificationResolverNotFoundExceptionUserDetailsNotFoundExceptionNotificationExceptionProviderNotFoundExceptionProviderNotEnabledExceptionNotificationProviderExceptionUnresolvedNotificationDataException- Since:
- 11.1.2.0.0
-
notify
boolean notify(BulkNotificationEvent event) throws EventException, UnresolvedNotificationDataException, TemplateNotFoundException, MultipleTemplateException, NotificationResolverNotFoundException, UserDetailsNotFoundException, NotificationException Notifies a list of users/system against the event passed.- Parameters:
event- Carries information regarding 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 a single notification to multiple users (to/cc/bcc).- Returns:
- boolean to show success or failure
- Throws:
EventExceptionUnresolvedNotificationDataExceptionoccursTemplateNotFoundExceptionMultipleTemplateExceptionNotificationResolverNotFoundExceptionUserDetailsNotFoundExceptionNotificationExceptionUnresolvedNotificationDataException
-
getStaticData
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
-
getAvailableData
List<NotificationAttribute> getAvailableData(String eventType, Map<String, Object> map) throws EventException, UnresolvedNotificationDataExceptionTo retrieve the available data associated with an event- Parameters:
eventType- type of the particular eventmap- 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:
EventExceptionUnresolvedNotificationDataException
-
getEventList
Retrieve list of all the notification events existing in the system- Returns:
- list of all the notification events existing in the system
-
getEventDetails
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
-
search
List<SearchResult> search(SearchCriteria criteria, Set<String> retAttrs, HashMap<String, Object> configParams, Map<String, throws InvalidSearchOptionExceptionObject> resBundleMap) 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; Listlist = 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
List<SearchResult> search(SearchCriteria criteria, Set<String> retAttrs, HashMap<String, Object> configParams) throws InvalidSearchOptionExceptionRetrieves 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; Listlist = 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
Get all the notification providers- Returns:
- A list of Notification Providers
- Since:
- 11.1.2.0.0
-