/**
 * 
 */
package gov.nih.nci.calab.dto.workflow;

import gov.nih.nci.calab.service.util.CalabConstants;
import gov.nih.nci.calab.service.util.PropertyReader;

import java.io.File;
import java.util.Date;

/**
 * @author zengje
 * 
 */
public class FileBean {

	private String id = "";

	private String path = "";

	private String filename = "";

	private String createDateStr = "";

	private String fileSubmitter = "";

	private String fileMaskStatus = "";

	private Date createdDate;
	
	private String shortFilename = "";
	
	private String status = "";
	
	private String inoutType = "";

	/**
	 * 
	 */
	public FileBean() {
		super();
		// TODO Auto-generated constructor stub
	}

	// used in WorkflowResultBean
	public FileBean(String path, String fileSubmissionDate,
			String fileSubmitter, String fileMaskStatus, String inoutType) {
		this.path = path;
		this.createDateStr = fileSubmissionDate;
		this.fileSubmitter = fileSubmitter;
		this.fileMaskStatus = fileMaskStatus;
		this.filename = getFileName(path);
		this.inoutType = inoutType;
	}

	public FileBean(String id, String path) {
		super();
		// TODO Auto-generated constructor stub
		this.id = id;
		this.path = path;
		this.filename = getFileName(path);
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
		this.filename = getFileName(path);
	}

	public String getFilename() {
		return filename;
	}

	// public void setFilename(String filename) {
	// this.filename = filename;
	// }
	//	

	private String getFileName(String path) {
		String[] tokens = path.split("/");
		return tokens[tokens.length-1];
	}
	

	public String getFileMaskStatus() {
		return fileMaskStatus;
	}

	public void setFileMaskStatus(String fileMaskStatus) {
		this.fileMaskStatus = fileMaskStatus;
	}

	public String getCreateDateStr() {
		return createDateStr;
	}

	public void setCreateDateStr(String fileSubmissionDate) {
		this.createDateStr = fileSubmissionDate;
	}

	public String getFileSubmitter() {
		return fileSubmitter;
	}

	public void setFileSubmitter(String fileSubmitter) {
		this.fileSubmitter = fileSubmitter;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public String getShortFilename() {
		return shortFilename;
	}

	public void setShortFilename(String shortFileName) {
		this.shortFilename = shortFileName;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getInoutType() {
		return inoutType;
	}

	public void setInoutType(String inoutType) {
		this.inoutType = inoutType;
	}

}

@@ -524,39 +524,8 @@
 ;%0A%09%0A
-%09private String status = %22%22;%0A%09%0A
 %09pri
@@ -2489,128 +2489,8 @@
 ;%0A%09%7D
-%0A%0A%09public String getStatus() %7B%0A%09%09return status;%0A%09%7D%0A%0A%09public void setStatus(String status) %7B%0A%09%09this.status = status;%0A%09%7D%0A%09
 %0A%09pu

Remove redundent variable status.