hudson.model
Class ManagementLink

java.lang.Object
  extended by hudson.model.ManagementLink
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject
Direct Known Subclasses:
HudsonPrivateSecurityRealm.ManageUserLinks, WindowsInstallerLink

public abstract class ManagementLink
extends Object
implements ExtensionPoint, Action

Extension point to add icon to 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 Hudson.getActions().)

To register a new instance, put Extension on your implementation class.

Since:
1.194
Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static List<ManagementLink> LIST
          Deprecated. as of 1.286 Use all() for read access and put Extension for registration.
 
Constructor Summary
ManagementLink()
           
 
Method Summary
static ExtensionList<ManagementLink> all()
          All regsitered instances.
 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.
abstract  String getUrlName()
          Gets the URL path name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.model.Action
getDisplayName
 

Field Detail

LIST

public static final List<ManagementLink> LIST
Deprecated. as of 1.286 Use all() for read access and put Extension for registration.
All registered instances.

Constructor Detail

ManagementLink

public ManagementLink()
Method Detail

getIconFileName

public abstract String getIconFileName()
Mostly works like 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.

Specified by:
getIconFileName in interface Action
Returns:
As a special case, return null to exclude this object from the management link. This is useful for defining ManagementLink that only shows up under certain circumstances.
See Also:
Hudson.isAdmin()

getDescription

public String getDescription()
Returns a short description of what this link does. This text is the one that's displayed in grey. This can include HTML, although the use of block tags is highly discouraged. Optional.


getUrlName

public abstract String getUrlName()
Gets the URL path name.

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 Actions.

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 Hudson webapp.

In case of ManagementLink, this value is put straight into the href attribute, so relative paths are interpreted against the root Hudson object.

Specified by:
getUrlName in interface Action
Returns:
null if this action object doesn't need to be bound to web (when you do that, be sure to also return null from Action.getIconFileName().

all

public static ExtensionList<ManagementLink> all()
All regsitered instances.



Copyright © 2004-2013 Hudson. All Rights Reserved.