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