Class OperatingSystemEndOfLifeAdminMonitor
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.AdministrativeMonitor
-
- jenkins.monitor.OperatingSystemEndOfLifeAdminMonitor
-
- All Implemented Interfaces:
ExtensionPoint
,ModelObject
,SearchableModelObject
,SearchItem
,org.kohsuke.stapler.StaplerProxy
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Symbol("operatingSystemEndOfLife") public class OperatingSystemEndOfLifeAdminMonitor extends AdministrativeMonitor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.AdministrativeMonitor
id
-
-
Constructor Summary
Constructors Constructor Description OperatingSystemEndOfLifeAdminMonitor()
OperatingSystemEndOfLifeAdminMonitor(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.kohsuke.stapler.HttpResponse
doAct(String no)
boolean
getAfterEndOfLifeDate()
String
getDisplayName()
String
getDocumentationUrl()
String
getEndOfLifeDate()
String
getOperatingSystemName()
Permission
getRequiredPermission()
Required permission to view this admin monitor.boolean
isActivated()
Returns true if this monitor is activated and wants to produce a warning message.-
Methods inherited from class hudson.model.AdministrativeMonitor
all, disable, doDisable, getSearchUrl, getTarget, getUrl, isEnabled, isSecurity
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Constructor Detail
-
OperatingSystemEndOfLifeAdminMonitor
public OperatingSystemEndOfLifeAdminMonitor(String id) throws IOException
- Throws:
IOException
-
OperatingSystemEndOfLifeAdminMonitor
public OperatingSystemEndOfLifeAdminMonitor() throws IOException
- Throws:
IOException
-
-
Method Detail
-
getOperatingSystemName
@NonNull public String getOperatingSystemName()
-
getEndOfLifeDate
@NonNull public String getEndOfLifeDate()
-
getAfterEndOfLifeDate
public boolean getAfterEndOfLifeDate()
-
getDocumentationUrl
@NonNull public String getDocumentationUrl()
-
doAct
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public org.kohsuke.stapler.HttpResponse doAct(@QueryParameter String no) throws IOException
- Throws:
IOException
-
isActivated
public boolean isActivated()
Description copied from class:AdministrativeMonitor
Returns true if this monitor is activated and wants to produce a warning message.This method is called from the HTML rendering thread, so it should run efficiently.
- Specified by:
isActivated
in classAdministrativeMonitor
-
getRequiredPermission
public Permission getRequiredPermission()
Description copied from class:AdministrativeMonitor
Required permission to view this admin monitor. By defaultJenkins.ADMINISTER
, butJenkins.SYSTEM_READ
is also supported.Changing this permission check to return
Jenkins.SYSTEM_READ
will make the active administrative monitor appear onmanage.jelly
and on the globally visibleAdministrativeMonitorsDecorator
to users without Administer permission.AdministrativeMonitor.doDisable(StaplerRequest, StaplerResponse)
will still always require Administer permission.Implementers need to ensure that
doAct
and other web methods perform necessary permission checks: Users with System Read permissions are expected to be limited to read-only access. Form UI elements that change system state, e.g. toggling a feature on or off, need to be hidden from users lacking Administer permission.- Overrides:
getRequiredPermission
in classAdministrativeMonitor
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classAdministrativeMonitor
-
-