// Path: src/main/java/org/tap4j/plugin/model/TestSetMap.java
// public class TestSetMap implements Serializable {
// 
//     private static final long serialVersionUID = 7300386936718557088L;
//     
//     private final String fileName;
//     private final TestSet testSet;
//     
//     public TestSetMap( String fileName, TestSet testSet )
//     {
//         this.fileName = fileName;
//         this.testSet = testSet;
//     }
//     
//     public String getFileName()
//     {
//         return this.fileName;
//     }
//     
//     public TestSet getTestSet()
//     {
//         return this.testSet;
//     }
//     
// }
// 
// Path: src/main/java/org/tap4j/plugin/util/Constants.java
// public final class Constants {
// 
//     public static final String TAP_DIR_NAME = "tap-master-files";
//     
// }


import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import org.apache.commons.lang.BooleanUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tap4j.model.Plan;
import org.tap4j.model.TestSet;
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.tasks.test.TestResultAggregator;
import jenkins.tasks.SimpleBuildStep;

    public Boolean getPlanRequired() {
        return planRequired;
    }

    public Boolean getVerbose() {
        return verbose;
    }

    public Boolean getFlattenTapResult() {
        return flattenTapResult;
    }

    public Boolean getRemoveYamlIfCorrupted() {
        return removeYamlIfCorrupted;
    }

    public Boolean getSkipIfBuildNotOk() {
        return skipIfBuildNotOk;
    }

    /**
     * Gets the directory where the plug-in saves its TAP streams before processing them and
     * displaying in the UI.
     * <p>
     * Adapted from JUnit Attachments Plug-in.
     *
     * @param build Jenkins build
     * @return virtual directory (FilePath)
     */
    public static FilePath getReportsDirectory(Run build) {

// Path: src/main/java/org/tap4j/plugin/model/TestSetMap.java
// public class TestSetMap implements Serializable {
// 
//     private static final long serialVersionUID = 7300386936718557088L;
//     
//     private final String fileName;
//     private final TestSet testSet;
//     
//     public TestSetMap( String fileName, TestSet testSet )
//     {
//         this.fileName = fileName;
//         this.testSet = testSet;
//     }
//     
//     public String getFileName()
//     {
//         return this.fileName;
//     }
//     
//     public TestSet getTestSet()
//     {
//         return this.testSet;
//     }
//     
// }
// 
// Path: src/main/java/org/tap4j/plugin/util/Constants.java
// public final class Constants {
// 
//     public static final String TAP_DIR_NAME = "tap-master-files";
//     
// }


// Path: src/main/java/org/tap4j/plugin/TapPublisher.java
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import org.apache.commons.lang.BooleanUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.tap4j.model.Plan;
import org.tap4j.model.TestSet;
import org.tap4j.plugin.model.TestSetMap;
import org.tap4j.plugin.util.Constants;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.matrix.MatrixAggregatable;
import hudson.matrix.MatrixAggregator;
import hudson.matrix.MatrixBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.BuildStepMonitor;
import hudson.tasks.Publisher;
import hudson.tasks.Recorder;
import hudson.tasks.test.TestResultAggregator;
import jenkins.tasks.SimpleBuildStep;

    public Boolean getPlanRequired() {
        return planRequired;
    }

    public Boolean getVerbose() {
        return verbose;
    }

    public Boolean getFlattenTapResult() {
        return flattenTapResult;
    }

    public Boolean getRemoveYamlIfCorrupted() {
        return removeYamlIfCorrupted;
    }

    public Boolean getSkipIfBuildNotOk() {
        return skipIfBuildNotOk;
    }

    /**
     * Gets the directory where the plug-in saves its TAP streams before processing them and
     * displaying in the UI.
     * <p>
     * Adapted from JUnit Attachments Plug-in.
     *
     * @param build Jenkins build
     * @return virtual directory (FilePath)
     */
    public static FilePath getReportsDirectory(Run build) {

        return new FilePath(new File(build.getRootDir().getAbsolutePath())).child(Constants.TAP_DIR_NAME);
