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.config.supplier;
17  
18  import java.util.Properties;
19  
20  import org.kuali.common.util.project.ProjectService;
21  import org.kuali.common.util.project.model.Project;
22  import org.springframework.util.Assert;
23  
24  /**
25   * @deprecated
26   */
27  @Deprecated
28  public class ProjectPropertiesSupplier implements PropertiesSupplier {
29  
30  	ProjectService service;
31  	String groupId;
32  	String artifactId;
33  
34  	@Override
35  	public Properties getProperties() {
36  
37  		Assert.hasText(groupId, "groupId has no text");
38  		Assert.hasText(artifactId, "artifactId has no text");
39  		Assert.notNull(service, "service is null");
40  
41  		Project project = service.getProject(groupId, artifactId);
42  		return project.getProperties();
43  	}
44  
45  	public String getGroupId() {
46  		return groupId;
47  	}
48  
49  	public void setGroupId(String groupId) {
50  		this.groupId = groupId;
51  	}
52  
53  	public String getArtifactId() {
54  		return artifactId;
55  	}
56  
57  	public void setArtifactId(String artifactId) {
58  		this.artifactId = artifactId;
59  	}
60  
61  	public ProjectService getService() {
62  		return service;
63  	}
64  
65  	public void setService(ProjectService service) {
66  		this.service = service;
67  	}
68  
69  }