BF [2878887] - Replication: folder ignored at file import

http://sourceforge.net/tracker/?func=detail&aid=2878887&group_id=176962&atid=879332
This commit is contained in:
trifonnt 2009-10-14 14:46:32 +00:00
parent ae93c8ca64
commit 57a18e5b33
1 changed files with 4 additions and 4 deletions

View File

@ -56,14 +56,15 @@ public class FileImportProcessor implements IImportProcessor {
X_IMP_ProcessorParameter[] processorParameters = impProcessor.getIMP_ProcessorParameters(trxName); X_IMP_ProcessorParameter[] processorParameters = impProcessor.getIMP_ProcessorParameters(trxName);
String fileName = null; String fileName = null;
String folder = "";
if (processorParameters != null && processorParameters.length > 0) { if (processorParameters != null && processorParameters.length > 0) {
for (int i = 0; i < processorParameters.length; i++) { for (int i = 0; i < processorParameters.length; i++) {
log.info("ProcesParameter Value = " + processorParameters[i].getValue()); log.info("ProcesParameter Value = " + processorParameters[i].getValue());
log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue());
if (processorParameters[i].getValue().equals("fileName")) { if (processorParameters[i].getValue().equals("fileName")) {
fileName = processorParameters[i].getParameterValue(); fileName = processorParameters[i].getParameterValue();
} else { } else if ( processorParameters[i].getValue().equals("folder") ) {
// Some other mandatory parameter here folder = processorParameters[i].getParameterValue();
} }
} }
} }
@ -72,7 +73,7 @@ public class FileImportProcessor implements IImportProcessor {
throw new Exception("Missing IMP_ProcessorParameter with key 'fileName'!"); throw new Exception("Missing IMP_ProcessorParameter with key 'fileName'!");
} }
Document documentToBeImported = XMLHelper.createDocumentFromFile(fileName); Document documentToBeImported = XMLHelper.createDocumentFromFile(folder + fileName);
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
ImportHelper impHelper = new ImportHelper( ctx ); ImportHelper impHelper = new ImportHelper( ctx );
@ -83,7 +84,6 @@ public class FileImportProcessor implements IImportProcessor {
public void stop() throws Exception { public void stop() throws Exception {
// do nothing! // do nothing!
} }
} }