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=3f927a345e9027d33be59b6d463ccee6863c47ee;hb=60677ee743e6d54ceda3187824cef28cf844ccc0;hp=66ddc9cf4c0da6327d95f858553e8d66e1f9f5eb;hpb=9c82ed02a7ee7b4a757853d8160587b27e493f1a;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 66ddc9cf4..3f927a345 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 @@ -1,12 +1,32 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + 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 { +public interface ExecutionModulesManager extends ModulesManager { + /** Used to filter event notified to an execution notifier. */ + public static String SLC_PROCESS_ID = "slc.process.id"; + /** @return a full fledged module descriptor. */ public ExecutionModuleDescriptor getExecutionModuleDescriptor( String moduleName, String version); @@ -17,9 +37,25 @@ public interface ExecutionModulesManager { */ 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); }