/*
 * Created on 27-sep-2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.fenalco.utilities.fileloader;

import java.sql.Date;
import java.sql.Time;

/**
 * @author andres
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ProductFailedEvent implements Event
{
	private String fileName;
	
	private String productCode;
	
	private String supplierGLN;
	
	private Date date;
	
	private Time time;
	
	public ProductFailedEvent( String fileName, String productCode, String suppleriGLN )
	{
		this.fileName = fileName;
		this.productCode = productCode;
		this.supplierGLN = suppleriGLN;
		date = new Date( ( new java.util.Date( ) ).getTime() );
		time = new Time( ( new java.util.Date( ) ).getTime() );
	}

	/* (non-Javadoc)
	 * @see com.fenalco.utilities.fileloader.Event#getFileName()
	 */
	public String getFileName()
	{
		return fileName;
	}

	/* (non-Javadoc)
	 * @see com.fenalco.utilities.fileloader.Event#getStatus()
	 */
	public String getStatus()
	{
		return "Error cargando el producto " + productCode + " del proveedor "
				+ supplierGLN + ".";
	}

	/* (non-Javadoc)
	 * @see com.fenalco.utilities.fileloader.Event#getTime()
	 */
	public String getTime()
	{
		return date.toString() + " " + time.toString();
	}

}
