View Javadoc
1   /**
2    * Copyright 2010-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
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.
15   */
16  package org.kuali.common.util.spring;
17  
18  import java.util.List;
19  import java.util.Properties;
20  
21  import org.kuali.common.util.Assert;
22  import org.springframework.beans.factory.FactoryBean;
23  import org.springframework.core.env.PropertySource;
24  
25  /**
26   * @deprecated
27   */
28  @Deprecated
29  public class GetPropertySourceFactoryBean implements FactoryBean<PropertySource<?>> {
30  
31  	org.kuali.common.util.ProjectContext project;
32  	List<org.kuali.common.util.ProjectContext> others;
33  	Properties properties;
34  
35  	@Override
36  	public PropertySource<?> getObject() {
37  		Assert.notNull(project, "project is null");
38  		return SpringUtils.getGlobalPropertySource(project, others, properties);
39  	}
40  
41  	@Override
42  	public Class<PropertySource<?>> getObjectType() {
43  		return null;
44  	}
45  
46  	@Override
47  	public boolean isSingleton() {
48  		return false;
49  	}
50  
51  	public org.kuali.common.util.ProjectContext getProject() {
52  		return project;
53  	}
54  
55  	public void setProject(org.kuali.common.util.ProjectContext project) {
56  		this.project = project;
57  	}
58  
59  	public List<org.kuali.common.util.ProjectContext> getOthers() {
60  		return others;
61  	}
62  
63  	public void setOthers(List<org.kuali.common.util.ProjectContext> others) {
64  		this.others = others;
65  	}
66  
67  	public Properties getProperties() {
68  		return properties;
69  	}
70  
71  	public void setProperties(Properties properties) {
72  		this.properties = properties;
73  	}
74  
75  }