Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / ProjectElementService.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   07.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.service;
11
12 import org.splat.dal.bo.som.ProjectElement;
13 import org.splat.som.Step;
14 import org.springframework.transaction.annotation.Transactional;
15
16 /**
17  * Project element service interface.
18  * 
19  * @author RKV
20  * 
21  */
22 public interface ProjectElementService {
23
24         /**
25          * Get the first activity of the project element.
26          * 
27          * @param elem
28          *            a study or a scenario
29          * @return the first activity (step) of the project element
30          */
31         public Step getFirstStep(ProjectElement elem);
32
33         /**
34          * Get activities of the project element.
35          * 
36          * @param elem
37          *            a study or a scenario
38          * @return array of activities (steps).
39          */
40         public Step[] getSteps(ProjectElement elem);
41
42         /**
43          * Refreshes the internal data potentially out-of-date. This function needs to be called when Publication objects are added to this
44          * Project Element before being saved. The reason is, as saving a persistent object changes its hashcode, hashed data need to be rebuilt
45          * after saving for making functions based on this hashcode such as remove(), working.
46          * 
47          * @param elem
48          *            the project element to refresh
49          */
50         public void refresh(ProjectElement elem);
51 }