OpenNMS API 1.1.3

org.opennms.netmgt.config.notificationCommands
Class Command

java.lang.Object
  extended byorg.opennms.netmgt.config.notificationCommands.Command
All Implemented Interfaces:
java.io.Serializable

public class Command
extends java.lang.Object
implements java.io.Serializable

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
private  java.util.ArrayList _argumentList
           
private  java.lang.String _comment
           
private  java.lang.String _execute
           
private  java.lang.String _name
           
private  java.util.Vector propertyChangeListeners
           
 
Constructor Summary
Command()
           
 
Method Summary
 void addArgument(Argument vArgument)
           
 void addArgument(int index, Argument vArgument)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Registers a PropertyChangeListener with this class.
 void clearArgument()
           
 java.util.Enumeration enumerateArgument()
           
 boolean equals(java.lang.Object obj)
          Note: hashCode() has not been overriden
 Argument[] getArgument()
           
 Argument getArgument(int index)
           
 java.util.Collection getArgumentCollection()
           
 int getArgumentCount()
           
 java.lang.String getComment()
          Returns the value of field 'comment'.
 java.lang.String getExecute()
          Returns the value of field 'execute'.
 java.lang.String getName()
          Returns the value of field 'name'.
 boolean isValid()
           
 void marshal(org.xml.sax.DocumentHandler handler)
           
 void marshal(java.io.Writer out)
           
protected  void notifyPropertyChangeListeners(java.lang.String fieldName, java.lang.Object oldValue, java.lang.Object newValue)
          Notifies all registered PropertyChangeListeners when a bound property's value changes.
 boolean removeArgument(Argument vArgument)
           
 boolean removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Removes the given PropertyChangeListener from this classes list of ProperyChangeListeners.
 void setArgument(Argument[] argumentArray)
           
 void setArgument(int index, Argument vArgument)
           
 void setArgumentCollection(java.util.Collection vArgument)
           
 void setComment(java.lang.String comment)
          Sets the value of field 'comment'.
 void setExecute(java.lang.String execute)
          Sets the value of field 'execute'.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
static Command unmarshal(java.io.Reader reader)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

private java.lang.String _name

_execute

private java.lang.String _execute

_comment

private java.lang.String _comment

_argumentList

private java.util.ArrayList _argumentList

propertyChangeListeners

private java.util.Vector propertyChangeListeners
Constructor Detail

Command

public Command()
Method Detail

addArgument

public void addArgument(Argument vArgument)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
vArgument -
Throws:
java.lang.IndexOutOfBoundsException

addArgument

public void addArgument(int index,
                        Argument vArgument)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vArgument -
Throws:
java.lang.IndexOutOfBoundsException

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Registers a PropertyChangeListener with this class.

Parameters:
pcl - The PropertyChangeListener to register.

clearArgument

public void clearArgument()

enumerateArgument

public java.util.Enumeration enumerateArgument()

equals

public boolean equals(java.lang.Object obj)
Note: hashCode() has not been overriden

Parameters:
obj -

getArgument

public Argument getArgument(int index)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
index -
Throws:
java.lang.IndexOutOfBoundsException

getArgument

public Argument[] getArgument()

getArgumentCollection

public java.util.Collection getArgumentCollection()

getArgumentCount

public int getArgumentCount()

getComment

public java.lang.String getComment()
Returns the value of field 'comment'.

Returns:
the value of field 'comment'.

getExecute

public java.lang.String getExecute()
Returns the value of field 'execute'.

Returns:
the value of field 'execute'.

getName

public java.lang.String getName()
Returns the value of field 'name'.

Returns:
the value of field 'name'.

isValid

public boolean isValid()

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.DocumentHandler handler)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

notifyPropertyChangeListeners

protected void notifyPropertyChangeListeners(java.lang.String fieldName,
                                             java.lang.Object oldValue,
                                             java.lang.Object newValue)
Notifies all registered PropertyChangeListeners when a bound property's value changes.

Parameters:
fieldName - the name of the property that has changed.
newValue - the new value of the property.
oldValue - the old value of the property.

removeArgument

public boolean removeArgument(Argument vArgument)
Parameters:
vArgument -

removePropertyChangeListener

public boolean removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes the given PropertyChangeListener from this classes list of ProperyChangeListeners.

Parameters:
pcl - The PropertyChangeListener to remove.
Returns:
true if the given PropertyChangeListener was removed.

setArgument

public void setArgument(int index,
                        Argument vArgument)
                 throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vArgument -
Throws:
java.lang.IndexOutOfBoundsException

setArgument

public void setArgument(Argument[] argumentArray)
Parameters:
argumentArray -

setArgumentCollection

public void setArgumentCollection(java.util.Collection vArgument)
Parameters:
vArgument -

setComment

public void setComment(java.lang.String comment)
Sets the value of field 'comment'.

Parameters:
comment - the value of field 'comment'.

setExecute

public void setExecute(java.lang.String execute)
Sets the value of field 'execute'.

Parameters:
execute - the value of field 'execute'.

setName

public void setName(java.lang.String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

unmarshal

public static Command unmarshal(java.io.Reader reader)
                         throws org.exolab.castor.xml.MarshalException,
                                org.exolab.castor.xml.ValidationException
Parameters:
reader -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException

OpenNMS API 1.1.3

Generated by root on August 19 2004 0130.