Class SidebarLinkPlugin

All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Symbol("sidebarGlobalLink") public class SidebarLinkPlugin extends GlobalConfiguration
Add links in the main page sidepanel.
Author:
Alan Harder
  • 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 class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • getLinks

      public List<LinkAction> getLinks()
      Returns:
      the currently configured links, if any
    • setLinks

      @DataBoundSetter public void setLinks(List<LinkAction> links)
      Together with getLinks(), binds to entry in config.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 like document, disabled.gif or document-properties.svg. List of supported icons located in JENKINS_HOME/var/images directory.