Package hudson.plugins.sidebar_link
Class SidebarLinkPlugin
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
hudson.plugins.sidebar_link.SidebarLinkPlugin
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalConfiguration>
,Saveable
,Loadable
,OnMaster
Add links in the main page sidepanel.
- Author:
- Alan Harder
-
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.Descriptor
clazz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) doCheckLinkIcon
(String value) doCheckLinkText
(String value) doCheckLinkUrl
(String value) void
doUploadLinkImage
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Receive file upload from startUpload.jelly.getLinks()
boolean
isAcceptedIconName
(String iconName) Validates if passed icon may be supported by Jenkins.void
setLinks
(List<LinkAction> links) Together withgetLinks()
, binds to entry inconfig.jelly
.Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPage
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
SidebarLinkPlugin
public SidebarLinkPlugin()
-
-
Method Details
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException - Overrides:
configure
in classGlobalConfiguration
- Throws:
Descriptor.FormException
-
getLinks
- Returns:
- the currently configured links, if any
-
setLinks
Together withgetLinks()
, binds to entry inconfig.jelly
.- Parameters:
links
- the new value of this field
-
doUploadLinkImage
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void doUploadLinkImage(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, InterruptedException Receive file upload from startUpload.jelly. File is placed in $JENKINS_HOME/userContent directory.- Throws:
IOException
javax.servlet.ServletException
InterruptedException
-
doCheckLinkUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckLinkUrl(@QueryParameter String value) -
doCheckLinkText
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckLinkText(@QueryParameter String value) -
doCheckLinkIcon
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckLinkIcon(@QueryParameter String value) -
isAcceptedIconName
Validates if passed icon may be supported by Jenkins. It accepts values likedocument
,disabled.gif
ordocument-properties.svg
. List of supported icons located in JENKINS_HOME/var/images directory.
-