org.opennms.bb.dp.events
Class EventOperatorAction

java.lang.Object
  |
  +--org.opennms.bb.dp.events.EventOperatorAction
All Implemented Interfaces:
Serializable

public class EventOperatorAction
extends Object
implements Serializable

This class is designed to encapsulate the information in the operaction element of the Event DTD. This class collects the appropriate required attribute value with the actual data in the node.

Version:
CVS $Revision: 1.4 $
Author:
Brian Weaver, OpenNMS
See Also:
Serialized Form

Field Summary
private  String m_action
          The operator action string.
private  String m_menutext
          The menu text for the action
 
Constructor Summary
EventOperatorAction()
          Constructs a new operator action instance for the event stream.
EventOperatorAction(EventOperatorAction second)
          Constructs a new instance of the class and copies the data from the passed instance.
EventOperatorAction(String action)
          Constructs a new instance of the class with the passed values.
EventOperatorAction(String action, String menutext)
          Constructs a new instance of the class with the passed values.
 
Method Summary
 String getAction()
          Returns the current action registered in this object's instance.
 String getMenuText()
          Returns the current menu text that is associated with the operator action.
(package private)  void serializeToXML(PrintStream ps)
          Writes self to event stream
 void set(String action, String menutext)
          Sets the current object's value to the new values passed in this method.
 void setAction(String action)
          Sets the action test for the current instance.
 void setMenuText(String menutext)
          Sets the current menu text for the operator action.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_action

private String m_action
The operator action string.

m_menutext

private String m_menutext
The menu text for the action
Constructor Detail

EventOperatorAction

public EventOperatorAction()
Constructs a new operator action instance for the event stream. The default values are set to null.

EventOperatorAction

public EventOperatorAction(EventOperatorAction second)
Constructs a new instance of the class and copies the data from the passed instance.
Parameters:
second - The object to be copied to self.

EventOperatorAction

public EventOperatorAction(String action)
Constructs a new instance of the class with the passed values.
Parameters:
action - The action string for the operator.

EventOperatorAction

public EventOperatorAction(String action,
                           String menutext)
Constructs a new instance of the class with the passed values.
Parameters:
action - The action string for the operator.
menutext - The menu text for the operator action.
Method Detail

serializeToXML

void serializeToXML(PrintStream ps)
Writes self to event stream

set

public void set(String action,
                String menutext)
Sets the current object's value to the new values passed in this method.
Parameters:
action - The operator action text
menutext - The menu text for the action.

setAction

public void setAction(String action)
Sets the action test for the current instance.
Parameters:
action - The new action text.

getAction

public String getAction()
Returns the current action registered in this object's instance.
Returns:
The action text.

setMenuText

public void setMenuText(String menutext)
Sets the current menu text for the operator action.
Parameters:
menutext - The menu text for the action.

getMenuText

public String getMenuText()
Returns the current menu text that is associated with the operator action.
Returns:
The menu text.