package com.capgemini.reports.execution;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.framework.teamcenter.exceptions.KurtException;
import com.capgemini.reports.execution.strategies.IExecutionStrategy;
import net.lingala.zip4j.exception.ZipException;

import java.io.Serializable;

/**
 * This interface will allow to prepare data for the reports.
 *
 * @param <T> The type of the report this is preparing data for
 */
public interface IDataReportPreparator<T extends AbstractExecutionReport> extends Serializable {

    /**
     * Message to display execution time.
     */
    String EXECUTION_TIME_XXX_MS_FOR_YYY = "Execution time : {} ms for {}";

    /**
     * Print the data by extracting it from Teamcenter.
     *
     * @param session
     * @param execution            will provide the report which is executing
     * @param executionStrategy
     * @throws KurtException when an internal error occurred
     */
    String print(TcSession session, T execution, IExecutionStrategy executionStrategy) throws KurtException, ZipException;
}
