org.opennms.web.notification.bobject
Class Notification

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

public class Notification
extends Object

This class holds the information parsed from the notifications.xml

Version:
1.1.1.1
Author:
Jason Johns , OpenNMS

Constructor Summary
Notification()
          Default constructor, initializes members
 
Method Summary
 void addTarget(NotificationTarget target)
          Adds a target to the notification
 String getComments()
          Returns the comments for the notification
 String getInterval()
          Returns the string version of the interval
 long getIntervalMilliseconds()
          Returns the interval converted to milliseconds
 long getIntervalSeconds()
          Returns the interval in seconds
 String getName()
          Returns the name of the notification
 List<NotificationTarget> getTargets()
          Returns the list of targets
 void setComments(String comments)
          Sets the comments for the notification
 void setInterval(String interval)
          Sets the interval for the notification
 void setName(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
 

Constructor Detail

Notification

public Notification()
Default constructor, initializes members

Method Detail

setName

public void setName(String name)
Sets the name of the notification

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

getName

public String getName()
Returns the name of the notification

Returns:
the name of the notification.

setComments

public void setComments(String comments)
Sets the comments for the notification

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

getComments

public String getComments()
Returns the comments for the notification

Returns:
comments for this notification.

setInterval

public void setInterval(String interval)
Sets the interval for the notification

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

getInterval

public 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 List<NotificationTarget> getTargets()
Returns the list of targets

Returns:
the list of targets.


Copyright © 2009. All Rights Reserved.