]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/dal/bo/som/ValidationCycle.java
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 / dal / bo / som / ValidationCycle.java
index 072130a233394b6deef911728410c8e6b78422e3..5c67d1e10f03e2c8ecc8ddafdf15223e918257a6 100644 (file)
@@ -141,14 +141,29 @@ public class ValidationCycle extends Persistent {
     public ValidationCycle () {
     }
     public ValidationCycle (final Study from, final Properties vprop) throws MissedPropertyException, InvalidPropertyException, MultiplyDefinedException {
-      super(vprop);                  // Throws one of the above exception if not valid
-      mytype    = vprop.doctype;
-      publisher = vprop.publisher;   // May be null
-      reviewer  = vprop.reviewer;    // May be null
-      approver  = vprop.approver;    // May be null
-      signatory = vprop.signatory;   // May be null
-      context   = new ValidationCycleRelation(from, this);
-    }
+        super(vprop);                  // Throws one of the above exception if not valid
+        mytype    = vprop.doctype;
+        publisher = vprop.publisher;   // May be null
+        reviewer  = vprop.reviewer;    // May be null
+        approver  = vprop.approver;    // May be null
+        signatory = vprop.signatory;   // May be null
+        context   = new ValidationCycleRelation(from, this);
+      }
+
+    /**
+     * Create a copy of the given cycle for the given study.
+     * @param study the owner study
+     * @param src the original validation cycle
+     */
+    public ValidationCycle (final Study study, final ValidationCycle src) {
+        super();                  // Throws one of the above exception if not valid
+        mytype    = src.getDocumentType();
+        publisher = src.publisher;   // May be null
+        reviewer  = src.reviewer;    // May be null
+        approver  = src.approver;    // May be null
+        signatory = src.signatory;   // May be null
+        context   = new ValidationCycleRelation(study, this);
+      }
 
 //  ==============================================================================================================================
 //  Public member functions