org.opennms.netmgt.config.statsd
Class Package

java.lang.Object
  extended by org.opennms.netmgt.config.statsd.Package
All Implemented Interfaces:
Serializable

public class Package
extends Object
implements Serializable

Package encapsulating nodes eligible to have this report run on them.

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

Constructor Summary
Package()
           
 
Method Summary
 void addPackageReport(int index, PackageReport vPackageReport)
           
 void addPackageReport(PackageReport vPackageReport)
           
 Enumeration<PackageReport> enumeratePackageReport()
          Method enumeratePackageReport.
 Filter getFilter()
          Returns the value of field 'filter'.
 String getName()
          Returns the value of field 'name'.
 PackageReport[] getPackageReport()
          Method getPackageReport.Returns the contents of the collection in an Array.
 PackageReport getPackageReport(int index)
          Method getPackageReport.
 List<PackageReport> getPackageReportCollection()
          Method getPackageReportCollection.Returns a reference to '_packageReportList'.
 int getPackageReportCount()
          Method getPackageReportCount.
 boolean isValid()
          Method isValid.
 Iterator<PackageReport> iteratePackageReport()
          Method iteratePackageReport.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPackageReport()
           
 boolean removePackageReport(PackageReport vPackageReport)
          Method removePackageReport.
 PackageReport removePackageReportAt(int index)
          Method removePackageReportAt.
 void setFilter(Filter filter)
          Sets the value of field 'filter'.
 void setName(String name)
          Sets the value of field 'name'.
 void setPackageReport(int index, PackageReport vPackageReport)
           
 void setPackageReport(List<PackageReport> vPackageReportList)
          Sets the value of '_packageReportList' by copying the given Vector.
 void setPackageReport(PackageReport[] vPackageReportArray)
           
 void setPackageReportCollection(List<PackageReport> packageReportList)
          Deprecated.  
static Package 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

Package

public Package()
Method Detail

addPackageReport

public void addPackageReport(PackageReport vPackageReport)
                      throws IndexOutOfBoundsException
Parameters:
vPackageReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPackageReport

public void addPackageReport(int index,
                             PackageReport vPackageReport)
                      throws IndexOutOfBoundsException
Parameters:
index -
vPackageReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumeratePackageReport

public Enumeration<PackageReport> enumeratePackageReport()
Method enumeratePackageReport.

Returns:
an Enumeration over all possible elements of this collection

getFilter

public Filter getFilter()
Returns the value of field 'filter'. The field 'filter' has the following description: A rule which adresses belonging to this package must pass. This package is applied only to addresses that pass this filter.

Returns:
the value of field 'Filter'.

getName

public String getName()
Returns the value of field 'name'. The field 'name' has the following description: The name or identifier for this package

Returns:
the value of field 'Name'.

getPackageReport

public PackageReport getPackageReport(int index)
                               throws IndexOutOfBoundsException
Method getPackageReport.

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

getPackageReport

public PackageReport[] getPackageReport()
Method getPackageReport.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

getPackageReportCollection

public List<PackageReport> getPackageReportCollection()
Method getPackageReportCollection.Returns a reference to '_packageReportList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPackageReportCount

public int getPackageReportCount()
Method getPackageReportCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iteratePackageReport

public Iterator<PackageReport> iteratePackageReport()
Method iteratePackageReport.

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

removeAllPackageReport

public void removeAllPackageReport()

removePackageReport

public boolean removePackageReport(PackageReport vPackageReport)
Method removePackageReport.

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

removePackageReportAt

public PackageReport removePackageReportAt(int index)
Method removePackageReportAt.

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

setFilter

public void setFilter(Filter filter)
Sets the value of field 'filter'. The field 'filter' has the following description: A rule which adresses belonging to this package must pass. This package is applied only to addresses that pass this filter.

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

setName

public void setName(String name)
Sets the value of field 'name'. The field 'name' has the following description: The name or identifier for this package

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

setPackageReport

public void setPackageReport(int index,
                             PackageReport vPackageReport)
                      throws IndexOutOfBoundsException
Parameters:
index -
vPackageReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPackageReport

public void setPackageReport(PackageReport[] vPackageReportArray)
Parameters:
vPackageReportArray -

setPackageReport

public void setPackageReport(List<PackageReport> vPackageReportList)
Sets the value of '_packageReportList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPackageReportList - the Vector to copy.

setPackageReportCollection

public void setPackageReportCollection(List<PackageReport> packageReportList)
Deprecated. 

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

Parameters:
packageReportList - the Vector to set.

unmarshal

public static Package 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.statsd.Package
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.