2 * Copyright (C) 2007-2012 Argeo GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org
.argeo
.slc
.core
.execution
;
18 import org
.apache
.commons
.logging
.Log
;
19 import org
.apache
.commons
.logging
.LogFactory
;
20 import org
.springframework
.beans
.factory
.FactoryBean
;
22 public class ParameterRef
implements FactoryBean
<Object
> {
23 private final static Log log
= LogFactory
.getLog(ParameterRef
.class);
25 private InstantiationManager instantiationManager
;
29 private Object object
;
31 public ParameterRef() {
34 public ParameterRef(String name
) {
38 public Object
getObject() throws Exception
{
39 if (log
.isTraceEnabled())
40 log
.debug("Parameter ref called for " + name
);
43 object
= instantiationManager
.getInitializingFlowParameter(name
);
47 public Class
<?
> getObjectType() {
49 return instantiationManager
.getInitializingFlowParameterClass(name
);
51 return object
.getClass();
54 public boolean isSingleton() {
58 public void setInstantiationManager(
59 InstantiationManager instantiationManager
) {
60 this.instantiationManager
= instantiationManager
;
63 public void setName(String name
) {