]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/EditStudyAction.java
Salome HOME
Siman codebase is refactored. Spring beans are introduced in the context.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditStudyAction.java
index 028013897482e9df93b6e0635e0478376750e013..79c48426aa4e590ffaf8be83e9ffbbf1a750f455 100644 (file)
@@ -3,8 +3,9 @@ package org.splat.simer;
 import org.hibernate.HibernateException;
 import org.hibernate.Session;
 import org.hibernate.Transaction;
-import org.splat.som.Database;
-import org.splat.som.Study;
+import org.splat.dal.dao.som.Database;
+import org.splat.dal.bo.som.Study;
+import org.splat.service.StudyService;
 
 
 public class EditStudyAction extends DisplayStudyStepAction {
@@ -13,6 +14,8 @@ public class EditStudyAction extends DisplayStudyStepAction {
 
        private enum Execute { publish, promote }
 
+       private StudyService _studyService;
+
 //  ==============================================================================================================================
 //  Action methods
 //  ==============================================================================================================================
@@ -27,8 +30,8 @@ public class EditStudyAction extends DisplayStudyStepAction {
         Execute  todo   = Execute.valueOf(action);
         Study    study  = mystudy.getStudyObject();
         
-        if      (todo == Execute.publish) study.moveToPublic();
-        else if (todo == Execute.promote) study.moveToReference();
+        if      (todo == Execute.publish) getStudyService().moveToPublic(study);
+        else if (todo == Execute.promote) getStudyService().moveToReference(study);
         mystudy.getPopup().setContext("study", mystudy.getStudyRights());   // The context has changed
 
 //      Useless to update the open study
@@ -48,4 +51,22 @@ public class EditStudyAction extends DisplayStudyStepAction {
         return ERROR;
       }
     }
+       /**
+        * Get the studyService.
+        * 
+        * @return the studyService
+        */
+       public StudyService getStudyService() {
+               return _studyService;
+       }
+
+       /**
+        * Set the studyService.
+        * 
+        * @param studyService
+        *            the studyService to set
+        */
+       public void setStudyService(StudyService studyService) {
+               _studyService = studyService;
+       }
 }
\ No newline at end of file