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  import java.util.ArrayList;
24  import java.util.HashMap;
25  import java.util.List;
26  import java.util.Map;
27  import java.util.Properties;
28  
29  @XmlRootElement( name = "projectVersionMetadata" )
30  public class ProjectVersionMetadata
31      extends FacetedMetadata
32  {
33      /**
34       * id is the version
35       */
36      private String id;
37  
38      private String url;
39  
40      private String name;
41  
42      private String description;
43  
44      private Organization organization;
45  
46      private IssueManagement issueManagement;
47  
48      private Scm scm;
49  
50      private CiManagement ciManagement;
51  
52      private List<License> licenses = new ArrayList<>();
53  
54      private List<MailingList> mailingLists = new ArrayList<>();
55  
56      private List<Dependency> dependencies = new ArrayList<>();
57  
58      private Map<String, String> properties = new HashMap<String, String>();
59  
60      private boolean incomplete;
61  
62      public String getId()
63      {
64          return id;
65      }
66  
67      public String getVersion()
68      {
69          return id;
70      }
71  
72      public void setId( String id )
73      {
74          this.id = id;
75      }
76  
77      public void setUrl( String url )
78      {
79          this.url = url;
80      }
81  
82      public void setName( String name )
83      {
84          this.name = name;
85      }
86  
87      public void setDescription( String description )
88      {
89          this.description = description;
90      }
91  
92      public String getDescription()
93      {
94          return description;
95      }
96  
97      public String getUrl()
98      {
99          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 }