package com.mx.dla.dda.contrato.generales.actions;

import java.io.InputStream;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.generales.bos.GeneralesBO;

@Controller
public class InfoContratoAction extends BaseContratoAction {

	private static final long serialVersionUID = 1L;
	private InputStream fileInputStream;
	private String fileName;
	
	@Autowired
	private GeneralesBO generalesBO;

	public String execute() {
		Long idContrato = (Long)this.getSession().get("idContrato");
		fileInputStream = generalesBO.h(idContrato);
		fileName = "detalle_contrato_" + idContrato;
		return SUCCESS;
	}

	public InputStream getFileInputStream() {
		return fileInputStream;
	}

	public void setFileInputStream(InputStream fileInputStream) {
		this.fileInputStream = fileInputStream;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	

}
