package in.gov.digilocker.uidai.services.properties;

import java.io.InputStream;
import java.util.Properties;

import org.springframework.stereotype.Service;

@Service
public class EKYCProperties {
	
	private String ekycVer;
	private String raVal;
	private String lrVal;
	private String deVal;
	private String mecVal;
	private String pfrVal;
	private String ekycXmlns; 
	
	public EKYCProperties() {
		Properties props = new java.util.Properties();		
	    try {
	      InputStream uidaiInputStream = getClass().getClassLoader().getResourceAsStream("uidai-services.properties");
	      props.load(uidaiInputStream);
	    }catch (Exception e) {
	      throw new RuntimeException(e.getMessage());
	    }
	    this.ekycVer= (null!= props.getProperty("uidai.ekyc.ver.value")) && !"".equals(props.getProperty("uidai.ekyc.ver.value")) ? props.getProperty("uidai.ekyc.ver.value") : "";
	    this.raVal= (null!= props.getProperty("uidai.ekyc.ra.value")) && !"".equals(props.getProperty("uidai.ekyc.ra.value")) ? props.getProperty("uidai.ekyc.ra.value") : "";
	    this.lrVal= (null!= props.getProperty("uidai.ekyc.lr.value")) && !"".equals(props.getProperty("uidai.ekyc.lr.value")) ? props.getProperty("uidai.ekyc.lr.value") : "";
	    this.deVal= (null!= props.getProperty("uidai.ekyc.de.value")) && !"".equals(props.getProperty("uidai.ekyc.de.value")) ? props.getProperty("uidai.ekyc.de.value") : "";
	    this.mecVal=(null!= props.getProperty("uidai.ekyc.mec.value")) && !"".equals(props.getProperty("uidai.ekyc.mec.value")) ? props.getProperty("uidai.ekyc.mec.value") : "";
	    this.pfrVal=(null!= props.getProperty("uidai.ekyc.pfr.value")) && !"".equals(props.getProperty("uidai.ekyc.pfr.value")) ? props.getProperty("uidai.ekyc.pfr.value") : "";
	    this.ekycXmlns=(null!= props.getProperty("uidai.ekyc.xmlns.value")) && !"".equals(props.getProperty("uidai.ekyc.xmlns.value")) ? props.getProperty("uidai.ekyc.xmlns.value") : "";
	}

	public String getEkycVer() {
		return ekycVer;
	}

	public void setEkycVer(String ekycVer) {
		this.ekycVer = ekycVer;
	}
	
	public String getRaVal() {
		return raVal;
	}

	public void setRaVal(String raVal) {
		this.raVal = raVal;
	}

	public String getLrVal() {
		return lrVal;
	}

	public void setLrVal(String lrVal) {
		this.lrVal = lrVal;
	}

	public String getDeVal() {
		return deVal;
	}

	public void setDeVal(String deVal) {
		this.deVal = deVal;
	}

	public String getMecVal() {
		return mecVal;
	}

	public void setMecVal(String mecVal) {
		this.mecVal = mecVal;
	}

	public String getPfrVal() {
		return pfrVal;
	}

	public void setPfrVal(String pfrVal) {
		this.pfrVal = pfrVal;
	}

	public String getEkycXmlns() {
		return ekycXmlns;
	}

}
