org.opennms.netmgt.xml.eventconf
Class Correlation

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

public class Correlation
extends Object
implements Serializable

The event correlation information

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

Constructor Summary
Correlation()
           
 
Method Summary
 void addCuei(int index, String vCuei)
           
 void addCuei(String vCuei)
           
 Enumeration<String> enumerateCuei()
          Method enumerateCuei.
 String getCmax()
          Returns the value of field 'cmax'.
 String getCmin()
          Returns the value of field 'cmin'.
 String getCtime()
          Returns the value of field 'ctime'.
 String[] getCuei()
          Method getCuei.Returns the contents of the collection in an Array.
 String getCuei(int index)
          Method getCuei.
 List<String> getCueiCollection()
          Method getCueiCollection.Returns a reference to '_cueiList'.
 int getCueiCount()
          Method getCueiCount.
 String getPath()
          Returns the value of field 'path'.
 String getState()
          Returns the value of field 'state'.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateCuei()
          Method iterateCuei.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllCuei()
           
 boolean removeCuei(String vCuei)
          Method removeCuei.
 String removeCueiAt(int index)
          Method removeCueiAt.
 void setCmax(String cmax)
          Sets the value of field 'cmax'.
 void setCmin(String cmin)
          Sets the value of field 'cmin'.
 void setCtime(String ctime)
          Sets the value of field 'ctime'.
 void setCuei(int index, String vCuei)
           
 void setCuei(List<String> vCueiList)
          Sets the value of '_cueiList' by copying the given Vector.
 void setCuei(String[] vCueiArray)
           
 void setCueiCollection(List<String> cueiList)
          Deprecated.  
 void setPath(String path)
          Sets the value of field 'path'.
 void setState(String state)
          Sets the value of field 'state'.
static Correlation 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

Correlation

public Correlation()
Method Detail

addCuei

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

addCuei

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

enumerateCuei

public Enumeration<String> enumerateCuei()
Method enumerateCuei.

Returns:
an Enumeration over all possible elements of this collection

getCmax

public String getCmax()
Returns the value of field 'cmax'. The field 'cmax' has the following description: The maximum count for this event

Returns:
the value of field 'Cmax'.

getCmin

public String getCmin()
Returns the value of field 'cmin'. The field 'cmin' has the following description: The minimum count for this event

Returns:
the value of field 'Cmin'.

getCtime

public String getCtime()
Returns the value of field 'ctime'. The field 'ctime' has the following description: The correlation time for this event

Returns:
the value of field 'Ctime'.

getCuei

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

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

getCuei

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

getCueiCollection

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

Returns:
a reference to the Vector backing this class

getCueiCount

public int getCueiCount()
Method getCueiCount.

Returns:
the size of this collection

getPath

public String getPath()
Returns the value of field 'path'. The field 'path' has the following description: The correlation path

Returns:
the value of field 'Path'.

getState

public String getState()
Returns the value of field 'state'. The field 'state' has the following description: The state determines if event is correlated

Returns:
the value of field 'State'.

isValid

public boolean isValid()
Method isValid.

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

iterateCuei

public Iterator<String> iterateCuei()
Method iterateCuei.

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

removeAllCuei

public void removeAllCuei()

removeCuei

public boolean removeCuei(String vCuei)
Method removeCuei.

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

removeCueiAt

public String removeCueiAt(int index)
Method removeCueiAt.

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

setCmax

public void setCmax(String cmax)
Sets the value of field 'cmax'. The field 'cmax' has the following description: The maximum count for this event

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

setCmin

public void setCmin(String cmin)
Sets the value of field 'cmin'. The field 'cmin' has the following description: The minimum count for this event

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

setCtime

public void setCtime(String ctime)
Sets the value of field 'ctime'. The field 'ctime' has the following description: The correlation time for this event

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

setCuei

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

setCuei

public void setCuei(String[] vCueiArray)
Parameters:
vCueiArray -

setCuei

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

Parameters:
vCueiList - the Vector to copy.

setCueiCollection

public void setCueiCollection(List<String> cueiList)
Deprecated. 

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

Parameters:
cueiList - the Vector to set.

setPath

public void setPath(String path)
Sets the value of field 'path'. The field 'path' has the following description: The correlation path

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

setState

public void setState(String state)
Sets the value of field 'state'. The field 'state' has the following description: The state determines if event is correlated

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

unmarshal

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