public abstract class ToolDescriptor<T extends ToolInstallation> extends Descriptor<ToolInstallation>
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
clazz
Modifier | Constructor and Description |
---|---|
protected |
ToolDescriptor() |
protected |
ToolDescriptor(Class<T> clazz) |
Modifier and Type | Method and Description |
---|---|
protected FormValidation |
checkHomeDirectory(File home)
May be overridden to provide tool-specific validation of a tool home directory.
|
boolean |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json)
Invoked when the global configuration page is submitted.
|
FormValidation |
doCheckHome(File value)
Checks if the home directory is valid.
|
FormValidation |
doCheckName(String value)
Checks if the tool name is valid.
|
GlobalConfigurationCategory |
getCategory()
Define the global configuration category the global config of this Descriptor is in.
|
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
ToolInstallation s. |
List<ToolPropertyDescriptor> |
getPropertyDescriptors()
Lists up
ToolPropertyDescriptor s that are applicable to this ToolInstallation . |
void |
setInstallations(T... installations)
Overwrites
ToolInstallation s. |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, 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
public T[] getInstallations()
ToolInstallation
s.public void setInstallations(T... installations)
ToolInstallation
s.installations
- list of installations;
can be empty but never null.public List<ToolPropertyDescriptor> getPropertyDescriptors()
ToolPropertyDescriptor
s that are applicable to this ToolInstallation
.@Nonnull public GlobalConfigurationCategory getCategory()
Descriptor
getCategory
in class Descriptor<ToolInstallation>
Descriptor
.public List<? extends ToolInstaller> getDefaultInstallers()
public DescribableList<ToolProperty<?>,ToolPropertyDescriptor> getDefaultProperties() throws IOException
ToolInstallation.getProperties()
used in the form binding.IOException
public boolean configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject json) throws Descriptor.FormException
Descriptor
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+SubmissionDescriptor.FormException
public FormValidation doCheckHome(@QueryParameter File value)
protected FormValidation checkHomeDirectory(File home)
home
- a possible value for ToolInstallation.getHome()
, known to already exist on the masterFormValidation.ok()
public FormValidation doCheckName(@QueryParameter String value)
Copyright © 2004–2019. All rights reserved.