Class Banner

    • Constructor Detail

      • Banner

        public Banner​(String message,
                      String hosts,
                      boolean active,
                      long startTime,
                      long endTime,
                      String type)
      • Banner

        public Banner​(String uuid,
                      String message,
                      String hosts,
                      boolean active,
                      long startTime,
                      long endTime,
                      String type)
      • Banner

        public Banner​(String uuid,
                      String message,
                      String hosts,
                      boolean active,
                      long startTime,
                      long endTime,
                      String type,
                      boolean isDismissed)
    • Method Detail

      • getType

        public String getType()
        The type of this banner (high, medium, low).
      • calculateAcknowledgementType

        public AcknowledgementType calculateAcknowledgementType()
        Determine the default acknowledgement type for this banner.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getSeverityScore

        public int getSeverityScore()
        A numeric type representing this banner's importance (higher number = more important)
      • isActiveNow

        public boolean isActiveNow()
        Whether or not this banner should be displayed at this moment in time.
      • isDismissible

        public boolean isDismissible()
        Whether or not this banner type can be dismissed by a user.
      • isActiveForHost

        public boolean isActiveForHost​(String hostname)
        True if this banner is active now and assigned to the current server.
      • validate

        public Errors validate()
        Check that the values we've been given make sense.