Salome HOME
<jsp:param ... > parameters are removed from the title bar
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / DocumentType.java
index 6b83936e84ea8b541941c1ee1dfedf40fe43dc4d..2a55dd138411083ffd763cadd68c0bbc3b4ca472 100644 (file)
@@ -5,17 +5,14 @@ package org.splat.dal.bo.som;
  * @copyright OPEN CASCADE 2012
  */
 
-import java.util.List;
 import java.util.Set;
 import java.util.HashSet;
 
 import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
 import org.splat.kernel.MultiplyDefinedException;
 import org.splat.service.technical.ProjectSettingsService;
-import org.splat.service.technical.ProjectSettingsService.Step;
 
 
 public class DocumentType extends Persistent {
@@ -23,7 +20,7 @@ public class DocumentType extends Persistent {
 //  Persistent fields
     private String            name;
     private ProgressState     state;
-    private String            step;     // List of (dash separated) steps (numbers) containing this type
+       private String            step;     // List of (dash separated) steps (numbers) containing this type
     private String            result;   // Step (number ) having this type as result
     private Set<DocumentType> uses;
 
@@ -85,7 +82,7 @@ public class DocumentType extends Persistent {
 //  -------------------------
     }
 //  Initialization constructor
-    protected DocumentType (Properties dprop) throws MissedPropertyException, InvalidPropertyException, MultiplyDefinedException {
+    public DocumentType (Properties dprop) throws MissedPropertyException, InvalidPropertyException, MultiplyDefinedException {
 //  -----------------------------------------
       super(dprop);              // Throws one of the above exception if not valid
       name   = dprop.name;
@@ -100,14 +97,6 @@ public class DocumentType extends Persistent {
 //  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;
@@ -184,4 +173,19 @@ public class DocumentType extends Persistent {
       if (result == null) return false;
       return (Integer.valueOf(result) == step.getNumber());
     }
+    
+    /**
+        * 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;
+       }
 }
\ No newline at end of file