Class FolderConfigFileAction

java.lang.Object
org.jenkinsci.plugins.configfiles.folder.FolderConfigFileAction
All Implemented Interfaces:
Action, ModelObject, ConfigFilesUIContract, org.kohsuke.stapler.StaplerProxy

public class FolderConfigFileAction extends Object implements Action, ConfigFilesUIContract, org.kohsuke.stapler.StaplerProxy
  • Method Details

    • getFolder

      public com.cloudbees.hudson.plugins.folder.AbstractFolder<?> getFolder()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getIconUrl

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getIconUrl(String rootUrl)
      used by configfiles.jelly to resolve the correct path to the icon (see JENKINS-24441)
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getContentTypeForProvider

      public ContentType getContentTypeForProvider(String providerId)
      Specified by:
      getContentTypeForProvider in interface ConfigFilesUIContract
    • getGroupedConfigs

      public Map<ConfigProvider,Collection<Config>> getGroupedConfigs()
      Specified by:
      getGroupedConfigs in interface ConfigFilesUIContract
    • getProviders

      public List<ConfigProvider> getProviders()
      Specified by:
      getProviders in interface ConfigFilesUIContract
    • doSaveConfig

      @POST public org.kohsuke.stapler.HttpResponse doSaveConfig(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException
      Description copied from interface: ConfigFilesUIContract
      Insert or update
      Specified by:
      doSaveConfig in interface ConfigFilesUIContract
      Parameters:
      req - request
      Returns:
      Throws:
      IOException
      javax.servlet.ServletException
    • doShow

      public void doShow(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter("id") String configId) throws IOException, javax.servlet.ServletException
      Specified by:
      doShow in interface ConfigFilesUIContract
      Throws:
      IOException
      javax.servlet.ServletException
    • doEditConfig

      public void doEditConfig(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter("id") String configId) throws IOException, javax.servlet.ServletException
      Description copied from interface: ConfigFilesUIContract
      Loads the config by its id and forwards the request to "edit.jelly".
      Specified by:
      doEditConfig in interface ConfigFilesUIContract
      Parameters:
      req - request
      rsp - response
      configId - the id of the config to be loaded in to the edit view.
      Throws:
      IOException
      javax.servlet.ServletException
    • doAddConfig

      @POST public void doAddConfig(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter("providerId") String providerId, @QueryParameter("configId") String configId) throws IOException, javax.servlet.ServletException
      Description copied from interface: ConfigFilesUIContract
      Requests a new config object from provider (defined by the given id) and forwards the request to "edit.jelly".
      Specified by:
      doAddConfig in interface ConfigFilesUIContract
      Parameters:
      req - request
      rsp - response
      providerId - the id of the provider to create a new config instance with
      configId - the id of the new config instance
      Throws:
      IOException
      javax.servlet.ServletException
    • doSelectProvider

      public void doSelectProvider(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Specified by:
      doSelectProvider in interface ConfigFilesUIContract
      Throws:
      IOException
      javax.servlet.ServletException
    • doRemoveConfig

      public org.kohsuke.stapler.HttpResponse doRemoveConfig(org.kohsuke.stapler.StaplerRequest res, org.kohsuke.stapler.StaplerResponse rsp, @QueryParameter("id") String configId) throws IOException
      Description copied from interface: ConfigFilesUIContract
      Removes a script from the config and filesystem.
      Specified by:
      doRemoveConfig in interface ConfigFilesUIContract
      Parameters:
      res - response
      rsp - request
      configId - the id of the config to be removed
      Returns:
      forward to 'index'
      Throws:
      IOException
    • doCheckConfigId

      public FormValidation doCheckConfigId(@QueryParameter("configId") String configId)
      Specified by:
      doCheckConfigId in interface ConfigFilesUIContract
    • getTarget

      public Object getTarget()
      Specified by:
      getTarget in interface org.kohsuke.stapler.StaplerProxy