Package org.opennms.netmgt.dao.mock
Class MockAlarmDao
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.AbstractMockDao<OnmsAlarm,Integer>
-
- org.opennms.netmgt.dao.mock.MockAlarmDao
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
AbstractMockDao.NullEventForwarder
-
-
Constructor Summary
Constructors Constructor Description MockAlarmDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(OnmsAlarm alarm)
OnmsAlarm
findByReductionKey(String reductionKey)
protected void
generateId(OnmsAlarm alarm)
List<OnmsAlarm>
getAlarmsForEventParameters(Map<String,String> eventParameters)
List<HeatMapElement>
getHeatMapItemsForEntity(String entityNameColumn, String entityIdColumn, boolean processAcknowledgedAlarms, String restrictionColumn, String restrictionValue, String... groupByColumns)
protected Integer
getId(OnmsAlarm alarm)
List<AlarmSummary>
getNodeAlarmSummaries()
Get the list of current - not yet acknowledged - alarms per node with severity greater than normal, reflecting the max severity, the minimum last event time and alarm count; ordered by the oldest.List<AlarmSummary>
getNodeAlarmSummariesIncludeAcknowledgedOnes(List<Integer> nodeIds)
Get the list of current alarms per node with severity not equal to cleared, reflecting the max severity, the minimum last event time and alarm count.List<SituationSummary>
getSituationSummaries()
Get the list of current - not yet acknowledged - situations with severity greater than normal;Integer
save(OnmsAlarm alarm)
void
update(OnmsAlarm alarm)
-
Methods inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
afterPropertiesSet, clear, countAll, countMatching, countMatching, delete, findAll, findMatching, findMatching, flush, get, getAlarmAssociationDao, getAlarmDao, getAssetRecordDao, getCategoryDao, getDistPollerDao, getEventDao, getIpInterfaceDao, getMonitoredServiceDao, getMonitoringLocationDao, getNodeDao, getServiceRegistry, getServiceTypeDao, getSnmpInterfaceDao, initialize, load, lock, saveOrUpdate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.dao.api.LegacyOnmsDao
countMatching, findMatching
-
Methods inherited from interface org.opennms.netmgt.dao.api.OnmsDao
clear, countAll, countMatching, delete, findAll, findMatching, flush, get, initialize, load, lock, saveOrUpdate
-
-
-
-
Method Detail
-
update
public void update(OnmsAlarm alarm)
-
delete
public void delete(OnmsAlarm alarm)
-
generateId
protected void generateId(OnmsAlarm alarm)
- Specified by:
generateId
in classAbstractMockDao<OnmsAlarm,Integer>
-
getId
protected Integer getId(OnmsAlarm alarm)
- Specified by:
getId
in classAbstractMockDao<OnmsAlarm,Integer>
-
findByReductionKey
public OnmsAlarm findByReductionKey(String reductionKey)
- Specified by:
findByReductionKey
in interfaceAlarmDao
-
getNodeAlarmSummaries
public List<AlarmSummary> getNodeAlarmSummaries()
Description copied from interface:AlarmDao
Get the list of current - not yet acknowledged - alarms per node with severity greater than normal, reflecting the max severity, the minimum last event time and alarm count; ordered by the oldest.
- Specified by:
getNodeAlarmSummaries
in interfaceAlarmDao
- Returns:
- A list of alarm summaries.
-
getSituationSummaries
public List<SituationSummary> getSituationSummaries()
Description copied from interface:AlarmDao
Get the list of current - not yet acknowledged - situations with severity greater than normal;
- Specified by:
getSituationSummaries
in interfaceAlarmDao
- Returns:
- A list of situation summaries.
-
getNodeAlarmSummariesIncludeAcknowledgedOnes
public List<AlarmSummary> getNodeAlarmSummariesIncludeAcknowledgedOnes(List<Integer> nodeIds)
Description copied from interface:AlarmDao
Get the list of current alarms per node with severity not equal to cleared, reflecting the max severity, the minimum last event time and alarm count. The alarm count only considers not yet acknowledged alarms, but the max severity is calculated overall (including acknowledged) alarms.- Specified by:
getNodeAlarmSummariesIncludeAcknowledgedOnes
in interfaceAlarmDao
- Parameters:
nodeIds
- The nodeIds you want to restrict the AlarmSummary calculation to. Must not be NULL!
-
getHeatMapItemsForEntity
public List<HeatMapElement> getHeatMapItemsForEntity(String entityNameColumn, String entityIdColumn, boolean processAcknowledgedAlarms, String restrictionColumn, String restrictionValue, String... groupByColumns)
- Specified by:
getHeatMapItemsForEntity
in interfaceAlarmDao
-
-