org.opennms.netmgt.xml.event
Class Mask

java.lang.Object
  extended by org.opennms.netmgt.xml.event.Mask
All Implemented Interfaces:
Serializable

public class Mask
extends Object
implements Serializable

The Mask for event configuration: The mask contains one or more 'maskelements' which uniquely identify an event. This can only include elements from the following subset: uei, source, host, snmphost, nodeid, interface, service, id(SNMP EID), specific, generic, community

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

Constructor Summary
Mask()
           
 
Method Summary
 void addMaskelement(int index, Maskelement vMaskelement)
           
 void addMaskelement(Maskelement vMaskelement)
           
 Enumeration<Maskelement> enumerateMaskelement()
          Method enumerateMaskelement.
 Maskelement[] getMaskelement()
          Method getMaskelement.Returns the contents of the collection in an Array.
 Maskelement getMaskelement(int index)
          Method getMaskelement.
 List<Maskelement> getMaskelementCollection()
          Method getMaskelementCollection.Returns a reference to '_maskelementList'.
 int getMaskelementCount()
          Method getMaskelementCount.
 boolean isValid()
          Method isValid.
 Iterator<Maskelement> iterateMaskelement()
          Method iterateMaskelement.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllMaskelement()
           
 boolean removeMaskelement(Maskelement vMaskelement)
          Method removeMaskelement.
 Maskelement removeMaskelementAt(int index)
          Method removeMaskelementAt.
 void setMaskelement(int index, Maskelement vMaskelement)
           
 void setMaskelement(List<Maskelement> vMaskelementList)
          Sets the value of '_maskelementList' by copying the given Vector.
 void setMaskelement(Maskelement[] vMaskelementArray)
           
 void setMaskelementCollection(List<Maskelement> maskelementList)
          Deprecated.  
static Mask 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

Mask

public Mask()
Method Detail

addMaskelement

public void addMaskelement(Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMaskelement

public void addMaskelement(int index,
                           Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
index -
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateMaskelement

public Enumeration<Maskelement> enumerateMaskelement()
Method enumerateMaskelement.

Returns:
an Enumeration over all possible elements of this collection

getMaskelement

public Maskelement getMaskelement(int index)
                           throws IndexOutOfBoundsException
Method getMaskelement.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.xml.event.Maskelement at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getMaskelement

public Maskelement[] getMaskelement()
Method getMaskelement.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

getMaskelementCollection

public List<Maskelement> getMaskelementCollection()
Method getMaskelementCollection.Returns a reference to '_maskelementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getMaskelementCount

public int getMaskelementCount()
Method getMaskelementCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateMaskelement

public Iterator<Maskelement> iterateMaskelement()
Method iterateMaskelement.

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

removeAllMaskelement

public void removeAllMaskelement()

removeMaskelement

public boolean removeMaskelement(Maskelement vMaskelement)
Method removeMaskelement.

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

removeMaskelementAt

public Maskelement removeMaskelementAt(int index)
Method removeMaskelementAt.

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

setMaskelement

public void setMaskelement(int index,
                           Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
index -
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMaskelement

public void setMaskelement(Maskelement[] vMaskelementArray)
Parameters:
vMaskelementArray -

setMaskelement

public void setMaskelement(List<Maskelement> vMaskelementList)
Sets the value of '_maskelementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vMaskelementList - the Vector to copy.

setMaskelementCollection

public void setMaskelementCollection(List<Maskelement> maskelementList)
Deprecated. 

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

Parameters:
maskelementList - the Vector to set.

unmarshal

public static Mask unmarshal(Reader reader)
                      throws org.exolab.castor.xml.MarshalException,
                             org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.xml.event.Mask
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 © 2009. All Rights Reserved.