org.opennms.netmgt.config.poller
Class Outage

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

public class Outage
extends BasicSchedule
implements Serializable

a scheduled outage

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

Constructor Summary
Outage()
           
 
Method Summary
 void addInterface(Interface vInterface)
           
 void addInterface(int index, Interface vInterface)
           
 void addNode(int index, Node vNode)
           
 void addNode(Node vNode)
           
 Enumeration<Interface> enumerateInterface()
          Method enumerateInterface.
 Enumeration<Node> enumerateNode()
          Method enumerateNode.
 Interface[] getInterface()
          Method getInterface.Returns the contents of the collection in an Array.
 Interface getInterface(int index)
          Method getInterface.
 List<Interface> getInterfaceCollection()
          Method getInterfaceCollection.Returns a reference to '_interfaceList'.
 int getInterfaceCount()
          Method getInterfaceCount.
 Node[] getNode()
          Method getNode.Returns the contents of the collection in an Array.
 Node getNode(int index)
          Method getNode.
 List<Node> getNodeCollection()
          Method getNodeCollection.Returns a reference to '_nodeList'.
 int getNodeCount()
          Method getNodeCount.
 boolean isValid()
          Method isValid.
 Iterator<Interface> iterateInterface()
          Method iterateInterface.
 Iterator<Node> iterateNode()
          Method iterateNode.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllInterface()
           
 void removeAllNode()
           
 boolean removeInterface(Interface vInterface)
          Method removeInterface.
 Interface removeInterfaceAt(int index)
          Method removeInterfaceAt.
 boolean removeNode(Node vNode)
          Method removeNode.
 Node removeNodeAt(int index)
          Method removeNodeAt.
 void setInterface(Interface[] vInterfaceArray)
           
 void setInterface(int index, Interface vInterface)
           
 void setInterface(List<Interface> vInterfaceList)
          Sets the value of '_interfaceList' by copying the given Vector.
 void setInterfaceCollection(List<Interface> _interfaceList)
          Deprecated.  
 void setNode(int index, Node vNode)
           
 void setNode(List<Node> vNodeList)
          Sets the value of '_nodeList' by copying the given Vector.
 void setNode(Node[] vNodeArray)
           
 void setNodeCollection(List<Node> nodeList)
          Deprecated.  
static Outage unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class org.opennms.netmgt.config.common.BasicSchedule
addTime, addTime, enumerateTime, getName, getTime, getTime, getTimeCollection, getTimeCount, getType, iterateTime, removeAllTime, removeTime, removeTimeAt, setName, setTime, setTime, setTime, setTimeCollection, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Outage

public Outage()
Method Detail

addInterface

public void addInterface(Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInterface

public void addInterface(int index,
                         Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
index -
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addNode

public void addNode(Node vNode)
             throws IndexOutOfBoundsException
Parameters:
vNode -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addNode

public void addNode(int index,
                    Node vNode)
             throws IndexOutOfBoundsException
Parameters:
index -
vNode -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateInterface

public Enumeration<Interface> enumerateInterface()
Method enumerateInterface.

Returns:
an Enumeration over all possible elements of this collection

enumerateNode

public Enumeration<Node> enumerateNode()
Method enumerateNode.

Returns:
an Enumeration over all possible elements of this collection

getInterface

public Interface getInterface(int index)
                       throws IndexOutOfBoundsException
Method getInterface.

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

getInterface

public Interface[] getInterface()
Method getInterface.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

getInterfaceCollection

public List<Interface> getInterfaceCollection()
Method getInterfaceCollection.Returns a reference to '_interfaceList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getInterfaceCount

public int getInterfaceCount()
Method getInterfaceCount.

Returns:
the size of this collection

getNode

public Node getNode(int index)
             throws IndexOutOfBoundsException
Method getNode.

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

getNode

public Node[] getNode()
Method getNode.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

getNodeCollection

public List<Node> getNodeCollection()
Method getNodeCollection.Returns a reference to '_nodeList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getNodeCount

public int getNodeCount()
Method getNodeCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

Overrides:
isValid in class BasicSchedule
Returns:
true if this object is valid according to the schema

iterateInterface

public Iterator<Interface> iterateInterface()
Method iterateInterface.

Returns:
an Iterator over all possible elements in this collection

iterateNode

public Iterator<Node> iterateNode()
Method iterateNode.

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
Overrides:
marshal in class BasicSchedule
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
Overrides:
marshal in class BasicSchedule
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

removeAllInterface

public void removeAllInterface()

removeAllNode

public void removeAllNode()

removeInterface

public boolean removeInterface(Interface vInterface)
Method removeInterface.

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

removeInterfaceAt

public Interface removeInterfaceAt(int index)
Method removeInterfaceAt.

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

removeNode

public boolean removeNode(Node vNode)
Method removeNode.

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

removeNodeAt

public Node removeNodeAt(int index)
Method removeNodeAt.

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

setInterface

public void setInterface(int index,
                         Interface vInterface)
                  throws IndexOutOfBoundsException
Parameters:
index -
vInterface -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setInterface

public void setInterface(Interface[] vInterfaceArray)
Parameters:
vInterfaceArray -

setInterface

public void setInterface(List<Interface> vInterfaceList)
Sets the value of '_interfaceList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vInterfaceList - the Vector to copy.

setInterfaceCollection

public void setInterfaceCollection(List<Interface> _interfaceList)
Deprecated. 

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

Parameters:
_interfaceList - the Vector to set.

setNode

public void setNode(int index,
                    Node vNode)
             throws IndexOutOfBoundsException
Parameters:
index -
vNode -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setNode

public void setNode(Node[] vNodeArray)
Parameters:
vNodeArray -

setNode

public void setNode(List<Node> vNodeList)
Sets the value of '_nodeList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vNodeList - the Vector to copy.

setNodeCollection

public void setNodeCollection(List<Node> nodeList)
Deprecated. 

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

Parameters:
nodeList - the Vector to set.

unmarshal

public static Outage 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.Outage
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
Overrides:
validate in class BasicSchedule
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2008. All Rights Reserved.