]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Compare method signature and DocToCompareDTO are added.
authormka <mka@opencascade.com>
Wed, 6 Mar 2013 07:56:27 +0000 (07:56 +0000)
committermka <mka@opencascade.com>
Wed, 6 Mar 2013 07:56:27 +0000 (07:56 +0000)
Workspace/Siman-Common/src/org/splat/service/StudyService.java
Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java
Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java [new file with mode: 0644]

index a7353d6a1740477c1669e3e1aa2ab205c66adecb..aea1958fcd95c574d033a5e9ac2659a0780375a5 100644 (file)
@@ -23,6 +23,7 @@ import org.splat.exception.InvalidParameterException;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
 import org.splat.kernel.MultiplyDefinedException;
+import org.splat.service.dto.DocToCompareDTO;
 
 /**
  * This class defines all methods for creation, modification the study.
@@ -303,4 +304,13 @@ public interface StudyService {
         * @return true if succeeded, false if study doesn't have a description.
         */
        boolean removeDescription(final Long studyId) throws InvalidParameterException;
+       
+       /**
+        * Compare the studies and generate the file that contains the result chart.
+        * @param docsList the list of dtos each contains information: 
+        * StudyTitle, ScenarioTitle, PathToFile in vault. 
+        * 
+        * @return path to result file in the vault.
+        */
+       String compare (List<DocToCompareDTO> docsList);
 }
index 1826adb0589108f978ac6bdd8c4238f60ee34d09..7cc8aced510711d68a2aa78371fe7c54f353a50d 100644 (file)
@@ -52,6 +52,7 @@ import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
 import org.splat.kernel.MultiplyDefinedException;
 import org.splat.log.AppLogger;
+import org.splat.service.dto.DocToCompareDTO;
 import org.splat.service.technical.IndexService;
 import org.splat.service.technical.ProjectSettingsService;
 import org.splat.service.technical.ProjectSettingsServiceImpl;
@@ -1127,6 +1128,11 @@ public class StudyServiceImpl implements StudyService {
                }
                return study.removeAttribute(study.getAttribute(DescriptionAttribute.class));
        }
+       
+       @Override
+       public String compare (final List<DocToCompareDTO> docsList) {
+               return "Result file path";
+       }
 
        /**
         * Get project settings.
diff --git a/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java b/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java
new file mode 100644 (file)
index 0000000..2925ece
--- /dev/null
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * Company         EURIWARE
+ * Application     SIMAN
+ * File            $Id$ 
+ * Creation date   06.03.2013
+ * @author         Author: Maria KRUCHININA
+ * @version        Revision: 
+ *****************************************************************************/
+
+package org.splat.service.dto; 
+
+/**
+ * DTO contains information about documents that can be compared 
+ * in the frame of "Compare the Studies" operation.
+ * @author Maria KRUCHININA
+ *
+ */
+public class DocToCompareDTO {
+
+       /**
+        * Study title.
+        */
+       private String _studyTitle;
+       /**
+        * Scenario title.
+        */
+       private String _scenarioTitle;
+       /**
+        * Path to comparable file in vault.
+        */
+       private String _pathToFile;
+       
+       
+       /**
+        * Get the studyTitle.
+        * @return the studyTitle
+        */
+       public String getStudyTitle() {
+               return _studyTitle;
+       }
+       /**
+        * Set the studyTitle.
+        * @param studyTitle the studyTitle to set
+        */
+       public void setStudyTitle(final String studyTitle) {
+               _studyTitle = studyTitle;
+       }
+       /**
+        * Get the scenarioTitle.
+        * @return the scenarioTitle
+        */
+       public String getScenarioTitle() {
+               return _scenarioTitle;
+       }
+       /**
+        * Set the scenarioTitle.
+        * @param scenarioTitle the scenarioTitle to set
+        */
+       public void setScenarioTitle(final String scenarioTitle) {
+               _scenarioTitle = scenarioTitle;
+       }
+       /**
+        * Get the pathToFile.
+        * @return the pathToFile
+        */
+       public String getPathToFile() {
+               return _pathToFile;
+       }
+       /**
+        * Set the pathToFile.
+        * @param pathToFile the pathToFile to set
+        */
+       public void setPathToFile(final String pathToFile) {
+               _pathToFile = pathToFile;
+       }
+       
+       
+}