org.opennms.netmgt.config.datacollection
Class DatacollectionGroup

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

public class DatacollectionGroup
extends Object
implements Serializable

Top-level element for the datacollection group configuration file.

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

Constructor Summary
DatacollectionGroup()
           
 
Method Summary
 void addGroup(Group vGroup)
           
 void addGroup(int index, Group vGroup)
           
 void addResourceType(int index, ResourceType vResourceType)
           
 void addResourceType(ResourceType vResourceType)
           
 void addSystemDef(int index, SystemDef vSystemDef)
           
 void addSystemDef(SystemDef vSystemDef)
           
 Enumeration<Group> enumerateGroup()
          Method enumerateGroup.
 Enumeration<ResourceType> enumerateResourceType()
          Method enumerateResourceType.
 Enumeration<SystemDef> enumerateSystemDef()
          Method enumerateSystemDef.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Group[] getGroup()
          Method getGroup.Returns the contents of the collection in an Array.
 Group getGroup(int index)
          Method getGroup.
 List<Group> getGroupCollection()
          Method getGroupCollection.Returns a reference to '_groupList'.
 int getGroupCount()
          Method getGroupCount.
 String getName()
          Returns the value of field 'name'.
 ResourceType[] getResourceType()
          Method getResourceType.Returns the contents of the collection in an Array.
 ResourceType getResourceType(int index)
          Method getResourceType.
 List<ResourceType> getResourceTypeCollection()
          Method getResourceTypeCollection.Returns a reference to '_resourceTypeList'.
 int getResourceTypeCount()
          Method getResourceTypeCount.
 SystemDef[] getSystemDef()
          Method getSystemDef.Returns the contents of the collection in an Array.
 SystemDef getSystemDef(int index)
          Method getSystemDef.
 List<SystemDef> getSystemDefCollection()
          Method getSystemDefCollection.Returns a reference to '_systemDefList'.
 int getSystemDefCount()
          Method getSystemDefCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Group> iterateGroup()
          Method iterateGroup.
 Iterator<ResourceType> iterateResourceType()
          Method iterateResourceType.
 Iterator<SystemDef> iterateSystemDef()
          Method iterateSystemDef.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllGroup()
           
 void removeAllResourceType()
           
 void removeAllSystemDef()
           
 boolean removeGroup(Group vGroup)
          Method removeGroup.
 Group removeGroupAt(int index)
          Method removeGroupAt.
 boolean removeResourceType(ResourceType vResourceType)
          Method removeResourceType.
 ResourceType removeResourceTypeAt(int index)
          Method removeResourceTypeAt.
 boolean removeSystemDef(SystemDef vSystemDef)
          Method removeSystemDef.
 SystemDef removeSystemDefAt(int index)
          Method removeSystemDefAt.
 void setGroup(Group[] vGroupArray)
           
 void setGroup(int index, Group vGroup)
           
 void setGroup(List<Group> vGroupList)
          Sets the value of '_groupList' by copying the given Vector.
 void setGroupCollection(List<Group> groupList)
          Deprecated.  
 void setName(String name)
          Sets the value of field 'name'.
 void setResourceType(int index, ResourceType vResourceType)
           
 void setResourceType(List<ResourceType> vResourceTypeList)
          Sets the value of '_resourceTypeList' by copying the given Vector.
 void setResourceType(ResourceType[] vResourceTypeArray)
           
 void setResourceTypeCollection(List<ResourceType> resourceTypeList)
          Deprecated.  
 void setSystemDef(int index, SystemDef vSystemDef)
           
 void setSystemDef(List<SystemDef> vSystemDefList)
          Sets the value of '_systemDefList' by copying the given Vector.
 void setSystemDef(SystemDef[] vSystemDefArray)
           
 void setSystemDefCollection(List<SystemDef> systemDefList)
          Deprecated.  
static DatacollectionGroup unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatacollectionGroup

public DatacollectionGroup()
Method Detail

addGroup

public void addGroup(Group vGroup)
              throws IndexOutOfBoundsException
Parameters:
vGroup -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addGroup

public void addGroup(int index,
                     Group vGroup)
              throws IndexOutOfBoundsException
Parameters:
index -
vGroup -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addResourceType

public void addResourceType(ResourceType vResourceType)
                     throws IndexOutOfBoundsException
Parameters:
vResourceType -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addResourceType

public void addResourceType(int index,
                            ResourceType vResourceType)
                     throws IndexOutOfBoundsException
Parameters:
index -
vResourceType -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSystemDef

public void addSystemDef(SystemDef vSystemDef)
                  throws IndexOutOfBoundsException
Parameters:
vSystemDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSystemDef

public void addSystemDef(int index,
                         SystemDef vSystemDef)
                  throws IndexOutOfBoundsException
Parameters:
index -
vSystemDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateGroup

public Enumeration<Group> enumerateGroup()
Method enumerateGroup.

Returns:
an Enumeration over all possible elements of this collection

enumerateResourceType

public Enumeration<ResourceType> enumerateResourceType()
Method enumerateResourceType.

Returns:
an Enumeration over all possible elements of this collection

enumerateSystemDef

public Enumeration<SystemDef> enumerateSystemDef()
Method enumerateSystemDef.

Returns:
an Enumeration over all possible elements of this collection

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getGroup

public Group getGroup(int index)
               throws IndexOutOfBoundsException
Method getGroup.

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

getGroup

public Group[] getGroup()
Method getGroup.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

getGroupCollection

public List<Group> getGroupCollection()
Method getGroupCollection.Returns a reference to '_groupList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getGroupCount

public int getGroupCount()
Method getGroupCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'. The field 'name' has the following description: data collector group name

Returns:
the value of field 'Name'.

getResourceType

public ResourceType getResourceType(int index)
                             throws IndexOutOfBoundsException
Method getResourceType.

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

getResourceType

public ResourceType[] getResourceType()
Method getResourceType.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

getResourceTypeCollection

public List<ResourceType> getResourceTypeCollection()
Method getResourceTypeCollection.Returns a reference to '_resourceTypeList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getResourceTypeCount

public int getResourceTypeCount()
Method getResourceTypeCount.

Returns:
the size of this collection

getSystemDef

public SystemDef getSystemDef(int index)
                       throws IndexOutOfBoundsException
Method getSystemDef.

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

getSystemDef

public SystemDef[] getSystemDef()
Method getSystemDef.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

getSystemDefCollection

public List<SystemDef> getSystemDefCollection()
Method getSystemDefCollection.Returns a reference to '_systemDefList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getSystemDefCount

public int getSystemDefCount()
Method getSystemDefCount.

Returns:
the size of this collection

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

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

iterateGroup

public Iterator<Group> iterateGroup()
Method iterateGroup.

Returns:
an Iterator over all possible elements in this collection

iterateResourceType

public Iterator<ResourceType> iterateResourceType()
Method iterateResourceType.

Returns:
an Iterator over all possible elements in this collection

iterateSystemDef

public Iterator<SystemDef> iterateSystemDef()
Method iterateSystemDef.

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

removeAllGroup

public void removeAllGroup()

removeAllResourceType

public void removeAllResourceType()

removeAllSystemDef

public void removeAllSystemDef()

removeGroup

public boolean removeGroup(Group vGroup)
Method removeGroup.

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

removeGroupAt

public Group removeGroupAt(int index)
Method removeGroupAt.

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

removeResourceType

public boolean removeResourceType(ResourceType vResourceType)
Method removeResourceType.

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

removeResourceTypeAt

public ResourceType removeResourceTypeAt(int index)
Method removeResourceTypeAt.

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

removeSystemDef

public boolean removeSystemDef(SystemDef vSystemDef)
Method removeSystemDef.

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

removeSystemDefAt

public SystemDef removeSystemDefAt(int index)
Method removeSystemDefAt.

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

setGroup

public void setGroup(int index,
                     Group vGroup)
              throws IndexOutOfBoundsException
Parameters:
index -
vGroup -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setGroup

public void setGroup(Group[] vGroupArray)
Parameters:
vGroupArray -

setGroup

public void setGroup(List<Group> vGroupList)
Sets the value of '_groupList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vGroupList - the Vector to copy.

setGroupCollection

public void setGroupCollection(List<Group> groupList)
Deprecated. 

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

Parameters:
groupList - the Vector to set.

setName

public void setName(String name)
Sets the value of field 'name'. The field 'name' has the following description: data collector group name

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

setResourceType

public void setResourceType(int index,
                            ResourceType vResourceType)
                     throws IndexOutOfBoundsException
Parameters:
index -
vResourceType -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setResourceType

public void setResourceType(ResourceType[] vResourceTypeArray)
Parameters:
vResourceTypeArray -

setResourceType

public void setResourceType(List<ResourceType> vResourceTypeList)
Sets the value of '_resourceTypeList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vResourceTypeList - the Vector to copy.

setResourceTypeCollection

public void setResourceTypeCollection(List<ResourceType> resourceTypeList)
Deprecated. 

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

Parameters:
resourceTypeList - the Vector to set.

setSystemDef

public void setSystemDef(int index,
                         SystemDef vSystemDef)
                  throws IndexOutOfBoundsException
Parameters:
index -
vSystemDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setSystemDef

public void setSystemDef(SystemDef[] vSystemDefArray)
Parameters:
vSystemDefArray -

setSystemDef

public void setSystemDef(List<SystemDef> vSystemDefList)
Sets the value of '_systemDefList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vSystemDefList - the Vector to copy.

setSystemDefCollection

public void setSystemDefCollection(List<SystemDef> systemDefList)
Deprecated. 

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

Parameters:
systemDefList - the Vector to set.

unmarshal

public static DatacollectionGroup 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.DatacollectionGroup
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 © 2011. All Rights Reserved.