001package com.credibledoc.substitution.reporting.reportdocument; 002 003import com.credibledoc.combiner.node.file.NodeFile; 004import com.credibledoc.enricher.printable.Printable; 005import com.credibledoc.substitution.reporting.report.Report; 006 007import java.util.Set; 008import java.util.function.Consumer; 009 010/** 011 * Contains a state of a single report document during its generation. 012 * 013 * {@link ReportDocument} can be a representation of a markdown file, html file, UML diagram and so on. 014 * 015 * @author Kyrylo Semenko 016 */ 017public interface ReportDocument extends Printable { 018 019 /** 020 * @return A method for filling out this {@link ReportDocument}. This method will be called as the last method 021 * before closing of {@link ReportDocument#getPrintWriter()} object. 022 */ 023 Consumer<ReportDocument> getFooterMethod(); 024 025 /** 026 * @return A {@link ReportDocumentType} this {@link ReportDocument} belongs to. 027 */ 028 Class<? extends ReportDocumentType> getReportDocumentType(); 029 030 /** 031 * @return Set of {@link NodeFile}s this {@link ReportDocument} obtain data from. 032 */ 033 Set<NodeFile> getNodeFiles(); 034 035 /** 036 * @return The {@link Report} this {@link ReportDocument} belongs to. 037 */ 038 Report getReport(); 039 040 /** 041 * @param report the {@link Report} instance this {@link ReportDocument} will be belonging to. 042 */ 043 void setReport(Report report); 044 045}