package ee.ut.math.tvt2008.salessystem.penalty.standard;

import java.util.Date;

import ee.ut.math.tvt2008.salessystem.domain.data.Sale;
import ee.ut.math.tvt2008.salessystem.penalty.Penalty;
import ee.ut.math.tvt2008.salessystem.penalty.Strategy;
import ee.ut.math.tvt2008.salessystem.penalty.standard.model.Configuration;


/**
 * Strategy that calculates penalty by interpreting configuration.
 * 
 * @author Hannes Lehemets
 */
public class InterpreterStrategy implements Strategy {

	private Configuration configuration;

	/**
	 * @param configuration Configuration of strategy.
	 */
	public InterpreterStrategy(Configuration configuration) {
		this.configuration = configuration;
	}

	/**
	 * Calculate penalty using info from configuration.
	 * 
	 */
	public Penalty calculate(Sale sale, Long clientId, Date payDate) {
		// TODO Implement logic

		return null;
	}

	/**
	 * @return Returns the configuration.
	 */
	public Configuration getConfiguration() {
		return configuration;
	}

	/**
	 * @param configuration
	 *            The configuration to set.
	 */
	public void setConfiguration(Configuration configuration) {
		this.configuration = configuration;
	}

}
