org.opennms.netmgt.config.destinationPaths
Class Target

java.lang.Object
  extended by org.opennms.netmgt.config.destinationPaths.Target
All Implemented Interfaces:
Serializable

public class Target
extends Object
implements Serializable

Class Target.

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

Constructor Summary
Target()
           
 
Method Summary
 void addCommand(int index, String vCommand)
           
 void addCommand(String vCommand)
           
 Enumeration<String> enumerateCommand()
          Method enumerateCommand.
 String getAutoNotify()
          Returns the value of field 'autoNotify'.
 String[] getCommand()
          Method getCommand.Returns the contents of the collection in an Array.
 String getCommand(int index)
          Method getCommand.
 List<String> getCommandCollection()
          Method getCommandCollection.Returns a reference to '_commandList'.
 int getCommandCount()
          Method getCommandCount.
 String getInterval()
          Returns the value of field 'interval'.
 String getName()
          Returns the value of field 'name'.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateCommand()
          Method iterateCommand.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllCommand()
           
 boolean removeCommand(String vCommand)
          Method removeCommand.
 String removeCommandAt(int index)
          Method removeCommandAt.
 void setAutoNotify(String autoNotify)
          Sets the value of field 'autoNotify'.
 void setCommand(int index, String vCommand)
           
 void setCommand(List<String> vCommandList)
          Sets the value of '_commandList' by copying the given Vector.
 void setCommand(String[] vCommandArray)
           
 void setCommandCollection(List<String> commandList)
          Deprecated.  
 void setInterval(String interval)
          Sets the value of field 'interval'.
 void setName(String name)
          Sets the value of field 'name'.
static Target 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

Target

public Target()
Method Detail

addCommand

public void addCommand(String vCommand)
                throws IndexOutOfBoundsException
Parameters:
vCommand -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCommand

public void addCommand(int index,
                       String vCommand)
                throws IndexOutOfBoundsException
Parameters:
index -
vCommand -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateCommand

public Enumeration<String> enumerateCommand()
Method enumerateCommand.

Returns:
an Enumeration over all possible elements of this collection

getAutoNotify

public String getAutoNotify()
Returns the value of field 'autoNotify'.

Returns:
the value of field 'AutoNotify'.

getCommand

public String getCommand(int index)
                  throws IndexOutOfBoundsException
Method getCommand.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getCommand

public String[] getCommand()
Method getCommand.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

getCommandCollection

public List<String> getCommandCollection()
Method getCommandCollection.Returns a reference to '_commandList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCommandCount

public int getCommandCount()
Method getCommandCount.

Returns:
the size of this collection

getInterval

public String getInterval()
Returns the value of field 'interval'.

Returns:
the value of field 'Interval'.

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

iterateCommand

public Iterator<String> iterateCommand()
Method iterateCommand.

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

removeAllCommand

public void removeAllCommand()

removeCommand

public boolean removeCommand(String vCommand)
Method removeCommand.

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

removeCommandAt

public String removeCommandAt(int index)
Method removeCommandAt.

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

setAutoNotify

public void setAutoNotify(String autoNotify)
Sets the value of field 'autoNotify'.

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

setCommand

public void setCommand(int index,
                       String vCommand)
                throws IndexOutOfBoundsException
Parameters:
index -
vCommand -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCommand

public void setCommand(String[] vCommandArray)
Parameters:
vCommandArray -

setCommand

public void setCommand(List<String> vCommandList)
Sets the value of '_commandList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCommandList - the Vector to copy.

setCommandCollection

public void setCommandCollection(List<String> commandList)
Deprecated. 

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

Parameters:
commandList - the Vector to set.

setInterval

public void setInterval(String interval)
Sets the value of field 'interval'.

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

setName

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

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

unmarshal

public static Target 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.destinationPaths.Target
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.