/*
 * Copyright
 *   2009 axYus - www.axyus.com
 *   2009 L.Meckert laurent.meckert@axyus.com
 *
 * This file is part of XEMELIOS.
 *
 * XEMELIOS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XEMELIOS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XEMELIOS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package fr.gouv.finances.dgfip.xemelios.controls.etatFrais.values;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Vector;

import org.xml.sax.SAXException;
import org.apache.log4j.Logger;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import fr.gouv.finances.cp.xemelios.controls.AbstractUnitControl;
import fr.gouv.finances.cp.xemelios.controls.Anomalie;
import fr.gouv.finances.cp.xemelios.controls.IdGenerator;
import fr.gouv.finances.cp.xemelios.controls.Node;

/**
 * Implémente le contrôle VALUES01
 *
 * Contrôle sur la valeur des champs Modalités de règlement
 * (PaymentMeansCode)
 * 
 * Pour toutes les lignes, vérifier que le PaymentMeansCode appartient à la liste
 * passee en parametre.
 * + @TODO si code V indiquer reference bancaire PaymentChannelCode et PayeeFinancialAccount
 *
 */
/**
 *
 * @author laurent.meckert
 */
public class CTL_M035 extends VALUES00 {

	private final static Logger logger = Logger.getLogger(CTL_M035.class);
	public static final transient String CTRL_ID = "CTL-M035";
	/**
	 * La chaine cible
	 */
	private static final String CHEMIN_PM_CODE = "EtatsFrais/Invoice/PaymentMeans/PaymentMeansCode/";
	private static final String FIN_INVOICE = "EtatsFrais/Invoice/";
	private static final String ON_RETURN_ANOMALIES = FIN_INVOICE;
	private String valuesString;
	private String[] valuesList;
	private String badValue;

	/**
	 * @return the valuesList
	 */
	public String[] getValuesList() {
		return valuesList;
	}

	/**
	 * @param aValuesList the valuesList to set
	 */
	public void setValuesList(String[] aValuesList) {
		valuesList = aValuesList;
	}

	protected Logger getLogger() {
		return logger;
	}

	protected String getCtrlId() {
		return CTRL_ID;
	}

	protected String getReturnAnomalies() {
		return ON_RETURN_ANOMALIES;
	}

	protected String getXpath() {
		return CHEMIN_PM_CODE;
	}

	protected String getValuesParameterName() {
		return "Moyens de paiement";
	}

	/**
	 * @return the valuesString
	 */
	public String getValuesString() {
		return valuesString;
	}

	/**
	 * @param valuesString the valuesString to set
	 */
	public void setValuesString(String valuesString) {
		this.valuesString = valuesString;
	}

	/**
	 * @return the badValue
	 */
	public String getBadValue() {
		return badValue;
	}

	/**
	 * @param badValue the badValue to set
	 */
	public void setBadValue(String badValue) {
		this.badValue = badValue;
	}
}
