package info.bukova.isspst.data;

import info.bukova.isspst.mail.MailMessage;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SettingsData {
	
	private boolean enableRequirements;
	private MailMessage newReqTemplate;
	private MailMessage authReqTemplate;
	private MailMessage confReqTemplate;
	private MailMessage confReqTripPassenger;
	private MailMessage reqPassenger;
	private Address mainAddress;
	private List<Address> shippingAddrs;
	private String bankName;
	private String accountNumber;
	private String bankCode;
	private List<Vehicle> vehicles;
	private Map<Integer, BigDecimal[]> refunds;
	private String stampFile;
	private String logoFile;
	
	public SettingsData() {
		newReqTemplate = new MailMessage();
		authReqTemplate = new MailMessage();
		confReqTemplate = new MailMessage();
		confReqTripPassenger = new MailMessage();
		reqPassenger = new MailMessage();
		mainAddress = new Address();
		shippingAddrs = new ArrayList<Address>();
		vehicles = new ArrayList<Vehicle>();
		refunds = new HashMap<Integer, BigDecimal[]>();
	}

	public boolean isEnableRequirements() {
		return enableRequirements;
	}

	public void setEnableRequirements(boolean enableRequirements) {
		this.enableRequirements = enableRequirements;
	}

	public MailMessage getNewReqTemplate() {
		return newReqTemplate;
	}

	public void setNewReqTemplate(MailMessage newReqTemplate) {
		this.newReqTemplate = newReqTemplate;
	}

	public MailMessage getAuthReqTemplate() {
		return authReqTemplate;
	}

	public void setAuthReqTemplate(MailMessage authReqTemplate) {
		this.authReqTemplate = authReqTemplate;
	}

	public MailMessage getConfReqTemplate() {
		return confReqTemplate;
	}

	public void setConfReqTemplate(MailMessage confReqTemplate) {
		this.confReqTemplate = confReqTemplate;
	}
	
	public Address getMainAddress() {
		return mainAddress;
	}

	public void setMainAddress(Address mainAddress) {
		this.mainAddress = mainAddress;
	}

	public List<Address> getShippingAddrs() {
		return shippingAddrs;
	}

	/**
	 * @return Seznam všech doručovacích adres včetně hlavní fakturační adresy
	 */
	public List<Address> getAllShippingAddrs()
	{
		List<Address> list = new ArrayList<Address>();
		list.add(this.mainAddress);
		list.addAll(this.getShippingAddrs());
		return list;
	}

	public void setShippingAddrs(List<Address> shippingAddrs) {
		this.shippingAddrs = shippingAddrs;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getAccountNumber() {
		return accountNumber;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public List<Vehicle> getVehicles() {
		return vehicles;
	}

	public void setVehicles(List<Vehicle> vehicles) {
		this.vehicles = vehicles;
	}

	public Map<Integer, BigDecimal[]> getRefunds() {
		return refunds;
	}

	public void setRefunds(Map<Integer, BigDecimal[]> refunds) {
		this.refunds = refunds;
	}

	public String getStampFile() {
		return stampFile;
	}

	public void setStampFile(String stampFile) {
		this.stampFile = stampFile;
	}

	public String getLogoFile()
	{
		return logoFile;
	}

	public void setLogoFile(String logoFile)
	{
		this.logoFile = logoFile;
	}

	public MailMessage getConfReqTripPassenger() {
		return confReqTripPassenger;
	}

	public void setConfReqTripPassenger(MailMessage confReqTripPassenger) {
		this.confReqTripPassenger = confReqTripPassenger;
	}

	public MailMessage getReqPassenger() {
		return reqPassenger;
	}

	public void setReqPassenger(MailMessage reqPassenger) {
		this.reqPassenger = reqPassenger;
	}
}
