org.opennms.netmgt.config.poller
Class Outages

java.lang.Object
  extended by org.opennms.netmgt.config.poller.Outages
All Implemented Interfaces:
Serializable

public class Outages
extends Object
implements Serializable

Top-level element for the poll-outages.xml configuration file.

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

Constructor Summary
Outages()
           
 
Method Summary
 void addOutage(int index, Outage vOutage)
           
 void addOutage(Outage vOutage)
           
 Enumeration<Outage> enumerateOutage()
          Method enumerateOutage.
 Outage[] getOutage()
          Method getOutage.Returns the contents of the collection in an Array.
 Outage getOutage(int index)
          Method getOutage.
 List<Outage> getOutageCollection()
          Method getOutageCollection.Returns a reference to '_outageList'.
 int getOutageCount()
          Method getOutageCount.
 boolean isValid()
          Method isValid.
 Iterator<Outage> iterateOutage()
          Method iterateOutage.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllOutage()
           
 boolean removeOutage(Outage vOutage)
          Method removeOutage.
 Outage removeOutageAt(int index)
          Method removeOutageAt.
 void setOutage(int index, Outage vOutage)
           
 void setOutage(List<Outage> vOutageList)
          Sets the value of '_outageList' by copying the given Vector.
 void setOutage(Outage[] vOutageArray)
           
 void setOutageCollection(List<Outage> outageList)
          Deprecated.  
static Outages 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

Outages

public Outages()
Method Detail

addOutage

public void addOutage(Outage vOutage)
               throws IndexOutOfBoundsException
Parameters:
vOutage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addOutage

public void addOutage(int index,
                      Outage vOutage)
               throws IndexOutOfBoundsException
Parameters:
index -
vOutage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateOutage

public Enumeration<Outage> enumerateOutage()
Method enumerateOutage.

Returns:
an Enumeration over all possible elements of this collection

getOutage

public Outage getOutage(int index)
                 throws IndexOutOfBoundsException
Method getOutage.

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

getOutage

public Outage[] getOutage()
Method getOutage.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

getOutageCollection

public List<Outage> getOutageCollection()
Method getOutageCollection.Returns a reference to '_outageList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getOutageCount

public int getOutageCount()
Method getOutageCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateOutage

public Iterator<Outage> iterateOutage()
Method iterateOutage.

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

removeAllOutage

public void removeAllOutage()

removeOutage

public boolean removeOutage(Outage vOutage)
Method removeOutage.

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

removeOutageAt

public Outage removeOutageAt(int index)
Method removeOutageAt.

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

setOutage

public void setOutage(int index,
                      Outage vOutage)
               throws IndexOutOfBoundsException
Parameters:
index -
vOutage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setOutage

public void setOutage(Outage[] vOutageArray)
Parameters:
vOutageArray -

setOutage

public void setOutage(List<Outage> vOutageList)
Sets the value of '_outageList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vOutageList - the Vector to copy.

setOutageCollection

public void setOutageCollection(List<Outage> outageList)
Deprecated. 

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

Parameters:
outageList - the Vector to set.

unmarshal

public static Outages 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.poller.Outages
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.