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
,OnMaster
@Extension @Symbol("sidebarGlobalLink") public class SidebarLinkPlugin extends GlobalConfiguration
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 Constructor Description SidebarLinkPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
FormValidation
doCheckLinkIcon(String value)
FormValidation
doCheckLinkText(String value)
FormValidation
doCheckLinkUrl(String value)
void
doUploadLinkImage(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
Receive file upload from startUpload.jelly.List<LinkAction>
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, getDescriptor, getGlobalConfigPage
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
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
public List<LinkAction> getLinks()
- Returns:
- the currently configured links, if any
-
setLinks
@DataBoundSetter public void setLinks(List<LinkAction> links)
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
public boolean isAcceptedIconName(String iconName)
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.
-
-