org.opennms.netmgt.xml.eventconf
Class Maskelement

java.lang.Object
  extended by org.opennms.netmgt.xml.eventconf.Maskelement
All Implemented Interfaces:
Serializable

public class Maskelement
extends Object
implements Serializable

The mask element

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

Constructor Summary
Maskelement()
           
 
Method Summary
 void addMevalue(int index, String vMevalue)
           
 void addMevalue(String vMevalue)
           
 Enumeration<String> enumerateMevalue()
          Method enumerateMevalue.
 String getMename()
          Returns the value of field 'mename'.
 String[] getMevalue()
          Method getMevalue.Returns the contents of the collection in an Array.
 String getMevalue(int index)
          Method getMevalue.
 List<String> getMevalueCollection()
          Method getMevalueCollection.Returns a reference to '_mevalueList'.
 int getMevalueCount()
          Method getMevalueCount.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateMevalue()
          Method iterateMevalue.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllMevalue()
           
 boolean removeMevalue(String vMevalue)
          Method removeMevalue.
 String removeMevalueAt(int index)
          Method removeMevalueAt.
 void setMename(String mename)
          Sets the value of field 'mename'.
 void setMevalue(int index, String vMevalue)
           
 void setMevalue(List<String> vMevalueList)
          Sets the value of '_mevalueList' by copying the given Vector.
 void setMevalue(String[] vMevalueArray)
           
 void setMevalueCollection(List<String> mevalueList)
          Deprecated.  
static Maskelement 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

Maskelement

public Maskelement()
Method Detail

addMevalue

public void addMevalue(String vMevalue)
                throws IndexOutOfBoundsException
Parameters:
vMevalue -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMevalue

public void addMevalue(int index,
                       String vMevalue)
                throws IndexOutOfBoundsException
Parameters:
index -
vMevalue -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateMevalue

public Enumeration<String> enumerateMevalue()
Method enumerateMevalue.

Returns:
an Enumeration over all possible elements of this collection

getMename

public String getMename()
Returns the value of field 'mename'. The field 'mename' has the following description: The mask element name. Must be from the following subset: "uei" (the OpenNMS Universal Event Identifier), "source" (source of the event; "trapd" for received SNMP traps; warning: these aren't that standardized), "host" (host related to the event; for SNMP traps this is the IP source address of the host that sent the trap to OpenNMS, "snmphost" (SNMP host related to the event; for SNMPv1 traps this is IP address reported in the trap; for SNMPv2 traps and later this is the same as "host"), "nodeid" (the OpenNMS node identifier for the node related to this event), "interface" (interface related to the event; for SNMP traps this is the same as "snmphost"), "service", "id" (enterprise ID in an SNMP trap), "specific" (specific value in an SNMP trap), "generic" (generic value in an SNMP trap), or "community" (community string in an SNMP trap).

Returns:
the value of field 'Mename'.

getMevalue

public String getMevalue(int index)
                  throws IndexOutOfBoundsException
Method getMevalue.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getMevalue

public String[] getMevalue()
Method getMevalue.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

getMevalueCollection

public List<String> getMevalueCollection()
Method getMevalueCollection.Returns a reference to '_mevalueList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getMevalueCount

public int getMevalueCount()
Method getMevalueCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateMevalue

public Iterator<String> iterateMevalue()
Method iterateMevalue.

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

removeAllMevalue

public void removeAllMevalue()

removeMevalue

public boolean removeMevalue(String vMevalue)
Method removeMevalue.

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

removeMevalueAt

public String removeMevalueAt(int index)
Method removeMevalueAt.

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

setMename

public void setMename(String mename)
Sets the value of field 'mename'. The field 'mename' has the following description: The mask element name. Must be from the following subset: "uei" (the OpenNMS Universal Event Identifier), "source" (source of the event; "trapd" for received SNMP traps; warning: these aren't that standardized), "host" (host related to the event; for SNMP traps this is the IP source address of the host that sent the trap to OpenNMS, "snmphost" (SNMP host related to the event; for SNMPv1 traps this is IP address reported in the trap; for SNMPv2 traps and later this is the same as "host"), "nodeid" (the OpenNMS node identifier for the node related to this event), "interface" (interface related to the event; for SNMP traps this is the same as "snmphost"), "service", "id" (enterprise ID in an SNMP trap), "specific" (specific value in an SNMP trap), "generic" (generic value in an SNMP trap), or "community" (community string in an SNMP trap).

Parameters:
mename - the value of field 'mename'.

setMevalue

public void setMevalue(int index,
                       String vMevalue)
                throws IndexOutOfBoundsException
Parameters:
index -
vMevalue -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMevalue

public void setMevalue(String[] vMevalueArray)
Parameters:
vMevalueArray -

setMevalue

public void setMevalue(List<String> vMevalueList)
Sets the value of '_mevalueList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vMevalueList - the Vector to copy.

setMevalueCollection

public void setMevalueCollection(List<String> mevalueList)
Deprecated. 

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

Parameters:
mevalueList - the Vector to set.

unmarshal

public static Maskelement 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.Maskelement
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.