OpenNMS API 1.2.3

org.opennms.web.notification
Class NotificationModel

java.lang.Object
  extended byorg.opennms.web.notification.NotificationModel

public class NotificationModel
extends java.lang.Object


Field Summary
private  java.lang.String ANS_BY
           
private  java.lang.String CONTACT
           
private  java.lang.String EVENTID
           
private  java.lang.String INSERT_NOTIFY
           
private  java.lang.String INTERFACE
           
private static org.apache.log4j.Category m_logger
          Static Log4j logging category
private  java.lang.String MEDIA
           
private  java.lang.String NODE
           
private  java.lang.String NOTICE_ID
           
private  java.lang.String NOTICE_TIME
           
private  java.lang.String NOTIFY
           
private  java.lang.String NUM_MESG
           
private  java.lang.String OUTSTANDING
           
private  java.lang.String OUTSTANDING_COUNT
           
private  java.lang.String REPLYTIME
           
private  java.lang.String SELECT
           
private  java.lang.String SENT_TO
           
private  java.lang.String SERVICE
           
private  java.lang.String TIME
           
private  java.lang.String TXT_MESG
           
private  java.lang.String USER_OUTSTANDING
           
private  java.lang.String USER_OUTSTANDING_COUNT
           
private  java.lang.String USERID
           
 
Constructor Summary
NotificationModel()
           
 
Method Summary
 void acknowledged(java.lang.String name, int noticeId)
          This method updates the table when the user acknowledges the pager information.
 Notification[] allNotifications()
          Return all notifications, both outstanding and acknowledged.
private  java.lang.String appendZero(java.lang.String values)
          This method is used for formatting the date attributes in a proper format.
 Notification getNoticeInfo(int id)
           
 int getOutstandingNoticeCount()
          This method returns notices not yet acknowledged.
 int getOutstandingNoticeCount(java.lang.String username)
          This method returns notices not yet acknowledged.
 Notification[] getOutstandingNotices()
          This method returns the count of all outstanding notices.
 Notification[] getOutstandingNotices(java.lang.String name)
          This method returns notices not yet acknowledged.
 void insert(Notification nbean)
          This method helps insert into the database.
protected  Notification[] rs2NotifyBean(java.sql.Connection conn, java.sql.ResultSet rs)
          This method returns the data from the result set as an array of Notification objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERID

private final java.lang.String USERID
See Also:
Constant Field Values

NOTICE_TIME

private final java.lang.String NOTICE_TIME
See Also:
Constant Field Values

TXT_MESG

private final java.lang.String TXT_MESG
See Also:
Constant Field Values

NUM_MESG

private final java.lang.String NUM_MESG
See Also:
Constant Field Values

NOTIFY

private final java.lang.String NOTIFY
See Also:
Constant Field Values

TIME

private final java.lang.String TIME
See Also:
Constant Field Values

REPLYTIME

private final java.lang.String REPLYTIME
See Also:
Constant Field Values

ANS_BY

private final java.lang.String ANS_BY
See Also:
Constant Field Values

CONTACT

private final java.lang.String CONTACT
See Also:
Constant Field Values

NODE

private final java.lang.String NODE
See Also:
Constant Field Values

INTERFACE

private final java.lang.String INTERFACE
See Also:
Constant Field Values

SERVICE

private final java.lang.String SERVICE
See Also:
Constant Field Values

MEDIA

private final java.lang.String MEDIA
See Also:
Constant Field Values

EVENTID

private final java.lang.String EVENTID
See Also:
Constant Field Values

SELECT

private final java.lang.String SELECT
See Also:
Constant Field Values

NOTICE_ID

private final java.lang.String NOTICE_ID
See Also:
Constant Field Values

SENT_TO

private final java.lang.String SENT_TO
See Also:
Constant Field Values

INSERT_NOTIFY

private final java.lang.String INSERT_NOTIFY
See Also:
Constant Field Values

OUTSTANDING

private final java.lang.String OUTSTANDING
See Also:
Constant Field Values

OUTSTANDING_COUNT

private final java.lang.String OUTSTANDING_COUNT
See Also:
Constant Field Values

USER_OUTSTANDING

private final java.lang.String USER_OUTSTANDING
See Also:
Constant Field Values

USER_OUTSTANDING_COUNT

private final java.lang.String USER_OUTSTANDING_COUNT
See Also:
Constant Field Values

m_logger

private static org.apache.log4j.Category m_logger
Static Log4j logging category

Constructor Detail

NotificationModel

public NotificationModel()
Method Detail

getNoticeInfo

public Notification getNoticeInfo(int id)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

allNotifications

public Notification[] allNotifications()
                                throws java.sql.SQLException
Return all notifications, both outstanding and acknowledged.

Throws:
java.sql.SQLException

rs2NotifyBean

protected Notification[] rs2NotifyBean(java.sql.Connection conn,
                                       java.sql.ResultSet rs)
                                throws java.sql.SQLException
This method returns the data from the result set as an array of Notification objects.

Throws:
java.sql.SQLException

getOutstandingNotices

public Notification[] getOutstandingNotices()
                                     throws java.sql.SQLException
This method returns the count of all outstanding notices.

Throws:
java.sql.SQLException

getOutstandingNoticeCount

public int getOutstandingNoticeCount()
                              throws java.sql.SQLException
This method returns notices not yet acknowledged.

Throws:
java.sql.SQLException

getOutstandingNoticeCount

public int getOutstandingNoticeCount(java.lang.String username)
                              throws java.sql.SQLException
This method returns notices not yet acknowledged.

Throws:
java.sql.SQLException

getOutstandingNotices

public Notification[] getOutstandingNotices(java.lang.String name)
                                     throws java.sql.SQLException
This method returns notices not yet acknowledged.

Throws:
java.sql.SQLException

acknowledged

public void acknowledged(java.lang.String name,
                         int noticeId)
                  throws java.sql.SQLException
This method updates the table when the user acknowledges the pager information.

Throws:
java.sql.SQLException

insert

public void insert(Notification nbean)
            throws java.sql.SQLException
This method helps insert into the database.

Throws:
java.sql.SQLException

appendZero

private java.lang.String appendZero(java.lang.String values)
This method is used for formatting the date attributes in a proper format.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.