Class TargetGroup

java.lang.Object
hudson.model.AbstractDescribableImpl<TargetGroup>
io.jenkins.plugins.configsplice.TargetGroup
All Implemented Interfaces:
Describable<TargetGroup>

public class TargetGroup extends AbstractDescribableImpl<TargetGroup>
A set of file globs, one format, and the substitutions that apply only to those files (SRS section 4.4).

Grouping is the whole reason the API is shaped this way. A flat list of files crossed with a flat list of substitutions would apply XML paths to JSON files and fail under the default error policy; scoping substitutions to the files they belong to is what makes the canonical example work.

  • Constructor Details

  • Method Details

    • getFiles

      @NonNull public List<String> getFiles()
    • getFilesText

      @NonNull public String getFilesText()
      The file patterns as newline-separated text, for the form view only.

      Not a configuration property: DescribableModel derives properties from the @DataBoundConstructor parameters and @DataBoundSetter methods, so this getter is invisible to Pipeline binding and to the Snippet Generator. It exists because Jenkins form binding has no workable idiom for a List<String>, so the form uses a textarea and TargetGroup.DescriptorImpl.newInstance(org.kohsuke.stapler.StaplerRequest2, net.sf.json.JSONObject) converts it back. The Pipeline API stays files: ['a', 'b'].

    • getSubstitutions

      @NonNull public List<Substitution> getSubstitutions()
    • getFormat

      @NonNull public String getFormat()
    • setFormat

      @DataBoundSetter public void setFormat(@CheckForNull String format)