org.opennms.netmgt.config.destinationPaths
Class DestinationPaths

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

public class DestinationPaths
extends Object
implements Serializable

Top-level element for the destinationPaths.xml configuration file.

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

Constructor Summary
DestinationPaths()
           
 
Method Summary
 void addPath(int index, Path vPath)
           
 void addPath(Path vPath)
           
 Enumeration<Path> enumeratePath()
          Method enumeratePath.
 Header getHeader()
          Returns the value of field 'header'.
 Path[] getPath()
          Method getPath.Returns the contents of the collection in an Array.
 Path getPath(int index)
          Method getPath.
 List<Path> getPathCollection()
          Method getPathCollection.Returns a reference to '_pathList'.
 int getPathCount()
          Method getPathCount.
 boolean isValid()
          Method isValid.
 Iterator<Path> iteratePath()
          Method iteratePath.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPath()
           
 boolean removePath(Path vPath)
          Method removePath.
 Path removePathAt(int index)
          Method removePathAt.
 void setHeader(Header header)
          Sets the value of field 'header'.
 void setPath(int index, Path vPath)
           
 void setPath(List<Path> vPathList)
          Sets the value of '_pathList' by copying the given Vector.
 void setPath(Path[] vPathArray)
           
 void setPathCollection(List<Path> pathList)
          Deprecated.  
static DestinationPaths 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

DestinationPaths

public DestinationPaths()
Method Detail

addPath

public void addPath(Path vPath)
             throws IndexOutOfBoundsException
Parameters:
vPath -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPath

public void addPath(int index,
                    Path vPath)
             throws IndexOutOfBoundsException
Parameters:
index -
vPath -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumeratePath

public Enumeration<Path> enumeratePath()
Method enumeratePath.

Returns:
an Enumeration over all possible elements of this collection

getHeader

public Header getHeader()
Returns the value of field 'header'. The field 'header' has the following description: Header containing information about this configuration file.

Returns:
the value of field 'Header'.

getPath

public Path getPath(int index)
             throws IndexOutOfBoundsException
Method getPath.

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

getPath

public Path[] getPath()
Method getPath.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

getPathCollection

public List<Path> getPathCollection()
Method getPathCollection.Returns a reference to '_pathList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPathCount

public int getPathCount()
Method getPathCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iteratePath

public Iterator<Path> iteratePath()
Method iteratePath.

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

removeAllPath

public void removeAllPath()

removePath

public boolean removePath(Path vPath)
Method removePath.

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

removePathAt

public Path removePathAt(int index)
Method removePathAt.

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

setHeader

public void setHeader(Header header)
Sets the value of field 'header'. The field 'header' has the following description: Header containing information about this configuration file.

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

setPath

public void setPath(int index,
                    Path vPath)
             throws IndexOutOfBoundsException
Parameters:
index -
vPath -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPath

public void setPath(Path[] vPathArray)
Parameters:
vPathArray -

setPath

public void setPath(List<Path> vPathList)
Sets the value of '_pathList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPathList - the Vector to copy.

setPathCollection

public void setPathCollection(List<Path> pathList)
Deprecated. 

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

Parameters:
pathList - the Vector to set.

unmarshal

public static DestinationPaths 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.DestinationPaths
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.