package m05bClasses.m05bDokusi.ws;

import m05bClasses.m05bComun;

public class M05BFSDWSInvoker {

	public static final String DOKUSI_URL_SERVICIO = new m05bComun().leerPropiedad("DOKUSI_URL_SERVICIO");

	public static String almacenarDocumento(String pStrSessionToken,
											String pStrAuditUser,
											String pStrType,
											String pXmlObjectMap,
											String pXmlBeanContent) {
		 String sMethod = "storeDocument";
		 String[] sParameterName = { "integrationToken", "auditUser","content", "documentalType", "attributeList"};
		 String[] sParameterValue = { pStrSessionToken, pStrAuditUser,pXmlBeanContent, pStrType, pXmlObjectMap};
		 return M05BWSInvoker.invoke(DOKUSI_URL_SERVICIO, sMethod, sParameterName, sParameterValue);
	}

	public static String anyadirDigitalizacion(String pStrSessionToken, String pStrAuditUser,
			 								   String pXmlDocumentId, String pXmlContent,
			 								   String pStrDigitType, String pStrDigitDate) {
		 String sMethod = "addDigitalizationToDocument";
		 String[] sParameterName = { "integrationToken", "auditUser","documentID", "content", "digitType","digitDate"};
		 String[] sParameterValue = { pStrSessionToken, pStrAuditUser,pXmlDocumentId, pXmlContent, pStrDigitType, pStrDigitDate};
		 return M05BWSInvoker.invoke(DOKUSI_URL_SERVICIO, sMethod, sParameterName, sParameterValue);
	}

	public static String adjuntarFirmasAlDocumento(String pStrSessionToken,
												   String pStrAuditUser,
												   String pXmlDocumentId,
												   String pXmlSignatures) {
		 String sMethod = "addSignaturesToDocument";
		 String[] sParameterName = { "integrationToken", "auditUser","documentID", "signatures" };
		 String[] sParameterValue = { pStrSessionToken, pStrAuditUser,pXmlDocumentId, pXmlSignatures };
		 return M05BWSInvoker.invoke(DOKUSI_URL_SERVICIO, sMethod, sParameterName, sParameterValue);
	}

	public static String recuperarDocumento(String pStrSessionToken,
											String pStrAuditUser,
											String pXmlDocumentId,
											String pXmlStrAttr,
											String pXmlBeanContent) {
		 String sMethod = "retrieveDocument";
		 String[] sParameterName = { "integrationToken", "auditUser","documentID", "keysList", "content"};
		 String[] sParameterValue = { pStrSessionToken, pStrAuditUser,pXmlDocumentId, pXmlStrAttr, pXmlBeanContent };
		 return M05BWSInvoker.invoke(DOKUSI_URL_SERVICIO, sMethod, sParameterName, sParameterValue);
	}

	public static String recuperarFirmas(String pStrSessionToken,
			 							 String pStrAuditUser,
			 							 String pXmlDocumentId,
			 							 String pStrFormato) {
		 String sMethod = "retrieveSignatures";
		 String[] sParameterName = { "integrationToken", "auditUser","documentID", "format" };
		 String[] sParameterValue = { pStrSessionToken, pStrAuditUser,pXmlDocumentId, pStrFormato };
		 return M05BWSInvoker.invoke(DOKUSI_URL_SERVICIO, sMethod, sParameterName, sParameterValue);
	 }
}