Class CommandDescriptor
- All Implemented Interfaces:
Saveable
,OnMaster
,org.jenkinsci.plugins.structs.describable.CustomDescribableModel
- Direct Known Subclasses:
ListPackage.DescriptorImpl
,MSBuildCommandDescriptor
,NuGetCommandDescriptor
,Restore.DescriptorImpl
,ToolCommandDescriptor
public abstract class CommandDescriptor
extends BuildStepDescriptor<Builder>
implements org.jenkinsci.plugins.structs.describable.CustomDescribableModel
A descriptor for a .NET command.
-
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
ModifierConstructorDescriptionprotected
Creates a new .NET command descriptor instance.protected
CommandDescriptor
(Class<? extends Command> clazz) Creates a new .NET command descriptor instance for a specific class. -
Method Summary
Modifier and TypeMethodDescriptionfinal AutoCompletionCandidates
doAutoCompleteFramework
(String value, Item item) Performs auto-completion for a .NET target framework moniker.final AutoCompletionCandidates
doAutoCompleteFrameworksString
(String value, Item item) Performs auto-completion for a list of .NET target framework monikers.final AutoCompletionCandidates
doAutoCompleteRuntime
(String value, Item item) Performs auto-completion for a .NET target runtime identifier.final AutoCompletionCandidates
doAutoCompleteRuntimesString
(String value, Item item) Performs auto-completion for a list of .NET runtime identifiers.doCheckCharset
(String value, Item item) Performs validation on a Java charset name.doCheckFramework
(String value, Item item) Performs validation on a .NET target framework moniker.doCheckFrameworksString
(String value, Item item) Performs validation on a list of .NET target framework monikers.doCheckRuntime
(String value, Item item) Performs validation on a .NET runtime identifier.doCheckRuntimesString
(String value, Item item) Performs validation on a list of .NET runtime identifiers.final ListBoxModel
doFillCharsetItems
(Item item) Fills a listbox with the names of charsets supported by the running version of Java.final ListBoxModel
doFillSdkItems
(Item item) Fills a listbox with the names of .NET SDKs that have been defined as global tools.final ListBoxModel
doFillVerbosityItems
(Item item) Fills a listbox with the possible values for the .NET CLI "verbosity" option.final String
Gets the button text to use for the "Advanced" button.final boolean
isApplicable
(Class<? extends AbstractProject> jobType) Determines whether this descriptor is applicable for the specified job type.protected boolean
isApplicableToFreeStyleProjects
(DotNetConfiguration configuration) Determines whether this command should be made available to freestyle projects.Methods inherited from class hudson.tasks.BuildStepDescriptor
filter
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, 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 org.jenkinsci.plugins.structs.describable.CustomDescribableModel
customInstantiate, customUninstantiate
-
Constructor Details
-
CommandDescriptor
protected CommandDescriptor()Creates a new .NET command descriptor instance.This version works when you follow the common convention, where a descriptor is written as the static nested class of the describable class.
-
CommandDescriptor
Creates a new .NET command descriptor instance for a specific class.- Parameters:
clazz
- The class implementing the command described by this descriptor instance.
-
-
Method Details
-
doAutoCompleteFramework
@NonNull @POST public final AutoCompletionCandidates doAutoCompleteFramework(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs auto-completion for a .NET target framework moniker.- Parameters:
value
- The (partial) value to perform auto-completion for.item
- The item being configured.- Returns:
- The computed auto-completion candidates.
-
doAutoCompleteFrameworksString
@NonNull @POST public final AutoCompletionCandidates doAutoCompleteFrameworksString(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs auto-completion for a list of .NET target framework monikers.- Parameters:
value
- The (partial) value to perform auto-completion for.item
- The item being configured.- Returns:
- The computed auto-completion candidates.
-
doAutoCompleteRuntime
@NonNull @POST public final AutoCompletionCandidates doAutoCompleteRuntime(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs auto-completion for a .NET target runtime identifier.- Parameters:
value
- The (partial) value to perform auto-completion for.item
- The item being configured.- Returns:
- The computed auto-completion candidates.
-
doAutoCompleteRuntimesString
@NonNull @POST public final AutoCompletionCandidates doAutoCompleteRuntimesString(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs auto-completion for a list of .NET runtime identifiers.- Parameters:
value
- The (partial) value to perform auto-completion for.item
- The item being configured.- Returns:
- The computed auto-completion candidates.
-
doCheckCharset
@NonNull @POST public FormValidation doCheckCharset(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs validation on a Java charset name.- Parameters:
value
- The value to validate.item
- The item being configured.- Returns:
- The result of the validation.
-
doCheckFramework
@NonNull @POST public FormValidation doCheckFramework(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs validation on a .NET target framework moniker.- Parameters:
value
- The value to validate.item
- The item being configured.- Returns:
- The result of the validation.
-
doCheckFrameworksString
@NonNull @POST public FormValidation doCheckFrameworksString(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs validation on a list of .NET target framework monikers.- Parameters:
value
- The value to validate.item
- The item being configured.- Returns:
- The result of the validation.
-
doCheckRuntime
@NonNull @POST public FormValidation doCheckRuntime(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs validation on a .NET runtime identifier.- Parameters:
value
- The value to validate.item
- The item being configured.- Returns:
- The result of the validation.
-
doCheckRuntimesString
@NonNull @POST public FormValidation doCheckRuntimesString(@CheckForNull @QueryParameter String value, @CheckForNull @AncestorInPath Item item) Performs validation on a list of .NET runtime identifiers.- Parameters:
value
- The values to validate.item
- The item being configured.- Returns:
- The result of the validation.
-
doFillCharsetItems
@NonNull @POST public final ListBoxModel doFillCharsetItems(@CheckForNull @AncestorInPath Item item) Fills a listbox with the names of charsets supported by the running version of Java.- Parameters:
item
- The item being configured.- Returns:
- A suitably filled listbox model.
-
doFillSdkItems
Fills a listbox with the names of .NET SDKs that have been defined as global tools.- Parameters:
item
- The item being configured.- Returns:
- A suitably filled listbox model.
-
doFillVerbosityItems
@NonNull @POST public final ListBoxModel doFillVerbosityItems(@CheckForNull @AncestorInPath Item item) Fills a listbox with the possible values for the .NET CLI "verbosity" option.- Parameters:
item
- The item being configured.- Returns:
- A suitably filled listbox model.
-
getMoreOptions
Gets the button text to use for the "Advanced" button.- Returns:
- "More Options", or the localized equivalent.
-
isApplicable
Determines whether this descriptor is applicable for the specified job type.- Specified by:
isApplicable
in classBuildStepDescriptor<Builder>
- Parameters:
jobType
- The job type.- Returns:
true
.
-
isApplicableToFreeStyleProjects
Determines whether this command should be made available to freestyle projects.- Parameters:
configuration
- The applicable configuration.- Returns:
true
when the command should be available for use in freestyle projects;false
otherwise.
-