org.opennms.netmgt.xml.eventconf
Class Mask

java.lang.Object
  extended by org.opennms.netmgt.xml.eventconf.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. XXX need to add information about varbind

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

Constructor Summary
Mask()
           
 
Method Summary
 void addMaskelement(int index, Maskelement vMaskelement)
           
 void addMaskelement(Maskelement vMaskelement)
           
 void addVarbind(int index, Varbind vVarbind)
           
 void addVarbind(Varbind vVarbind)
           
 Enumeration<Maskelement> enumerateMaskelement()
          Method enumerateMaskelement.
 Enumeration<Varbind> enumerateVarbind()
          Method enumerateVarbind.
 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.
 Varbind[] getVarbind()
          Method getVarbind.Returns the contents of the collection in an Array.
 Varbind getVarbind(int index)
          Method getVarbind.
 List<Varbind> getVarbindCollection()
          Method getVarbindCollection.Returns a reference to '_varbindList'.
 int getVarbindCount()
          Method getVarbindCount.
 boolean isValid()
          Method isValid.
 Iterator<Maskelement> iterateMaskelement()
          Method iterateMaskelement.
 Iterator<Varbind> iterateVarbind()
          Method iterateVarbind.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllMaskelement()
           
 void removeAllVarbind()
           
 boolean removeMaskelement(Maskelement vMaskelement)
          Method removeMaskelement.
 Maskelement removeMaskelementAt(int index)
          Method removeMaskelementAt.
 boolean removeVarbind(Varbind vVarbind)
          Method removeVarbind.
 Varbind removeVarbindAt(int index)
          Method removeVarbindAt.
 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.  
 void setVarbind(int index, Varbind vVarbind)
           
 void setVarbind(List<Varbind> vVarbindList)
          Sets the value of '_varbindList' by copying the given Vector.
 void setVarbind(Varbind[] vVarbindArray)
           
 void setVarbindCollection(List<Varbind> varbindList)
          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

addVarbind

public void addVarbind(Varbind vVarbind)
                throws IndexOutOfBoundsException
Parameters:
vVarbind -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVarbind

public void addVarbind(int index,
                       Varbind vVarbind)
                throws IndexOutOfBoundsException
Parameters:
index -
vVarbind -
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

enumerateVarbind

public Enumeration<Varbind> enumerateVarbind()
Method enumerateVarbind.

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.eventconf.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

getVarbind

public Varbind getVarbind(int index)
                   throws IndexOutOfBoundsException
Method getVarbind.

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

getVarbind

public Varbind[] getVarbind()
Method getVarbind.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

getVarbindCollection

public List<Varbind> getVarbindCollection()
Method getVarbindCollection.Returns a reference to '_varbindList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getVarbindCount

public int getVarbindCount()
Method getVarbindCount.

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

iterateVarbind

public Iterator<Varbind> iterateVarbind()
Method iterateVarbind.

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()

removeAllVarbind

public void removeAllVarbind()

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

removeVarbind

public boolean removeVarbind(Varbind vVarbind)
Method removeVarbind.

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

removeVarbindAt

public Varbind removeVarbindAt(int index)
Method removeVarbindAt.

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.

setVarbind

public void setVarbind(int index,
                       Varbind vVarbind)
                throws IndexOutOfBoundsException
Parameters:
index -
vVarbind -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setVarbind

public void setVarbind(Varbind[] vVarbindArray)
Parameters:
vVarbindArray -

setVarbind

public void setVarbind(List<Varbind> vVarbindList)
Sets the value of '_varbindList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vVarbindList - the Vector to copy.

setVarbindCollection

public void setVarbindCollection(List<Varbind> varbindList)
Deprecated. 

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

Parameters:
varbindList - 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.eventconf.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 © 2008. All Rights Reserved.