Class AbstractArchiveFileReport

All Implemented Interfaces:
ModelObject
Direct Known Subclasses:
ATXZipReport, ETLogReport, GeneratorReport, TraceAnalysisReport, TRFReport

public abstract class AbstractArchiveFileReport extends AbstractTestReport
Common base class for TRFReport and ETLogReport holding the archive file information. The build that holds the artifact is resolved by StaplerRequest.findAncestorObject(Class) at runtime.
  • Constructor Details

    • AbstractArchiveFileReport

      public AbstractArchiveFileReport(String id, String title, String fileName, long fileSize)
      Instantiates a new AbstractArchiveFileReport.
      Parameters:
      id - the id used in the report URL
      title - the report title
      fileName - the log file name
      fileSize - the log file size
  • Method Details

    • getFileName

      public String getFileName()
    • getFileSize

      public long getFileSize()
    • getArchiveDir

      public abstract String getArchiveDir()
      Gets the archive directory containing the stored files.
      Returns:
      the archive directory
    • getArchiveTargetDir

      protected VirtualFile getArchiveTargetDir(File rootDir)
      Description copied from class: AbstractRequestHandler
      Specified by:
      getArchiveTargetDir in class AbstractRequestHandler
      Parameters:
      rootDir - the root directory
      Returns:
      the archive target directory
    • doDynamic

      public void doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
      Send contents of the archive file that is requested via HTTP.
      Parameters:
      req - the StaplerRequest used for access this report
      rsp - the StaplerResponse used for serving the file
      Throws:
      IOException - signals that an I/O exception has occurred
      javax.servlet.ServletException - if serving the file failed