org.opennms.netmgt.config.datacollection
Class Collect

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

public class Collect
extends Object
implements Serializable

container for list of MIB groups to be collected for the system

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

Constructor Summary
Collect()
           
 
Method Summary
 void addIncludeGroup(int index, String vIncludeGroup)
           
 void addIncludeGroup(String vIncludeGroup)
           
 Enumeration<String> enumerateIncludeGroup()
          Method enumerateIncludeGroup.
 String[] getIncludeGroup()
          Method getIncludeGroup.Returns the contents of the collection in an Array.
 String getIncludeGroup(int index)
          Method getIncludeGroup.
 List<String> getIncludeGroupCollection()
          Method getIncludeGroupCollection.Returns a reference to '_includeGroupList'.
 int getIncludeGroupCount()
          Method getIncludeGroupCount.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateIncludeGroup()
          Method iterateIncludeGroup.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllIncludeGroup()
           
 boolean removeIncludeGroup(String vIncludeGroup)
          Method removeIncludeGroup.
 String removeIncludeGroupAt(int index)
          Method removeIncludeGroupAt.
 void setIncludeGroup(int index, String vIncludeGroup)
           
 void setIncludeGroup(List<String> vIncludeGroupList)
          Sets the value of '_includeGroupList' by copying the given Vector.
 void setIncludeGroup(String[] vIncludeGroupArray)
           
 void setIncludeGroupCollection(List<String> includeGroupList)
          Deprecated.  
static Collect 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

Collect

public Collect()
Method Detail

addIncludeGroup

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

addIncludeGroup

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

enumerateIncludeGroup

public Enumeration<String> enumerateIncludeGroup()
Method enumerateIncludeGroup.

Returns:
an Enumeration over all possible elements of this collection

getIncludeGroup

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

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

getIncludeGroup

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

getIncludeGroupCollection

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

Returns:
a reference to the Vector backing this class

getIncludeGroupCount

public int getIncludeGroupCount()
Method getIncludeGroupCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateIncludeGroup

public Iterator<String> iterateIncludeGroup()
Method iterateIncludeGroup.

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

removeAllIncludeGroup

public void removeAllIncludeGroup()

removeIncludeGroup

public boolean removeIncludeGroup(String vIncludeGroup)
Method removeIncludeGroup.

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

removeIncludeGroupAt

public String removeIncludeGroupAt(int index)
Method removeIncludeGroupAt.

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

setIncludeGroup

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

setIncludeGroup

public void setIncludeGroup(String[] vIncludeGroupArray)
Parameters:
vIncludeGroupArray -

setIncludeGroup

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

Parameters:
vIncludeGroupList - the Vector to copy.

setIncludeGroupCollection

public void setIncludeGroupCollection(List<String> includeGroupList)
Deprecated. 

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

Parameters:
includeGroupList - the Vector to set.

unmarshal

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