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;
} catch (SQLException sqlException) {
LOG.debug("Sorry, impossible to populate the database", sqlException);
}
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Scenario Id = " + scenarioId);
+ }
List<StepDTO> 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");
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')) {
DocumentDTO document;
StepDTO step;
long ScenarioId = 0;
+
+ LOG.debug("The fileURL = " + fileURL);
try {
Scanner input = new Scanner(configFile);
input.close();
List<StepDTO> listSteps = new ArrayList<StepDTO>(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();