Interface AlarmRepository

  • All Known Implementing Classes:
    AlarmRepositoryHibernate

    public interface AlarmRepository
    WebAlarmRepository @author brozow
    • Method Detail

      • countMatchingAlarms

        int countMatchingAlarms​(OnmsCriteria criteria)
        Count alarms matching a criteria.
        Parameters:
        criteria - the criteria
        Returns:
        the amount of alarms
      • countMatchingAlarmsBySeverity

        int[] countMatchingAlarmsBySeverity​(OnmsCriteria criteria)
        Count alarms by severity matching a specific criteria.
        Parameters:
        criteria - the criteria
        Returns:
        an array with the amount of alarms per severity.
      • getAlarm

        OnmsAlarm getAlarm​(int alarmId)
        Gets and alarm.
        Parameters:
        alarmId - the alarm id
        Returns:
        the alarm object
      • getMatchingAlarms

        OnmsAlarm[] getMatchingAlarms​(OnmsCriteria criteria)
        Gets alarms matching a specific criteria.
        Parameters:
        criteria - the criteria
        Returns:
        a array with matching alarms
      • acknowledgeMatchingAlarms

        void acknowledgeMatchingAlarms​(java.lang.String user,
                                       java.util.Date timestamp,
                                       OnmsCriteria criteria)
        Acknowledge alarms matching a specific criteria.
        Parameters:
        user - the user
        timestamp - the timestamp
        criteria - the criteria
      • acknowledgeAlarms

        void acknowledgeAlarms​(int[] alarmIds,
                               java.lang.String user,
                               java.util.Date timestamp)
        Acknowledge Alarms.
        Parameters:
        alarmIds - an array of alarms ID
        user - the user
        timestamp - the timestamp
      • acknowledgeAll

        void acknowledgeAll​(java.lang.String user,
                            java.util.Date timestamp)
        Acknowledge all the alarms.
        Parameters:
        user - the user
        timestamp - the timestamp
      • unacknowledgeMatchingAlarms

        void unacknowledgeMatchingAlarms​(OnmsCriteria criteria,
                                         java.lang.String user)
        Unacknowledge Matching Alarms

        .
        Parameters:
        criteria - the criteria
        user - the user
      • unacknowledgeAlarms

        void unacknowledgeAlarms​(int[] alarmIds,
                                 java.lang.String user)
        Unacknowledge Alarms
        Parameters:
        alarmIds - an array of alarms ID
        user - the user
      • unacknowledgeAll

        void unacknowledgeAll​(java.lang.String user)
        Unacknowledge all the alarms.
        Parameters:
        user - the user
      • escalateAlarms

        void escalateAlarms​(int[] alarmIds,
                            java.lang.String user,
                            java.util.Date timestamp)
        Escalate Alarms.
        Parameters:
        alarmIds - an array of alarms ID
        user - the user
        timestamp - the timestamp
      • clearAlarms

        void clearAlarms​(int[] alarmIds,
                         java.lang.String user,
                         java.util.Date timestamp)
        Clear Alarms
        Parameters:
        alarmIds - an array of alarms ID
        user - the user
        timestamp - the timestamp
      • updateStickyMemo

        void updateStickyMemo​(java.lang.Integer alarmId,
                              java.lang.String body,
                              java.lang.String user)
        Updates the StickyMemo of the alarm to persistence.
        Parameters:
        alarmId - the alarmId of the alarm where the StickyMemo has to be persisted.
      • updateReductionKeyMemo

        void updateReductionKeyMemo​(java.lang.Integer alarmId,
                                    java.lang.String body,
                                    java.lang.String user)
        Updates the ReductionKeyMemo of the alarm to persistence. ReductionKeyMemo aka JournalMemo.
        Parameters:
        alarmId - the alarm id
        body - the body
        user - the user
      • removeStickyMemo

        void removeStickyMemo​(java.lang.Integer alarmId)
        Removes the sticky memo.
        Parameters:
        alarmId - the alarm id
      • removeReductionKeyMemo

        void removeReductionKeyMemo​(int alarmId)
        Removes the reduction key memo.
        Parameters:
        alarmId - the alarm id
      • getAcknowledgments

        java.util.List<OnmsAcknowledgment> getAcknowledgments​(int alarmId)
        Gets the acknowledgments.
        Parameters:
        alarmId - the alarm id
        Returns:
        the acknowledgments
      • getCurrentNodeAlarmSummaries

        java.util.List<AlarmSummary> getCurrentNodeAlarmSummaries()
        Gets the current node alarm summaries.
        Returns:
        the current node alarm summaries
      • getCurrentSituationSummaries

        java.util.List<SituationSummary> getCurrentSituationSummaries()
        Gets the current node alarm summaries.
        Returns:
        the current node alarm summaries