org.opennms.netmgt.model
Class OnmsNotification

java.lang.Object
  extended by org.opennms.netmgt.model.OnmsNotification
All Implemented Interfaces:
Serializable, Acknowledgeable

public class OnmsNotification
extends Object
implements Acknowledgeable, Serializable

See Also:
Serialized Form

Constructor Summary
OnmsNotification()
          default constructor
OnmsNotification(Integer notifyId, String textMsg, OnmsEvent event, OnmsNode node, Set<OnmsUserNotification> usersNotified)
          minimal constructor
OnmsNotification(Integer notifyId, String textMsg, String subject, String numericMsg, Date pageTime, Date respondTime, String answeredBy, String ipAddress, OnmsServiceType serviceType, String queueId, OnmsEvent event, OnmsNode node, Set<OnmsUserNotification> usersNotified, String notifConfigName)
          full constructor
 
Method Summary
 void acknowledge(String ackUser)
           
 void clear(String ackUser)
           
 void escalate(String ackUser)
           
 Integer getAckId()
           
 Date getAckTime()
           
 String getAckUser()
           
 String getAnsweredBy()
           
 OnmsEvent getEvent()
           
 String getEventUei()
           
 String getIpAddress()
           
 OnmsNode getNode()
          Might be null but probably supported already by most implementations, but still, here for convenience.
 String getNotifConfigName()
           
 Integer getNotifyId()
           
 String getNumericMsg()
           
 Date getPageTime()
           
 String getQueueId()
           
 Date getRespondTime()
           
 OnmsServiceType getServiceType()
           
 String getSubject()
           
 String getTextMsg()
           
 AckType getType()
           
 Set<OnmsUserNotification> getUsersNotified()
           
 void setAnsweredBy(String answeredby)
           
 void setEvent(OnmsEvent event)
           
 void setEventUei(String eventUei)
           
 void setIpAddress(String ipAddress)
           
 void setNode(OnmsNode node)
           
 void setNotifConfigName(String notifConfigName)
           
 void setNotifyId(Integer notifyid)
           
 void setNumericMsg(String numericmsg)
           
 void setPageTime(Date pagetime)
           
 void setQueueId(String queueid)
           
 void setRespondTime(Date respondtime)
           
 void setServiceType(OnmsServiceType serviceType)
           
 void setSubject(String subject)
           
 void setTextMsg(String textmsg)
           
 void setUsersNotified(Set<OnmsUserNotification> usersnotifieds)
           
 String toString()
           
 void unacknowledge(String ackUser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnmsNotification

public OnmsNotification(Integer notifyId,
                        String textMsg,
                        String subject,
                        String numericMsg,
                        Date pageTime,
                        Date respondTime,
                        String answeredBy,
                        String ipAddress,
                        OnmsServiceType serviceType,
                        String queueId,
                        OnmsEvent event,
                        OnmsNode node,
                        Set<OnmsUserNotification> usersNotified,
                        String notifConfigName)
full constructor


OnmsNotification

public OnmsNotification()
default constructor


OnmsNotification

public OnmsNotification(Integer notifyId,
                        String textMsg,
                        OnmsEvent event,
                        OnmsNode node,
                        Set<OnmsUserNotification> usersNotified)
minimal constructor

Method Detail

getNotifyId

public Integer getNotifyId()

setNotifyId

public void setNotifyId(Integer notifyid)

getTextMsg

public String getTextMsg()

setTextMsg

public void setTextMsg(String textmsg)

getSubject

public String getSubject()

setSubject

public void setSubject(String subject)

getNumericMsg

public String getNumericMsg()

setNumericMsg

public void setNumericMsg(String numericmsg)

getPageTime

public Date getPageTime()

setPageTime

public void setPageTime(Date pagetime)

getRespondTime

public Date getRespondTime()

setRespondTime

public void setRespondTime(Date respondtime)

getAnsweredBy

public String getAnsweredBy()

setAnsweredBy

public void setAnsweredBy(String answeredby)

getIpAddress

public String getIpAddress()

setIpAddress

public void setIpAddress(String ipAddress)

getServiceType

public OnmsServiceType getServiceType()

setServiceType

public void setServiceType(OnmsServiceType serviceType)

getQueueId

public String getQueueId()

setQueueId

public void setQueueId(String queueid)

getEvent

public OnmsEvent getEvent()

setEvent

public void setEvent(OnmsEvent event)

getEventUei

public String getEventUei()

setEventUei

public void setEventUei(String eventUei)

getNode

public OnmsNode getNode()
Description copied from interface: Acknowledgeable
Might be null but probably supported already by most implementations, but still, here for convenience. Also guarantees that this is available in this API if the model changes where the node is not directly related and de-facto support is removed.

Specified by:
getNode in interface Acknowledgeable
Returns:
the related OnmsNode, null if non available or doesn't make sense

setNode

public void setNode(OnmsNode node)

getUsersNotified

public Set<OnmsUserNotification> getUsersNotified()

setUsersNotified

public void setUsersNotified(Set<OnmsUserNotification> usersnotifieds)

toString

public String toString()
Overrides:
toString in class Object

getNotifConfigName

public String getNotifConfigName()

setNotifConfigName

public void setNotifConfigName(String notifConfigName)

acknowledge

public void acknowledge(String ackUser)
Specified by:
acknowledge in interface Acknowledgeable

getType

public AckType getType()
Specified by:
getType in interface Acknowledgeable

getAckId

public Integer getAckId()
Specified by:
getAckId in interface Acknowledgeable

getAckUser

public String getAckUser()
Specified by:
getAckUser in interface Acknowledgeable

getAckTime

public Date getAckTime()
Specified by:
getAckTime in interface Acknowledgeable

clear

public void clear(String ackUser)
Specified by:
clear in interface Acknowledgeable

escalate

public void escalate(String ackUser)
Specified by:
escalate in interface Acknowledgeable

unacknowledge

public void unacknowledge(String ackUser)
Specified by:
unacknowledge in interface Acknowledgeable


Copyright © 2009. All Rights Reserved.