- // FLOWS INITIALIZATION SUPPORT
-
- public static void flowInitializationStarted(ExecutionFlow flow) {
- if (log.isTraceEnabled())
- log.trace("Start initialization of " + flow.hashCode() + " ("
- + flow + " - " + flow.getClass() + ")");
- initializingFlow.set(flow);
- }
-
- public static void flowInitializationFinished(ExecutionFlow flow) {
- if (log.isTraceEnabled())
- log.trace("Finish initialization of " + flow.hashCode() + " ("
- + flow + " - " + flow.getClass() + ")");
- ExecutionFlow registeredFlow = initializingFlow.get();
- if (registeredFlow != null) {
- if (!flow.getName().equals(registeredFlow.getName()))
- throw new SlcException("Current flow is " + flow);
- initializingFlow.set(null);
- }
- }
-
- public static Object getInitializingFlowParameter(String key) {
- if (initializingFlow.get() == null)
- throw new SlcException("No initializing flow available.");
- return initializingFlow.get().getParameter(key);
- }
-
- public static Boolean isInFlowInitialization() {
- return initializingFlow.get() != null;
- }
-