1 /*****************************************************************************
5 * Creation date 16.10.2012
8 *****************************************************************************/
10 package org.splat.service;
12 import java.util.List;
14 import org.splat.dal.bo.som.SimulationContext;
15 import org.splat.dal.bo.som.SimulationContextType;
16 import org.splat.kernel.InvalidPropertyException;
17 import org.splat.service.technical.ProjectSettingsService;
20 * Simulation context service interface.
22 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
25 public interface SimulationContextService {
28 * Get simulation context by its id.
31 * simulation context id.
32 * @return found context
34 public SimulationContext selectSimulationContext(long index);
37 * Find simulation context by its type and value.
43 * @return found context
45 public SimulationContext selectSimulationContext(
46 SimulationContextType celt, String value);
49 * Find simulation contexts by example.
53 * @return list of contexts
55 public List<SimulationContext> selectSimulationContextsWhere(
56 SimulationContext.Properties cprop);
59 * Create a simulation context type.
64 * activity related to this context type
65 * @return the created context type
66 * @throws InvalidPropertyException
67 * if some property of the type to be created is invalid
69 public SimulationContextType createType(String name,
70 ProjectSettingsService.Step step) throws InvalidPropertyException;
73 * Get all simulation context types.
75 * @return list of context types
77 public List<SimulationContextType> selectAllTypes();
80 * Get simulation context types related to given activities.
84 * @return list of found context types
86 public List<SimulationContextType> selectTypesOf(
87 ProjectSettingsService.Step... step);
90 * Get simulation context types by example.
91 * @param sprop the example
92 * @return list of found context types
94 public List<SimulationContextType> selectTypesWhere(
95 SimulationContextType.Properties sprop);
98 * Get a simulation context type by its name.
99 * @param name name of the context type
100 * @return found context type
102 public SimulationContextType selectType(String name);
105 * Get simulation context type by its id.
108 * simulation context type id.
109 * @return found context type
111 public SimulationContextType selectType(long index);
114 * Hold the simulation context.
117 * the context to hold.
119 public void hold(SimulationContext simCtx);
122 * Release the simulation context.
125 * the context to release
127 public void release(SimulationContext simCtx);
130 * Get the simulation context list for displaying drop-down list values populating on the "Create new study" screen.
132 * @return List of the simulation contexts.
134 List<SimulationContext> getSimulationContextList();