001package com.credibledoc.substitution.reporting.reportdocument.creator;
002
003import com.credibledoc.enricher.context.EnricherContext;
004import com.credibledoc.substitution.reporting.reportdocument.ReportDocument;
005import com.credibledoc.substitution.reporting.reportdocument.ReportDocumentType;
006
007/**
008 * Classes which implement this interface are able to create
009 * a {@link ReportDocument} of a {@link ReportDocumentType}.
010 *
011 * @author Kyrylo Semenko
012 */
013public interface ReportDocumentCreator {
014
015    /**
016     * Create a new {@link ReportDocument}.
017     * @param enricherContext the current state of {@link EnricherContext#getLineProcessorRepository()}.
018     * @return a stateful object which can write lines to a single report file.
019     */
020    ReportDocument prepareReportDocument(EnricherContext enricherContext);
021
022    /**
023     * Returns the {@link ReportDocumentType} class of the {@link ReportDocument}
024     * @return the current {@link ReportDocument} type.
025     */
026    Class<? extends ReportDocumentType> getReportDocumentType();
027}