Package hudson.tasks
Class Shell.DescriptorImpl
- All Implemented Interfaces:
PersistentDescriptor
,Saveable
,Loadable
,OnMaster
- Enclosing class:
- Shell
@Extension
@Symbol("shell")
public static class Shell.DescriptorImpl
extends BuildStepDescriptor<Builder>
implements PersistentDescriptor
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
configure
(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject data) Invoked when the global configuration page is submitted.doCheckShell
(String value) Check the existence of sh in the given location.doCheckUnstableReturn
(String value) Performs on-the-fly validation of the exit code.Human readable name of this kind of configurable object.getShell()
Deprecated.getShellOrDefault
(hudson.remoting.VirtualChannel channel) boolean
isApplicable
(Class<? extends AbstractProject> jobType) Returns true if this task is applicable to the given project.void
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, 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
Methods inherited from interface hudson.model.PersistentDescriptor
load
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()
-
-
Method Details
-
isApplicable
Description copied from class:BuildStepDescriptor
Returns true if this task is applicable to the given project.- Specified by:
isApplicable
in classBuildStepDescriptor<Builder>
- Returns:
- true to allow user to configure this post-promotion task for the given project.
- See Also:
-
getApplicableLocalRules
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<EnvVarsFilterLocalRuleDescriptor> getApplicableLocalRules() -
getShell
-
getShellOrDefault
Deprecated. -
getShellOrDefault
-
setShell
-
getDisplayName
Description copied from class:Descriptor
Human readable name of this kind of configurable object. Should be overridden for most descriptors, if the display name is visible somehow. As a fallback it usesClass.getSimpleName()
onDescriptor.clazz
, so for exampleMyThing
fromsome.pkg.MyThing.DescriptorImpl
. Historically some implementations returned null as a way of hiding the descriptor from the UI, but this is generally managed by an explicit method such asisEnabled
orisApplicable
.- Overrides:
getDisplayName
in classDescriptor<Builder>
-
doCheckUnstableReturn
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public FormValidation doCheckUnstableReturn(@QueryParameter String value) Performs on-the-fly validation of the exit code. -
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject data) throws Descriptor.FormException Description copied from class:Descriptor
Invoked when the global configuration page is submitted. Can be overridden to store descriptor-specific information.- Overrides:
configure
in classDescriptor<Builder>
data
- The JSON object that captures the configuration data for thisDescriptor
. See the developer documentation.- Returns:
- false to keep the client in the same config page.
- Throws:
Descriptor.FormException
-
doCheckShell
Check the existence of sh in the given location.
-
getShellOrDefault(hudson.remoting.VirtualChannel)
.