org.opennms.netmgt.config.reportd
Class ReportdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.reportd.ReportdConfiguration
All Implemented Interfaces:
Serializable

public class ReportdConfiguration
extends Object
implements Serializable

Behavior configuration for the Enterprise Reporting Daemon

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

Constructor Summary
ReportdConfiguration()
           
 
Method Summary
 void addReport(int index, Report vReport)
           
 void addReport(Report vReport)
           
 Enumeration<Report> enumerateReport()
          Method enumerateReport.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getPersistReports()
          Returns the value of field 'persistReports'.
 Report[] getReport()
          Method getReport.Returns the contents of the collection in an Array.
 Report getReport(int index)
          Method getReport.
 List<Report> getReportCollection()
          Method getReportCollection.Returns a reference to '_reportList'.
 int getReportCount()
          Method getReportCount.
 String getStorageLocation()
          Returns the value of field 'storageLocation'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Report> iterateReport()
          Method iterateReport.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllReport()
           
 boolean removeReport(Report vReport)
          Method removeReport.
 Report removeReportAt(int index)
          Method removeReportAt.
 void setPersistReports(String persistReports)
          Sets the value of field 'persistReports'.
 void setReport(int index, Report vReport)
           
 void setReport(List<Report> vReportList)
          Sets the value of '_reportList' by copying the given Vector.
 void setReport(Report[] vReportArray)
           
 void setReportCollection(List<Report> reportList)
          Deprecated.  
 void setStorageLocation(String storageLocation)
          Sets the value of field 'storageLocation'.
static ReportdConfiguration 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

ReportdConfiguration

public ReportdConfiguration()
Method Detail

addReport

public void addReport(Report vReport)
               throws IndexOutOfBoundsException
Parameters:
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addReport

public void addReport(int index,
                      Report vReport)
               throws IndexOutOfBoundsException
Parameters:
index -
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateReport

public Enumeration<Report> enumerateReport()
Method enumerateReport.

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.

getPersistReports

public String getPersistReports()
Returns the value of field 'persistReports'. The field 'persistReports' has the following description: Should reports be kept after delivered?

Returns:
the value of field 'PersistReports'.

getReport

public Report getReport(int index)
                 throws IndexOutOfBoundsException
Method getReport.

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

getReport

public Report[] getReport()
Method getReport.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

getReportCollection

public List<Report> getReportCollection()
Method getReportCollection.Returns a reference to '_reportList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getReportCount

public int getReportCount()
Method getReportCount.

Returns:
the size of this collection

getStorageLocation

public String getStorageLocation()
Returns the value of field 'storageLocation'. The field 'storageLocation' has the following description: The base directory rendered reports are saved on the file system.

Returns:
the value of field 'StorageLocation'.

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

iterateReport

public Iterator<Report> iterateReport()
Method iterateReport.

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

removeAllReport

public void removeAllReport()

removeReport

public boolean removeReport(Report vReport)
Method removeReport.

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

removeReportAt

public Report removeReportAt(int index)
Method removeReportAt.

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

setPersistReports

public void setPersistReports(String persistReports)
Sets the value of field 'persistReports'. The field 'persistReports' has the following description: Should reports be kept after delivered?

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

setReport

public void setReport(int index,
                      Report vReport)
               throws IndexOutOfBoundsException
Parameters:
index -
vReport -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setReport

public void setReport(Report[] vReportArray)
Parameters:
vReportArray -

setReport

public void setReport(List<Report> vReportList)
Sets the value of '_reportList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vReportList - the Vector to copy.

setReportCollection

public void setReportCollection(List<Report> reportList)
Deprecated. 

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

Parameters:
reportList - the Vector to set.

setStorageLocation

public void setStorageLocation(String storageLocation)
Sets the value of field 'storageLocation'. The field 'storageLocation' has the following description: The base directory rendered reports are saved on the file system.

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

unmarshal

public static ReportdConfiguration 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.reportd.ReportdConfiguration
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.