コード例 #1
0
    @Override
    public Publisher newInstance(StaplerRequest req, JSONObject formData) throws FormException {
      DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>> testDataPublishers =
          new DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>>(Saveable.NOOP);
      try {
        testDataPublishers.rebuild(req, formData, TestDataPublisher.all());
      } catch (IOException e) {
        throw new FormException(e, null);
      }

      return new FixedMavenTestDataPublisher(testDataPublishers);
    }
コード例 #2
0
 @SuppressWarnings("rawtypes")
 @Override
 public boolean isApplicable(Class<? extends AbstractProject> jobType) {
   return MavenModuleSet.class.isAssignableFrom(jobType) && !TestDataPublisher.all().isEmpty();
 }