001/** 002 * Copyright 2010-2014 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 */ 016package org.kuali.common.util.spring; 017 018import org.kuali.common.util.Assert; 019import org.springframework.beans.factory.FactoryBean; 020 021/** 022 * @deprecated 023 */ 024@Deprecated 025public class ProjectFactoryBean<T> implements FactoryBean<org.kuali.common.util.Project> { 026 027 String gav; 028 boolean singleton = true; 029 030 @Override 031 public org.kuali.common.util.Project getObject() { 032 Assert.hasText(gav); 033 return org.kuali.common.util.ProjectUtils.loadProject(gav); 034 } 035 036 @Override 037 public Class<org.kuali.common.util.Project> getObjectType() { 038 return org.kuali.common.util.Project.class; 039 } 040 041 @Override 042 public boolean isSingleton() { 043 return singleton; 044 } 045 046 public String getGav() { 047 return gav; 048 } 049 050 public void setGav(String gav) { 051 this.gav = gav; 052 } 053 054 public void setSingleton(boolean singleton) { 055 this.singleton = singleton; 056 } 057 058}