X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionModulesManager.java;h=616dc502c74886bbe73575d1cd9aa928882675e9;hb=aee87eeef820af87f18c2cf2e9b86b612393f7db;hp=c1b9e47a3255714bd527e6823f6ddded53985063;hpb=1fdb1b4e7b1d2b0cabb6483238301b857a6392fa;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java index c1b9e47a3..616dc502c 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/execution/ExecutionModulesManager.java @@ -17,13 +17,22 @@ package org.argeo.slc.execution; import java.util.List; +import java.util.Map; import org.argeo.slc.deploy.ModulesManager; import org.argeo.slc.process.RealizedFlow; -import org.argeo.slc.process.SlcExecution; /** Provides access to the execution modules */ public interface ExecutionModulesManager extends ModulesManager { + /** Used to filter event notified to an execution notifier. */ + public static String SLC_PROCESS_ID = "slc.process.id"; + + /** Unique launch module */ + public static String UNIQUE_LAUNCH_MODULE_PROPERTY = "slc.launch.module"; + + /** Unique launch flow */ + public static String UNIQUE_LAUNCH_FLOW_PROPERTY = "slc.launch.flow"; + /** @return a full fledged module descriptor. */ public ExecutionModuleDescriptor getExecutionModuleDescriptor( String moduleName, String version); @@ -34,9 +43,25 @@ public interface ExecutionModulesManager extends ModulesManager { */ public List listExecutionModules(); - /** Asynchronously prepare and executes an {@link SlcExecution} */ - public void process(SlcExecution slcExecution); - /** Synchronously finds and executes an {@link ExecutionFlow}. */ public void execute(RealizedFlow realizedFlow); + + /** Notify of a status update status of the {@link ExecutionProcess} */ + public void dispatchUpdateStatus(ExecutionProcess process, + String oldStatus, String newStatus); + + /** Notify that a step was added in an {@link ExecutionProcess} */ + public void dispatchAddSteps(ExecutionProcess process, + List steps); + + /** + * Register a notifier which will be notified based on the provided + * properties. + */ + public void registerProcessNotifier(ExecutionProcessNotifier notifier, + Map properties); + + /** Unregisters a notifier */ + public void unregisterProcessNotifier(ExecutionProcessNotifier notifier, + Map properties); }