This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.metadata.model;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import javax.xml.bind.annotation.XmlRootElement;
023import java.util.ArrayList;
024import java.util.HashMap;
025import java.util.List;
026import java.util.Map;
027import java.util.Properties;
028
029@XmlRootElement( name = "projectVersionMetadata" )
030public class ProjectVersionMetadata
031    extends FacetedMetadata
032{
033    /**
034     * id is the version
035     */
036    private String id;
037
038    private String url;
039
040    private String name;
041
042    private String description;
043
044    private Organization organization;
045
046    private IssueManagement issueManagement;
047
048    private Scm scm;
049
050    private CiManagement ciManagement;
051
052    private List<License> licenses = new ArrayList<>();
053
054    private List<MailingList> mailingLists = new ArrayList<>();
055
056    private List<Dependency> dependencies = new ArrayList<>();
057
058    private Map<String, String> properties = new HashMap<String, String>();
059
060    private boolean incomplete;
061
062    public String getId()
063    {
064        return id;
065    }
066
067    public String getVersion()
068    {
069        return id;
070    }
071
072    public void setId( String id )
073    {
074        this.id = id;
075    }
076
077    public void setUrl( String url )
078    {
079        this.url = url;
080    }
081
082    public void setName( String name )
083    {
084        this.name = name;
085    }
086
087    public void setDescription( String description )
088    {
089        this.description = description;
090    }
091
092    public String getDescription()
093    {
094        return description;
095    }
096
097    public String getUrl()
098    {
099        return url;
100    }
101
102    public String getName()
103    {
104        return name;
105    }
106
107    public Organization getOrganization()
108    {
109        return organization;
110    }
111
112    public void setOrganization( Organization organization )
113    {
114        this.organization = organization;
115    }
116
117    public IssueManagement getIssueManagement()
118    {
119        return issueManagement;
120    }
121
122    public void setIssueManagement( IssueManagement issueManagement )
123    {
124        this.issueManagement = issueManagement;
125    }
126
127    public Scm getScm()
128    {
129        return scm;
130    }
131
132    public void setScm( Scm scm )
133    {
134        this.scm = scm;
135    }
136
137    public CiManagement getCiManagement()
138    {
139        return ciManagement;
140    }
141
142    public void setCiManagement( CiManagement ciManagement )
143    {
144        this.ciManagement = ciManagement;
145    }
146
147    public List<License> getLicenses()
148    {
149        return licenses;
150    }
151
152    public void setLicenses( List<License> licenses )
153    {
154        this.licenses = licenses;
155    }
156
157    public void addLicense( License license )
158    {
159        this.licenses.add( license );
160    }
161
162    public void setMailingLists( List<MailingList> mailingLists )
163    {
164        this.mailingLists = mailingLists;
165    }
166
167    public List<MailingList> getMailingLists()
168    {
169        return mailingLists;
170    }
171
172    public void addMailingList( MailingList mailingList )
173    {
174        this.mailingLists.add( mailingList );
175    }
176
177    public void setDependencies( List<Dependency> dependencies )
178    {
179        this.dependencies = dependencies;
180    }
181
182    public List<Dependency> getDependencies()
183    {
184        return dependencies;
185    }
186
187    public void addDependency( Dependency dependency )
188    {
189        this.dependencies.add( dependency );
190    }
191
192    public Map<String, String> getProperties()
193    {
194        return properties;
195    }
196
197    public void setProperties( Map<String, String> properties )
198    {
199        this.properties = properties;
200    }
201
202    @SuppressWarnings( { "unchecked", "rawtypes" } )
203    public void setProperties( Properties properties )
204    {
205        setProperties( new HashMap<String, String>((Map) properties ) );
206    }
207
208    public boolean isIncomplete()
209    {
210        return incomplete;
211    }
212
213    public void setIncomplete( boolean incomplete )
214    {
215        this.incomplete = incomplete;
216    }
217
218    @Override
219    public String toString()
220    {
221        return "ProjectVersionMetadata{" +
222            "id='" + id + '\'' +
223            ", url='" + url + '\'' +
224            ", name='" + name + '\'' +
225            ", description='" + description + '\'' +
226            ", organization=" + organization +
227            ", issueManagement=" + issueManagement +
228            ", scm=" + scm +
229            ", ciManagement=" + ciManagement +
230            ", licenses=" + licenses +
231            ", mailingLists=" + mailingLists +
232            ", dependencies=" + dependencies +
233            ", incomplete=" + incomplete +
234            '}';
235    }
236}