Class AdministrativeMonitorsDecorator

java.lang.Object
hudson.model.Descriptor<PageDecorator>
hudson.model.PageDecorator
jenkins.management.AdministrativeMonitorsDecorator
All Implemented Interfaces:
ExtensionPoint, Describable<PageDecorator>, Saveable, Loadable, OnMaster

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class AdministrativeMonitorsDecorator extends PageDecorator
Show notifications and popups for active administrative monitors on all pages.
  • Constructor Details

    • AdministrativeMonitorsDecorator

      public AdministrativeMonitorsDecorator()
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Description copied from class: Descriptor
      Human readable name of this kind of configurable object. Should be overridden for most descriptors, if the display name is visible somehow. As a fallback it uses Class.getSimpleName() on Descriptor.clazz, so for example MyThing from some.pkg.MyThing.DescriptorImpl. Historically some implementations returned null as a way of hiding the descriptor from the UI, but this is generally managed by an explicit method such as isEnabled or isApplicable.
      Overrides:
      getDisplayName in class Descriptor<PageDecorator>
    • filterNonSecurityAdministrativeMonitors

      public Collection<AdministrativeMonitor> filterNonSecurityAdministrativeMonitors(Collection<AdministrativeMonitor> activeMonitors)
    • filterSecurityAdministrativeMonitors

      public Collection<AdministrativeMonitor> filterSecurityAdministrativeMonitors(Collection<AdministrativeMonitor> activeMonitors)
    • getNonSecurityAdministrativeMonitors

      public List<AdministrativeMonitor> getNonSecurityAdministrativeMonitors()
    • getSecurityAdministrativeMonitors

      public List<AdministrativeMonitor> getSecurityAdministrativeMonitors()
    • getMonitorsToDisplay

      public Collection<AdministrativeMonitor> getMonitorsToDisplay()
      Compute the administrative monitors that are active and should be shown. This is done only when the instance is currently running and the user has the permission to read them.
      Returns:
      the list of active monitors if we should display them, otherwise null.