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; 017 018import java.util.ArrayList; 019import java.util.List; 020 021import javax.xml.bind.annotation.XmlAccessType; 022import javax.xml.bind.annotation.XmlAccessorType; 023import javax.xml.bind.annotation.XmlAttribute; 024import javax.xml.bind.annotation.XmlElement; 025import javax.xml.bind.annotation.XmlRootElement; 026 027import org.kuali.common.util.CollectionUtils; 028 029/** 030 * @deprecated 031 */ 032@Deprecated 033@XmlRootElement(name = "project") 034@XmlAccessorType(XmlAccessType.PROPERTY) 035public class ProjectConfigContainer { 036 037 String groupId; 038 String artifactId; 039 List<Location> locations = new ArrayList<Location>(); 040 List<ContextConfig> contexts = new ArrayList<ContextConfig>(); 041 042 public ProjectConfigContainer() { 043 super(); 044 } 045 046 public ProjectConfigContainer(String groupId, String artifactId) { 047 super(); 048 this.groupId = groupId; 049 this.artifactId = artifactId; 050 } 051 052 public ProjectConfigContainer(ProjectConfigContainer config) { 053 super(); 054 this.groupId = config.getGroupId(); 055 this.artifactId = config.getArtifactId(); 056 for (Location location : CollectionUtils.toEmptyList(config.getLocations())) { 057 this.locations.add(new Location(location)); 058 } 059 for (ContextConfig context : CollectionUtils.toEmptyList(config.getContexts())) { 060 this.contexts.add(new ContextConfig(context)); 061 } 062 } 063 064 @XmlAttribute 065 public String getGroupId() { 066 return groupId; 067 } 068 069 @XmlAttribute 070 public String getArtifactId() { 071 return artifactId; 072 } 073 074 @XmlElement(name = "location") 075 public List<Location> getLocations() { 076 return locations; 077 } 078 079 @XmlElement(name = "context") 080 public List<ContextConfig> getContexts() { 081 return contexts; 082 } 083 084 public void setGroupId(String groupId) { 085 this.groupId = groupId; 086 } 087 088 public void setArtifactId(String artifactId) { 089 this.artifactId = artifactId; 090 } 091 092 public void setLocations(List<Location> locations) { 093 this.locations = locations; 094 } 095 096 public void setContexts(List<ContextConfig> contexts) { 097 this.contexts = contexts; 098 } 099 100}