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.config.supplier; 017 018import java.util.Properties; 019 020import org.kuali.common.util.project.ProjectService; 021import org.kuali.common.util.project.model.Project; 022import org.springframework.util.Assert; 023 024/** 025 * @deprecated 026 */ 027@Deprecated 028public class ProjectPropertiesSupplier implements PropertiesSupplier { 029 030 ProjectService service; 031 String groupId; 032 String artifactId; 033 034 @Override 035 public Properties getProperties() { 036 037 Assert.hasText(groupId, "groupId has no text"); 038 Assert.hasText(artifactId, "artifactId has no text"); 039 Assert.notNull(service, "service is null"); 040 041 Project project = service.getProject(groupId, artifactId); 042 return project.getProperties(); 043 } 044 045 public String getGroupId() { 046 return groupId; 047 } 048 049 public void setGroupId(String groupId) { 050 this.groupId = groupId; 051 } 052 053 public String getArtifactId() { 054 return artifactId; 055 } 056 057 public void setArtifactId(String artifactId) { 058 this.artifactId = artifactId; 059 } 060 061 public ProjectService getService() { 062 return service; 063 } 064 065 public void setService(ProjectService service) { 066 this.service = service; 067 } 068 069}