View Javadoc
1   /**
2    * Copyright 2010-2013 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;
17  
18  /**
19   * @deprecated
20   */
21  @Deprecated
22  public class DefaultProjectConfig implements ProjectConfig {
23  
24  	String groupId;
25  	String artifactId;
26  	String contextId;
27  
28  	public DefaultProjectConfig() {
29  		this(null, null);
30  	}
31  
32  	public DefaultProjectConfig(ProjectConfig request) {
33  		super();
34  		this.groupId = request.getGroupId();
35  		this.artifactId = request.getArtifactId();
36  		this.contextId = request.getContextId();
37  	}
38  
39  	public DefaultProjectConfig(String configId) {
40  		this(ConfigUtils.getProjectConfig(configId));
41  	}
42  
43  	public DefaultProjectConfig(String groupId, String artifactId) {
44  		this(groupId, artifactId, null);
45  	}
46  
47  	public DefaultProjectConfig(String groupId, String artifactId, String contextId) {
48  		super();
49  		this.groupId = groupId;
50  		this.artifactId = artifactId;
51  		this.contextId = contextId;
52  	}
53  
54  	/*
55  	 * (non-Javadoc)
56  	 * 
57  	 * @see org.kuali.common.util.config.ConfigRequest#getId()
58  	 */
59  	@Override
60  	public String getConfigId() {
61  		return ConfigUtils.getConfigId(this);
62  	}
63  
64  	/*
65  	 * (non-Javadoc)
66  	 * 
67  	 * @see org.kuali.common.util.config.ConfigRequest#getGroupId()
68  	 */
69  	@Override
70  	public String getGroupId() {
71  		return groupId;
72  	}
73  
74  	public void setGroupId(String groupId) {
75  		this.groupId = groupId;
76  	}
77  
78  	/*
79  	 * (non-Javadoc)
80  	 * 
81  	 * @see org.kuali.common.util.config.ConfigRequest#getArtifactId()
82  	 */
83  	@Override
84  	public String getArtifactId() {
85  		return artifactId;
86  	}
87  
88  	public void setArtifactId(String artifactId) {
89  		this.artifactId = artifactId;
90  	}
91  
92  	/*
93  	 * (non-Javadoc)
94  	 * 
95  	 * @see org.kuali.common.util.config.ConfigRequest#getContextId()
96  	 */
97  	@Override
98  	public String getContextId() {
99  		return contextId;
100 	}
101 
102 	public void setContextId(String contextId) {
103 		this.contextId = contextId;
104 	}
105 
106 	@Override
107 	public String toString() {
108 		return getConfigId();
109 	}
110 
111 }