1 /*****************************************************************************
5 * Creation date 07.10.2012
8 *****************************************************************************/
10 package org.splat.service;
14 import org.splat.dal.bo.som.ProjectElement;
15 import org.splat.som.Step;
18 * Project element service interface.
23 public interface ProjectElementService {
26 * Get the first activity of the project element.
29 * a study or a scenario
30 * @return the first activity (step) of the project element
32 Step getFirstStep(ProjectElement elem);
35 * Get the last activity of the project element.
38 * a study or a scenario
39 * @return the last activity (step) of the project element
41 Step getLastStep(ProjectElement elem);
44 * Get activities of the project element.
47 * a study or a scenario
48 * @return array of activities (steps).
50 Step[] getSteps(ProjectElement elem);
53 * Get map of steps numbers to steps for the given project element.
57 * @return map of steps numbers to steps
59 public Map<Integer, Step> getStepsMap(final ProjectElement elem);
62 * Refreshes the internal data potentially out-of-date. This function needs to be called when Publication objects are added to this
63 * Project Element before being saved. The reason is, as saving a persistent object changes its hashcode, hashed data need to be rebuilt
64 * after saving for making functions based on this hashcode such as remove(), working.
67 * the project element to refresh
69 void refresh(ProjectElement elem);