Salome HOME
The draft of the "Copy from existing study" action is added. The YACS step is introdu...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / ScenarioService.java
index 58a1bbb6ff4ca048025fbcb112d4f0a6a27a0a6c..4012fa94c87daa0a140827ec088fb78ce965697e 100644 (file)
@@ -17,11 +17,13 @@ import org.splat.dal.bo.som.KnowledgeElement;
 import org.splat.dal.bo.som.Scenario;
 import org.splat.dal.bo.som.SimulationContext;
 import org.splat.dal.bo.som.Study;
+import org.splat.exception.InvalidParameterException;
 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.dto.ScenarioDTO;
 import org.splat.service.dto.StepDTO;
 import org.splat.som.Step;
 
@@ -32,6 +34,45 @@ import org.splat.som.Step;
  */
 public interface ScenarioService {
 
+       /**
+        * Get a list of scenarios of a study with the given id.
+        * 
+        * @param studyId
+        *            the study id
+        * @return list of scenario DTOs
+        */
+       public List<ScenarioDTO> getStudyScenarios(final Long studyId);
+
+       /**
+        * Copy content of a source study into the given study up to the given step.
+        * 
+        * @param fromStudyId
+        *            the source study id
+        * @param fromScenId
+        *            the source scenario id
+        * @param finalStepNum
+        *            the final source step number
+        * @param toStudyId
+        *            the target study
+        * @throws InvalidParameterException
+        *             if study, scenario or step is not found
+        * @throws MissedPropertyException
+        *             if document creation is failed
+        * @throws InvalidPropertyException
+        *             if document creation is failed
+        * @throws MultiplyDefinedException
+        *             if document creation is failed
+        * @throws IOException
+        *             if document file creation is failed
+        * @throws NotApplicableException
+        *             if document state is not applicable
+        */
+       public void copyStudyContent(final long fromStudyId, final long fromScenId,
+                       final int finalStepNum, final long toStudyId)
+                       throws InvalidParameterException, MissedPropertyException,
+                       InvalidPropertyException, MultiplyDefinedException,
+                       NotApplicableException, IOException;
+
        /**
         * Get lists of scenario steps, documents and files for building siman-salome.conf file.
         *