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;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlAttribute;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlRootElement;
26  
27  import org.kuali.common.util.CollectionUtils;
28  
29  /**
30   * @deprecated
31   */
32  @Deprecated
33  @XmlRootElement(name = "project")
34  @XmlAccessorType(XmlAccessType.PROPERTY)
35  public class ProjectConfigContainer {
36  
37  	String groupId;
38  	String artifactId;
39  	List<Location> locations = new ArrayList<Location>();
40  	List<ContextConfig> contexts = new ArrayList<ContextConfig>();
41  
42  	public ProjectConfigContainer() {
43  		super();
44  	}
45  
46  	public ProjectConfigContainer(String groupId, String artifactId) {
47  		super();
48  		this.groupId = groupId;
49  		this.artifactId = artifactId;
50  	}
51  
52  	public ProjectConfigContainer(ProjectConfigContainer config) {
53  		super();
54  		this.groupId = config.getGroupId();
55  		this.artifactId = config.getArtifactId();
56  		for (Location location : CollectionUtils.toEmptyList(config.getLocations())) {
57  			this.locations.add(new Location(location));
58  		}
59  		for (ContextConfig context : CollectionUtils.toEmptyList(config.getContexts())) {
60  			this.contexts.add(new ContextConfig(context));
61  		}
62  	}
63  
64  	@XmlAttribute
65  	public String getGroupId() {
66  		return groupId;
67  	}
68  
69  	@XmlAttribute
70  	public String getArtifactId() {
71  		return artifactId;
72  	}
73  
74  	@XmlElement(name = "location")
75  	public List<Location> getLocations() {
76  		return locations;
77  	}
78  
79  	@XmlElement(name = "context")
80  	public List<ContextConfig> getContexts() {
81  		return contexts;
82  	}
83  
84  	public void setGroupId(String groupId) {
85  		this.groupId = groupId;
86  	}
87  
88  	public void setArtifactId(String artifactId) {
89  		this.artifactId = artifactId;
90  	}
91  
92  	public void setLocations(List<Location> locations) {
93  		this.locations = locations;
94  	}
95  
96  	public void setContexts(List<ContextConfig> contexts) {
97  		this.contexts = contexts;
98  	}
99  
100 }