org.opennms.netmgt.config.threshd
Class Group

java.lang.Object
  extended by org.opennms.netmgt.config.threshd.Group
All Implemented Interfaces:
Serializable

public class Group
extends Object
implements Serializable

Grouping of related threshold definitions

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

Constructor Summary
Group()
           
 
Method Summary
 void addExpression(Expression vExpression)
           
 void addExpression(int index, Expression vExpression)
           
 void addThreshold(int index, Threshold vThreshold)
           
 void addThreshold(Threshold vThreshold)
           
 Enumeration<Expression> enumerateExpression()
          Method enumerateExpression.
 Enumeration<Threshold> enumerateThreshold()
          Method enumerateThreshold.
 Expression[] getExpression()
          Method getExpression.Returns the contents of the collection in an Array.
 Expression getExpression(int index)
          Method getExpression.
 List<Expression> getExpressionCollection()
          Method getExpressionCollection.Returns a reference to '_expressionList'.
 int getExpressionCount()
          Method getExpressionCount.
 String getName()
          Returns the value of field 'name'.
 String getRrdRepository()
          Returns the value of field 'rrdRepository'.
 Threshold[] getThreshold()
          Method getThreshold.Returns the contents of the collection in an Array.
 Threshold getThreshold(int index)
          Method getThreshold.
 List<Threshold> getThresholdCollection()
          Method getThresholdCollection.Returns a reference to '_thresholdList'.
 int getThresholdCount()
          Method getThresholdCount.
 boolean isValid()
          Method isValid.
 Iterator<Expression> iterateExpression()
          Method iterateExpression.
 Iterator<Threshold> iterateThreshold()
          Method iterateThreshold.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllExpression()
           
 void removeAllThreshold()
           
 boolean removeExpression(Expression vExpression)
          Method removeExpression.
 Expression removeExpressionAt(int index)
          Method removeExpressionAt.
 boolean removeThreshold(Threshold vThreshold)
          Method removeThreshold.
 Threshold removeThresholdAt(int index)
          Method removeThresholdAt.
 void setExpression(Expression[] vExpressionArray)
           
 void setExpression(int index, Expression vExpression)
           
 void setExpression(List<Expression> vExpressionList)
          Sets the value of '_expressionList' by copying the given Vector.
 void setExpressionCollection(List<Expression> expressionList)
          Deprecated.  
 void setName(String name)
          Sets the value of field 'name'.
 void setRrdRepository(String rrdRepository)
          Sets the value of field 'rrdRepository'.
 void setThreshold(int index, Threshold vThreshold)
           
 void setThreshold(List<Threshold> vThresholdList)
          Sets the value of '_thresholdList' by copying the given Vector.
 void setThreshold(Threshold[] vThresholdArray)
           
 void setThresholdCollection(List<Threshold> thresholdList)
          Deprecated.  
static Group 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

Group

public Group()
Method Detail

addExpression

public void addExpression(Expression vExpression)
                   throws IndexOutOfBoundsException
Parameters:
vExpression -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addExpression

public void addExpression(int index,
                          Expression vExpression)
                   throws IndexOutOfBoundsException
Parameters:
index -
vExpression -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addThreshold

public void addThreshold(Threshold vThreshold)
                  throws IndexOutOfBoundsException
Parameters:
vThreshold -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addThreshold

public void addThreshold(int index,
                         Threshold vThreshold)
                  throws IndexOutOfBoundsException
Parameters:
index -
vThreshold -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateExpression

public Enumeration<Expression> enumerateExpression()
Method enumerateExpression.

Returns:
an Enumeration over all possible elements of this collection

enumerateThreshold

public Enumeration<Threshold> enumerateThreshold()
Method enumerateThreshold.

Returns:
an Enumeration over all possible elements of this collection

getExpression

public Expression getExpression(int index)
                         throws IndexOutOfBoundsException
Method getExpression.

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

getExpression

public Expression[] getExpression()
Method getExpression.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

getExpressionCollection

public List<Expression> getExpressionCollection()
Method getExpressionCollection.Returns a reference to '_expressionList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getExpressionCount

public int getExpressionCount()
Method getExpressionCount.

Returns:
the size of this collection

getName

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

Returns:
the value of field 'Name'.

getRrdRepository

public String getRrdRepository()
Returns the value of field 'rrdRepository'. The field 'rrdRepository' has the following description: Full path to the RRD repository where the data is stored

Returns:
the value of field 'RrdRepository'.

getThreshold

public Threshold getThreshold(int index)
                       throws IndexOutOfBoundsException
Method getThreshold.

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

getThreshold

public Threshold[] getThreshold()
Method getThreshold.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

getThresholdCollection

public List<Threshold> getThresholdCollection()
Method getThresholdCollection.Returns a reference to '_thresholdList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getThresholdCount

public int getThresholdCount()
Method getThresholdCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateExpression

public Iterator<Expression> iterateExpression()
Method iterateExpression.

Returns:
an Iterator over all possible elements in this collection

iterateThreshold

public Iterator<Threshold> iterateThreshold()
Method iterateThreshold.

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

removeAllExpression

public void removeAllExpression()

removeAllThreshold

public void removeAllThreshold()

removeExpression

public boolean removeExpression(Expression vExpression)
Method removeExpression.

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

removeExpressionAt

public Expression removeExpressionAt(int index)
Method removeExpressionAt.

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

removeThreshold

public boolean removeThreshold(Threshold vThreshold)
Method removeThreshold.

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

removeThresholdAt

public Threshold removeThresholdAt(int index)
Method removeThresholdAt.

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

setExpression

public void setExpression(int index,
                          Expression vExpression)
                   throws IndexOutOfBoundsException
Parameters:
index -
vExpression -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setExpression

public void setExpression(Expression[] vExpressionArray)
Parameters:
vExpressionArray -

setExpression

public void setExpression(List<Expression> vExpressionList)
Sets the value of '_expressionList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vExpressionList - the Vector to copy.

setExpressionCollection

public void setExpressionCollection(List<Expression> expressionList)
Deprecated. 

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

Parameters:
expressionList - the Vector to set.

setName

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

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

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 where the data is stored

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

setThreshold

public void setThreshold(int index,
                         Threshold vThreshold)
                  throws IndexOutOfBoundsException
Parameters:
index -
vThreshold -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setThreshold

public void setThreshold(Threshold[] vThresholdArray)
Parameters:
vThresholdArray -

setThreshold

public void setThreshold(List<Threshold> vThresholdList)
Sets the value of '_thresholdList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vThresholdList - the Vector to copy.

setThresholdCollection

public void setThresholdCollection(List<Threshold> thresholdList)
Deprecated. 

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

Parameters:
thresholdList - the Vector to set.

unmarshal

public static Group 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.threshd.Group
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.