AdventNet Web NMS 4 API Specification

com.adventnet.nms.fe.alert.ejb
Interface AlertSessionRemote

All Superinterfaces:
CustomSessionRemote, javax.ejb.EJBObject, java.rmi.Remote

public interface AlertSessionRemote
extends CustomSessionRemote

This is the "Remote" interface for the AlertSessionBean. Using the AlertSessionBean (the associated EJBean), both CustomView related operations and AlertAPI related operations can be performed.

Since:
Web NMS 2.3
See Also:
CustomSessionRemote

Method Summary
 boolean clearAlert(java.lang.String ticket, java.lang.String entity)
          Clears the alert i.e, Changes the severity of the alert to clear.
 boolean deleteAlert(java.lang.String ticket, java.lang.String entity)
          Deletes the alert from the system
 void deleteAlertAnnotation(java.lang.String ticket, java.lang.String entity)
          To delete Alert Annotation for an Alert Object
 void deleteAlertHistory(java.lang.String ticket, java.lang.String entity)
          To delete Alert History for an Alert Object
 int getAlertCount(java.lang.String ownerName, java.lang.String[] category, int severity)
          Returns the number of alerts for the specified array of categories and severity
 int getAlertCount(java.lang.String ownerName, java.lang.String category, int severity)
          Returns the number of alerts with given category and severity.
 com.adventnet.nms.fe.alert.ejb.AlertCountData getAlertCountData(java.lang.String ownerName)
          Returns a AlertCountData object containing information about the number of Alerts present in each category and severity.
 com.adventnet.nms.fe.alert.ejb.AlertCountData getAlertCountData(java.lang.String ownerName, java.lang.String[] categoryList)
          Returns a AlertCountData object containing information about the number of Alerts present in each category and severity.
 int getAlertsCount(java.lang.String ticket, int severity)
          Returns the number of alerts with given severity in the WebNMS System.
 java.util.Vector getAnnotation(java.lang.String ticket, java.lang.String entity)
          Get the Complete set of AlertAnnotation Objects in a Vector for a particular Alert.
 java.lang.String getGroupViewMode(java.lang.String ticket)
          Alert objects can be grouped based on the "groupName" property of the Alert.
 java.util.Vector getHistory(java.lang.String ticket, java.lang.String entity)
          Get the Complete set of AlertHistory Objects in a Vector for a particular Alert.
 int getTotalAlertCount(java.lang.String ownerName)
          Returns Total number of Alerts in the Web NMS system.
 int getTotalAlertCount(java.lang.String ownerName, java.lang.String category)
          Returns the number of alerts with given category.
 int getTotalAlertCount(java.lang.String ownerName, java.lang.String[] category)
          Returns the number of alerts belonging to any of the given categories.
 com.adventnet.nms.fe.alert.ejb.AlertCountData getUserAlertCountData(java.lang.String userName, java.lang.String[] categoryList)
          Returns a AlertCountData object containing information about the number of Alerts present in each category and severity.
 boolean pickUpAlert(java.lang.String who, java.lang.String entity)
          Picks up an alert.
 boolean unPickAlert(java.lang.String who, java.lang.String entity)
          This method unpicks the alert, whose entity field matches entity,if it is already picked up by an user.
 boolean updateNotes(java.lang.String userName, java.lang.String entity, java.lang.String notes)
          To add annotation notes to the Alert as annotated by user of name userName.
 
Methods inherited from interface com.adventnet.nms.fe.common.ejb.CustomSessionRemote
createCustomView, createCustomView, getAllViewIDsAndProps, getData, getObjectNamesWithProps, getPropertiesOfObject, getTotalCount, getTotalCount, getTotalCount, getViewProperties, modifyCustomView, removeCustomView, renameCustomView, saveViewState
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getGroupViewMode

public java.lang.String getGroupViewMode(java.lang.String ticket)
                                  throws java.rmi.RemoteException
Alert objects can be grouped based on the "groupName" property of the Alert. Alerts with the same group name will form a group under this mechanism. When there is more than one alert in a group, one among them will represent that group. This is based on the setting of the parameter "GROUP_ALERTS_MODE" of com.adventnet.nms.eventdb.EventMgr module in the configuration file named processSmall_begin.conf_RDBMS_BE (RDBMS mode) present in /conf directory. This can be either "max","latest" or "none".

If the group mode is "none", then the alerts are not grouped and all the alerts are shown separately.

If the group mode is "max", then the alert of maximum severity, out of all the alerts belonging to that group, represents that group.

If the group mode is "latest", then the latest alert from an alert group represents that group.

This method will return the group view mode set in the configuration file processSmall_begin.conf_RDBMS_BE (RDBMS mode) as mentioned above.

Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
Returns:
One of the three values : "max", "latest" or "none".
Throws:
java.rmi.RemoteException - if an error occurs

pickUpAlert

public boolean pickUpAlert(java.lang.String who,
                           java.lang.String entity)
                    throws java.rmi.RemoteException
Picks up an alert. The owner of the alert object is changed to the name specified in the second argument.
Parameters:
who - The user name to be assigned to the Alert.who field
entity - The entity of the Alert object to be picked up.
Returns:
Success of the request
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

unPickAlert

public boolean unPickAlert(java.lang.String who,
                           java.lang.String entity)
                    throws java.rmi.RemoteException
This method unpicks the alert, whose entity field matches entity,if it is already picked up by an user. An AlertAnnotation entry will be entered for user who unpicked the alert.
Parameters:
who - The user name who unpicking the alert
entity - The entity of the Alert object to be picked up.
Returns:
Success of the request
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

deleteAlert

public boolean deleteAlert(java.lang.String ticket,
                           java.lang.String entity)
                    throws java.rmi.RemoteException
Deletes the alert from the system
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The entity of the alert object to be deleted
Returns:
Success of the request
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

clearAlert

public boolean clearAlert(java.lang.String ticket,
                          java.lang.String entity)
                   throws java.rmi.RemoteException
Clears the alert i.e, Changes the severity of the alert to clear.
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The entity of thr Alert Object whose status is to be cleared.
Returns:
Success of the request
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

updateNotes

public boolean updateNotes(java.lang.String userName,
                           java.lang.String entity,
                           java.lang.String notes)
                    throws java.rmi.RemoteException
To add annotation notes to the Alert as annotated by user of name userName. This call would be useful for servlets in HTML UI.
Parameters:
userName - The name of the user who is adding the annotation
entity - The entity of the Alert to which annotation has to be done.
notes - The text which is to be used for annotation.
Returns:
Success of the request
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

getAnnotation

public java.util.Vector getAnnotation(java.lang.String ticket,
                                      java.lang.String entity)
                               throws java.rmi.RemoteException
Get the Complete set of AlertAnnotation Objects in a Vector for a particular Alert. The Vector will be arranged according to Annotation Object's modTime in ascending order. If there is no AlertAnnotation Object for that entity, this method will return null.
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The unique entity name of the Alert.
Returns:
The Vector of AlertAnnotation objects. If the Annotation Object does not exist, returns null.
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
See Also:
AlertAnnotation

getHistory

public java.util.Vector getHistory(java.lang.String ticket,
                                   java.lang.String entity)
                            throws java.rmi.RemoteException
Get the Complete set of AlertHistory Objects in a Vector for a particular Alert. The Vector will be arranged according to History Object's modTime in ascending order. If there is no AlertHistory Object for that entity, this method will return null.
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The unique entity name of the Alert.
Returns:
The Vector of AlertHistory object. If the History Object does not exist, returns null.
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
See Also:
AlertHistory

getAlertsCount

public int getAlertsCount(java.lang.String ticket,
                          int severity)
                   throws java.rmi.RemoteException
Returns the number of alerts with given severity in the WebNMS System.
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
severity - The severity value of the Alert as specified in the SeverityInfo.conf file in the /conf directory..
Returns:
Number of Alerts in the System with the given severity
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

deleteAlertAnnotation

public void deleteAlertAnnotation(java.lang.String ticket,
                                  java.lang.String entity)
                           throws java.rmi.RemoteException
To delete Alert Annotation for an Alert Object
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The unique entity name of the Alert.
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

deleteAlertHistory

public void deleteAlertHistory(java.lang.String ticket,
                               java.lang.String entity)
                        throws java.rmi.RemoteException
To delete Alert History for an Alert Object
Parameters:
ticket - String value which gets the userName as ticket for authentication and logging.
entity - The unique entity name of the Alert.
Throws:
java.rmi.RemoteException - if error occurs in Remote machine

getTotalAlertCount

public int getTotalAlertCount(java.lang.String ownerName)
                       throws java.rmi.RemoteException,
                              NmsStorageException
Returns Total number of Alerts in the Web NMS system.
Parameters:
ownerName - which gets the userName as ticket for authentication and logging.
Returns:
total number of alerts present in the Web NMS system.
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
NmsStorageException - if error occurs while querying DB

getAlertCount

public int getAlertCount(java.lang.String ownerName,
                         java.lang.String category,
                         int severity)
                  throws java.rmi.RemoteException,
                         NmsStorageException
Returns the number of alerts with given category and severity.
Parameters:
ownerName - the userName as ticket for authentication and logging.
category - category of the Alert.
severity - The severity value of the alert as specified in the SeverityInfo.conf file in the WebNMS/conf directory.
Returns:
number of alerts present in Web NMS with given category and severity.
Throws:
java.rmi.RemoteException - if an error occurs
NmsStorageException - if an error occurs

getTotalAlertCount

public int getTotalAlertCount(java.lang.String ownerName,
                              java.lang.String category)
                       throws java.rmi.RemoteException,
                              NmsStorageException
Returns the number of alerts with given category.
Parameters:
ownerName - the userName as ticket for authentication and logging.
category - category of the Alert.
Returns:
number of alerts present in Web NMS with given category.
Throws:
java.rmi.RemoteException - if an error occurs
NmsStorageException - if an error occurs

getTotalAlertCount

public int getTotalAlertCount(java.lang.String ownerName,
                              java.lang.String[] category)
                       throws java.rmi.RemoteException,
                              NmsStorageException
Returns the number of alerts belonging to any of the given categories.
Parameters:
ownerName - the userName as ticket for authentication and logging.
category - the array of categories of the Alert.
Returns:
number of alerts present in Web NMS with any of the given categories.
Throws:
java.rmi.RemoteException - if an error occurs
NmsStorageException - if an error occurs

getAlertCount

public int getAlertCount(java.lang.String ownerName,
                         java.lang.String[] category,
                         int severity)
                  throws java.rmi.RemoteException,
                         NmsStorageException
Returns the number of alerts for the specified array of categories and severity
Parameters:
ownerName - the userName as ticket for authentication and logging.
category - array of categories of the Alerts.
severity - The severity value of the alert as specified in the SeverityInfo.conf file in the WebNMS/conf directory.
Returns:
number of alerts present in Web NMS with one of the given categories and severity.
Throws:
java.rmi.RemoteException - if an error occurs
NmsStorageException - if an error occurs

getAlertCountData

public com.adventnet.nms.fe.alert.ejb.AlertCountData getAlertCountData(java.lang.String ownerName)
                                                                throws java.rmi.RemoteException,
                                                                       NmsStorageException
Returns a AlertCountData object containing information about the number of Alerts present in each category and severity.
Parameters:
ownerName - the userName as ticket for authentication and logging.
Returns:
a AlertCountData object with Alert count data
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
NmsStorageException - if error occurs while querying DB

getAlertCountData

public com.adventnet.nms.fe.alert.ejb.AlertCountData getAlertCountData(java.lang.String ownerName,
                                                                       java.lang.String[] categoryList)
                                                                throws java.rmi.RemoteException,
                                                                       NmsStorageException
Returns a AlertCountData object containing information about the number of Alerts present in each category and severity. The AlertCountData will have "Categories-Total" as a category with the total calculated for the alerts present in the specified list of catogories categoryList.
Parameters:
ownerName - the userName as ticket for authentication and logging.
categoryList - the list of categories based on which Categories-Total has to be calculated.
Returns:
a AlertCountData object with Alert count data
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
NmsStorageException - if error occurs while querying DB

getUserAlertCountData

public com.adventnet.nms.fe.alert.ejb.AlertCountData getUserAlertCountData(java.lang.String userName,
                                                                           java.lang.String[] categoryList)
                                                                    throws java.rmi.RemoteException,
                                                                           NmsStorageException
Returns a AlertCountData object containing information about the number of Alerts present in each category and severity.
Parameters:
userName - name of the user who request Alert Count Data.
categoryList - the list of categories based on which Alert count total has to be calculated.
Returns:
a AlertCountData object with Alert Count Data
Throws:
java.rmi.RemoteException - if error occurs in Remote machine
NmsStorageException - if error occurs while querying DB

AdventNet Web NMS 4 API Specification