org.ow2.jasmine.monitoring.eventswitch.beans
Interface JasmineEventNotificationSLBRemote


public interface JasmineEventNotificationSLBRemote

Interface for the JasmineEventNotification stateless bean.

Author:
HAN Tianyi

Method Summary
 List<org.ow2.jasmine.event.beans.JasmineEventNotification> getAllNotifications()
          Gets all the notification events from the DataBase.
 org.ow2.jasmine.event.beans.JasmineEventNotification getEventNotification(List<org.ow2.jasmine.event.component.SearchFilter> filters)
          Looks for the given bean in the data base, knowing the specified SearchFilters.
 org.ow2.jasmine.event.beans.JasmineEventNotification getEventNotification(String id)
          Looks for the given bean in the data base.
 List<org.ow2.jasmine.event.beans.JasmineEventNotification> getEventNotifications(Date dateFrom, Date dateTo)
          Gets the event notification between two dates.
 List<org.ow2.jasmine.event.beans.JasmineEventNotification> getEventNotifications(int keepDisplayed, String acknowledgeButtonName, String... rules)
          Gets the event notifications for a given rule, a "synchronized" flag and a keepDisplayed value.

IMPORTANT: the details and actions will not be retrieved.
 org.ow2.jasmine.event.beans.JasmineEventNotification[] getEventNotifications(String id, Date date, String level, String message, Boolean status, String rule, String orderBy, Integer limit)
          looks for the beans searched for, converts the search into an array of JasmineEventNotificationEB objects and returns.
 void saveEvent(org.ow2.jasmine.event.beans.JasmineEventNotification n)
          creates the JasmineEventNotification entity bean corresponding to given datum and saves an event on the database.
 void saveExecutedAction(String id, org.ow2.jasmine.event.beans.JasmineEventNotificationExecutedAction action)
          Saves the action executed by a user in the DataBase.
 org.ow2.jasmine.event.beans.JasmineEventNotification updateEventNotification(org.ow2.jasmine.event.beans.JasmineEventNotificationUpdate updateNotification)
          Looks for the given bean in the data base, knowing the specified SearchFilters, and adds a JasmineEventNotificationDetail.
 void updateNotificationStatus(String id, boolean status)
          Updates the status of the notification : acknowledge or not.
 

Method Detail

saveExecutedAction

void saveExecutedAction(String id,
                        org.ow2.jasmine.event.beans.JasmineEventNotificationExecutedAction action)
Saves the action executed by a user in the DataBase.

Parameters:
id - the Id of the notification to update.
action - the action to save.

updateNotificationStatus

void updateNotificationStatus(String id,
                              boolean status)
Updates the status of the notification : acknowledge or not.

Parameters:
id - the id of the notification to update.
status - the new status to save.

saveEvent

void saveEvent(org.ow2.jasmine.event.beans.JasmineEventNotification n)
creates the JasmineEventNotification entity bean corresponding to given datum and saves an event on the database.

Parameters:
n - Notification to save.

getAllNotifications

List<org.ow2.jasmine.event.beans.JasmineEventNotification> getAllNotifications()
Gets all the notification events from the DataBase.

Returns:
A list that contains all the JasmineEventNotification stored in the DataBase.

getEventNotifications

org.ow2.jasmine.event.beans.JasmineEventNotification[] getEventNotifications(String id,
                                                                             Date date,
                                                                             String level,
                                                                             String message,
                                                                             Boolean status,
                                                                             String rule,
                                                                             String orderBy,
                                                                             Integer limit)
looks for the beans searched for, converts the search into an array of JasmineEventNotificationEB objects and returns.

Parameters:
id - Notification id, ignored if null.
date - Notification date, ignored if null.
level - Notification level, ignored if null.
message - Associated message, ignored if null.
status - Notification status, ignored if null.
rule - The rule id that caused the notification, ignored if null.
orderBy - Order using column, ignored if null..
limit - Maximal number of results to get, ignored if null.
Returns:
EventNotifications corresponding to the given search, null if none found.

getEventNotifications

List<org.ow2.jasmine.event.beans.JasmineEventNotification> getEventNotifications(Date dateFrom,
                                                                                 Date dateTo)
Gets the event notification between two dates.

Parameters:
dateFrom - the date from
dateTo - the date to
Returns:
a list of JasmineEventNotification

getEventNotifications

List<org.ow2.jasmine.event.beans.JasmineEventNotification> getEventNotifications(int keepDisplayed,
                                                                                 String acknowledgeButtonName,
                                                                                 String... rules)
Gets the event notifications for a given rule, a "synchronized" flag and a keepDisplayed value.

IMPORTANT: the details and actions will not be retrieved. Call

Parameters:
keepDisplayed - the keepDisplayed option, expressed in hours:
  • If "synchronized" is false, only notifications with a date inferior to now minus keepDisplayed hours will be returned.
  • If "synchronized" is true, a merge of two types of notifications is returned:
    1. Notifications with status false (i.e., not acknowledged yet)
    2. Notifications with status true AND at least one action of type ACKNOWLEDGE with a date to now minus keepDisplayed hours
acknowledgeButtonName - the name of the ACKNOWLEDGE button. if null, "synchronized" is considered to be false; otherwise it is considered to be true.
rules - rule names. might contain an * character at the end, meaning "rule starts with".
Returns:
a list of JasmineEventNotification

getEventNotification

org.ow2.jasmine.event.beans.JasmineEventNotification getEventNotification(String id)
Looks for the given bean in the data base. It returns the associated JasmineEventNotification.

Parameters:
id - Id of the notification to retrieve.
Returns:
the retrieved notification.

getEventNotification

org.ow2.jasmine.event.beans.JasmineEventNotification getEventNotification(List<org.ow2.jasmine.event.component.SearchFilter> filters)
Looks for the given bean in the data base, knowing the specified SearchFilters.

Parameters:
filters - a list of SearchFilter to get the right bean to update in the database.
Returns:
the JasmineEventNotification looked for.

updateEventNotification

org.ow2.jasmine.event.beans.JasmineEventNotification updateEventNotification(org.ow2.jasmine.event.beans.JasmineEventNotificationUpdate updateNotification)
                                                                             throws IllegalStateException
Looks for the given bean in the data base, knowing the specified SearchFilters, and adds a JasmineEventNotificationDetail. It returns the updated JasmineEventNotification.

Parameters:
updateNotification - the JasmineEventNotificationUpdate that contains the datas to update the stored JasmineEventNotification.
Returns:
the updated notification.
Throws:
IllegalStateException - if no filters are defined in the update object.


Copyright © 2013 OW2 Consortium. All Rights Reserved.