org.opennms.netmgt.xml.eventconf
Class Events

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

public class Events
extends Object
implements Serializable

Class Events.

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

Constructor Summary
Events()
           
 
Method Summary
 void addEvent(Event vEvent)
           
 void addEvent(int index, Event vEvent)
           
 void addEventFile(int index, String vEventFile)
           
 void addEventFile(String vEventFile)
           
 Enumeration<Event> enumerateEvent()
          Method enumerateEvent.
 Enumeration<String> enumerateEventFile()
          Method enumerateEventFile.
 Event[] getEvent()
          Method getEvent.Returns the contents of the collection in an Array.
 Event getEvent(int index)
          Method getEvent.
 List<Event> getEventCollection()
          Method getEventCollection.Returns a reference to '_eventList'.
 int getEventCount()
          Method getEventCount.
 String[] getEventFile()
          Method getEventFile.Returns the contents of the collection in an Array.
 String getEventFile(int index)
          Method getEventFile.
 List<String> getEventFileCollection()
          Method getEventFileCollection.Returns a reference to '_eventFileList'.
 int getEventFileCount()
          Method getEventFileCount.
 Global getGlobal()
          Returns the value of field 'global'.
 boolean isValid()
          Method isValid.
 Iterator<Event> iterateEvent()
          Method iterateEvent.
 Iterator<String> iterateEventFile()
          Method iterateEventFile.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllEvent()
           
 void removeAllEventFile()
           
 boolean removeEvent(Event vEvent)
          Method removeEvent.
 Event removeEventAt(int index)
          Method removeEventAt.
 boolean removeEventFile(String vEventFile)
          Method removeEventFile.
 String removeEventFileAt(int index)
          Method removeEventFileAt.
 void setEvent(Event[] vEventArray)
           
 void setEvent(int index, Event vEvent)
           
 void setEvent(List<Event> vEventList)
          Sets the value of '_eventList' by copying the given Vector.
 void setEventCollection(List<Event> eventList)
          Deprecated.  
 void setEventFile(int index, String vEventFile)
           
 void setEventFile(List<String> vEventFileList)
          Sets the value of '_eventFileList' by copying the given Vector.
 void setEventFile(String[] vEventFileArray)
           
 void setEventFileCollection(List<String> eventFileList)
          Deprecated.  
 void setGlobal(Global global)
          Sets the value of field 'global'.
static Events 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

Events

public Events()
Method Detail

addEvent

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

addEvent

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

addEventFile

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

addEventFile

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

enumerateEvent

public Enumeration<Event> enumerateEvent()
Method enumerateEvent.

Returns:
an Enumeration over all possible elements of this collection

enumerateEventFile

public Enumeration<String> enumerateEventFile()
Method enumerateEventFile.

Returns:
an Enumeration over all possible elements of this collection

getEvent

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

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

getEvent

public Event[] 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<Event> 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

getEventFile

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

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

getEventFile

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

getEventFileCollection

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

Returns:
a reference to the Vector backing this class

getEventFileCount

public int getEventFileCount()
Method getEventFileCount.

Returns:
the size of this collection

getGlobal

public Global getGlobal()
Returns the value of field 'global'. The field 'global' has the following description: Global settings for this configuration

Returns:
the value of field 'Global'.

isValid

public boolean isValid()
Method isValid.

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

iterateEvent

public Iterator<Event> iterateEvent()
Method iterateEvent.

Returns:
an Iterator over all possible elements in this collection

iterateEventFile

public Iterator<String> iterateEventFile()
Method iterateEventFile.

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

removeAllEventFile

public void removeAllEventFile()

removeEvent

public boolean removeEvent(Event vEvent)
Method removeEvent.

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

removeEventAt

public Event removeEventAt(int index)
Method removeEventAt.

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

removeEventFile

public boolean removeEventFile(String vEventFile)
Method removeEventFile.

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

removeEventFileAt

public String removeEventFileAt(int index)
Method removeEventFileAt.

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

setEvent

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

setEvent

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

setEvent

public void setEvent(List<Event> 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<Event> 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.

setEventFile

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

setEventFile

public void setEventFile(String[] vEventFileArray)
Parameters:
vEventFileArray -

setEventFile

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

Parameters:
vEventFileList - the Vector to copy.

setEventFileCollection

public void setEventFileCollection(List<String> eventFileList)
Deprecated. 

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

Parameters:
eventFileList - the Vector to set.

setGlobal

public void setGlobal(Global global)
Sets the value of field 'global'. The field 'global' has the following description: Global settings for this configuration

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

unmarshal

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