From 57a18e5b33895715f39ca832345f6427500807fc Mon Sep 17 00:00:00 2001 From: trifonnt Date: Wed, 14 Oct 2009 14:46:32 +0000 Subject: [PATCH] BF [2878887] - Replication: folder ignored at file import http://sourceforge.net/tracker/?func=detail&aid=2878887&group_id=176962&atid=879332 --- .../org/adempiere/server/rpl/imp/FileImportProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/serverRoot/src/main/server/org/adempiere/server/rpl/imp/FileImportProcessor.java b/serverRoot/src/main/server/org/adempiere/server/rpl/imp/FileImportProcessor.java index e19b204275..a3184b6f6e 100644 --- a/serverRoot/src/main/server/org/adempiere/server/rpl/imp/FileImportProcessor.java +++ b/serverRoot/src/main/server/org/adempiere/server/rpl/imp/FileImportProcessor.java @@ -56,14 +56,15 @@ public class FileImportProcessor implements IImportProcessor { X_IMP_ProcessorParameter[] processorParameters = impProcessor.getIMP_ProcessorParameters(trxName); String fileName = null; + String folder = ""; if (processorParameters != null && processorParameters.length > 0) { for (int i = 0; i < processorParameters.length; i++) { log.info("ProcesParameter Value = " + processorParameters[i].getValue()); log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); if (processorParameters[i].getValue().equals("fileName")) { fileName = processorParameters[i].getParameterValue(); - } else { - // Some other mandatory parameter here + } else if ( processorParameters[i].getValue().equals("folder") ) { + folder = processorParameters[i].getParameterValue(); } } } @@ -72,7 +73,7 @@ public class FileImportProcessor implements IImportProcessor { throw new Exception("Missing IMP_ProcessorParameter with key 'fileName'!"); } - Document documentToBeImported = XMLHelper.createDocumentFromFile(fileName); + Document documentToBeImported = XMLHelper.createDocumentFromFile(folder + fileName); StringBuffer result = new StringBuffer(); ImportHelper impHelper = new ImportHelper( ctx ); @@ -83,7 +84,6 @@ public class FileImportProcessor implements IImportProcessor { public void stop() throws Exception { // do nothing! - } }