org.opennms.netmgt.config
Class EventconfFactory

java.lang.Object
  extended by org.opennms.netmgt.config.EventconfFactory

public class EventconfFactory
extends java.lang.Object


Method Summary
 void addEvent(org.opennms.netmgt.xml.eventconf.Event event)
          Adds the event to the root level event config storage (file).
 void addEventToProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
          Adds the given event to the programmatic event store.
 org.opennms.netmgt.xml.eventconf.Event getEvent(java.lang.String uei, org.opennms.netmgt.xml.eventconf.Mask mask)
          Deprecated. This function is not implemented completely. It will not perform as expected. When it is implemented, remove this deprecation tag.
 java.lang.String getEventLabel(java.lang.String uei)
           
 java.util.Map getEventLabels()
           
 java.util.List<org.opennms.netmgt.xml.eventconf.Event> getEvents(java.lang.String uei)
           
 java.util.List getEventsByLabel()
           
 java.util.List<java.lang.String> getEventUEIs()
           
static EventconfFactory getInstance()
          Singleton static call to get the only instance that should exist for the EventconfFactory
static void init()
           
static void reinit()
          A full reinitialization, from scratch.
static void reload()
           
 boolean removeEventFromProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
          Removes the given event from the programmatic event store.
 void saveCurrent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public static void init()
                 throws java.io.IOException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

reinit

public static void reinit()
                   throws org.exolab.castor.xml.MarshalException,
                          org.exolab.castor.xml.ValidationException,
                          java.io.IOException
A full reinitialization, from scratch. Subtly different from a reload (more encompassing). Safe to call in place of init if you so desire

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

getInstance

public static EventconfFactory getInstance()
Singleton static call to get the only instance that should exist for the EventconfFactory

Returns:
the single eventconf factory instance

reload

public static void reload()
                   throws java.io.IOException,
                          org.exolab.castor.xml.MarshalException,
                          org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getEvents

public java.util.List<org.opennms.netmgt.xml.eventconf.Event> getEvents(java.lang.String uei)

getEvent

public org.opennms.netmgt.xml.eventconf.Event getEvent(java.lang.String uei,
                                                       org.opennms.netmgt.xml.eventconf.Mask mask)
Deprecated. This function is not implemented completely. It will not perform as expected. When it is implemented, remove this deprecation tag.


getEventUEIs

public java.util.List<java.lang.String> getEventUEIs()

getEventLabels

public java.util.Map getEventLabels()

getEventLabel

public java.lang.String getEventLabel(java.lang.String uei)

saveCurrent

public void saveCurrent()
                 throws org.exolab.castor.xml.MarshalException,
                        java.io.IOException,
                        org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.MarshalException
java.io.IOException
org.exolab.castor.xml.ValidationException

getEventsByLabel

public java.util.List getEventsByLabel()

addEvent

public void addEvent(org.opennms.netmgt.xml.eventconf.Event event)
Adds the event to the root level event config storage (file). Does not save (you must save independently with saveCurrent)

Parameters:
event - The fully configured Event object to add.

addEventToProgrammaticStore

public void addEventToProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
Adds the given event to the programmatic event store. This store currently implemented as a file (referenced from eventconf.xml) The programmatic store is a separate storage area, so that incidental programmatic editing of events (e.g. custom UEIs for thresholds, edited through the Web-UI) does not clutter up the otherwise carefully maintained event files. This method does not save (persist) the changes

Parameters:
event - The fully configured Event object to add.

removeEventFromProgrammaticStore

public boolean removeEventFromProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
Removes the given event from the programmatic event store. This store currently implemented as a file (referenced from eventconf.xml) The programmatic store is a separate storage area, so that incidental programmatic editing of events (e.g. custom UEIs for thresholds, edited through the Web-UI) does not clutter up the otherwise carefully maintained event files. This method does not save (persist) the changes

Parameters:
event - The fully configured Event object to remove.


Copyright © 2007. All Rights Reserved.