Class CommandDescriptor

java.lang.Object
hudson.model.Descriptor<T>
hudson.tasks.BuildStepDescriptor<Builder>
io.jenkins.plugins.dotnet.commands.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.
  • 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

      protected CommandDescriptor(@NonNull Class<? extends Command> clazz)
      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

      @NonNull @POST public final ListBoxModel doFillSdkItems(@CheckForNull @AncestorInPath Item item)
      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

      @NonNull public final String getMoreOptions()
      Gets the button text to use for the "Advanced" button.
      Returns:
      "More Options", or the localized equivalent.
    • isApplicable

      public final boolean isApplicable(@CheckForNull Class<? extends AbstractProject> jobType)
      Determines whether this descriptor is applicable for the specified job type.
      Specified by:
      isApplicable in class BuildStepDescriptor<Builder>
      Parameters:
      jobType - The job type.
      Returns:
      true.
    • isApplicableToFreeStyleProjects

      protected boolean isApplicableToFreeStyleProjects(@NonNull DotNetConfiguration configuration)
      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.