public abstract class ManagementLink extends Object implements ExtensionPoint, Action
http://server/hudson/manage
page.
This is a place for exposing features that are only meant for system admins
(whereas features that are meant for Hudson users at large should probably
be added to Jenkins.getActions()
.)
To register a new instance, put Extension
on your implementation class.
Modifier and Type | Class and Description |
---|---|
static class |
ManagementLink.Category
Categories supported by this version of core.
|
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static List<ManagementLink> |
LIST
|
Constructor and Description |
---|
ManagementLink() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<ManagementLink> |
all()
All registered instances.
|
ManagementLink.Category |
getCategory()
Category for management link, uses
String so it can be done with core dependency pre-dating the version this feature was added. |
protected String |
getCategoryName()
Name of the category for this management link.
|
String |
getDescription()
Returns a short description of what this link does.
|
abstract String |
getIconFileName()
Mostly works like
Action.getIconFileName() , except that
the expected icon size is 48x48, not 24x24. |
Permission |
getRequiredPermission()
Returns the permission required for user to see this management link on the "Manage Jenkins" page (
ManageJenkinsAction ). |
boolean |
getRequiresConfirmation()
Allows implementations to request that this link show a confirmation dialog, and use POST if confirmed.
|
boolean |
getRequiresPOST()
Define if the rendered link will use the default GET method or POST.
|
abstract String |
getUrlName()
Gets the URL path name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDisplayName
@Deprecated public static final List<ManagementLink> LIST
@CheckForNull public abstract String getIconFileName()
Action.getIconFileName()
, except that
the expected icon size is 48x48, not 24x24. So if you give
just a file name, "/images/48x48" will be assumed.getIconFileName
in interface Action
ManagementLink
that only shows up under
certain circumstances.Functions.isAnonymous()
,
Functions.getIconFilePath(Action)
public String getDescription()
@CheckForNull public abstract String getUrlName()
For example, if this method returns "xyz", and if the parent object (that this action is associated with) is bound to /foo/bar/zot, then this action object will be exposed to /foo/bar/zot/xyz.
This method should return a string that's unique among other Action
s.
The returned string can be an absolute URL, like "http://www.sun.com/", which is useful for directly connecting to external systems.
If the returned string starts with '/', like '/foo', then it's assumed to be relative to the context path of the Jenkins webapp.
In case of ManagementLink
, this value is put straight into the href attribute,
so relative paths are interpreted against the root Jenkins
object.
getUrlName
in interface Action
Action.getIconFileName()
.Functions.getActionUrl(String, Action)
public boolean getRequiresConfirmation()
RequirePOST
@NonNull public static ExtensionList<ManagementLink> all()
@NonNull public Permission getRequiredPermission()
ManageJenkinsAction
).
Historically, this returned null, which amounted to the same behavior, as Jenkins.ADMINISTER
was required to access the page.public boolean getRequiresPOST()
RequirePOST
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull protected String getCategoryName()
getCategory()
instead.ManagementLink.Category
, e.g. STATUS
.@NonNull public ManagementLink.Category getCategory()
String
so it can be done with core dependency pre-dating the version this feature was added.ManagementLink.Category
.Copyright © 2004–2021. All rights reserved.