Package org.opennms.netmgt.dao.hibernate
Class AlarmRepositoryHibernate
- java.lang.Object
-
- org.opennms.netmgt.dao.hibernate.AlarmRepositoryHibernate
-
- All Implemented Interfaces:
AlarmRepository,org.springframework.beans.factory.InitializingBean
public class AlarmRepositoryHibernate extends Object implements AlarmRepository, org.springframework.beans.factory.InitializingBean
DaoWebAlarmRepository class.
- Since:
- 1.8.1
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description AlarmRepositoryHibernate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledgeAlarms(int[] alarmIds, String user, Date timestamp)Acknowledge Alarms.voidacknowledgeAlarms(String user, Date timestamp, int[] alarmIds)voidacknowledgeAll(String user, Date timestamp)Acknowledge all the alarms.voidacknowledgeMatchingAlarms(String user, Date timestamp, OnmsCriteria criteria)Acknowledge alarms matching a specific criteria.voidafterPropertiesSet()voidclearAlarms(int[] alarmIds, String user, Date timestamp)Clear AlarmsintcountMatchingAlarms(OnmsCriteria criteria)Count alarms matching a criteria.int[]countMatchingAlarmsBySeverity(OnmsCriteria criteria)Count alarms by severity matching a specific criteria.voidescalateAlarms(int[] alarmIds, String user, Date timestamp)Escalate Alarms.List<OnmsAcknowledgment>getAcknowledgments(int alarmId)Gets the acknowledgments.OnmsAlarmgetAlarm(int alarmId)Gets and alarm.List<AlarmSummary>getCurrentNodeAlarmSummaries()Gets the current node alarm summaries.List<SituationSummary>getCurrentSituationSummaries()Gets the current node alarm summaries.OnmsAlarm[]getMatchingAlarms(OnmsCriteria criteria)Gets alarms matching a specific criteria.voidremoveReductionKeyMemo(int alarmId)Removes the reduction key memo.voidremoveStickyMemo(Integer alarmId)Removes the sticky memo.voidunacknowledgeAlarms(int[] alarmIds, String user)Unacknowledge AlarmsvoidunacknowledgeAll(String user)Unacknowledge all the alarms.voidunacknowledgeMatchingAlarms(OnmsCriteria criteria, String user)Unacknowledge Matching AlarmsvoidupdateReductionKeyMemo(Integer alarmId, String body, String user)Updates the ReductionKeyMemo of the alarm to persistence.voidupdateStickyMemo(Integer alarmId, String body, String user)Updates the StickyMemo of the alarm to persistence.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
acknowledgeAll
@Transactional public void acknowledgeAll(String user, Date timestamp)
Acknowledge all the alarms.- Specified by:
acknowledgeAllin interfaceAlarmRepository- Parameters:
user- the usertimestamp- the timestamp
-
acknowledgeAlarms
@Transactional public void acknowledgeAlarms(String user, Date timestamp, int[] alarmIds)
-
acknowledgeMatchingAlarms
@Transactional public void acknowledgeMatchingAlarms(String user, Date timestamp, OnmsCriteria criteria)
Acknowledge alarms matching a specific criteria.- Specified by:
acknowledgeMatchingAlarmsin interfaceAlarmRepository- Parameters:
user- the usertimestamp- the timestampcriteria- the criteria
-
clearAlarms
@Transactional public void clearAlarms(int[] alarmIds, String user, Date timestamp)Clear Alarms- Specified by:
clearAlarmsin interfaceAlarmRepository- Parameters:
alarmIds- an array of alarms IDuser- the usertimestamp- the timestamp
-
countMatchingAlarms
@Transactional public int countMatchingAlarms(OnmsCriteria criteria)
Count alarms matching a criteria.- Specified by:
countMatchingAlarmsin interfaceAlarmRepository- Parameters:
criteria- the criteria- Returns:
- the amount of alarms
-
countMatchingAlarmsBySeverity
@Transactional public int[] countMatchingAlarmsBySeverity(OnmsCriteria criteria)
Count alarms by severity matching a specific criteria.- Specified by:
countMatchingAlarmsBySeverityin interfaceAlarmRepository- Parameters:
criteria- the criteria- Returns:
- an array with the amount of alarms per severity.
-
escalateAlarms
@Transactional public void escalateAlarms(int[] alarmIds, String user, Date timestamp)Escalate Alarms.- Specified by:
escalateAlarmsin interfaceAlarmRepository- Parameters:
alarmIds- an array of alarms IDuser- the usertimestamp- the timestamp
-
getAlarm
@Transactional public OnmsAlarm getAlarm(int alarmId)
Gets and alarm.- Specified by:
getAlarmin interfaceAlarmRepository- Parameters:
alarmId- the alarm id- Returns:
- the alarm object
-
getMatchingAlarms
@Transactional public OnmsAlarm[] getMatchingAlarms(OnmsCriteria criteria)
Gets alarms matching a specific criteria.- Specified by:
getMatchingAlarmsin interfaceAlarmRepository- Parameters:
criteria- the criteria- Returns:
- a array with matching alarms
-
unacknowledgeAll
@Transactional public void unacknowledgeAll(String user)
Unacknowledge all the alarms.- Specified by:
unacknowledgeAllin interfaceAlarmRepository- Parameters:
user- the user
-
unacknowledgeMatchingAlarms
@Transactional public void unacknowledgeMatchingAlarms(OnmsCriteria criteria, String user)
Unacknowledge Matching Alarms.- Specified by:
unacknowledgeMatchingAlarmsin interfaceAlarmRepository- Parameters:
criteria- the criteriauser- the user
-
acknowledgeAlarms
@Transactional public void acknowledgeAlarms(int[] alarmIds, String user, Date timestamp)Acknowledge Alarms.- Specified by:
acknowledgeAlarmsin interfaceAlarmRepository- Parameters:
alarmIds- an array of alarms IDuser- the usertimestamp- the timestamp
-
unacknowledgeAlarms
@Transactional public void unacknowledgeAlarms(int[] alarmIds, String user)Unacknowledge Alarms- Specified by:
unacknowledgeAlarmsin interfaceAlarmRepository- Parameters:
alarmIds- an array of alarms IDuser- the user
-
updateStickyMemo
@Transactional public void updateStickyMemo(Integer alarmId, String body, String user)
Updates the StickyMemo of the alarm to persistence.- Specified by:
updateStickyMemoin interfaceAlarmRepository- Parameters:
alarmId- the alarmId of the alarm where the StickyMemo has to be persisted.
-
updateReductionKeyMemo
@Transactional public void updateReductionKeyMemo(Integer alarmId, String body, String user)
Updates the ReductionKeyMemo of the alarm to persistence. ReductionKeyMemo aka JournalMemo.- Specified by:
updateReductionKeyMemoin interfaceAlarmRepository- Parameters:
alarmId- the alarm idbody- the bodyuser- the user
-
removeStickyMemo
@Transactional public void removeStickyMemo(Integer alarmId)
Removes the sticky memo.- Specified by:
removeStickyMemoin interfaceAlarmRepository- Parameters:
alarmId- the alarm id
-
removeReductionKeyMemo
@Transactional public void removeReductionKeyMemo(int alarmId)
Removes the reduction key memo.- Specified by:
removeReductionKeyMemoin interfaceAlarmRepository- Parameters:
alarmId- the alarm id
-
getAcknowledgments
@Transactional public List<OnmsAcknowledgment> getAcknowledgments(int alarmId)
Description copied from interface:AlarmRepositoryGets the acknowledgments.- Specified by:
getAcknowledgmentsin interfaceAlarmRepository- Parameters:
alarmId- the alarm id- Returns:
- the acknowledgments
-
getCurrentNodeAlarmSummaries
@Transactional public List<AlarmSummary> getCurrentNodeAlarmSummaries()
Description copied from interface:AlarmRepositoryGets the current node alarm summaries.- Specified by:
getCurrentNodeAlarmSummariesin interfaceAlarmRepository- Returns:
- the current node alarm summaries
-
getCurrentSituationSummaries
@Transactional public List<SituationSummary> getCurrentSituationSummaries()
Description copied from interface:AlarmRepositoryGets the current node alarm summaries.- Specified by:
getCurrentSituationSummariesin interfaceAlarmRepository- Returns:
- the current node alarm summaries
-
-