Package org.opennms.netmgt.dao.mock
Class MockEventIpcManager.EmptyEventConfDao
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.MockEventIpcManager.EmptyEventConfDao
-
- All Implemented Interfaces:
EventConfDao
- Enclosing class:
- MockEventIpcManager
public static class MockEventIpcManager.EmptyEventConfDao extends java.lang.Object implements EventConfDao
This class implementsEventConfDao
but every call returns null.
-
-
Constructor Summary
Constructors Constructor Description EmptyEventConfDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(Event event)
Adds the event to the root level event config storage (file).void
addEventToProgrammaticStore(Event event)
Adds the given event to the programmatic event store.Event
findByEvent(Event matchingEvent)
findByEventEvent
findByUei(java.lang.String uei)
findByUeijava.lang.String
getEventLabel(java.lang.String uei)
getEventLabeljava.util.Map<java.lang.String,java.lang.String>
getEventLabels()
getEventLabelsjava.util.List<Event>
getEvents(java.lang.String uei)
getEventsjava.util.List<Event>
getEventsByLabel()
getEventsByLabeljava.util.List<java.lang.String>
getEventUEIs()
getEventUEIsEvents
getRootEvents()
getRootEventsboolean
isSecureTag(java.lang.String tag)
isSecureTagvoid
reload()
reloadboolean
removeEventFromProgrammaticStore(Event event)
Removes the given event from the programmatic event store.void
saveCurrent()
saveCurrent
-
-
-
Method Detail
-
addEvent
public void addEvent(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 interfaceEventConfDao
- Parameters:
event
- The fully configured Event object to add.
-
addEventToProgrammaticStore
public void addEventToProgrammaticStore(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 interfaceEventConfDao
- Parameters:
event
- The fully configured Event object to add.
-
findByEvent
public Event findByEvent(Event matchingEvent)
Description copied from interface:EventConfDao
findByEvent
- Specified by:
findByEvent
in interfaceEventConfDao
- Parameters:
matchingEvent
- aEvent
object.- Returns:
- a
Event
object.
-
findByUei
public Event findByUei(java.lang.String uei)
Description copied from interface:EventConfDao
findByUei
- Specified by:
findByUei
in interfaceEventConfDao
- Parameters:
uei
- aString
object.- Returns:
- a
Event
object.
-
getEventLabel
public java.lang.String getEventLabel(java.lang.String uei)
Description copied from interface:EventConfDao
getEventLabel
- Specified by:
getEventLabel
in interfaceEventConfDao
- Parameters:
uei
- aString
object.- Returns:
- a
String
object.
-
getEventLabels
public java.util.Map<java.lang.String,java.lang.String> getEventLabels()
Description copied from interface:EventConfDao
getEventLabels
- Specified by:
getEventLabels
in interfaceEventConfDao
- Returns:
- a
Map
object.
-
getEventUEIs
public java.util.List<java.lang.String> getEventUEIs()
Description copied from interface:EventConfDao
getEventUEIs
- Specified by:
getEventUEIs
in interfaceEventConfDao
- Returns:
- a
List
object.
-
getEvents
public java.util.List<Event> getEvents(java.lang.String uei)
Description copied from interface:EventConfDao
getEvents
- Specified by:
getEvents
in interfaceEventConfDao
- Parameters:
uei
- aString
object.- Returns:
- a
List
object.
-
getEventsByLabel
public java.util.List<Event> getEventsByLabel()
Description copied from interface:EventConfDao
getEventsByLabel
- Specified by:
getEventsByLabel
in interfaceEventConfDao
- Returns:
- a
List
object.
-
isSecureTag
public boolean isSecureTag(java.lang.String tag)
Description copied from interface:EventConfDao
isSecureTag
- Specified by:
isSecureTag
in interfaceEventConfDao
- Parameters:
tag
- aString
object.- Returns:
- a boolean.
-
reload
public void reload() throws org.springframework.dao.DataAccessException
Description copied from interface:EventConfDao
reload
- Specified by:
reload
in interfaceEventConfDao
- Throws:
org.springframework.dao.DataAccessException
- if any.
-
removeEventFromProgrammaticStore
public boolean removeEventFromProgrammaticStore(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 interfaceEventConfDao
- Parameters:
event
- The fully configured Event object to remove.- Returns:
- a boolean.
-
saveCurrent
public void saveCurrent()
Description copied from interface:EventConfDao
saveCurrent
- Specified by:
saveCurrent
in interfaceEventConfDao
-
getRootEvents
public Events getRootEvents()
Description copied from interface:EventConfDao
getRootEvents
- Specified by:
getRootEvents
in interfaceEventConfDao
- Returns:
- a
Events
object.
-
-