X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FInstantiationManager.java;h=60e93ec15c08b40d24882f7ffa431f7e8d56da8b;hb=9ec3a30ade2e331102f3e38667129dc68bece661;hp=c3692a55026dffab43ca0dc3dfc6eceff6191c10;hpb=b9336fb77b251c886f7bc09ffafeb9818a50eb94;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/InstantiationManager.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/InstantiationManager.java index c3692a550..60e93ec15 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/InstantiationManager.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/InstantiationManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2007-2012 Argeo GmbH + * + * 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.core.execution; import java.util.Stack; @@ -8,6 +23,7 @@ import org.argeo.slc.SlcException; import org.argeo.slc.execution.ExecutionFlow; import org.argeo.slc.execution.ExecutionSpecAttribute; +/** Manage parameters that need to be set during the instantiation of a flow */ public class InstantiationManager { private final static Log log = LogFactory @@ -30,7 +46,7 @@ public class InstantiationManager { if (flow instanceof DefaultExecutionFlow) { ((DefaultExecutionFlow) flow).setBeanName(flowName); } - + if (log.isTraceEnabled()) log.trace("Start initialization of " + flow.hashCode() + " (" + flow + " - " + flow.getClass() + ")"); @@ -47,8 +63,8 @@ public class InstantiationManager { if (log.isTraceEnabled()) log.trace("Finish initialization of " + flow.hashCode() + " (" + flow + " - " + flow.getClass() + ")"); - - if(flowStack.get() != null) { + + if (flowStack.get() != null) { ExecutionFlow registeredFlow = flowStack.get().pop(); if (registeredFlow != null) { if (!flow.getName().equals(registeredFlow.getName())) @@ -56,8 +72,7 @@ public class InstantiationManager { // log.info("# flowInitializationFinished " + flowName); // initializingFlow.set(null); } - } - else { + } else { // happens for flows imported as services log.warn("flowInitializationFinished - Flow Stack is null"); }