X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fservice%2FSimulationContextService.java;h=866f29ffba3d26d09253585e20478875174cffe9;hb=c466a2e1212921b03787c765854f440fc5187483;hp=1cbf05c430dfbaa8a9a0948d39fbc47e6cd99372;hpb=a7653ca21334edc0d9bb5bfbf75c4a9959d1b52b;p=tools%2Fsiman.git diff --git a/Workspace/Siman-Common/src/org/splat/service/SimulationContextService.java b/Workspace/Siman-Common/src/org/splat/service/SimulationContextService.java index 1cbf05c..866f29f 100644 --- a/Workspace/Siman-Common/src/org/splat/service/SimulationContextService.java +++ b/Workspace/Siman-Common/src/org/splat/service/SimulationContextService.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Company EURIWARE + * Company OPEN CASCADE * Application SIMAN * File $Id$ * Creation date 16.10.2012 @@ -10,10 +10,13 @@ package org.splat.service; import java.util.List; +import java.util.Vector; +import org.splat.dal.bo.som.ProgressState; import org.splat.dal.bo.som.SimulationContext; import org.splat.dal.bo.som.SimulationContextType; import org.splat.kernel.InvalidPropertyException; +import org.splat.service.dto.SimulationContextFacade; import org.splat.service.technical.ProjectSettingsService; /** @@ -24,6 +27,18 @@ import org.splat.service.technical.ProjectSettingsService; */ public interface SimulationContextService { + /** + * Get simulation contexts which are currently in the given state. + * + * @param aState + * the progress state to filter contexts + * @return the list of found contexts as a vector of SimulationContextFacade + * @throws InvalidPropertyException + * if the given state is invalid + */ + Vector getSimulationContextsInState( + ProgressState aState) throws InvalidPropertyException; + /** * Get simulation context by its id. * @@ -31,7 +46,7 @@ public interface SimulationContextService { * simulation context id. * @return found context */ - public SimulationContext selectSimulationContext(long index); + SimulationContext selectSimulationContext(long index); /** * Find simulation context by its type and value. @@ -42,7 +57,7 @@ public interface SimulationContextService { * context value * @return found context */ - public SimulationContext selectSimulationContext( + SimulationContext selectSimulationContext( SimulationContextType celt, String value); /** @@ -52,29 +67,15 @@ public interface SimulationContextService { * example properties * @return list of contexts */ - public List selectSimulationContextsWhere( + List selectSimulationContextsWhere( SimulationContext.Properties cprop); - /** - * Create a simulation context type. - * - * @param name - * context type name - * @param step - * activity related to this context type - * @return the created context type - * @throws InvalidPropertyException - * if some property of the type to be created is invalid - */ - public SimulationContextType createType(String name, - ProjectSettingsService.Step step) throws InvalidPropertyException; - /** * Get all simulation context types. * * @return list of context types */ - public List selectAllTypes(); + List selectAllTypes(); /** * Get simulation context types related to given activities. @@ -83,23 +84,27 @@ public interface SimulationContextService { * the activity * @return list of found context types */ - public List selectTypesOf( + List selectTypesOf( ProjectSettingsService.Step... step); /** * Get simulation context types by example. - * @param sprop the example + * + * @param sprop + * the example * @return list of found context types */ - public List selectTypesWhere( + List selectTypesWhere( SimulationContextType.Properties sprop); /** * Get a simulation context type by its name. - * @param name name of the context type + * + * @param name + * name of the context type * @return found context type */ - public SimulationContextType selectType(String name); + SimulationContextType selectType(String name); /** * Get simulation context type by its id. @@ -108,7 +113,7 @@ public interface SimulationContextService { * simulation context type id. * @return found context type */ - public SimulationContextType selectType(long index); + SimulationContextType selectType(long index); /** * Hold the simulation context. @@ -116,7 +121,7 @@ public interface SimulationContextService { * @param simCtx * the context to hold. */ - public void hold(SimulationContext simCtx); + void hold(SimulationContext simCtx); /** * Release the simulation context. @@ -124,7 +129,7 @@ public interface SimulationContextService { * @param simCtx * the context to release */ - public void release(SimulationContext simCtx); + void release(SimulationContext simCtx); /** * Get the simulation context list for displaying drop-down list values populating on the "Create new study" screen. @@ -133,4 +138,10 @@ public interface SimulationContextService { */ List getSimulationContextList(); + /** + * @param simCtxType + * @return + */ + ProjectSettingsService.Step getAttachedStep( + SimulationContextType simCtxType); }