]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/service/StudyService.java
Salome HOME
createStudy method is added for calling from Python.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / StudyService.java
index 9726ddb83f055c39b38cc231eac14851c017124f..ddc4c0f9316f5fa1241288d98bf38cd3094588f9 100644 (file)
@@ -17,8 +17,8 @@ import org.splat.dal.bo.som.DocumentType;
 import org.splat.dal.bo.som.Publication;
 import org.splat.dal.bo.som.SimulationContext;
 import org.splat.dal.bo.som.Study;
-import org.splat.dal.bo.som.Study.Properties;
 import org.splat.dal.bo.som.ValidationCycle;
+import org.splat.dal.bo.som.Study.Properties;
 import org.splat.exception.IncompatibleDataException;
 import org.splat.exception.InvalidParameterException;
 import org.splat.kernel.InvalidPropertyException;
@@ -61,13 +61,12 @@ public interface StudyService {
         * @throws MissedPropertyException
         *             if a mandatory property is missed
         * @throws InvalidPropertyException
-        *             if some property doesn't exist
+        *             if an invalid value is passed to a property
         * @throws MultiplyDefinedException
         *             if some property is defined several times
         */
-       Study createStudy(Study.Properties sprop)
-                       throws MissedPropertyException, InvalidPropertyException,
-                       MultiplyDefinedException;
+       Study createStudy(Study.Properties sprop) throws MissedPropertyException,
+                       InvalidPropertyException, MultiplyDefinedException;
 
        /**
         * Add a simulation context to the first step of the study. If the context doesn't yet saved it is created in the database.
@@ -80,7 +79,7 @@ public interface StudyService {
         * @throws MissedPropertyException
         *             if a mandatory property is missed
         * @throws InvalidPropertyException
-        *             if some property doesn't exist
+        *             if an invalid value is passed to a property
         * @throws MultiplyDefinedException
         *             if some property occurs several times
         */
@@ -97,8 +96,7 @@ public interface StudyService {
         *            the simulation context to add
         * @return the added simulation context
         */
-       SimulationContext addProjectContext(Study aStudy,
-                       SimulationContext context);
+       SimulationContext addProjectContext(Study aStudy, SimulationContext context);
 
        /**
         * Remove a simulation context from a study.
@@ -175,7 +173,7 @@ public interface StudyService {
         * @see #isPublic()
         */
        boolean moveToPublic(Study aStudy);
-       
+
        /**
         * Moves this study from the Public to the Private area of the repository.
         * 
@@ -207,7 +205,7 @@ public interface StudyService {
         *            new properties of the study
         * @return true if the study has been updated successfully
         * @throws InvalidPropertyException
-        *             if some property doesn't exist
+        *             if an invalid value is passed to a property
         */
        boolean update(Study aStudy, Properties sprop)
                        throws InvalidPropertyException;
@@ -263,58 +261,71 @@ public interface StudyService {
         * @return the unmodifiable not null transient list of contributors of this study
         */
        List<User> getContributors(Study aStudy);
-       
+
        /**
         * Mark study as reference.
         * 
-        * @param aStudy - the Study
+        * @param aStudy -
+        *            the Study
         */
        void markStudyAsReference(Study aStudy);
-       
+
        /**
-        * Remove study as reference.
-        * This operation is inverse one to Mark as reference.
+        * Remove study as reference. This operation is inverse one to Mark as reference.
         * 
-        * @param aStudy - the Study
+        * @param aStudy -
+        *            the Study
         */
        void removeStudyAsReference(Study aStudy);
-       
+
        /**
-        * Get the description attribute related to the study
-        *              (there supposed to be the only one such attribute in the database).
-        * @param studyId the study id
+        * Get the description attribute related to the study (there supposed to be the only one such attribute in the database).
+        * 
+        * @param studyId
+        *            the study id
         * @return the description attribute value (null if does not exist)
-        * @throws InvalidParameterException if a study with such id does not exist in the database.
+        * @throws InvalidParameterException
+        *             if a study with such id does not exist in the database.
         */
        String getDescription(Long studyId) throws InvalidParameterException;
-       
+
        /**
         * Set the description attribute related to the study.
-        * @param studyId the study id
-        * @param descriptionText the description text
-        * @throws InvalidParameterException if some parameters are invalid.
+        * 
+        * @param studyId
+        *            the study id
+        * @param descriptionText
+        *            the description text
+        * @throws InvalidParameterException
+        *             if some parameters are invalid.
         */
-       void setDescription(Long studyId, String descriptionText) throws InvalidParameterException;
+       void setDescription(Long studyId, String descriptionText)
+                       throws InvalidParameterException;
 
        /**
         * Remove a description attached to a study.
         * 
-        * @param studyId the study id
+        * @param studyId
+        *            the study id
         * @throws InvalidParameterException
-        *              if no study with such Id has been found in the database.
+        *             if no study with such Id has been found in the database.
         * @return true if succeeded, false if study doesn't have a description.
         */
-       boolean removeDescription(final Long studyId) throws InvalidParameterException;
-       
+       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. 
-        * @param userName the name of the user who compare the results.       
+        * 
+        * @param docsList
+        *            the list of dtos each contains information: StudyTitle, ScenarioTitle, PathToFile in vault.
+        * @param userName
+        *            the name of the user who compare the results.
         * @throws IncompatibleDataException
-        *         if data is incompatible for "Compare the studies" functionality.
+        *             if data is incompatible for "Compare the studies" functionality.
         * 
         * @return path to result file in the vault.
         */
-       String compare (List<DocToCompareDTO> docsList, final String userName) throws IncompatibleDataException;
+       String compare(List<DocToCompareDTO> docsList, final String userName)
+                       throws IncompatibleDataException;
 }