org.opennms.netmgt.config
Class DefaultEventConfDao
java.lang.Object
org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<org.opennms.netmgt.xml.eventconf.Events,org.opennms.netmgt.config.EventConfiguration>
org.opennms.netmgt.config.DefaultEventConfDao
- All Implemented Interfaces:
- EventConfDao, org.springframework.beans.factory.InitializingBean
public class DefaultEventConfDao
- extends org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<org.opennms.netmgt.xml.eventconf.Events,org.opennms.netmgt.config.EventConfiguration>
- implements EventConfDao, org.springframework.beans.factory.InitializingBean
| Nested classes/interfaces inherited from class org.opennms.netmgt.dao.castor.AbstractCastorConfigDao |
org.opennms.netmgt.dao.castor.AbstractCastorConfigDao.CastorReloadCallback |
| Methods inherited from class org.opennms.netmgt.dao.castor.AbstractCastorConfigDao |
getConfigResource, getContainer, getDescription, getReloadCheckInterval, loadConfig, log, setConfigResource, setReloadCheckInterval |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultEventConfDao
public DefaultEventConfDao()
createLoadedLogMessage
protected String createLoadedLogMessage(org.opennms.netmgt.config.EventConfiguration translatedConfig,
long diffTime)
- Overrides:
createLoadedLogMessage in class org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<org.opennms.netmgt.xml.eventconf.Events,org.opennms.netmgt.config.EventConfiguration>
reload
public void reload()
throws org.springframework.dao.DataAccessException
- Specified by:
reload in interface EventConfDao
- Throws:
org.springframework.dao.DataAccessException
afterPropertiesSet
public void afterPropertiesSet()
throws org.springframework.dao.DataAccessException
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSet in class org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<org.opennms.netmgt.xml.eventconf.Events,org.opennms.netmgt.config.EventConfiguration>
- Throws:
org.springframework.dao.DataAccessException
translateConfig
public org.opennms.netmgt.config.EventConfiguration translateConfig(org.opennms.netmgt.xml.eventconf.Events events)
throws org.springframework.dao.DataAccessException
- Specified by:
translateConfig in class org.opennms.netmgt.dao.castor.AbstractCastorConfigDao<org.opennms.netmgt.xml.eventconf.Events,org.opennms.netmgt.config.EventConfiguration>
- Throws:
org.springframework.dao.DataAccessException
getEvents
public List<org.opennms.netmgt.xml.eventconf.Event> getEvents(String uei)
- Specified by:
getEvents in interface EventConfDao
getEventUEIs
public List<String> getEventUEIs()
- Specified by:
getEventUEIs in interface EventConfDao
getEventLabels
public Map<String,String> getEventLabels()
- Specified by:
getEventLabels in interface EventConfDao
getEventLabel
public String getEventLabel(String uei)
- Specified by:
getEventLabel in interface EventConfDao
saveCurrent
public void saveCurrent()
- Specified by:
saveCurrent in interface EventConfDao
getEventsByLabel
public List<org.opennms.netmgt.xml.eventconf.Event> getEventsByLabel()
- Specified by:
getEventsByLabel in interface EventConfDao
addEvent
public void addEvent(org.opennms.netmgt.xml.eventconf.Event event)
- Description copied from interface:
EventConfDao
- Adds the event to the root level event config storage (file).
Does not save (you must save independently with saveCurrent)
- Specified by:
addEvent in interface EventConfDao
- Parameters:
event - The fully configured Event object to add.
addEventToProgrammaticStore
public void addEventToProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
- Description copied from interface:
EventConfDao
- 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
- Specified by:
addEventToProgrammaticStore in interface EventConfDao
- Parameters:
event - The fully configured Event object to add.
removeEventFromProgrammaticStore
public boolean removeEventFromProgrammaticStore(org.opennms.netmgt.xml.eventconf.Event event)
- Description copied from interface:
EventConfDao
- 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
- Specified by:
removeEventFromProgrammaticStore in interface EventConfDao
- Parameters:
event - The fully configured Event object to remove.
isSecureTag
public boolean isSecureTag(String tag)
- Specified by:
isSecureTag in interface EventConfDao
findByUei
public org.opennms.netmgt.xml.eventconf.Event findByUei(String uei)
- Specified by:
findByUei in interface EventConfDao
findByEvent
public org.opennms.netmgt.xml.eventconf.Event findByEvent(org.opennms.netmgt.xml.event.Event matchingEvent)
- Specified by:
findByEvent in interface EventConfDao
getProgrammaticStoreRelativeUrl
public String getProgrammaticStoreRelativeUrl()
setProgrammaticStoreRelativeUrl
public void setProgrammaticStoreRelativeUrl(String programmaticStoreRelativeUrl)
Copyright ? 2008. All Rights Reserved.