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;
17  
18  import java.util.Arrays;
19  import java.util.Collections;
20  import java.util.List;
21  
22  /**
23   * @deprecated
24   */
25  @Deprecated
26  public class DefaultProjectContext implements ProjectContext {
27  
28  	public static final List<String> DEFAULT_PROPERTY_LOCATIONS = Collections.emptyList();
29  
30  	@Deprecated
31  	public static final String DEFAULT_GROUP_ID = org.kuali.common.util.ProjectUtils.KUALI_COMMON_GROUP_ID;
32  
33  	List<String> propertyLocations = DEFAULT_PROPERTY_LOCATIONS;
34  	@Deprecated
35  	String groupId = DEFAULT_GROUP_ID;
36  	String artifactId;
37  
38  	public DefaultProjectContext() {
39  		this(null);
40  	}
41  
42  	public DefaultProjectContext(String artifactId) {
43  		this(DEFAULT_GROUP_ID, artifactId, DEFAULT_PROPERTY_LOCATIONS);
44  	}
45  
46  	public DefaultProjectContext(String groupId, String artifactId) {
47  		this(groupId, artifactId, DEFAULT_PROPERTY_LOCATIONS);
48  	}
49  
50  	public DefaultProjectContext(String groupId, String artifactId, String propertyLocation) {
51  		this(groupId, artifactId, Arrays.asList(propertyLocation));
52  	}
53  
54  	public DefaultProjectContext(String artifactId, List<String> propertyLocations) {
55  		this(DEFAULT_GROUP_ID, artifactId, propertyLocations);
56  	}
57  
58  	public DefaultProjectContext(String groupId, String artifactId, List<String> propertyLocations) {
59  		super();
60  		this.groupId = groupId;
61  		this.artifactId = artifactId;
62  		this.propertyLocations = propertyLocations;
63  	}
64  
65  	@Override
66  	public String getGroupId() {
67  		return groupId;
68  	}
69  
70  	@Override
71  	public String getArtifactId() {
72  		return artifactId;
73  	}
74  
75  	@Override
76  	public List<String> getPropertyLocations() {
77  		return propertyLocations;
78  	}
79  
80  	public void setGroupId(String groupId) {
81  		this.groupId = groupId;
82  	}
83  
84  	public void setArtifactId(String artifactId) {
85  		this.artifactId = artifactId;
86  	}
87  
88  	public void setPropertyLocations(List<String> propertyLocations) {
89  		this.propertyLocations = propertyLocations;
90  	}
91  }