org.opennms.netmgt.config.reportd
Class Report

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

public class Report
extends Object
implements Serializable

Defines an report schedule with a cron expression http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html Field Name Allowed Values Allowed Special Characters Seconds 0-59 , - / Minutes 0-59 , - / Hours 0-23 , - / Day-of-month 1-31 , - ? / L W C Month 1-12 or JAN-DEC , - / Day-of-Week 1-7 or SUN-SAT , - ? / L C # Year (Opt) empty, 1970-2099 , - /

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

Constructor Summary
Report()
           
 
Method Summary
 void addParameter(int index, Parameter vParameter)
           
 void addParameter(Parameter vParameter)
           
 void addRecipient(int index, String vRecipient)
           
 void addRecipient(String vRecipient)
           
 Enumeration<Parameter> enumerateParameter()
          Method enumerateParameter.
 Enumeration<String> enumerateRecipient()
          Method enumerateRecipient.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getCronSchedule()
          Returns the value of field 'cronSchedule'.
 Parameter[] getParameter()
          Method getParameter.Returns the contents of the collection in an Array.
 Parameter getParameter(int index)
          Method getParameter.
 List<Parameter> getParameterCollection()
          Method getParameterCollection.Returns a reference to '_parameterList'.
 int getParameterCount()
          Method getParameterCount.
 String[] getRecipient()
          Method getRecipient.Returns the contents of the collection in an Array.
 String getRecipient(int index)
          Method getRecipient.
 List<String> getRecipientCollection()
          Method getRecipientCollection.Returns a reference to '_recipientList'.
 int getRecipientCount()
          Method getRecipientCount.
 String getReportEngine()
          Returns the value of field 'reportEngine'.
 String getReportFormat()
          Returns the value of field 'reportFormat'.
 String getReportName()
          Returns the value of field 'reportName'.
 String getReportTemplate()
          Returns the value of field 'reportTemplate'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Parameter> iterateParameter()
          Method iterateParameter.
 Iterator<String> iterateRecipient()
          Method iterateRecipient.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllParameter()
           
 void removeAllRecipient()
           
 boolean removeParameter(Parameter vParameter)
          Method removeParameter.
 Parameter removeParameterAt(int index)
          Method removeParameterAt.
 boolean removeRecipient(String vRecipient)
          Method removeRecipient.
 String removeRecipientAt(int index)
          Method removeRecipientAt.
 void setCronSchedule(String cronSchedule)
          Sets the value of field 'cronSchedule'.
 void setParameter(int index, Parameter vParameter)
           
 void setParameter(List<Parameter> vParameterList)
          Sets the value of '_parameterList' by copying the given Vector.
 void setParameter(Parameter[] vParameterArray)
           
 void setParameterCollection(List<Parameter> parameterList)
          Deprecated.  
 void setRecipient(int index, String vRecipient)
           
 void setRecipient(List<String> vRecipientList)
          Sets the value of '_recipientList' by copying the given Vector.
 void setRecipient(String[] vRecipientArray)
           
 void setRecipientCollection(List<String> recipientList)
          Deprecated.  
 void setReportEngine(String reportEngine)
          Sets the value of field 'reportEngine'.
 void setReportFormat(String reportFormat)
          Sets the value of field 'reportFormat'.
 void setReportName(String reportName)
          Sets the value of field 'reportName'.
 void setReportTemplate(String reportTemplate)
          Sets the value of field 'reportTemplate'.
static Report 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

Report

public Report()
Method Detail

addParameter

public void addParameter(Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addParameter

public void addParameter(int index,
                         Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
index -
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRecipient

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

addRecipient

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

enumerateParameter

public Enumeration<Parameter> enumerateParameter()
Method enumerateParameter.

Returns:
an Enumeration over all possible elements of this collection

enumerateRecipient

public Enumeration<String> enumerateRecipient()
Method enumerateRecipient.

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.

getCronSchedule

public String getCronSchedule()
Returns the value of field 'cronSchedule'.

Returns:
the value of field 'CronSchedule'.

getParameter

public Parameter getParameter(int index)
                       throws IndexOutOfBoundsException
Method getParameter.

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

getParameter

public Parameter[] getParameter()
Method getParameter.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

getParameterCollection

public List<Parameter> getParameterCollection()
Method getParameterCollection.Returns a reference to '_parameterList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getParameterCount

public int getParameterCount()
Method getParameterCount.

Returns:
the size of this collection

getRecipient

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

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

getRecipient

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

getRecipientCollection

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

Returns:
a reference to the Vector backing this class

getRecipientCount

public int getRecipientCount()
Method getRecipientCount.

Returns:
the size of this collection

getReportEngine

public String getReportEngine()
Returns the value of field 'reportEngine'.

Returns:
the value of field 'ReportEngine'.

getReportFormat

public String getReportFormat()
Returns the value of field 'reportFormat'.

Returns:
the value of field 'ReportFormat'.

getReportName

public String getReportName()
Returns the value of field 'reportName'.

Returns:
the value of field 'ReportName'.

getReportTemplate

public String getReportTemplate()
Returns the value of field 'reportTemplate'.

Returns:
the value of field 'ReportTemplate'.

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

iterateParameter

public Iterator<Parameter> iterateParameter()
Method iterateParameter.

Returns:
an Iterator over all possible elements in this collection

iterateRecipient

public Iterator<String> iterateRecipient()
Method iterateRecipient.

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

removeAllParameter

public void removeAllParameter()

removeAllRecipient

public void removeAllRecipient()

removeParameter

public boolean removeParameter(Parameter vParameter)
Method removeParameter.

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

removeParameterAt

public Parameter removeParameterAt(int index)
Method removeParameterAt.

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

removeRecipient

public boolean removeRecipient(String vRecipient)
Method removeRecipient.

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

removeRecipientAt

public String removeRecipientAt(int index)
Method removeRecipientAt.

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

setCronSchedule

public void setCronSchedule(String cronSchedule)
Sets the value of field 'cronSchedule'.

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

setParameter

public void setParameter(int index,
                         Parameter vParameter)
                  throws IndexOutOfBoundsException
Parameters:
index -
vParameter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setParameter

public void setParameter(Parameter[] vParameterArray)
Parameters:
vParameterArray -

setParameter

public void setParameter(List<Parameter> vParameterList)
Sets the value of '_parameterList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vParameterList - the Vector to copy.

setParameterCollection

public void setParameterCollection(List<Parameter> parameterList)
Deprecated. 

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

Parameters:
parameterList - the Vector to set.

setRecipient

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

setRecipient

public void setRecipient(String[] vRecipientArray)
Parameters:
vRecipientArray -

setRecipient

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

Parameters:
vRecipientList - the Vector to copy.

setRecipientCollection

public void setRecipientCollection(List<String> recipientList)
Deprecated. 

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

Parameters:
recipientList - the Vector to set.

setReportEngine

public void setReportEngine(String reportEngine)
Sets the value of field 'reportEngine'.

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

setReportFormat

public void setReportFormat(String reportFormat)
Sets the value of field 'reportFormat'.

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

setReportName

public void setReportName(String reportName)
Sets the value of field 'reportName'.

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

setReportTemplate

public void setReportTemplate(String reportTemplate)
Sets the value of field 'reportTemplate'.

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

unmarshal

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