Salome HOME
Title of the chart is set from input file.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / ProjectElementService.java
index b9fd9d5e536cd043cd96ac8e3a2a4dbc692de571..81792bbc6c231a197e6e163897a7fb842681f71f 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Company         EURIWARE
+ * Company         OPEN CASCADE
  * Application     SIMAN
  * File            $Id$ 
  * Creation date   07.10.2012
@@ -13,12 +13,38 @@ import org.splat.dal.bo.som.ProjectElement;
 import org.splat.som.Step;
 
 /**
+ * Project element service interface.
+ * 
  * @author RKV
  * 
  */
 public interface ProjectElementService {
 
-       public Step getFirstStep(ProjectElement elem);
+       /**
+        * Get the first activity of the project element.
+        * 
+        * @param elem
+        *            a study or a scenario
+        * @return the first activity (step) of the project element
+        */
+       Step getFirstStep(ProjectElement elem);
+
+       /**
+        * Get activities of the project element.
+        * 
+        * @param elem
+        *            a study or a scenario
+        * @return array of activities (steps).
+        */
+       Step[] getSteps(ProjectElement elem);
 
-       public Step[] getSteps(ProjectElement elem);
+       /**
+        * Refreshes the internal data potentially out-of-date. This function needs to be called when Publication objects are added to this
+        * Project Element before being saved. The reason is, as saving a persistent object changes its hashcode, hashed data need to be rebuilt
+        * after saving for making functions based on this hashcode such as remove(), working.
+        * 
+        * @param elem
+        *            the project element to refresh
+        */
+       void refresh(ProjectElement elem);
 }