org.opennms.netmgt.config.vacuumd
Class VacuumdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.vacuumd.VacuumdConfiguration
All Implemented Interfaces:
Serializable

public class VacuumdConfiguration
extends Object
implements Serializable

Top-level element for the vacuumd-configuration.xml configuration file.

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

Constructor Summary
VacuumdConfiguration()
           
 
Method Summary
 void addStatement(int index, Statement vStatement)
           
 void addStatement(Statement vStatement)
           
 void deletePeriod()
           
 Enumeration<Statement> enumerateStatement()
          Method enumerateStatement.
 ActionEvents getActionEvents()
          Returns the value of field 'actionEvents'.
 Actions getActions()
          Returns the value of field 'actions'.
 AutoEvents getAutoEvents()
          Returns the value of field 'autoEvents'.
 Automations getAutomations()
          Returns the value of field 'automations'.
 int getPeriod()
          Returns the value of field 'period'.
 Statement[] getStatement()
          Method getStatement.Returns the contents of the collection in an Array.
 Statement getStatement(int index)
          Method getStatement.
 List<Statement> getStatementCollection()
          Method getStatementCollection.Returns a reference to '_statementList'.
 int getStatementCount()
          Method getStatementCount.
 Triggers getTriggers()
          Returns the value of field 'triggers'.
 boolean hasPeriod()
          Method hasPeriod.
 boolean isValid()
          Method isValid.
 Iterator<Statement> iterateStatement()
          Method iterateStatement.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllStatement()
           
 boolean removeStatement(Statement vStatement)
          Method removeStatement.
 Statement removeStatementAt(int index)
          Method removeStatementAt.
 void setActionEvents(ActionEvents actionEvents)
          Sets the value of field 'actionEvents'.
 void setActions(Actions actions)
          Sets the value of field 'actions'.
 void setAutoEvents(AutoEvents autoEvents)
          Sets the value of field 'autoEvents'.
 void setAutomations(Automations automations)
          Sets the value of field 'automations'.
 void setPeriod(int period)
          Sets the value of field 'period'.
 void setStatement(int index, Statement vStatement)
           
 void setStatement(List<Statement> vStatementList)
          Sets the value of '_statementList' by copying the given Vector.
 void setStatement(Statement[] vStatementArray)
           
 void setStatementCollection(List<Statement> statementList)
          Deprecated.  
 void setTriggers(Triggers triggers)
          Sets the value of field 'triggers'.
static VacuumdConfiguration 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

VacuumdConfiguration

public VacuumdConfiguration()
Method Detail

addStatement

public void addStatement(Statement vStatement)
                  throws IndexOutOfBoundsException
Parameters:
vStatement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStatement

public void addStatement(int index,
                         Statement vStatement)
                  throws IndexOutOfBoundsException
Parameters:
index -
vStatement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deletePeriod

public void deletePeriod()

enumerateStatement

public Enumeration<Statement> enumerateStatement()
Method enumerateStatement.

Returns:
an Enumeration over all possible elements of this collection

getActionEvents

public ActionEvents getActionEvents()
Returns the value of field 'actionEvents'.

Returns:
the value of field 'ActionEvents'.

getActions

public Actions getActions()
Returns the value of field 'actions'. The field 'actions' has the following description: A collection of actions

Returns:
the value of field 'Actions'.

getAutoEvents

public AutoEvents getAutoEvents()
Returns the value of field 'autoEvents'.

Returns:
the value of field 'AutoEvents'.

getAutomations

public Automations getAutomations()
Returns the value of field 'automations'.

Returns:
the value of field 'Automations'.

getPeriod

public int getPeriod()
Returns the value of field 'period'. The field 'period' has the following description: how often to vacuum the database in seconds

Returns:
the value of field 'Period'.

getStatement

public Statement getStatement(int index)
                       throws IndexOutOfBoundsException
Method getStatement.

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

getStatement

public Statement[] getStatement()
Method getStatement.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

getStatementCollection

public List<Statement> getStatementCollection()
Method getStatementCollection.Returns a reference to '_statementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getStatementCount

public int getStatementCount()
Method getStatementCount.

Returns:
the size of this collection

getTriggers

public Triggers getTriggers()
Returns the value of field 'triggers'. The field 'triggers' has the following description: A collection of triggers

Returns:
the value of field 'Triggers'.

hasPeriod

public boolean hasPeriod()
Method hasPeriod.

Returns:
true if at least one Period has been added

isValid

public boolean isValid()
Method isValid.

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

iterateStatement

public Iterator<Statement> iterateStatement()
Method iterateStatement.

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

removeAllStatement

public void removeAllStatement()

removeStatement

public boolean removeStatement(Statement vStatement)
Method removeStatement.

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

removeStatementAt

public Statement removeStatementAt(int index)
Method removeStatementAt.

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

setActionEvents

public void setActionEvents(ActionEvents actionEvents)
Sets the value of field 'actionEvents'.

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

setActions

public void setActions(Actions actions)
Sets the value of field 'actions'. The field 'actions' has the following description: A collection of actions

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

setAutoEvents

public void setAutoEvents(AutoEvents autoEvents)
Sets the value of field 'autoEvents'.

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

setAutomations

public void setAutomations(Automations automations)
Sets the value of field 'automations'.

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

setPeriod

public void setPeriod(int period)
Sets the value of field 'period'. The field 'period' has the following description: how often to vacuum the database in seconds

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

setStatement

public void setStatement(int index,
                         Statement vStatement)
                  throws IndexOutOfBoundsException
Parameters:
index -
vStatement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setStatement

public void setStatement(Statement[] vStatementArray)
Parameters:
vStatementArray -

setStatement

public void setStatement(List<Statement> vStatementList)
Sets the value of '_statementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vStatementList - the Vector to copy.

setStatementCollection

public void setStatementCollection(List<Statement> statementList)
Deprecated. 

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

Parameters:
statementList - the Vector to set.

setTriggers

public void setTriggers(Triggers triggers)
Sets the value of field 'triggers'. The field 'triggers' has the following description: A collection of triggers

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

unmarshal

public static VacuumdConfiguration 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.vacuumd.VacuumdConfiguration
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.