Package hudson.tasks
Class Shell.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- hudson.tasks.BuildStepDescriptor<Builder>
-
- hudson.tasks.Shell.DescriptorImpl
-
- All Implemented Interfaces:
PersistentDescriptor
,Saveable
,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
Constructors Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
configure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject data)
Invoked when the global configuration page is submitted.FormValidation
doCheckShell(String value)
Check the existence of sh in the given location.FormValidation
doCheckUnstableReturn(String value)
Performs on-the-fly validation of the exit code.List<EnvVarsFilterLocalRuleDescriptor>
getApplicableLocalRules()
String
getDisplayName()
Human readable name of this kind of configurable object.String
getShell()
String
getShellOrDefault()
Deprecated.String
getShellOrDefault(hudson.remoting.VirtualChannel channel)
boolean
isApplicable(Class<? extends AbstractProject> jobType)
Returns true if this task is applicable to the given project.void
setShell(String shell)
-
Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, 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, 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
-
Methods inherited from interface hudson.model.PersistentDescriptor
load
-
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(Class<? extends AbstractProject> jobType)
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:
AbstractProject.AbstractProjectDescriptor.isApplicable(Descriptor)
-
getApplicableLocalRules
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<EnvVarsFilterLocalRuleDescriptor> getApplicableLocalRules()
-
getShell
public String getShell()
-
getShellOrDefault
@Deprecated public String getShellOrDefault()
Deprecated.
-
getShellOrDefault
public String getShellOrDefault(hudson.remoting.VirtualChannel channel)
-
setShell
public void setShell(String shell)
-
getDisplayName
@NonNull public String 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.StaplerRequest 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
public FormValidation doCheckShell(@QueryParameter String value)
Check the existence of sh in the given location.
-
-