org.opennms.netmgt.config.datacollection
Class DatacollectionConfig

java.lang.Object
  extended by org.opennms.netmgt.config.datacollection.DatacollectionConfig
All Implemented Interfaces:
Serializable

public class DatacollectionConfig
extends Object
implements Serializable

Top-level element for the datacollection-config.xml configuration file.

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

Constructor Summary
DatacollectionConfig()
           
 
Method Summary
 void addSnmpCollection(int index, SnmpCollection vSnmpCollection)
           
 void addSnmpCollection(SnmpCollection vSnmpCollection)
           
 Enumeration<SnmpCollection> enumerateSnmpCollection()
          Method enumerateSnmpCollection.
 String getRrdRepository()
          Returns the value of field 'rrdRepository'.
 SnmpCollection[] getSnmpCollection()
          Method getSnmpCollection.Returns the contents of the collection in an Array.
 SnmpCollection getSnmpCollection(int index)
          Method getSnmpCollection.
 List<SnmpCollection> getSnmpCollectionCollection()
          Method getSnmpCollectionCollection.Returns a reference to '_snmpCollectionList'.
 int getSnmpCollectionCount()
          Method getSnmpCollectionCount.
 boolean isValid()
          Method isValid.
 Iterator<SnmpCollection> iterateSnmpCollection()
          Method iterateSnmpCollection.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllSnmpCollection()
           
 boolean removeSnmpCollection(SnmpCollection vSnmpCollection)
          Method removeSnmpCollection.
 SnmpCollection removeSnmpCollectionAt(int index)
          Method removeSnmpCollectionAt.
 void setRrdRepository(String rrdRepository)
          Sets the value of field 'rrdRepository'.
 void setSnmpCollection(int index, SnmpCollection vSnmpCollection)
           
 void setSnmpCollection(List<SnmpCollection> vSnmpCollectionList)
          Sets the value of '_snmpCollectionList' by copying the given Vector.
 void setSnmpCollection(SnmpCollection[] vSnmpCollectionArray)
           
 void setSnmpCollectionCollection(List<SnmpCollection> snmpCollectionList)
          Deprecated.  
static DatacollectionConfig 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

DatacollectionConfig

public DatacollectionConfig()
Method Detail

addSnmpCollection

public void addSnmpCollection(SnmpCollection vSnmpCollection)
                       throws IndexOutOfBoundsException
Parameters:
vSnmpCollection -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSnmpCollection

public void addSnmpCollection(int index,
                              SnmpCollection vSnmpCollection)
                       throws IndexOutOfBoundsException
Parameters:
index -
vSnmpCollection -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateSnmpCollection

public Enumeration<SnmpCollection> enumerateSnmpCollection()
Method enumerateSnmpCollection.

Returns:
an Enumeration over all possible elements of this collection

getRrdRepository

public String getRrdRepository()
Returns the value of field 'rrdRepository'. The field 'rrdRepository' has the following description: full path to the RRD repository for collected SNMP data

Returns:
the value of field 'RrdRepository'.

getSnmpCollection

public SnmpCollection getSnmpCollection(int index)
                                 throws IndexOutOfBoundsException
Method getSnmpCollection.

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

getSnmpCollection

public SnmpCollection[] getSnmpCollection()
Method getSnmpCollection.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

getSnmpCollectionCollection

public List<SnmpCollection> getSnmpCollectionCollection()
Method getSnmpCollectionCollection.Returns a reference to '_snmpCollectionList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getSnmpCollectionCount

public int getSnmpCollectionCount()
Method getSnmpCollectionCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateSnmpCollection

public Iterator<SnmpCollection> iterateSnmpCollection()
Method iterateSnmpCollection.

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

removeAllSnmpCollection

public void removeAllSnmpCollection()

removeSnmpCollection

public boolean removeSnmpCollection(SnmpCollection vSnmpCollection)
Method removeSnmpCollection.

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

removeSnmpCollectionAt

public SnmpCollection removeSnmpCollectionAt(int index)
Method removeSnmpCollectionAt.

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

setRrdRepository

public void setRrdRepository(String rrdRepository)
Sets the value of field 'rrdRepository'. The field 'rrdRepository' has the following description: full path to the RRD repository for collected SNMP data

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

setSnmpCollection

public void setSnmpCollection(int index,
                              SnmpCollection vSnmpCollection)
                       throws IndexOutOfBoundsException
Parameters:
index -
vSnmpCollection -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setSnmpCollection

public void setSnmpCollection(SnmpCollection[] vSnmpCollectionArray)
Parameters:
vSnmpCollectionArray -

setSnmpCollection

public void setSnmpCollection(List<SnmpCollection> vSnmpCollectionList)
Sets the value of '_snmpCollectionList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vSnmpCollectionList - the Vector to copy.

setSnmpCollectionCollection

public void setSnmpCollectionCollection(List<SnmpCollection> snmpCollectionList)
Deprecated. 

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

Parameters:
snmpCollectionList - the Vector to set.

unmarshal

public static DatacollectionConfig 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.datacollection.DatacollectionConfig
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.