org.ow2.jasmine.monitoring.eventswitch.beans.impl
Class JasmineEventNotificationSLBImpl

java.lang.Object
  extended by org.ow2.jasmine.monitoring.eventswitch.beans.impl.JasmineEventNotificationSLBImpl
All Implemented Interfaces:
org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote

public class JasmineEventNotificationSLBImpl
extends java.lang.Object
implements org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote

Implementation of the JasmineEventNotification stateless bean.

Author:
HAN Tianyi

Constructor Summary
JasmineEventNotificationSLBImpl()
           
 
Method Summary
 java.util.List<org.ow2.jasmine.event.beans.JasmineEventNotification> getAllNotifications()
          Gets all the notification events from the DataBase.
 org.ow2.jasmine.event.beans.JasmineEventNotification getEventNotification(java.lang.String id)
          Looks for the given bean in the data base.
 java.util.List<org.ow2.jasmine.event.beans.JasmineEventNotification> getEventNotifications(java.util.Date dateFrom, java.util.Date dateTo)
          Gets the event notification between two dates.
 org.ow2.jasmine.event.beans.JasmineEventNotification[] getEventNotifications(java.lang.String id, java.util.Date date, java.lang.String level, java.lang.String message, java.lang.Boolean status, java.lang.String rule, java.lang.String orderBy, java.lang.Integer limit)
          Implementation of inherited method: 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)
          Implementation of inherited method: creates the JasmineEventNotification entity bean corresponding to given datum and saves an event on the database.
 void saveExecutedAction(java.lang.String id, org.ow2.jasmine.event.beans.JasmineEventNotificationExecutedAction action)
          Saves the action executed by a user in the DataBase.
 void updateNotificationStatus(java.lang.String id, boolean status)
          Updates the status of the notification : acknowledge or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasmineEventNotificationSLBImpl

public JasmineEventNotificationSLBImpl()
Method Detail

saveExecutedAction

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

Specified by:
saveExecutedAction in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
id - the Id of the notification to update.
action - the action to save.
See Also:
JasmineEventNotificationSLBRemote.saveExecutedAction(String, JasmineEventNotificationExecutedAction)

updateNotificationStatus

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

Specified by:
updateNotificationStatus in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
id - the id of the notification to update.
status - the new status to save.

saveEvent

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

Specified by:
saveEvent in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
n - Notification to save.
See Also:
JasmineEventNotificationSLBRemote#saveEvent(JasmineEventNotificationEB)

getEventNotifications

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

Specified by:
getEventNotifications in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
id - Notification id
date - Notification date
level - Notification level
message - Associated message
status - Notification status
rule - The rule id that caused the notification
orderBy - Order using column.
limit - Maximal number of results to get.
Returns:
EventNotifications corresponding to the given search, null if none found.
See Also:
JasmineEventNotification[] getEventNotifications(int, Date, String, String, Boolean, int, String, int);

getEventNotifications

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

Specified by:
getEventNotifications in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
dateFrom - the date from
dateTo - the date to
Returns:
a list of JasmineEventNotification

getAllNotifications

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

Specified by:
getAllNotifications in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Returns:
A list that contains all the JasmineEventNotification stored in the DataBase.

getEventNotification

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

Specified by:
getEventNotification in interface org.ow2.jasmine.monitoring.eventswitch.beans.JasmineEventNotificationSLBRemote
Parameters:
id - Id of the notification to retrieve.
Returns:
the retrieved notification.


Copyright © 2009 OW2 Consortium. All Rights Reserved.