org.jenkinsci.plugins.viewer
Class XPathConfigViewerPlugin

java.lang.Object
  extended by hudson.model.ManagementLink
      extended by org.jenkinsci.plugins.viewer.XPathConfigViewerPlugin
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject

@Extension
public class XPathConfigViewerPlugin
extends hudson.model.ManagementLink

Main class for the config viewer plugin.

Author:
c031

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.model.ManagementLink
LIST
 
Constructor Summary
XPathConfigViewerPlugin()
          initialize the xpath config provider;
 
Method Summary
 void doAddXPath(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Requests a new config object from provider (defined by the given id) and forwards the request to "edit.jelly".
 org.kohsuke.stapler.HttpResponse doDelConfig(org.kohsuke.stapler.StaplerRequest res, org.kohsuke.stapler.StaplerResponse rsp, String configId)
          Removes a script from the config and filesystem.
 void doEditConfig(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, String confgiId)
          Loads the config by its id and forwards the request to "edit.jelly".
 org.kohsuke.stapler.HttpResponse doSaveXPath(org.kohsuke.stapler.StaplerRequest req)
          Returns the http response to redirect to /index after save.
 String getDescription()
          Returns the description of the plugin.
 String getDisplayName()
          Returns the display name of the plugin to be shown on the /manage page.
 String getIconFileName()
          Returns the icon filename of the plugin to be shown on the /manage page.
 List<org.jenkinsci.lib.configprovider.ConfigProvider> getProviders()
          Returns the list of all config providers.
 String getUrlName()
          Returns the url part to open the plugin page.
 
Methods inherited from class hudson.model.ManagementLink
all
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathConfigViewerPlugin

public XPathConfigViewerPlugin()
initialize the xpath config provider;

Method Detail

getDescription

public String getDescription()
Returns the description of the plugin.

Overrides:
getDescription in class hudson.model.ManagementLink
Returns:
the description of the plugin

getIconFileName

public String getIconFileName()
Returns the icon filename of the plugin to be shown on the /manage page.

Specified by:
getIconFileName in interface hudson.model.Action
Specified by:
getIconFileName in class hudson.model.ManagementLink
Returns:
the icon filename

getUrlName

public String getUrlName()
Returns the url part to open the plugin page.

Specified by:
getUrlName in interface hudson.model.Action
Specified by:
getUrlName in class hudson.model.ManagementLink
Returns:
the url part

getDisplayName

public String getDisplayName()
Returns the display name of the plugin to be shown on the /manage page.

Returns:
the display name

getProviders

public List<org.jenkinsci.lib.configprovider.ConfigProvider> getProviders()
Returns the list of all config providers.

Returns:
the list of all config providers

doAddXPath

public void doAddXPath(org.kohsuke.stapler.StaplerRequest req,
                       org.kohsuke.stapler.StaplerResponse rsp)
                throws IOException,
                       javax.servlet.ServletException
Requests a new config object from provider (defined by the given id) and forwards the request to "edit.jelly".

Parameters:
req - request
rsp - response
Throws:
IOException
javax.servlet.ServletException

doEditConfig

public void doEditConfig(org.kohsuke.stapler.StaplerRequest req,
                         org.kohsuke.stapler.StaplerResponse rsp,
                         @QueryParameter(value="id")
                         String confgiId)
                  throws IOException,
                         javax.servlet.ServletException
Loads the config by its id and forwards the request to "edit.jelly".

Parameters:
req - request
rsp - response
confgiId - the id of the config to be loaded in to the edit view.
Throws:
IOException
javax.servlet.ServletException

doSaveXPath

public org.kohsuke.stapler.HttpResponse doSaveXPath(org.kohsuke.stapler.StaplerRequest req)
Returns the http response to redirect to /index after save.

Parameters:
req - Request containing the xpathconfig form data.
Returns:
the http response

doDelConfig

public org.kohsuke.stapler.HttpResponse doDelConfig(org.kohsuke.stapler.StaplerRequest res,
                                                    org.kohsuke.stapler.StaplerResponse rsp,
                                                    @QueryParameter(value="id")
                                                    String configId)
                                             throws IOException
Removes a script from the config and filesystem.

Parameters:
res - response
rsp - request
configId - the id of the config to be removed
Returns:
forward to 'index'
Throws:
IOException


Copyright © 2004-2012. All Rights Reserved.