From: mka Date: Mon, 3 Dec 2012 07:33:31 +0000 (+0000) Subject: Methods are updated X-Git-Tag: Root_Delivery1_2012_12_06~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b66294cf15439dffa9fe9e9b3562646e30c21b4;p=tools%2Fsiman.git Methods are updated --- diff --git a/Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java b/Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java index 1668069..d83620b 100644 --- a/Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java +++ b/Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java @@ -18,6 +18,11 @@ import javax.activation.DataHandler; import javax.activation.FileDataSource; import org.apache.log4j.Logger; +import org.splat.kernel.InvalidPropertyException; +import org.splat.kernel.MismatchException; +import org.splat.kernel.MissedPropertyException; +import org.splat.kernel.MultiplyDefinedException; +import org.splat.kernel.NotApplicableException; import org.splat.service.ScenarioService; import org.splat.service.dto.DocumentDTO; import org.splat.service.dto.FileDTO; @@ -99,10 +104,14 @@ public class SimanSalomeServiceImpl implements SimanSalomeService { } catch (SQLException sqlException) { LOG.debug("Sorry, impossible to populate the database", sqlException); } + + if (LOG.isDebugEnabled()) { + LOG.debug("Scenario Id = " + scenarioId); + } List listSteps = _scenarioService.getScenarioInfo(scenarioId); - File configFilePath = new File(_repositoryService.getRepositoryVaultPath() + "\\SimanSalome\\" + studyId.toString() + scenarioId.toString() + userId.toString()); + File configFilePath = new File(_repositoryService.getDownloadDirectory(userId).getPath()); configFilePath.mkdirs(); File configFile = new File(configFilePath + "\\siman-salome.conf"); @@ -149,6 +158,8 @@ public class SimanSalomeServiceImpl implements SimanSalomeService { out.write(" Result file : " + fileValue.getPath() + "\n"); } + out.write(" File ID : " + fileValue.getId() + "\n"); + out.write(" Automatic processing : " + fileValue.getProcessing() + "\n"); fileState = fileValue.getState(); if ((fileState == 'Y') || (fileState == 'N')) { @@ -252,6 +263,8 @@ public class SimanSalomeServiceImpl implements SimanSalomeService { DocumentDTO document; StepDTO step; long ScenarioId = 0; + + LOG.debug("The fileURL = " + fileURL); try { Scanner input = new Scanner(configFile); @@ -289,8 +302,24 @@ public class SimanSalomeServiceImpl implements SimanSalomeService { input.close(); List listSteps = new ArrayList(numberStepMap.values()); + LOG.debug("MKA List of steps: "); + LOG.debug(listSteps.get(0).toString()); - _scenarioService.checkin(ScenarioId, userId, listSteps); + try { + _scenarioService.checkin(ScenarioId, userId, listSteps); + } catch (InvalidPropertyException e) { + e.printStackTrace(); + } catch (MissedPropertyException e) { + e.printStackTrace(); + } catch (MultiplyDefinedException e) { + e.printStackTrace(); + } catch (MismatchException e) { + e.printStackTrace(); + } catch (NotApplicableException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } numberStepMap.clear();