org.opennms.netmgt.config.notificationCommands
Class Command

java.lang.Object
  extended by org.opennms.netmgt.config.notificationCommands.Command
All Implemented Interfaces:
Serializable

public class Command
extends Object
implements Serializable

Class Command.

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

Constructor Summary
Command()
           
 
Method Summary
 void addArgument(Argument vArgument)
           
 void addArgument(int index, Argument vArgument)
           
 Enumeration<Argument> enumerateArgument()
          Method enumerateArgument.
 Argument[] getArgument()
          Method getArgument.Returns the contents of the collection in an Array.
 Argument getArgument(int index)
          Method getArgument.
 List<Argument> getArgumentCollection()
          Method getArgumentCollection.Returns a reference to '_argumentList'.
 int getArgumentCount()
          Method getArgumentCount.
 String getBinary()
          Returns the value of field 'binary'.
 String getComment()
          Returns the value of field 'comment'.
 String getExecute()
          Returns the value of field 'execute'.
 String getName()
          Returns the value of field 'name'.
 boolean isValid()
          Method isValid.
 Iterator<Argument> iterateArgument()
          Method iterateArgument.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllArgument()
           
 boolean removeArgument(Argument vArgument)
          Method removeArgument.
 Argument removeArgumentAt(int index)
          Method removeArgumentAt.
 void setArgument(Argument[] vArgumentArray)
           
 void setArgument(int index, Argument vArgument)
           
 void setArgument(List<Argument> vArgumentList)
          Sets the value of '_argumentList' by copying the given Vector.
 void setArgumentCollection(List<Argument> argumentList)
          Deprecated.  
 void setBinary(String binary)
          Sets the value of field 'binary'.
 void setComment(String comment)
          Sets the value of field 'comment'.
 void setExecute(String execute)
          Sets the value of field 'execute'.
 void setName(String name)
          Sets the value of field 'name'.
static Command unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()
Method Detail

addArgument

public void addArgument(Argument vArgument)
                 throws IndexOutOfBoundsException
Parameters:
vArgument -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addArgument

public void addArgument(int index,
                        Argument vArgument)
                 throws IndexOutOfBoundsException
Parameters:
index -
vArgument -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateArgument

public Enumeration<Argument> enumerateArgument()
Method enumerateArgument.

Returns:
an Enumeration over all possible elements of this collection

getArgument

public Argument getArgument(int index)
                     throws IndexOutOfBoundsException
Method getArgument.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.notificationCommands.Argument at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getArgument

public Argument[] getArgument()
Method getArgument.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getArgumentCollection

public List<Argument> getArgumentCollection()
Method getArgumentCollection.Returns a reference to '_argumentList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getArgumentCount

public int getArgumentCount()
Method getArgumentCount.

Returns:
the size of this collection

getBinary

public String getBinary()
Returns the value of field 'binary'.

Returns:
the value of field 'Binary'.

getComment

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

Returns:
the value of field 'Comment'.

getExecute

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

Returns:
the value of field 'Execute'.

getName

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

Returns:
the value of field 'Name'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateArgument

public Iterator<Argument> iterateArgument()
Method iterateArgument.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllArgument

public void removeAllArgument()

removeArgument

public boolean removeArgument(Argument vArgument)
Method removeArgument.

Parameters:
vArgument -
Returns:
true if the object was removed from the collection.

removeArgumentAt

public Argument removeArgumentAt(int index)
Method removeArgumentAt.

Parameters:
index -
Returns:
the element removed from the collection

setArgument

public void setArgument(int index,
                        Argument vArgument)
                 throws IndexOutOfBoundsException
Parameters:
index -
vArgument -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setArgument

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

setArgument

public void setArgument(List<Argument> vArgumentList)
Sets the value of '_argumentList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vArgumentList - the Vector to copy.

setArgumentCollection

public void setArgumentCollection(List<Argument> argumentList)
Deprecated. 

Sets the value of '_argumentList' by setting it to the given Vector. No type checking is performed.

Parameters:
argumentList - the Vector to set.

setBinary

public void setBinary(String binary)
Sets the value of field 'binary'.

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

setComment

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

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

setExecute

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

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

setName

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

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

unmarshal

public static Command unmarshal(Reader reader)
                         throws org.exolab.castor.xml.MarshalException,
                                org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.notificationCommands.Command
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2008. All Rights Reserved.