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;
023
024import java.util.ArrayList;
025import java.util.HashMap;
026import java.util.List;
027import java.util.Map;
028import java.util.Properties;
029
030@XmlRootElement( name = "projectVersionMetadata" )
031public class ProjectVersionMetadata
032    extends FacetedMetadata
033{
034    /**
035     * id is the version
036     */
037    private String id;
038
039    private String url;
040
041    private String name;
042
043    private String description;
044
045    private Organization organization;
046
047    private IssueManagement issueManagement;
048
049    private Scm scm;
050
051    private CiManagement ciManagement;
052
053    private List<License> licenses = new ArrayList<>();
054
055    private List<MailingList> mailingLists = new ArrayList<>();
056
057    private List<Dependency> dependencies = new ArrayList<>();
058
059    private Map<String, String> properties = new HashMap<String, String>();
060
061    private boolean incomplete;
062
063    public String getId()
064    {
065        return id;
066    }
067
068    public String getVersion()
069    {
070        return id;
071    }
072
073    public void setId( String id )
074    {
075        this.id = id;
076    }
077
078    public void setUrl( String url )
079    {
080        this.url = url;
081    }
082
083    public void setName( String name )
084    {
085        this.name = name;
086    }
087
088    public void setDescription( String description )
089    {
090        this.description = description;
091    }
092
093    public String getDescription()
094    {
095        return description;
096    }
097
098    public String getUrl()
099    {
100        return url;
101    }
102
103    public String getName()
104    {
105        return name;
106    }
107
108    public Organization getOrganization()
109    {
110        return organization;
111    }
112
113    public void setOrganization( Organization organization )
114    {
115        this.organization = organization;
116    }
117
118    public IssueManagement getIssueManagement()
119    {
120        return issueManagement;
121    }
122
123    public void setIssueManagement( IssueManagement issueManagement )
124    {
125        this.issueManagement = issueManagement;
126    }
127
128    public Scm getScm()
129    {
130        return scm;
131    }
132
133    public void setScm( Scm scm )
134    {
135        this.scm = scm;
136    }
137
138    public CiManagement getCiManagement()
139    {
140        return ciManagement;
141    }
142
143    public void setCiManagement( CiManagement ciManagement )
144    {
145        this.ciManagement = ciManagement;
146    }
147
148    public List<License> getLicenses()
149    {
150        return licenses;
151    }
152
153    public void setLicenses( List<License> licenses )
154    {
155        this.licenses = licenses;
156    }
157
158    public void addLicense( License license )
159    {
160        this.licenses.add( license );
161    }
162
163    public void setMailingLists( List<MailingList> mailingLists )
164    {
165        this.mailingLists = mailingLists;
166    }
167
168    public List<MailingList> getMailingLists()
169    {
170        return mailingLists;
171    }
172
173    public void addMailingList( MailingList mailingList )
174    {
175        this.mailingLists.add( mailingList );
176    }
177
178    public void setDependencies( List<Dependency> dependencies )
179    {
180        this.dependencies = dependencies;
181    }
182
183    public List<Dependency> getDependencies()
184    {
185        return dependencies;
186    }
187
188    public void addDependency( Dependency dependency )
189    {
190        this.dependencies.add( dependency );
191    }
192
193    public Map<String, String> getProperties()
194    {
195        return properties;
196    }
197
198    public void setProperties( Map<String, String> properties )
199    {
200        this.properties = properties;
201    }
202
203    @SuppressWarnings( { "unchecked", "rawtypes" } )
204    public void setProperties( Properties properties )
205    {
206        setProperties( new HashMap<String, String>((Map) properties ) );
207    }
208
209    public boolean isIncomplete()
210    {
211        return incomplete;
212    }
213
214    public void setIncomplete( boolean incomplete )
215    {
216        this.incomplete = incomplete;
217    }
218
219    @Override
220    public String toString()
221    {
222        return "ProjectVersionMetadata{" +
223            "id='" + id + '\'' +
224            ", url='" + url + '\'' +
225            ", name='" + name + '\'' +
226            ", description='" + description + '\'' +
227            ", organization=" + organization +
228            ", issueManagement=" + issueManagement +
229            ", scm=" + scm +
230            ", ciManagement=" + ciManagement +
231            ", licenses=" + licenses +
232            ", mailingLists=" + mailingLists +
233            ", dependencies=" + dependencies +
234            ", incomplete=" + incomplete +
235            '}';
236    }
237}