001    /**
002     * Copyright 2010-2013 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.common.util.spring;
017    
018    import java.util.List;
019    import java.util.Properties;
020    
021    import org.kuali.common.util.Assert;
022    import org.springframework.beans.factory.FactoryBean;
023    import org.springframework.core.env.PropertySource;
024    
025    /**
026     * @deprecated
027     */
028    @Deprecated
029    public class GetPropertySourceFactoryBean implements FactoryBean<PropertySource<?>> {
030    
031            org.kuali.common.util.ProjectContext project;
032            List<org.kuali.common.util.ProjectContext> others;
033            Properties properties;
034    
035            @Override
036            public PropertySource<?> getObject() {
037                    Assert.notNull(project, "project is null");
038                    return SpringUtils.getGlobalPropertySource(project, others, properties);
039            }
040    
041            @Override
042            public Class<PropertySource<?>> getObjectType() {
043                    return null;
044            }
045    
046            @Override
047            public boolean isSingleton() {
048                    return false;
049            }
050    
051            public org.kuali.common.util.ProjectContext getProject() {
052                    return project;
053            }
054    
055            public void setProject(org.kuali.common.util.ProjectContext project) {
056                    this.project = project;
057            }
058    
059            public List<org.kuali.common.util.ProjectContext> getOthers() {
060                    return others;
061            }
062    
063            public void setOthers(List<org.kuali.common.util.ProjectContext> others) {
064                    this.others = others;
065            }
066    
067            public Properties getProperties() {
068                    return properties;
069            }
070    
071            public void setProperties(Properties properties) {
072                    this.properties = properties;
073            }
074    
075    }