This project has retired. For details please refer to its Attic page.
ProjectVersionMetadata xref
View Javadoc
1   package org.apache.archiva.metadata.model;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import javax.xml.bind.annotation.XmlRootElement;
23  
24  import java.util.ArrayList;
25  import java.util.HashMap;
26  import java.util.List;
27  import java.util.Map;
28  import java.util.Properties;
29  
30  @XmlRootElement( name = "projectVersionMetadata" )
31  public class ProjectVersionMetadata
32      extends FacetedMetadata
33  {
34      /**
35       * id is the version
36       */
37      private String id;
38  
39      private String url;
40  
41      private String name;
42  
43      private String description;
44  
45      private Organization organization;
46  
47      private IssueManagement issueManagement;
48  
49      private Scm scm;
50  
51      private CiManagement ciManagement;
52  
53      private List<License> licenses = new ArrayList<>();
54  
55      private List<MailingList> mailingLists = new ArrayList<>();
56  
57      private List<Dependency> dependencies = new ArrayList<>();
58  
59      private Map<String, String> properties = new HashMap<String, String>();
60  
61      private boolean incomplete;
62  
63      public String getId()
64      {
65          return id;
66      }
67  
68      public String getVersion()
69      {
70          return id;
71      }
72  
73      public void setId( String id )
74      {
75          this.id = id;
76      }
77  
78      public void setUrl( String url )
79      {
80          this.url = url;
81      }
82  
83      public void setName( String name )
84      {
85          this.name = name;
86      }
87  
88      public void setDescription( String description )
89      {
90          this.description = description;
91      }
92  
93      public String getDescription()
94      {
95          return description;
96      }
97  
98      public String getUrl()
99      {
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 }