OpenNMS API 1.2.9

## org.opennms.web.notification.bobject
Class Notification

    java.lang.Object
      org.opennms.web.notification.bobject.Notification

public class Notification
extends java.lang.Object

This class holds the information parsed from the notifications.xml

Version:
  1.1.1.1
Author:
  Jason Johns , OpenNMS

Field Summary
`private java.lang.String` `m_comments` Comments for the notification
`private java.lang.String` `m_interval` The interval to wait between processing target
`private java.lang.String` `m_name` The name of the notification
`private java.util.List` `m_targets` The list of users or other notifications to include in this notification

Constructor Summary
`Notification()` Default constructor, initializes members

Method Summary
`void` `addTarget(NotificationTarget target)` Adds a target to the notification
`java.lang.String` `getComments()` Returns the comments for the notification
`java.lang.String` `getInterval()` Returns the string version of the interval
`long` `getIntervalMilliseconds()` Returns the interval converted to milliseconds
`long` `getIntervalSeconds()` Returns the interval in seconds
`java.lang.String` `getName()` Returns the name of the notification
`java.util.List` `getTargets()` Returns the list of targets
`void` `setComments(java.lang.String comments)` Sets the comments for the notification
`void` `setInterval(java.lang.String interval)` Sets the interval for the notification
`void` `setName(java.lang.String name)` Sets the name of the notification

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_interval

    private java.lang.String m_interval

  The interval to wait between processing target

### m_name

    private java.lang.String m_name

  The name of the notification

### m_comments

    private java.lang.String m_comments

  Comments for the notification

### m_targets

    private java.util.List m_targets

  The list of users or other notifications to include in this notification

Constructor Detail

### Notification

    public Notification()

  Default constructor, initializes members

Method Detail

### setName

    public void setName(java.lang.String name)

  Sets the name of the notification

  Parameters:
    `name` - the name to be set for this notification.

### getName

    public java.lang.String getName()

  Returns the name of the notification

  Returns:
    the name of the notification.

### setComments

    public void setComments(java.lang.String comments)

  Sets the comments for the notification

  Parameters:
    `comments` - comments to be set for this notification.

### getComments

    public java.lang.String getComments()

  Returns the comments for the notification

  Returns:
    comments for this notification.

### setInterval

    public void setInterval(java.lang.String interval)

  Sets the interval for the notification

  Parameters:
    `interval` - the interval to be set for this notification.

### getInterval

    public java.lang.String getInterval()

  Returns the string version of the interval

  Returns:
    the interval for this notification.

### getIntervalMilliseconds

    public long getIntervalMilliseconds()

  Returns the interval converted to milliseconds

  Returns:
    the interval in milliseconds

### getIntervalSeconds

    public long getIntervalSeconds()

  Returns the interval in seconds

  Returns:
    the interval in seconds

### addTarget

    public void addTarget(NotificationTarget target)

  Adds a target to the notification

  Parameters:
    `target` - a target to be added for this notification.

### getTargets

    public java.util.List getTargets()

  Returns the list of targets

  Returns:
    the list of targets.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.