1 /*****************************************************************************
5 * Creation date 16.10.2012
8 *****************************************************************************/
10 package org.splat.service;
12 import java.util.List;
13 import java.util.Vector;
15 import org.splat.dal.bo.som.ProgressState;
16 import org.splat.dal.bo.som.SimulationContext;
17 import org.splat.dal.bo.som.SimulationContextType;
18 import org.splat.kernel.InvalidPropertyException;
19 import org.splat.service.dto.SimulationContextFacade;
20 import org.splat.service.technical.ProjectSettingsService;
23 * Simulation context service interface.
25 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
28 public interface SimulationContextService {
31 * Get simulation contexts which are currently in the given state.
34 * the progress state to filter contexts
35 * @return the list of found contexts as a vector of SimulationContextFacade
36 * @throws InvalidPropertyException
37 * if the given state is invalid
39 Vector<SimulationContextFacade> getSimulationContextsInState(
40 ProgressState aState) throws InvalidPropertyException;
43 * Get simulation context by its id.
46 * simulation context id.
47 * @return found context
49 SimulationContext selectSimulationContext(long index);
52 * Find simulation context by its type and value.
58 * @return found context
60 SimulationContext selectSimulationContext(
61 SimulationContextType celt, String value);
64 * Find simulation contexts by example.
68 * @return list of contexts
70 List<SimulationContext> selectSimulationContextsWhere(
71 SimulationContext.Properties cprop);
74 * Get all simulation context types.
76 * @return list of context types
78 List<SimulationContextType> selectAllTypes();
81 * Get simulation context types related to given activities.
85 * @return list of found context types
87 List<SimulationContextType> selectTypesOf(
88 ProjectSettingsService.Step... step);
91 * Get simulation context types by example.
95 * @return list of found context types
97 List<SimulationContextType> selectTypesWhere(
98 SimulationContextType.Properties sprop);
101 * Get a simulation context type by its name.
104 * name of the context type
105 * @return found context type
107 SimulationContextType selectType(String name);
110 * Get simulation context type by its id.
113 * simulation context type id.
114 * @return found context type
116 SimulationContextType selectType(long index);
119 * Hold the simulation context.
122 * the context to hold.
124 void hold(SimulationContext simCtx);
127 * Release the simulation context.
130 * the context to release
132 void release(SimulationContext simCtx);
135 * Get the simulation context list for displaying drop-down list values populating on the "Create new study" screen.
137 * @return List of the simulation contexts.
139 List<SimulationContext> getSimulationContextList();
145 ProjectSettingsService.Step getAttachedStep(
146 SimulationContextType simCtxType);