com.seitenbau.jenkins.plugins.dynamicparameter.config
Class DynamicParameterManagement

java.lang.Object
  extended by hudson.model.ManagementLink
      extended by com.seitenbau.jenkins.plugins.dynamicparameter.config.DynamicParameterManagement
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject

@Extension
public class DynamicParameterManagement
extends hudson.model.ManagementLink

Plugin configuration.


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
DynamicParameterManagement()
           
 
Method Summary
 org.kohsuke.stapler.HttpResponse doDeleteFile(String filePath)
          Delete the specified file.
 void doDownloadFile(org.kohsuke.stapler.StaplerRequest request, org.kohsuke.stapler.StaplerResponse response, String filePath)
          Download the specified file.
 org.kohsuke.stapler.HttpResponse doRenameFile(String oldName, String newName)
          Rename a file or a directory.
 org.kohsuke.stapler.HttpResponse doSetClassPathDir(String baseDirectory)
          Set the base directory.
 org.kohsuke.stapler.HttpResponse doUploadFile(org.kohsuke.stapler.StaplerRequest request)
          Upload a script file to the class path directory.
static String getBaseDirectory()
          Get the class path directory.
 String[] getClassPathDirectories()
          Get a list of all class path directories.
 String getDescription()
           
 String getDisplayName()
           
 String getIconFileName()
           
 String getLastClassPathDirectory()
          Get the last used class path directory.
 String[] getUploadedFiles(String classPath)
          Get a list with uploaded files.
 String getUrlName()
           
 
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

DynamicParameterManagement

public DynamicParameterManagement()
Method Detail

getIconFileName

public String getIconFileName()
Specified by:
getIconFileName in interface hudson.model.Action
Specified by:
getIconFileName in class hudson.model.ManagementLink

getUrlName

public String getUrlName()
Specified by:
getUrlName in interface hudson.model.Action
Specified by:
getUrlName in class hudson.model.ManagementLink

getDisplayName

public String getDisplayName()

getDescription

public String getDescription()
Overrides:
getDescription in class hudson.model.ManagementLink

getBaseDirectory

public static String getBaseDirectory()
                               throws IOException
Get the class path directory.

Returns:
path to the class path directory
Throws:
IOException

getLastClassPathDirectory

public String getLastClassPathDirectory()
Get the last used class path directory.

Returns:
last used directory or an empty string

getClassPathDirectories

public String[] getClassPathDirectories()
                                 throws IOException
Get a list of all class path directories.

Returns:
a list of directory names or an empty array
Throws:
IOException

getUploadedFiles

public String[] getUploadedFiles(String classPath)
                          throws IOException
Get a list with uploaded files.

Parameters:
classPath - class path directory to list
Returns:
an array with file names or an empty array
Throws:
IOException

doDownloadFile

public void doDownloadFile(org.kohsuke.stapler.StaplerRequest request,
                           org.kohsuke.stapler.StaplerResponse response,
                           @QueryParameter(value="file")
                           String filePath)
                    throws javax.servlet.ServletException,
                           IOException
Download the specified file.

Parameters:
request - HTTP request
response - HTTP response
filePath - file path
Throws:
javax.servlet.ServletException
IOException

doSetClassPathDir

public org.kohsuke.stapler.HttpResponse doSetClassPathDir(@QueryParameter(value="baseDirectory")
                                                          String baseDirectory)
                                                   throws IOException,
                                                          javax.servlet.ServletException
Set the base directory.

Parameters:
baseDirectory - new base directory
Returns:
redirect to index
Throws:
IOException
javax.servlet.ServletException

doUploadFile

public org.kohsuke.stapler.HttpResponse doUploadFile(org.kohsuke.stapler.StaplerRequest request)
                                              throws Exception
Upload a script file to the class path directory.

Parameters:
request - HTTP request
Returns:
redirect to index
Throws:
Exception

doDeleteFile

public org.kohsuke.stapler.HttpResponse doDeleteFile(@QueryParameter(value="file")
                                                     String filePath)
                                              throws IOException
Delete the specified file.

Parameters:
filePath - file path
Returns:
redirect to index
Throws:
IOException

doRenameFile

public org.kohsuke.stapler.HttpResponse doRenameFile(@QueryParameter(value="oldName")
                                                     String oldName,
                                                     @QueryParameter(value="newName")
                                                     String newName)
                                              throws IOException
Rename a file or a directory.

Parameters:
oldName - old name
newName - new name
Returns:
redirect to index
Throws:
IOException


Copyright © 2004-2012. All Rights Reserved.