Salome HOME
<jsp:param ... > parameters are removed from the title bar
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / SimulationContextType.java
index 881d086a9bbb732157785ae64ea0191d5992f46b..607582aba8d21ff42ed0a060036ccec8dceac942 100644 (file)
@@ -8,11 +8,8 @@ package org.splat.dal.bo.som;
 import java.io.Serializable;
 
 import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.service.technical.ProjectSettingsService;
-import org.splat.service.technical.ProjectSettingsService.Step;
-import org.splat.service.technical.ProjectSettingsServiceImpl;
 
 
 public class SimulationContextType extends Persistent implements Serializable {
@@ -20,7 +17,7 @@ public class SimulationContextType extends Persistent implements Serializable {
 //  Persistent fields
     private String         name;
     private ProgressState  state;
-    private int            step;
+       private int            step;
 
 //  Required by the serialization
        private static final long serialVersionUID = 4819425038576161242L;
@@ -35,13 +32,13 @@ public class SimulationContextType extends Persistent implements Serializable {
       private ProgressState         state = null;
       private ProjectSettingsService.Step  step  = null;
 
-      protected ProgressState getProgressState () {
+      public ProgressState getProgressState () {
        return state;
       }
-      protected ProjectSettingsService.Step getStep () {
+      public ProjectSettingsService.Step getStep () {
        return step;
       }
-      public Properties setState (ProgressState state) {
+      public Properties setProgressState (ProgressState state) {
        this.state = state;
        return this;
       }
@@ -54,7 +51,7 @@ public class SimulationContextType extends Persistent implements Serializable {
     protected SimulationContextType () {
     }
 //  Initialization constructor
-    protected SimulationContextType (String name, ProjectSettingsService.Step step) throws InvalidPropertyException {
+    public SimulationContextType (String name, ProjectSettingsService.Step step) throws InvalidPropertyException {
 //  ------------------------------------------------------------------------
       super();
       this.name  = name;
@@ -66,14 +63,6 @@ public class SimulationContextType extends Persistent implements Serializable {
 //  Public member functions
 //  ==============================================================================================================================
 
-    public boolean approve () {
-//  -------------------------
-      if  (state != ProgressState.inCHECK) return false;      
-      this.state =  ProgressState.APPROVED;     // The type name is supposed being localized
-      Database.getSession().update(this);
-         return true;
-    }
-
     public boolean equals(Object entity) {
 //  ------------------------------------
       if (entity == null) return false;
@@ -91,11 +80,6 @@ public class SimulationContextType extends Persistent implements Serializable {
       }
     }
 
-    public ProjectSettingsService.Step getAttachedStep () {
-//  ----------------------------------------------
-      return ProjectSettingsServiceImpl.getStep(step);
-    }
-
     public String getName () {
 //  ------------------------
       return name;
@@ -111,4 +95,33 @@ public class SimulationContextType extends Persistent implements Serializable {
 //  ----------------------------
       return (state == ProgressState.APPROVED);
     }
+    /**
+        * Get the state.
+        * @return the state
+        */
+       public ProgressState getState() {
+               return state;
+       }
+       /**
+        * Set the state.
+        * @param state the state to set
+        */
+       public void setState(ProgressState state) {
+               this.state = state;
+       }
+       /**
+        * Get the step.
+        * @return the step
+        */
+       public int getStep() {
+               return step;
+       }
+       /**
+        * Set the step.
+        * @param step the step to set
+        */
+       public void setStep(int step) {
+               this.step = step;
+       }
+
 }
\ No newline at end of file