package org.jerrymouse.cc.site.web.result;

import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import org.jerrymouse.cc.site.bean.Type;

@XmlRootElement
public class PutResourceResult {
	private String filename;

	private String fileType;

	private boolean hasFile;

	private List<String> convertTypes;

	public PutResourceResult() {
	}

	public PutResourceResult(boolean hasFile) {
		super();
		this.hasFile = hasFile;
		this.filename = null;
		this.fileType = null;
	}

	public PutResourceResult(String filename, Type type, List<Type> ts) {
		super();
		this.filename = filename;
		this.fileType = type.getSuffix();
		setConvertTypes(Type.toStrings(ts));
		this.hasFile = true;
	}

	public String getFilename() {
		return filename;
	}

	public String getFileType() {
		return fileType;
	}

	public boolean isHasFile() {
		return hasFile;
	}

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

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	public void setHasFile(boolean hasFile) {
		this.hasFile = hasFile;
	}

	public void setConvertTypes(List<String> convertTypes) {
		this.convertTypes = convertTypes;
	}

	public List<String> getConvertTypes() {
		return convertTypes;
	}

}
