Package jenkins.management
Class AdministrativeMonitorsDecorator
- java.lang.Object
-
- hudson.model.Descriptor<PageDecorator>
-
- hudson.model.PageDecorator
-
- jenkins.management.AdministrativeMonitorsDecorator
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PageDecorator>
,Saveable
,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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.PageDecorator
ALL
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description AdministrativeMonitorsDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<AdministrativeMonitor>
filterNonSecurityAdministrativeMonitors(Collection<AdministrativeMonitor> activeMonitors)
Collection<AdministrativeMonitor>
filterSecurityAdministrativeMonitors(Collection<AdministrativeMonitor> activeMonitors)
String
getDisplayName()
Human readable name of this kind of configurable object.Collection<AdministrativeMonitor>
getMonitorsToDisplay()
Compute the administrative monitors that are active and should be shown.List<AdministrativeMonitor>
getNonSecurityAdministrativeMonitors()
List<AdministrativeMonitor>
getSecurityAdministrativeMonitors()
-
Methods inherited from class hudson.model.PageDecorator
all, getDescriptor, getUrl
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
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 usesClass.getSimpleName()
onDescriptor.clazz
, so for exampleMyThing
fromsome.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 asisEnabled
orisApplicable
.- Overrides:
getDisplayName
in classDescriptor<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.
-
-