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
018/**
019 * @deprecated
020 */
021@Deprecated
022public class DefaultProjectConfig implements ProjectConfig {
023
024        String groupId;
025        String artifactId;
026        String contextId;
027
028        public DefaultProjectConfig() {
029                this(null, null);
030        }
031
032        public DefaultProjectConfig(ProjectConfig request) {
033                super();
034                this.groupId = request.getGroupId();
035                this.artifactId = request.getArtifactId();
036                this.contextId = request.getContextId();
037        }
038
039        public DefaultProjectConfig(String configId) {
040                this(ConfigUtils.getProjectConfig(configId));
041        }
042
043        public DefaultProjectConfig(String groupId, String artifactId) {
044                this(groupId, artifactId, null);
045        }
046
047        public DefaultProjectConfig(String groupId, String artifactId, String contextId) {
048                super();
049                this.groupId = groupId;
050                this.artifactId = artifactId;
051                this.contextId = contextId;
052        }
053
054        /*
055         * (non-Javadoc)
056         * 
057         * @see org.kuali.common.util.config.ConfigRequest#getId()
058         */
059        @Override
060        public String getConfigId() {
061                return ConfigUtils.getConfigId(this);
062        }
063
064        /*
065         * (non-Javadoc)
066         * 
067         * @see org.kuali.common.util.config.ConfigRequest#getGroupId()
068         */
069        @Override
070        public String getGroupId() {
071                return groupId;
072        }
073
074        public void setGroupId(String groupId) {
075                this.groupId = groupId;
076        }
077
078        /*
079         * (non-Javadoc)
080         * 
081         * @see org.kuali.common.util.config.ConfigRequest#getArtifactId()
082         */
083        @Override
084        public String getArtifactId() {
085                return artifactId;
086        }
087
088        public void setArtifactId(String artifactId) {
089                this.artifactId = artifactId;
090        }
091
092        /*
093         * (non-Javadoc)
094         * 
095         * @see org.kuali.common.util.config.ConfigRequest#getContextId()
096         */
097        @Override
098        public String getContextId() {
099                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}