hudson.tools
Class ToolDescriptor<T extends ToolInstallation>

java.lang.Object
  extended by hudson.model.Descriptor<ToolInstallation>
      extended by hudson.tools.ToolDescriptor<T>
All Implemented Interfaces:
Saveable
Direct Known Subclasses:
JDK.DescriptorImpl, Maven.MavenInstallation.DescriptorImpl

public abstract class ToolDescriptor<T extends ToolInstallation>
extends Descriptor<ToolInstallation>

Descriptor for ToolInstallation.

Since:
1.286
Author:
huybrechts

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
ToolDescriptor()
           
 
Method Summary
 boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json)
          Invoked when the global configuration page is submitted.
 List<? extends ToolInstaller> getDefaultInstallers()
          Optional list of installers to be configured by default for new tools of this type.
 DescribableList<ToolProperty<?>,ToolPropertyDescriptor> getDefaultProperties()
          Default value for ToolInstallation.getProperties() used in the form binding.
 T[] getInstallations()
          Configured instances of ToolInstallations.
 List<ToolPropertyDescriptor> getPropertyDescriptors()
          Lists up ToolPropertyDescriptors that are applicable to this ToolInstallation.
 void setInstallations(T... installations)
          Overwrites ToolInstallations.
 
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolDescriptor

public ToolDescriptor()
Method Detail

getInstallations

public T[] getInstallations()
Configured instances of ToolInstallations.

Returns:
read-only list of installations; can be empty but never null.

setInstallations

public void setInstallations(T... installations)
Overwrites ToolInstallations.

Parameters:
installations - list of installations; can be empty but never null.

getPropertyDescriptors

public List<ToolPropertyDescriptor> getPropertyDescriptors()
Lists up ToolPropertyDescriptors that are applicable to this ToolInstallation.


getDefaultInstallers

public List<? extends ToolInstaller> getDefaultInstallers()
Optional list of installers to be configured by default for new tools of this type. If there are popular versions of the tool available using generic installation techniques, they can be returned here for the user's convenience.

Since:
1.305

getDefaultProperties

public DescribableList<ToolProperty<?>,ToolPropertyDescriptor> getDefaultProperties()
                                                                             throws IOException
Default value for ToolInstallation.getProperties() used in the form binding.

Throws:
IOException
Since:
1.305

configure

public boolean configure(org.kohsuke.stapler.StaplerRequest req,
                         net.sf.json.JSONObject json)
                  throws Descriptor.FormException
Description copied from class: Descriptor
Invoked when the global configuration page is submitted. Can be overriden to store descriptor-specific information.

Overrides:
configure in class Descriptor<ToolInstallation>
json - The JSON object that captures the configuration data for this Descriptor. See http://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission
Returns:
false to keep the client in the same config page.
Throws:
Descriptor.FormException


Copyright © 2004-2013. All Rights Reserved.