Package org.opennms.netmgt.xml.eventconf
Class Events
- java.lang.Object
-
- org.opennms.netmgt.xml.eventconf.Events
-
- All Implemented Interfaces:
java.io.Serializable
public class Events extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEvents.EventCallback<T>static interfaceEvents.EventCriteria
-
Constructor Summary
Constructors Constructor Description Events()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(Event event)voidaddEventFile(java.lang.String eventFile)voidaddLoadedEventFile(java.lang.String relativePath, Events events)booleanequals(java.lang.Object obj)EventfindFirstMatchingEvent(Event matchingEvent)EventfindFirstMatchingEvent(Events.EventCriteria criteria)<T> TforEachEvent(T initial, Events.EventCallback<T> callback)EventgetEventByUeiOptimistic(java.lang.String uei)Quick-look for Events by UEI with the caveat that not all Events can be looked up this way.java.util.List<java.lang.String>getEventFiles()java.util.List<Event>getEvents()GlobalgetGlobal()EventsgetLoadEventsByFile(java.lang.String relativePath)EventOrderinggetOrdering()inthashCode()voidinitialize(Partition partition, EventOrdering eventOrdering)booleanisSecureTag(java.lang.String tag)java.util.Map<java.lang.String,java.lang.Long>loadEventFiles(org.springframework.core.io.Resource configResource)voidloadEventFilesIfModified(org.springframework.core.io.Resource configResource, java.util.Map<java.lang.String,java.lang.Long> lastModifiedEventFiles)booleanremoveEvent(Event event)booleanremoveEventFile(java.lang.String eventFile)voidremoveLoadedEventFile(java.lang.String relativePath)voidsave(org.springframework.core.io.Resource resource)voidsaveEvents(org.springframework.core.io.Resource resource)voidsetEventFiles(java.util.List<java.lang.String> eventFiles)voidsetEvents(java.util.List<Event> events)voidsetGlobal(Global global)
-
-
-
Method Detail
-
getGlobal
public Global getGlobal()
-
setGlobal
public void setGlobal(Global global)
-
getEvents
public java.util.List<Event> getEvents()
-
setEvents
public void setEvents(java.util.List<Event> events)
-
addEvent
public void addEvent(Event event)
-
removeEvent
public boolean removeEvent(Event event)
-
getEventFiles
public java.util.List<java.lang.String> getEventFiles()
-
setEventFiles
public void setEventFiles(java.util.List<java.lang.String> eventFiles)
-
addEventFile
public void addEventFile(java.lang.String eventFile)
-
removeEventFile
public boolean removeEventFile(java.lang.String eventFile)
-
getOrdering
public EventOrdering getOrdering()
-
loadEventFiles
public java.util.Map<java.lang.String,java.lang.Long> loadEventFiles(org.springframework.core.io.Resource configResource) throws java.io.IOException- Throws:
java.io.IOException
-
loadEventFilesIfModified
public void loadEventFilesIfModified(org.springframework.core.io.Resource configResource, java.util.Map<java.lang.String,java.lang.Long> lastModifiedEventFiles) throws java.io.IOException- Throws:
java.io.IOException
-
isSecureTag
public boolean isSecureTag(java.lang.String tag)
-
findFirstMatchingEvent
public Event findFirstMatchingEvent(Events.EventCriteria criteria)
-
forEachEvent
public <T> T forEachEvent(T initial, Events.EventCallback<T> callback)
-
initialize
public void initialize(Partition partition, EventOrdering eventOrdering)
-
getLoadEventsByFile
public Events getLoadEventsByFile(java.lang.String relativePath)
-
addLoadedEventFile
public void addLoadedEventFile(java.lang.String relativePath, Events events)
-
removeLoadedEventFile
public void removeLoadedEventFile(java.lang.String relativePath)
-
saveEvents
public void saveEvents(org.springframework.core.io.Resource resource)
-
save
public void save(org.springframework.core.io.Resource resource)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getEventByUeiOptimistic
public Event getEventByUeiOptimistic(java.lang.String uei)
Quick-look for Events by UEI with the caveat that not all Events can be looked up this way. This function can be used a first pass when attempting to lookup events by UEI. The caller should fall back to other means if no match is found - having no results returned by this function does not necessarily mean that an Event with the given UEI does not exist.- Parameters:
uei- UEI to lookup- Returns:
- matching Event, or {@link null} if none was found in the index
-
-