1 /*****************************************************************************
5 * Creation date 06.10.2012
8 *****************************************************************************/
10 package org.splat.service;
12 import org.splat.dal.bo.kernel.User;
13 import org.splat.dal.bo.som.KnowledgeElement;
14 import org.splat.dal.bo.som.Scenario;
15 import org.splat.kernel.InvalidPropertyException;
16 import org.splat.kernel.MissedPropertyException;
17 import org.splat.kernel.MultiplyDefinedException;
18 import org.splat.som.Step;
21 * Scenario service interface.
23 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
25 public interface ScenarioService {
28 * Add a new knowledge element to the scenario.
33 * knowledge element properties
34 * @return the created knowledge element
35 * @throws MissedPropertyException
36 * if a mandatory property is missed
37 * @throws InvalidPropertyException
38 * if some property doesn't exist
39 * @throws MultiplyDefinedException
40 * if some property is defined several times
42 public KnowledgeElement addKnowledgeElement(Scenario aScenario,
43 KnowledgeElement.Properties kprop) throws MissedPropertyException,
44 InvalidPropertyException, MultiplyDefinedException;
47 * Check in the scenario.
50 * the scenario to check in
52 public void checkin(Scenario aScenario);
55 * Check out the scenario.
58 * the scenario to check out
61 * @return true if check out operation succeeded
63 public boolean checkout(Scenario aScenario, User user);
66 * Copy contents from other scenario up to its given step into the given scenario.
71 * the last processed step of the source scenario
73 public void copyContentsUpTo(Scenario scenario, Step lastep);
76 * Check if the scenario is empty, i.d. no one of its steps doesn't contain any knowledge elements or documents.
79 * the scenario to check
80 * @return true if the scenario is empty
82 public boolean isEmpty(Scenario scenario);