Package org.opennms.netmgt.config
Class DefaultEventConfDao
- java.lang.Object
-
- org.opennms.netmgt.config.DefaultEventConfDao
-
- All Implemented Interfaces:
EventConfDao,org.springframework.beans.factory.InitializingBean
public class DefaultEventConfDao extends Object implements EventConfDao, org.springframework.beans.factory.InitializingBean
-
-
Constructor Summary
Constructors Constructor Description DefaultEventConfDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(Event event)Adds the event to the root level event config storage (file).voidaddEventToProgrammaticStore(Event event)Adds the given event to the programmatic event store.voidafterPropertiesSet()EventfindByEvent(Event matchingEvent)findByEventEventfindByUei(String uei)findByUeiList<Event>getAllEvents()StringgetEventLabel(String uei)getEventLabelMap<String,String>getEventLabels()getEventLabelsList<Event>getEvents(String uei)getEventsList<Event>getEventsByLabel()getEventsByLabelList<String>getEventUEIs()getEventUEIsStringgetProgrammaticStoreRelativeUrl()EventsgetRootEvents()getRootEventsbooleanisSecureTag(String tag)isSecureTagvoidreload()reloadbooleanremoveEventFromProgrammaticStore(Event event)Removes the given event from the programmatic event store.voidsaveCurrent()saveCurrentvoidsetConfigResource(org.springframework.core.io.Resource configResource)voidsetProgrammaticStoreRelativeUrl(String programmaticStoreRelativeUrl)
-
-
-
Method Detail
-
getProgrammaticStoreRelativeUrl
public String getProgrammaticStoreRelativeUrl()
-
setProgrammaticStoreRelativeUrl
public void setProgrammaticStoreRelativeUrl(String programmaticStoreRelativeUrl)
-
reload
public void reload() throws org.springframework.dao.DataAccessExceptionDescription copied from interface:EventConfDaoreload
- Specified by:
reloadin interfaceEventConfDao- Throws:
org.springframework.dao.DataAccessException- if any.
-
getEvents
public List<Event> getEvents(String uei)
Description copied from interface:EventConfDaogetEvents
- Specified by:
getEventsin interfaceEventConfDao- Parameters:
uei- aStringobject.- Returns:
- a
Listobject.
-
getEventUEIs
public List<String> getEventUEIs()
Description copied from interface:EventConfDaogetEventUEIs
- Specified by:
getEventUEIsin interfaceEventConfDao- Returns:
- a
Listobject.
-
getEventLabels
public Map<String,String> getEventLabels()
Description copied from interface:EventConfDaogetEventLabels
- Specified by:
getEventLabelsin interfaceEventConfDao- Returns:
- a
Mapobject.
-
getEventLabel
public String getEventLabel(String uei)
Description copied from interface:EventConfDaogetEventLabel
- Specified by:
getEventLabelin interfaceEventConfDao- Parameters:
uei- aStringobject.- Returns:
- a
Stringobject.
-
saveCurrent
public void saveCurrent()
Description copied from interface:EventConfDaosaveCurrent
- Specified by:
saveCurrentin interfaceEventConfDao
-
getEventsByLabel
public List<Event> getEventsByLabel()
Description copied from interface:EventConfDaogetEventsByLabel
- Specified by:
getEventsByLabelin interfaceEventConfDao- Returns:
- a
Listobject.
-
addEvent
public void addEvent(Event event)
Description copied from interface:EventConfDaoAdds the event to the root level event config storage (file). Does not save (you must save independently with saveCurrent)- Specified by:
addEventin interfaceEventConfDao- Parameters:
event- The fully configured Event object to add.
-
addEventToProgrammaticStore
public void addEventToProgrammaticStore(Event event)
Description copied from interface:EventConfDaoAdds 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:
addEventToProgrammaticStorein interfaceEventConfDao- Parameters:
event- The fully configured Event object to add.
-
removeEventFromProgrammaticStore
public boolean removeEventFromProgrammaticStore(Event event)
Description copied from interface:EventConfDaoRemoves 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:
removeEventFromProgrammaticStorein interfaceEventConfDao- Parameters:
event- The fully configured Event object to remove.- Returns:
- a boolean.
-
isSecureTag
public boolean isSecureTag(String tag)
Description copied from interface:EventConfDaoisSecureTag
- Specified by:
isSecureTagin interfaceEventConfDao- Parameters:
tag- aStringobject.- Returns:
- a boolean.
-
findByUei
public Event findByUei(String uei)
Description copied from interface:EventConfDaofindByUei
- Specified by:
findByUeiin interfaceEventConfDao- Parameters:
uei- aStringobject.- Returns:
- a
Eventobject.
-
findByEvent
public Event findByEvent(Event matchingEvent)
Description copied from interface:EventConfDaofindByEvent
- Specified by:
findByEventin interfaceEventConfDao- Parameters:
matchingEvent- aEventobject.- Returns:
- a
Eventobject.
-
getRootEvents
public Events getRootEvents()
Description copied from interface:EventConfDaogetRootEvents
- Specified by:
getRootEventsin interfaceEventConfDao- Returns:
- a
Eventsobject.
-
setConfigResource
public void setConfigResource(org.springframework.core.io.Resource configResource) throws IOException- Throws:
IOException
-
afterPropertiesSet
public void afterPropertiesSet() throws org.springframework.dao.DataAccessException- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
org.springframework.dao.DataAccessException
-
-