org.opennms.netmgt.config.scriptd
Class ScriptdConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.scriptd.ScriptdConfiguration
All Implemented Interfaces:
Serializable

public class ScriptdConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
ScriptdConfiguration()
           
 
Method Summary
 void addEngine(Engine vEngine)
           
 void addEngine(int index, Engine vEngine)
           
 void addEventScript(EventScript vEventScript)
           
 void addEventScript(int index, EventScript vEventScript)
           
 void addReloadScript(int index, ReloadScript vReloadScript)
           
 void addReloadScript(ReloadScript vReloadScript)
           
 void addStartScript(int index, StartScript vStartScript)
           
 void addStartScript(StartScript vStartScript)
           
 void addStopScript(int index, StopScript vStopScript)
           
 void addStopScript(StopScript vStopScript)
           
 Enumeration<Engine> enumerateEngine()
          Method enumerateEngine.
 Enumeration<EventScript> enumerateEventScript()
          Method enumerateEventScript.
 Enumeration<ReloadScript> enumerateReloadScript()
          Method enumerateReloadScript.
 Enumeration<StartScript> enumerateStartScript()
          Method enumerateStartScript.
 Enumeration<StopScript> enumerateStopScript()
          Method enumerateStopScript.
 Engine[] getEngine()
          Method getEngine.Returns the contents of the collection in an Array.
 Engine getEngine(int index)
          Method getEngine.
 List<Engine> getEngineCollection()
          Method getEngineCollection.Returns a reference to '_engineList'.
 int getEngineCount()
          Method getEngineCount.
 EventScript[] getEventScript()
          Method getEventScript.Returns the contents of the collection in an Array.
 EventScript getEventScript(int index)
          Method getEventScript.
 List<EventScript> getEventScriptCollection()
          Method getEventScriptCollection.Returns a reference to '_eventScriptList'.
 int getEventScriptCount()
          Method getEventScriptCount.
 ReloadScript[] getReloadScript()
          Method getReloadScript.Returns the contents of the collection in an Array.
 ReloadScript getReloadScript(int index)
          Method getReloadScript.
 List<ReloadScript> getReloadScriptCollection()
          Method getReloadScriptCollection.Returns a reference to '_reloadScriptList'.
 int getReloadScriptCount()
          Method getReloadScriptCount.
 StartScript[] getStartScript()
          Method getStartScript.Returns the contents of the collection in an Array.
 StartScript getStartScript(int index)
          Method getStartScript.
 List<StartScript> getStartScriptCollection()
          Method getStartScriptCollection.Returns a reference to '_startScriptList'.
 int getStartScriptCount()
          Method getStartScriptCount.
 StopScript[] getStopScript()
          Method getStopScript.Returns the contents of the collection in an Array.
 StopScript getStopScript(int index)
          Method getStopScript.
 List<StopScript> getStopScriptCollection()
          Method getStopScriptCollection.Returns a reference to '_stopScriptList'.
 int getStopScriptCount()
          Method getStopScriptCount.
 boolean isValid()
          Method isValid.
 Iterator<Engine> iterateEngine()
          Method iterateEngine.
 Iterator<EventScript> iterateEventScript()
          Method iterateEventScript.
 Iterator<ReloadScript> iterateReloadScript()
          Method iterateReloadScript.
 Iterator<StartScript> iterateStartScript()
          Method iterateStartScript.
 Iterator<StopScript> iterateStopScript()
          Method iterateStopScript.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllEngine()
           
 void removeAllEventScript()
           
 void removeAllReloadScript()
           
 void removeAllStartScript()
           
 void removeAllStopScript()
           
 boolean removeEngine(Engine vEngine)
          Method removeEngine.
 Engine removeEngineAt(int index)
          Method removeEngineAt.
 boolean removeEventScript(EventScript vEventScript)
          Method removeEventScript.
 EventScript removeEventScriptAt(int index)
          Method removeEventScriptAt.
 boolean removeReloadScript(ReloadScript vReloadScript)
          Method removeReloadScript.
 ReloadScript removeReloadScriptAt(int index)
          Method removeReloadScriptAt.
 boolean removeStartScript(StartScript vStartScript)
          Method removeStartScript.
 StartScript removeStartScriptAt(int index)
          Method removeStartScriptAt.
 boolean removeStopScript(StopScript vStopScript)
          Method removeStopScript.
 StopScript removeStopScriptAt(int index)
          Method removeStopScriptAt.
 void setEngine(Engine[] vEngineArray)
           
 void setEngine(int index, Engine vEngine)
           
 void setEngine(List<Engine> vEngineList)
          Sets the value of '_engineList' by copying the given Vector.
 void setEngineCollection(List<Engine> engineList)
          Deprecated.  
 void setEventScript(EventScript[] vEventScriptArray)
           
 void setEventScript(int index, EventScript vEventScript)
           
 void setEventScript(List<EventScript> vEventScriptList)
          Sets the value of '_eventScriptList' by copying the given Vector.
 void setEventScriptCollection(List<EventScript> eventScriptList)
          Deprecated.  
 void setReloadScript(int index, ReloadScript vReloadScript)
           
 void setReloadScript(List<ReloadScript> vReloadScriptList)
          Sets the value of '_reloadScriptList' by copying the given Vector.
 void setReloadScript(ReloadScript[] vReloadScriptArray)
           
 void setReloadScriptCollection(List<ReloadScript> reloadScriptList)
          Deprecated.  
 void setStartScript(int index, StartScript vStartScript)
           
 void setStartScript(List<StartScript> vStartScriptList)
          Sets the value of '_startScriptList' by copying the given Vector.
 void setStartScript(StartScript[] vStartScriptArray)
           
 void setStartScriptCollection(List<StartScript> startScriptList)
          Deprecated.  
 void setStopScript(int index, StopScript vStopScript)
           
 void setStopScript(List<StopScript> vStopScriptList)
          Sets the value of '_stopScriptList' by copying the given Vector.
 void setStopScript(StopScript[] vStopScriptArray)
           
 void setStopScriptCollection(List<StopScript> stopScriptList)
          Deprecated.  
static ScriptdConfiguration 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

ScriptdConfiguration

public ScriptdConfiguration()
Method Detail

addEngine

public void addEngine(Engine vEngine)
               throws IndexOutOfBoundsException
Parameters:
vEngine -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEngine

public void addEngine(int index,
                      Engine vEngine)
               throws IndexOutOfBoundsException
Parameters:
index -
vEngine -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEventScript

public void addEventScript(EventScript vEventScript)
                    throws IndexOutOfBoundsException
Parameters:
vEventScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEventScript

public void addEventScript(int index,
                           EventScript vEventScript)
                    throws IndexOutOfBoundsException
Parameters:
index -
vEventScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addReloadScript

public void addReloadScript(ReloadScript vReloadScript)
                     throws IndexOutOfBoundsException
Parameters:
vReloadScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addReloadScript

public void addReloadScript(int index,
                            ReloadScript vReloadScript)
                     throws IndexOutOfBoundsException
Parameters:
index -
vReloadScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStartScript

public void addStartScript(StartScript vStartScript)
                    throws IndexOutOfBoundsException
Parameters:
vStartScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStartScript

public void addStartScript(int index,
                           StartScript vStartScript)
                    throws IndexOutOfBoundsException
Parameters:
index -
vStartScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStopScript

public void addStopScript(StopScript vStopScript)
                   throws IndexOutOfBoundsException
Parameters:
vStopScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStopScript

public void addStopScript(int index,
                          StopScript vStopScript)
                   throws IndexOutOfBoundsException
Parameters:
index -
vStopScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateEngine

public Enumeration<Engine> enumerateEngine()
Method enumerateEngine.

Returns:
an Enumeration over all possible elements of this collection

enumerateEventScript

public Enumeration<EventScript> enumerateEventScript()
Method enumerateEventScript.

Returns:
an Enumeration over all possible elements of this collection

enumerateReloadScript

public Enumeration<ReloadScript> enumerateReloadScript()
Method enumerateReloadScript.

Returns:
an Enumeration over all possible elements of this collection

enumerateStartScript

public Enumeration<StartScript> enumerateStartScript()
Method enumerateStartScript.

Returns:
an Enumeration over all possible elements of this collection

enumerateStopScript

public Enumeration<StopScript> enumerateStopScript()
Method enumerateStopScript.

Returns:
an Enumeration over all possible elements of this collection

getEngine

public Engine getEngine(int index)
                 throws IndexOutOfBoundsException
Method getEngine.

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

getEngine

public Engine[] getEngine()
Method getEngine.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

getEngineCollection

public List<Engine> getEngineCollection()
Method getEngineCollection.Returns a reference to '_engineList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getEngineCount

public int getEngineCount()
Method getEngineCount.

Returns:
the size of this collection

getEventScript

public EventScript getEventScript(int index)
                           throws IndexOutOfBoundsException
Method getEventScript.

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

getEventScript

public EventScript[] getEventScript()
Method getEventScript.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

getEventScriptCollection

public List<EventScript> getEventScriptCollection()
Method getEventScriptCollection.Returns a reference to '_eventScriptList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getEventScriptCount

public int getEventScriptCount()
Method getEventScriptCount.

Returns:
the size of this collection

getReloadScript

public ReloadScript getReloadScript(int index)
                             throws IndexOutOfBoundsException
Method getReloadScript.

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

getReloadScript

public ReloadScript[] getReloadScript()
Method getReloadScript.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

getReloadScriptCollection

public List<ReloadScript> getReloadScriptCollection()
Method getReloadScriptCollection.Returns a reference to '_reloadScriptList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getReloadScriptCount

public int getReloadScriptCount()
Method getReloadScriptCount.

Returns:
the size of this collection

getStartScript

public StartScript getStartScript(int index)
                           throws IndexOutOfBoundsException
Method getStartScript.

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

getStartScript

public StartScript[] getStartScript()
Method getStartScript.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

getStartScriptCollection

public List<StartScript> getStartScriptCollection()
Method getStartScriptCollection.Returns a reference to '_startScriptList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getStartScriptCount

public int getStartScriptCount()
Method getStartScriptCount.

Returns:
the size of this collection

getStopScript

public StopScript getStopScript(int index)
                         throws IndexOutOfBoundsException
Method getStopScript.

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

getStopScript

public StopScript[] getStopScript()
Method getStopScript.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

getStopScriptCollection

public List<StopScript> getStopScriptCollection()
Method getStopScriptCollection.Returns a reference to '_stopScriptList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getStopScriptCount

public int getStopScriptCount()
Method getStopScriptCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateEngine

public Iterator<Engine> iterateEngine()
Method iterateEngine.

Returns:
an Iterator over all possible elements in this collection

iterateEventScript

public Iterator<EventScript> iterateEventScript()
Method iterateEventScript.

Returns:
an Iterator over all possible elements in this collection

iterateReloadScript

public Iterator<ReloadScript> iterateReloadScript()
Method iterateReloadScript.

Returns:
an Iterator over all possible elements in this collection

iterateStartScript

public Iterator<StartScript> iterateStartScript()
Method iterateStartScript.

Returns:
an Iterator over all possible elements in this collection

iterateStopScript

public Iterator<StopScript> iterateStopScript()
Method iterateStopScript.

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

removeAllEngine

public void removeAllEngine()

removeAllEventScript

public void removeAllEventScript()

removeAllReloadScript

public void removeAllReloadScript()

removeAllStartScript

public void removeAllStartScript()

removeAllStopScript

public void removeAllStopScript()

removeEngine

public boolean removeEngine(Engine vEngine)
Method removeEngine.

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

removeEngineAt

public Engine removeEngineAt(int index)
Method removeEngineAt.

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

removeEventScript

public boolean removeEventScript(EventScript vEventScript)
Method removeEventScript.

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

removeEventScriptAt

public EventScript removeEventScriptAt(int index)
Method removeEventScriptAt.

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

removeReloadScript

public boolean removeReloadScript(ReloadScript vReloadScript)
Method removeReloadScript.

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

removeReloadScriptAt

public ReloadScript removeReloadScriptAt(int index)
Method removeReloadScriptAt.

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

removeStartScript

public boolean removeStartScript(StartScript vStartScript)
Method removeStartScript.

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

removeStartScriptAt

public StartScript removeStartScriptAt(int index)
Method removeStartScriptAt.

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

removeStopScript

public boolean removeStopScript(StopScript vStopScript)
Method removeStopScript.

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

removeStopScriptAt

public StopScript removeStopScriptAt(int index)
Method removeStopScriptAt.

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

setEngine

public void setEngine(int index,
                      Engine vEngine)
               throws IndexOutOfBoundsException
Parameters:
index -
vEngine -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setEngine

public void setEngine(Engine[] vEngineArray)
Parameters:
vEngineArray -

setEngine

public void setEngine(List<Engine> vEngineList)
Sets the value of '_engineList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vEngineList - the Vector to copy.

setEngineCollection

public void setEngineCollection(List<Engine> engineList)
Deprecated. 

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

Parameters:
engineList - the Vector to set.

setEventScript

public void setEventScript(int index,
                           EventScript vEventScript)
                    throws IndexOutOfBoundsException
Parameters:
index -
vEventScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setEventScript

public void setEventScript(EventScript[] vEventScriptArray)
Parameters:
vEventScriptArray -

setEventScript

public void setEventScript(List<EventScript> vEventScriptList)
Sets the value of '_eventScriptList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vEventScriptList - the Vector to copy.

setEventScriptCollection

public void setEventScriptCollection(List<EventScript> eventScriptList)
Deprecated. 

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

Parameters:
eventScriptList - the Vector to set.

setReloadScript

public void setReloadScript(int index,
                            ReloadScript vReloadScript)
                     throws IndexOutOfBoundsException
Parameters:
index -
vReloadScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setReloadScript

public void setReloadScript(ReloadScript[] vReloadScriptArray)
Parameters:
vReloadScriptArray -

setReloadScript

public void setReloadScript(List<ReloadScript> vReloadScriptList)
Sets the value of '_reloadScriptList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vReloadScriptList - the Vector to copy.

setReloadScriptCollection

public void setReloadScriptCollection(List<ReloadScript> reloadScriptList)
Deprecated. 

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

Parameters:
reloadScriptList - the Vector to set.

setStartScript

public void setStartScript(int index,
                           StartScript vStartScript)
                    throws IndexOutOfBoundsException
Parameters:
index -
vStartScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setStartScript

public void setStartScript(StartScript[] vStartScriptArray)
Parameters:
vStartScriptArray -

setStartScript

public void setStartScript(List<StartScript> vStartScriptList)
Sets the value of '_startScriptList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vStartScriptList - the Vector to copy.

setStartScriptCollection

public void setStartScriptCollection(List<StartScript> startScriptList)
Deprecated. 

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

Parameters:
startScriptList - the Vector to set.

setStopScript

public void setStopScript(int index,
                          StopScript vStopScript)
                   throws IndexOutOfBoundsException
Parameters:
index -
vStopScript -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setStopScript

public void setStopScript(StopScript[] vStopScriptArray)
Parameters:
vStopScriptArray -

setStopScript

public void setStopScript(List<StopScript> vStopScriptList)
Sets the value of '_stopScriptList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vStopScriptList - the Vector to copy.

setStopScriptCollection

public void setStopScriptCollection(List<StopScript> stopScriptList)
Deprecated. 

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

Parameters:
stopScriptList - the Vector to set.

unmarshal

public static ScriptdConfiguration 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.scriptd.ScriptdConfiguration
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.