]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
CheckIn method is modified
authormka <mka@opencascade.com>
Wed, 6 Feb 2013 08:37:15 +0000 (08:37 +0000)
committermka <mka@opencascade.com>
Wed, 6 Feb 2013 08:37:15 +0000 (08:37 +0000)
Workspace/Siman-Stub/service_wsdl/service/salome/SimanSalomeService.wsdl
Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeService.java
Workspace/Siman-WS/src/org/splat/ws_server/service/salome/SimanSalomeServiceImpl.java

index 474f278c874858a6c674e00a15d5c88a92d692c0..d98c99641a4125d89a17132df0bdadc8706c927b 100644 (file)
@@ -54,6 +54,7 @@
                     <xs:sequence>
                         <xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/>
                         <xs:element minOccurs="0" name="args1" type="xs:long"/>
+                        <xs:element minOccurs="0" name="args2" type="xs:long"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
index de4d7c2c90aebc23ac39b9e647954fc9127fca88..d88dbad7d34d0f25de2db3895b4be7065f3f4f66 100644 (file)
@@ -38,7 +38,8 @@ public interface SimanSalomeService {
        /**
         * Check in operation.
         * @param fileURL - the salome-siman.conf file URL
+        * @param scenarioId the scenario ID
         * @param userId the user ID
         **/
-       String checkIn(final String fileURL, final Long userId);
+       String checkIn(final String fileURL, final Long scenarioId, final Long userId);
 }
index c4a08776eb04959934bdf242483905baffe852b0..8088c2d13741a4e7ac0272eab31b3c6e4dc46e60 100644 (file)
@@ -226,7 +226,7 @@ public class SimanSalomeServiceImpl implements SimanSalomeService, ServletContex
         * @see org.splat.ws_server.service.salome.SimanSalomeService#checkIn()
         */
        @Override
-       public String checkIn(final String fileURL, final Long userId) {
+       public String checkIn(final String fileURL, final Long scenarioId, final Long userId) {
                                
                File configFile = new File(fileURL);
                
@@ -236,7 +236,6 @@ public class SimanSalomeServiceImpl implements SimanSalomeService, ServletContex
                FileDTO file;
                DocumentDTO document;
                StepDTO step;
-               long ScenarioId = 0;
                
                if (LOG.isDebugEnabled()) {
                        LOG.debug("The fileURL = " + fileURL);
@@ -250,7 +249,6 @@ public class SimanSalomeServiceImpl implements SimanSalomeService, ServletContex
                            String nextLine = input.nextLine();
                            String[] tokens = nextLine.split(",");
                            int activityNumber = Integer.valueOf(tokens[2]);
-                           ScenarioId = Long.valueOf(tokens[0]);
                            
                            if (numberStepMap.containsKey(activityNumber)) {
                                step = numberStepMap.get(activityNumber);
@@ -280,7 +278,7 @@ public class SimanSalomeServiceImpl implements SimanSalomeService, ServletContex
                        List<StepDTO> listSteps = new ArrayList<StepDTO>(numberStepMap.values());
                
                        try {
-                               _scenarioService.checkin(ScenarioId, userId, listSteps);
+                               _scenarioService.checkin(scenarioId, userId, listSteps);
                        } catch (InvalidPropertyException e) {
                                e.printStackTrace();
                        } catch (MissedPropertyException e) {
@@ -297,6 +295,12 @@ public class SimanSalomeServiceImpl implements SimanSalomeService, ServletContex
                        
                        numberStepMap.clear();
                        
+                       //delete siman-salome.conf and salome-siman.conf files
+                       configFile.delete();
+                       fileURL.replace("salome-siman.conf", "siman-salome.conf");
+                       File configFile2 = new File(fileURL);
+                       configFile2.delete();
+                                       
                        return "SUCCESS";
                        
                } catch (FileNotFoundException e) {