org.opennms.netmgt.config.translator
Class Mappings

java.lang.Object
  extended by org.opennms.netmgt.config.translator.Mappings
All Implemented Interfaces:
java.io.Serializable

public class Mappings
extends java.lang.Object
implements java.io.Serializable

The list of event mappings for this event. The first mapping that matches the event is used to translate the event into a new event.

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

Constructor Summary
Mappings()
           
 
Method Summary
 void addMapping(int index, Mapping vMapping)
          Method addMapping
 void addMapping(Mapping vMapping)
          Method addMapping
 void clearMapping()
          Method clearMapping
 java.util.Enumeration enumerateMapping()
          Method enumerateMapping
 Mapping[] getMapping()
          Method getMapping
 Mapping getMapping(int index)
          Method getMapping
 java.util.ArrayList getMappingCollection()
          Method getMappingCollection Returns a reference to 'mapping'.
 int getMappingCount()
          Method getMappingCount
 boolean isValid()
          Method isValid
 void marshal(org.xml.sax.ContentHandler handler)
          Method marshal
 void marshal(java.io.Writer out)
          Method marshal
 boolean removeMapping(Mapping vMapping)
          Method removeMapping
 void setMapping(java.util.ArrayList mappingCollection)
          Method setMapping Sets the value of 'mapping' by copying the given ArrayList.
 void setMapping(int index, Mapping vMapping)
          Method setMapping
 void setMapping(Mapping[] mappingArray)
          Method setMapping
 void setMappingCollection(java.util.ArrayList mappingCollection)
          Method setMappingCollection Sets the value of 'mapping' by setting it to the given ArrayList.
static java.lang.Object unmarshal(java.io.Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mappings

public Mappings()
Method Detail

addMapping

public void addMapping(Mapping vMapping)
                throws java.lang.IndexOutOfBoundsException
Method addMapping

Parameters:
vMapping -
Throws:
java.lang.IndexOutOfBoundsException

addMapping

public void addMapping(int index,
                       Mapping vMapping)
                throws java.lang.IndexOutOfBoundsException
Method addMapping

Parameters:
index -
vMapping -
Throws:
java.lang.IndexOutOfBoundsException

clearMapping

public void clearMapping()
Method clearMapping


enumerateMapping

public java.util.Enumeration enumerateMapping()
Method enumerateMapping

Returns:
Enumeration

getMapping

public Mapping getMapping(int index)
                   throws java.lang.IndexOutOfBoundsException
Method getMapping

Parameters:
index -
Returns:
Mapping
Throws:
java.lang.IndexOutOfBoundsException

getMapping

public Mapping[] getMapping()
Method getMapping

Returns:
Mapping

getMappingCollection

public java.util.ArrayList getMappingCollection()
Method getMappingCollection Returns a reference to 'mapping'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getMappingCount

public int getMappingCount()
Method getMappingCount

Returns:
int

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
handler -
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

removeMapping

public boolean removeMapping(Mapping vMapping)
Method removeMapping

Parameters:
vMapping -
Returns:
boolean

setMapping

public void setMapping(int index,
                       Mapping vMapping)
                throws java.lang.IndexOutOfBoundsException
Method setMapping

Parameters:
index -
vMapping -
Throws:
java.lang.IndexOutOfBoundsException

setMapping

public void setMapping(Mapping[] mappingArray)
Method setMapping

Parameters:
mappingArray -

setMapping

public void setMapping(java.util.ArrayList mappingCollection)
Method setMapping Sets the value of 'mapping' by copying the given ArrayList.

Parameters:
mappingCollection - the Vector to copy.

setMappingCollection

public void setMappingCollection(java.util.ArrayList mappingCollection)
Method setMappingCollection Sets the value of 'mapping' by setting it to the given ArrayList. No type checking is performed.

Parameters:
mappingCollection - the ArrayList to copy.

unmarshal

public static java.lang.Object unmarshal(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Method validate

Throws:
org.exolab.castor.xml.ValidationException


Copyright © 2007. All Rights Reserved.