]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman-Common/src/org/splat/service/SimulationContextService.java
Salome HOME
The checkin from SALOME operation is updated (ScenarioService.checkin()). Versioning...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / SimulationContextService.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   16.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.service;
11
12 import java.util.List;
13 import java.util.Vector;
14
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;
21
22 /**
23  * Simulation context service interface.
24  * 
25  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
26  * 
27  */
28 public interface SimulationContextService {
29
30         /**
31          * Get simulation contexts which are currently in the given state.
32          * 
33          * @param aState
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
38          */
39         Vector<SimulationContextFacade> getSimulationContextsInState(
40                         ProgressState aState) throws InvalidPropertyException;
41
42         /**
43          * Get simulation context by its id.
44          * 
45          * @param index
46          *            simulation context id.
47          * @return found context
48          */
49         SimulationContext selectSimulationContext(long index);
50
51         /**
52          * Find simulation context by its type and value.
53          * 
54          * @param celt
55          *            context type
56          * @param value
57          *            context value
58          * @return found context
59          */
60         SimulationContext selectSimulationContext(
61                         SimulationContextType celt, String value);
62
63         /**
64          * Find simulation contexts by example.
65          * 
66          * @param cprop
67          *            example properties
68          * @return list of contexts
69          */
70         List<SimulationContext> selectSimulationContextsWhere(
71                         SimulationContext.Properties cprop);
72
73         /**
74          * Get all simulation context types.
75          * 
76          * @return list of context types
77          */
78         List<SimulationContextType> selectAllTypes();
79
80         /**
81          * Get simulation context types related to given activities.
82          * 
83          * @param step
84          *            the activity
85          * @return list of found context types
86          */
87         List<SimulationContextType> selectTypesOf(
88                         ProjectSettingsService.Step... step);
89
90         /**
91          * Get simulation context types by example.
92          * 
93          * @param sprop
94          *            the example
95          * @return list of found context types
96          */
97         List<SimulationContextType> selectTypesWhere(
98                         SimulationContextType.Properties sprop);
99
100         /**
101          * Get a simulation context type by its name.
102          * 
103          * @param name
104          *            name of the context type
105          * @return found context type
106          */
107         SimulationContextType selectType(String name);
108
109         /**
110          * Get simulation context type by its id.
111          * 
112          * @param index
113          *            simulation context type id.
114          * @return found context type
115          */
116         SimulationContextType selectType(long index);
117
118         /**
119          * Hold the simulation context.
120          * 
121          * @param simCtx
122          *            the context to hold.
123          */
124         void hold(SimulationContext simCtx);
125
126         /**
127          * Release the simulation context.
128          * 
129          * @param simCtx
130          *            the context to release
131          */
132         void release(SimulationContext simCtx);
133
134         /**
135          * Get the simulation context list for displaying drop-down list values populating on the "Create new study" screen.
136          * 
137          * @return List of the simulation contexts.
138          */
139         List<SimulationContext> getSimulationContextList();
140
141         /**
142          * @param simCtxType
143          * @return
144          */
145         ProjectSettingsService.Step getAttachedStep(
146                         SimulationContextType simCtxType);
147 }