/*********************************************************************************************************
 * 프로그램명 : ReportViewManager.java 프로그램설명 : 보고한 보고자료와 문서 양식을 조합하여 보고자료 보기 처리 해줌 작성자 : 강원중 작성일 : 2003.11.30 변경일 :
 * 2004.09.16
 **********************************************************************************************************/

package kr.co.kihyun.beans.totsys.report;

import kr.co.kihyun.beans.entity.TotDoc;
import kr.co.kihyun.moumi.report.MReport;

/**
 * @author bhs
 * @deprecated
 * @see {@link TotReport#getData()} {@link TotReportUtil#toHTML(TotReport)}
 */
public class ReportViewManager {

	private String docName = "";
	private String report = "";
	private String reportNBSP = "";

	private ReportViewer reportViewer = null;

	public ReportViewManager(TotDoc totDoc) {
		this(totDoc, MReport.HTML);
	}

	public ReportViewManager(TotDoc totDoc, int outType) {
		reportViewer = new DynaReportViewer(totDoc, outType);
		docName = reportViewer.getDocName();
	}

    public ReportViewManager(TotDoc totDoc, TotDoc slaveDoc,int outType) {
		reportViewer = new DynaReportViewer(totDoc, slaveDoc,outType);
		docName = reportViewer.getDocName();
	}

	public void setReportData(String deptID, String userID, String dummy) {
		getReportViewer().setReportData(deptID, userID, dummy);
		report = getReportViewer().getReport();
		reportNBSP = getReportViewer().getReportNBSP();
	}

	public void setReportData(String deptID, String userID) {
		getReportViewer().setReportData(deptID, userID);
		report = getReportViewer().getReport();
		reportNBSP = getReportViewer().getReportNBSP();
	}

	public String getDocName() {
		return docName;
	}

	public String getReport() {
		return report;
	}

	public String getReportNBSP() {
		return reportNBSP;
	}

	/**
	 * @return the reportViewer
	 */ public ReportViewer getReportViewer() {
		return reportViewer;
	}

	/**
	 * @param reportViewer the reportViewer to set
	 */ public void setReportViewer(ReportViewer reportViewer) {
		this.reportViewer = reportViewer;
	}

        
}
