org.opennms.netmgt.correlation.drools.config
Class RuleSet

java.lang.Object
  extended by org.opennms.netmgt.correlation.drools.config.RuleSet
All Implemented Interfaces:
Serializable

public class RuleSet
extends Object
implements Serializable

Class RuleSet.

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

Constructor Summary
RuleSet()
           
 
Method Summary
 void addEvent(int index, String vEvent)
           
 void addEvent(String vEvent)
           
 void addGlobal(Global vGlobal)
           
 void addGlobal(int index, Global vGlobal)
           
 void addRuleFile(int index, String vRuleFile)
           
 void addRuleFile(String vRuleFile)
           
 Enumeration<String> enumerateEvent()
          Method enumerateEvent.
 Enumeration<Global> enumerateGlobal()
          Method enumerateGlobal.
 Enumeration<String> enumerateRuleFile()
          Method enumerateRuleFile.
 String getAppContext()
          Returns the value of field 'appContext'.
 String[] getEvent()
          Method getEvent.Returns the contents of the collection in an Array.
 String getEvent(int index)
          Method getEvent.
 List<String> getEventCollection()
          Method getEventCollection.Returns a reference to '_eventList'.
 int getEventCount()
          Method getEventCount.
 Global[] getGlobal()
          Method getGlobal.Returns the contents of the collection in an Array.
 Global getGlobal(int index)
          Method getGlobal.
 List<Global> getGlobalCollection()
          Method getGlobalCollection.Returns a reference to '_globalList'.
 int getGlobalCount()
          Method getGlobalCount.
 String getName()
          Returns the value of field 'name'.
 String[] getRuleFile()
          Method getRuleFile.Returns the contents of the collection in an Array.
 String getRuleFile(int index)
          Method getRuleFile.
 List<String> getRuleFileCollection()
          Method getRuleFileCollection.Returns a reference to '_ruleFileList'.
 int getRuleFileCount()
          Method getRuleFileCount.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateEvent()
          Method iterateEvent.
 Iterator<Global> iterateGlobal()
          Method iterateGlobal.
 Iterator<String> iterateRuleFile()
          Method iterateRuleFile.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllEvent()
           
 void removeAllGlobal()
           
 void removeAllRuleFile()
           
 boolean removeEvent(String vEvent)
          Method removeEvent.
 String removeEventAt(int index)
          Method removeEventAt.
 boolean removeGlobal(Global vGlobal)
          Method removeGlobal.
 Global removeGlobalAt(int index)
          Method removeGlobalAt.
 boolean removeRuleFile(String vRuleFile)
          Method removeRuleFile.
 String removeRuleFileAt(int index)
          Method removeRuleFileAt.
 void setAppContext(String appContext)
          Sets the value of field 'appContext'.
 void setEvent(int index, String vEvent)
           
 void setEvent(List<String> vEventList)
          Sets the value of '_eventList' by copying the given Vector.
 void setEvent(String[] vEventArray)
           
 void setEventCollection(List<String> eventList)
          Deprecated.  
 void setGlobal(Global[] vGlobalArray)
           
 void setGlobal(int index, Global vGlobal)
           
 void setGlobal(List<Global> vGlobalList)
          Sets the value of '_globalList' by copying the given Vector.
 void setGlobalCollection(List<Global> globalList)
          Deprecated.  
 void setName(String name)
          Sets the value of field 'name'.
 void setRuleFile(int index, String vRuleFile)
           
 void setRuleFile(List<String> vRuleFileList)
          Sets the value of '_ruleFileList' by copying the given Vector.
 void setRuleFile(String[] vRuleFileArray)
           
 void setRuleFileCollection(List<String> ruleFileList)
          Deprecated.  
static RuleSet 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

RuleSet

public RuleSet()
Method Detail

addEvent

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

addEvent

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

addGlobal

public void addGlobal(Global vGlobal)
               throws IndexOutOfBoundsException
Parameters:
vGlobal -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addGlobal

public void addGlobal(int index,
                      Global vGlobal)
               throws IndexOutOfBoundsException
Parameters:
index -
vGlobal -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRuleFile

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

addRuleFile

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

enumerateEvent

public Enumeration<String> enumerateEvent()
Method enumerateEvent.

Returns:
an Enumeration over all possible elements of this collection

enumerateGlobal

public Enumeration<Global> enumerateGlobal()
Method enumerateGlobal.

Returns:
an Enumeration over all possible elements of this collection

enumerateRuleFile

public Enumeration<String> enumerateRuleFile()
Method enumerateRuleFile.

Returns:
an Enumeration over all possible elements of this collection

getAppContext

public String getAppContext()
Returns the value of field 'appContext'.

Returns:
the value of field 'AppContext'.

getEvent

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

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

getEvent

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

getEventCollection

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

Returns:
a reference to the Vector backing this class

getEventCount

public int getEventCount()
Method getEventCount.

Returns:
the size of this collection

getGlobal

public Global getGlobal(int index)
                 throws IndexOutOfBoundsException
Method getGlobal.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.correlation.drools.config.Global at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getGlobal

public Global[] getGlobal()
Method getGlobal.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

getGlobalCollection

public List<Global> getGlobalCollection()
Method getGlobalCollection.Returns a reference to '_globalList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getGlobalCount

public int getGlobalCount()
Method getGlobalCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getRuleFile

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

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

getRuleFile

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

getRuleFileCollection

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

Returns:
a reference to the Vector backing this class

getRuleFileCount

public int getRuleFileCount()
Method getRuleFileCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateEvent

public Iterator<String> iterateEvent()
Method iterateEvent.

Returns:
an Iterator over all possible elements in this collection

iterateGlobal

public Iterator<Global> iterateGlobal()
Method iterateGlobal.

Returns:
an Iterator over all possible elements in this collection

iterateRuleFile

public Iterator<String> iterateRuleFile()
Method iterateRuleFile.

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

removeAllEvent

public void removeAllEvent()

removeAllGlobal

public void removeAllGlobal()

removeAllRuleFile

public void removeAllRuleFile()

removeEvent

public boolean removeEvent(String vEvent)
Method removeEvent.

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

removeEventAt

public String removeEventAt(int index)
Method removeEventAt.

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

removeGlobal

public boolean removeGlobal(Global vGlobal)
Method removeGlobal.

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

removeGlobalAt

public Global removeGlobalAt(int index)
Method removeGlobalAt.

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

removeRuleFile

public boolean removeRuleFile(String vRuleFile)
Method removeRuleFile.

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

removeRuleFileAt

public String removeRuleFileAt(int index)
Method removeRuleFileAt.

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

setAppContext

public void setAppContext(String appContext)
Sets the value of field 'appContext'.

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

setEvent

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

setEvent

public void setEvent(String[] vEventArray)
Parameters:
vEventArray -

setEvent

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

Parameters:
vEventList - the Vector to copy.

setEventCollection

public void setEventCollection(List<String> eventList)
Deprecated. 

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

Parameters:
eventList - the Vector to set.

setGlobal

public void setGlobal(int index,
                      Global vGlobal)
               throws IndexOutOfBoundsException
Parameters:
index -
vGlobal -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setGlobal

public void setGlobal(Global[] vGlobalArray)
Parameters:
vGlobalArray -

setGlobal

public void setGlobal(List<Global> vGlobalList)
Sets the value of '_globalList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vGlobalList - the Vector to copy.

setGlobalCollection

public void setGlobalCollection(List<Global> globalList)
Deprecated. 

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

Parameters:
globalList - the Vector to set.

setName

public void setName(String name)
Sets the value of field 'name'.

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

setRuleFile

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

setRuleFile

public void setRuleFile(String[] vRuleFileArray)
Parameters:
vRuleFileArray -

setRuleFile

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

Parameters:
vRuleFileList - the Vector to copy.

setRuleFileCollection

public void setRuleFileCollection(List<String> ruleFileList)
Deprecated. 

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

Parameters:
ruleFileList - the Vector to set.

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.correlation.drools.config.RuleSet
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.