Interface AlarmJournal


  • public interface AlarmJournal
    Basic interface for the AlarmJournal extension point. Includes some helper methods to aid with storage and filtering.
    Since:
    8.0.5
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static QualifiedPath SYS_ACK_USR_AUTO
      The "user" that will be logged for alarms acknowledged by the system.
      static QualifiedPath SYS_ACK_USR_EVT_LIMIT
      The "user" that will be logged for alarms acknowledged by the live event limit overflowing; see GeneralAlarmSettings
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Name of the journal.
      boolean isEnabled()
      Indicates whether the user has chosen to enable the journaling system.
      boolean isInitialized()
      Indicates whether the system has properly initialized and can handle events.
      boolean isQueryOnly()
      Indicates whether this journal should only be used for querying; if false, storage will not be attempted.
      boolean matchesFilter​(AlarmEvent event)
      Checks if the event matches the filters set up for this alarm journal.
      default boolean matchesFilter​(java.lang.String source, java.lang.String displayPath)
      Checks if the source and the display path for some alarm event match the data filters set up for this alarm journal.
      AlarmQueryResult query​(AlarmFilter filter)
      Queries the journal and returns the result.
      void shutdown()
      Performs any shut down tasks.
      void startup()
      Performs any start up tasks.
      void storeEvent​(AlarmEvent event, AlarmStateTransition transition)
      Shorthand to store an event without extracting every field manually.
      void storeRawEvent​(java.lang.String source, java.lang.String dispPath, java.lang.String uuid, int priority, int eventType, int eventFlags, EventData data)
      Stores an event directly into this journal.
      void storeSystemEvent​(QualifiedPath eventSource, EventData data)
      Shortcut to store a system event (likely, a constant from AlarmSystemEvent directly.
    • Field Detail

      • SYS_ACK_USR_AUTO

        static final QualifiedPath SYS_ACK_USR_AUTO
        The "user" that will be logged for alarms acknowledged by the system.
      • SYS_ACK_USR_EVT_LIMIT

        static final QualifiedPath SYS_ACK_USR_EVT_LIMIT
        The "user" that will be logged for alarms acknowledged by the live event limit overflowing; see GeneralAlarmSettings
    • Method Detail

      • getName

        @Nullable
        java.lang.String getName()
        Name of the journal.
      • isEnabled

        boolean isEnabled()
        Indicates whether the user has chosen to enable the journaling system.
      • isQueryOnly

        boolean isQueryOnly()
        Indicates whether this journal should only be used for querying; if false, storage will not be attempted.
      • isInitialized

        boolean isInitialized()
        Indicates whether the system has properly initialized and can handle events.
      • storeRawEvent

        void storeRawEvent​(java.lang.String source,
                           java.lang.String dispPath,
                           java.lang.String uuid,
                           int priority,
                           int eventType,
                           int eventFlags,
                           EventData data)
        Stores an event directly into this journal.
      • query

        AlarmQueryResult query​(@Nonnull
                               AlarmFilter filter)
                        throws java.lang.Exception
        Queries the journal and returns the result.
        Throws:
        java.lang.Exception
      • storeEvent

        void storeEvent​(AlarmEvent event,
                        AlarmStateTransition transition)
        Shorthand to store an event without extracting every field manually.
      • matchesFilter

        boolean matchesFilter​(AlarmEvent event)
        Checks if the event matches the filters set up for this alarm journal. Returns false if match fails or event is null (or, this journal doesn't support filtering).
      • matchesFilter

        default boolean matchesFilter​(java.lang.String source,
                                      java.lang.String displayPath)
        Checks if the source and the display path for some alarm event match the data filters set up for this alarm journal. Returns false if match fails or the journal doesn't support filtering.
      • storeSystemEvent

        void storeSystemEvent​(@Nonnull
                              QualifiedPath eventSource,
                              @Nullable
                              EventData data)
        Shortcut to store a system event (likely, a constant from AlarmSystemEvent directly.