|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.events.EventBase
Field Summary | |
protected List |
m_autoaction
Automatic actions to be performed. |
protected String |
m_descr
A description of the event |
protected List |
m_forward
The list of forwarding information |
protected List |
m_loggroup
The list of log group messages. |
protected EventLogMessage |
m_logmsg
A log message for the event |
protected String |
m_mouseovertext
The mouse over text for the end user console. |
protected List |
m_notification
The list of notification events |
protected List |
m_operaction
Operator actions to be performed. |
protected String |
m_operinstruct
Operator instructions |
protected String |
m_severity
The severity of the event |
protected EventSnmpInfo |
m_snmp
The snmp information |
protected EventTroubleTicket |
m_tticket
The trouble ticket information |
protected String |
m_uei
The Universal Event Identifier |
Constructor Summary | |
EventBase()
Constructs a new event object with all the default values. |
|
EventBase(Event second)
Constucts a new event object that is a duplicate of the current event. |
Method Summary | |
void |
addAutoAction(String action)
Adds a new automatic action string to the event. |
void |
addForward(EventForward fwd)
Adds a new forwarding event to the list of forwarding events. |
void |
addLogGroup(String loggrp)
Adds a new log group to the current list of log groups. |
void |
addNotification(String notify)
Adds a new notification ot the current event. |
void |
addOperatorAction(EventOperatorAction eoa)
Adds a new operator action to the list of current operator actions. |
String |
getAutoAction(int which)
Returns the automatic action located at the specific index. |
List |
getAutoActions()
Returns the list of automatic actions. |
int |
getAutoActionsSize()
Return the size of the automatic actions. |
String |
getDescription()
Returns the currently defined desription for the event, if any. |
EventForward |
getForward(int which)
Returns the forwarding information in the event at the specific index. |
List |
getForwards()
Returns the list of forwarding elements. |
int |
getForwardsSize()
Returns the current number of forwarding elements in the list |
String |
getLogGroup(int which)
Returns the specific log group located at the defined index. |
List |
getLogGroups()
Returns the current list of log groups for the event. |
int |
getLogGroupsSize()
Returns the current number of log groups for the event. |
EventLogMessage |
getLogMessage()
Returns the current log message for the event. |
String |
getMouseOverText()
Returns the current mouse over text, if any. |
String |
getNotification(int which)
Returns the notification at the specific index defined by the passed parameter. |
List |
getNotifications()
Returns the list of notifications for the event. |
int |
getNotificationsSize()
Returns the number of notifications currently defined in the list. |
EventOperatorAction |
getOperatorAction(int which)
Returns the specific action that is defined at the passed index. |
List |
getOperatorActions()
Returns the list of operator actions for the event. |
int |
getOperatorActionsSize()
Returns the number of actions currently defined for the event. |
String |
getOperatorInstruction()
Returns the current operator instruction for the event. |
String |
getSeverity()
Returns the currently associated severity for the event. |
EventSnmpInfo |
getSnmpInfo()
Returns the current snmp information if it is defined. |
EventTroubleTicket |
getTroubleTicket()
Returns the trouble ticket currently associated with the event. |
String |
getUEI()
Returns the universal event identifier. |
boolean |
hasAutoActions()
Returns true if there is at least one automatic action defined for the event. |
boolean |
hasDescription()
Returns true if the current event has a description associated with it. |
boolean |
hasForwards()
Returns true if the event has forwarding information |
boolean |
hasLogGroups()
Returns true if the event has log group information |
boolean |
hasLogMessage()
Returns true if there is a log message that is currently associated with the event. |
boolean |
hasMouseOverText()
Returns true if the event has mouse over textual information. |
boolean |
hasNotifications()
Returns true if there is at least one notification for the event. |
boolean |
hasOperatorActions()
Returns true if the operator has at least one operator action defined for the event. |
boolean |
hasOperatorInstruction()
Returns true if there is an operator instruction currently associated with the event. |
boolean |
hasSeverity()
Returns true if there is a severity associated with the current event. |
boolean |
hasSnmpInfo()
Returns true if there is any snmp information defined for the host. |
boolean |
hasTroubleTicket()
Returns true if there is a trouble ticket currently associated with the event. |
boolean |
hasUEI()
Returns true if the event has a Universal Event Identifier. |
void |
serializeToXML(OutputStream ostream)
Serializes the event to an XML stream. |
(package private) void |
serializeToXML(PrintStream ps)
Writes self to event stream. |
protected void |
serializeToXML(PrintStream ps,
boolean includeEventTag)
Writes self to event stream. |
void |
setAutoActions(List actions)
Allows the setting of the auto actions by passing in the complete list |
void |
setDescription(String descr)
Sets the current description for the event. |
void |
setForwards(List fwds)
Sets the list of forwards |
void |
setLogGroups(List lgrps)
Sets the log groups for the event. |
void |
setLogMessage(EventLogMessage msg)
Sets the log message for the current event. |
void |
setMouseOverText(String text)
Sets the current mouse over text information. |
void |
setNotifications(List notify)
Sets the notifications for the list |
void |
setOperatorActions(List ops)
Sets the list of operator actions. |
void |
setOperatorInstruction(String instruction)
Sets the operating instruction for the current event. |
void |
setSeverity(String severity)
Sets the current severity for the event. |
void |
setSnmpInfo(EventSnmpInfo info)
Sets the snmp information for the event to the passed value. |
void |
setTroubleTicket(EventTroubleTicket tticket)
Sets the current trouble ticket for the event. |
void |
setUEI(String uei)
Sets the universal event identifier for the event. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected String m_uei
protected EventSnmpInfo m_snmp
protected String m_descr
protected EventLogMessage m_logmsg
protected String m_severity
protected String m_operinstruct
protected List m_autoaction
protected List m_operaction
protected List m_loggroup
protected List m_notification
protected EventTroubleTicket m_tticket
protected List m_forward
protected String m_mouseovertext
Constructor Detail |
public EventBase()
public EventBase(Event second)
second
- The event to copy into self.Method Detail |
protected void serializeToXML(PrintStream ps, boolean includeEventTag)
Writes self to event stream. This implementation is based upon the format of an event object in the eventcfg.dtd, and should be compatable with the format of the event.dtd.
Should either format diverge then derived classes cannot depend on this serialization to work correctly!
ps
- The print stream to serialize to.includeEventTag
- If true then the <event>...</event;>
tag should wrap the data in the event.public boolean hasUEI()
public String getUEI()
public void setUEI(String uei)
uei
- The new identifier for the event.public boolean hasSnmpInfo()
public EventSnmpInfo getSnmpInfo()
public void setSnmpInfo(EventSnmpInfo info)
info
- The snmp information.public boolean hasDescription()
public String getDescription()
public void setDescription(String descr)
descr
- The new description for the event.public boolean hasLogMessage()
public EventLogMessage getLogMessage()
public void setLogMessage(EventLogMessage msg)
msg
- The current log message for the event.public boolean hasSeverity()
public String getSeverity()
public void setSeverity(String severity)
severity
- The new severity for the event.public boolean hasOperatorInstruction()
public String getOperatorInstruction()
public void setOperatorInstruction(String instruction)
instruction
- The new instruction for the event.public boolean hasAutoActions()
public List getAutoActions()
public void setAutoActions(List actions)
public int getAutoActionsSize()
public String getAutoAction(int which)
which
- The request action.IndexOutOfBoundsException
- Thrown if the
requested index is out of range.public void addAutoAction(String action)
action
- The new automatic action to add.public boolean hasOperatorActions()
public List getOperatorActions()
public void setOperatorActions(List ops)
public int getOperatorActionsSize()
public EventOperatorAction getOperatorAction(int which)
which
- The index of the operator actionIndexOutOfBoundsException
- Thrown if
an illegal index is requested.public void addOperatorAction(EventOperatorAction eoa)
eoa
- The new event operator actionpublic boolean hasLogGroups()
public List getLogGroups()
public void setLogGroups(List lgrps)
public int getLogGroupsSize()
public String getLogGroup(int which)
which
- The index of the desired elementpublic void addLogGroup(String loggrp)
loggrp
- The log group to add to the list.public boolean hasNotifications()
public List getNotifications()
public void setNotifications(List notify)
public int getNotificationsSize()
public String getNotification(int which)
which
- The index of the desireed notificationIndexOutOfBoundsException
- Thrown if the
index is out of bounds or the list is empty.public void addNotification(String notify)
notify
- The new notification string.public boolean hasTroubleTicket()
public EventTroubleTicket getTroubleTicket()
public void setTroubleTicket(EventTroubleTicket tticket)
tticket
- The trouble ticket information for the event.public boolean hasForwards()
public List getForwards()
public void setForwards(List fwds)
public int getForwardsSize()
public EventForward getForward(int which)
which
- The event desired from the list of events.IndexOutOfBoundsException
- Thrown if
there is no element in the list at the specific index.public void addForward(EventForward fwd)
public boolean hasMouseOverText()
public String getMouseOverText()
public void setMouseOverText(String text)
text
- The mouse over text information.public void serializeToXML(OutputStream ostream)
ostream
- The output stream that will receive the xml data.void serializeToXML(PrintStream ps)
Writes self to event stream. This implementation is based upon the format of an event object in the eventcfg.dtd.
ps
- The print stream to serialize to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |