View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.8.1,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * This elements describes all that pertains to distribution for a
10   * project. It is
11   *         primarily used for deployment of artifacts and the site
12   * produced by the build.
13   * 
14   * @version $Revision$ $Date$
15   */
16  @SuppressWarnings( "all" )
17  public class DistributionManagement
18      implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * Information needed to deploy the artifacts generated by the
27       * project to a
28       *             remote repository.
29       */
30      private DeploymentRepository repository;
31  
32      /**
33       * 
34       *             
35       *             Where to deploy snapshots of artifacts to. If
36       * not given, it defaults to the
37       *             <code>repository</code> element.
38       *             
39       *           
40       */
41      private DeploymentRepository snapshotRepository;
42  
43      /**
44       * Information needed for deploying the web site of the project.
45       */
46      private Site site;
47  
48      /**
49       * 
50       *             
51       *             The URL of the project's download page. If not
52       * given users will be
53       *             referred to the homepage given by
54       * <code>url</code>.
55       *             This is given to assist in locating artifacts
56       * that are not in the repository due to
57       *             licensing restrictions.
58       *             
59       *           
60       */
61      private String downloadUrl;
62  
63      /**
64       * Relocation information of the artifact if it has been moved
65       * to a new group ID
66       *             and/or artifact ID.
67       */
68      private Relocation relocation;
69  
70      /**
71       * 
72       *             
73       *             Gives the status of this artifact in the remote
74       * repository.
75       *             This must not be set in your local project, as
76       * it is updated by
77       *             tools placing it in the reposiory. Valid values
78       * are: <code>none</code> (default),
79       *             <code>converted</code> (repository manager
80       * converted this from an Maven 1 POM),
81       *             <code>partner</code>
82       *             (directly synced from a partner Maven 2
83       * repository), <code>deployed</code> (was deployed from a
84       * Maven 2
85       *             instance), <code>verified</code> (has been hand
86       * verified as correct and final).
87       *             
88       *           
89       */
90      private String status;
91  
92      /**
93       * Field locations.
94       */
95      private java.util.Map<Object, InputLocation> locations;
96  
97  
98        //-----------/
99       //- Methods -/
100     //-----------/
101 
102     /**
103      * Method clone.
104      * 
105      * @return DistributionManagement
106      */
107     public DistributionManagement clone()
108     {
109         try
110         {
111             DistributionManagement copy = (DistributionManagement) super.clone();
112 
113             if ( this.repository != null )
114             {
115                 copy.repository = (DeploymentRepository) this.repository.clone();
116             }
117 
118             if ( this.snapshotRepository != null )
119             {
120                 copy.snapshotRepository = (DeploymentRepository) this.snapshotRepository.clone();
121             }
122 
123             if ( this.site != null )
124             {
125                 copy.site = (Site) this.site.clone();
126             }
127 
128             if ( this.relocation != null )
129             {
130                 copy.relocation = (Relocation) this.relocation.clone();
131             }
132 
133             if ( copy.locations != null )
134             {
135                 copy.locations = new java.util.LinkedHashMap( copy.locations );
136             }
137 
138             return copy;
139         }
140         catch ( java.lang.Exception ex )
141         {
142             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
143                 + " does not support clone()" ).initCause( ex );
144         }
145     } //-- DistributionManagement clone()
146 
147     /**
148      * Get the URL of the project's download page. If not given
149      * users will be
150      *             referred to the homepage given by
151      * <code>url</code>.
152      *             This is given to assist in locating artifacts
153      * that are not in the repository due to
154      *             licensing restrictions.
155      * 
156      * @return String
157      */
158     public String getDownloadUrl()
159     {
160         return this.downloadUrl;
161     } //-- String getDownloadUrl()
162 
163     /**
164      * 
165      * 
166      * @param key
167      * @return InputLocation
168      */
169     public InputLocation getLocation( Object key )
170     {
171         return ( locations != null ) ? locations.get( key ) : null;
172     } //-- InputLocation getLocation( Object )
173 
174     /**
175      * Get relocation information of the artifact if it has been
176      * moved to a new group ID
177      *             and/or artifact ID.
178      * 
179      * @return Relocation
180      */
181     public Relocation getRelocation()
182     {
183         return this.relocation;
184     } //-- Relocation getRelocation()
185 
186     /**
187      * Get information needed to deploy the artifacts generated by
188      * the project to a
189      *             remote repository.
190      * 
191      * @return DeploymentRepository
192      */
193     public DeploymentRepository getRepository()
194     {
195         return this.repository;
196     } //-- DeploymentRepository getRepository()
197 
198     /**
199      * Get information needed for deploying the web site of the
200      * project.
201      * 
202      * @return Site
203      */
204     public Site getSite()
205     {
206         return this.site;
207     } //-- Site getSite()
208 
209     /**
210      * Get where to deploy snapshots of artifacts to. If not given,
211      * it defaults to the
212      *             <code>repository</code> element.
213      * 
214      * @return DeploymentRepository
215      */
216     public DeploymentRepository getSnapshotRepository()
217     {
218         return this.snapshotRepository;
219     } //-- DeploymentRepository getSnapshotRepository()
220 
221     /**
222      * Get gives the status of this artifact in the remote
223      * repository.
224      *             This must not be set in your local project, as
225      * it is updated by
226      *             tools placing it in the reposiory. Valid values
227      * are: <code>none</code> (default),
228      *             <code>converted</code> (repository manager
229      * converted this from an Maven 1 POM),
230      *             <code>partner</code>
231      *             (directly synced from a partner Maven 2
232      * repository), <code>deployed</code> (was deployed from a
233      * Maven 2
234      *             instance), <code>verified</code> (has been hand
235      * verified as correct and final).
236      * 
237      * @return String
238      */
239     public String getStatus()
240     {
241         return this.status;
242     } //-- String getStatus()
243 
244     /**
245      * Set the URL of the project's download page. If not given
246      * users will be
247      *             referred to the homepage given by
248      * <code>url</code>.
249      *             This is given to assist in locating artifacts
250      * that are not in the repository due to
251      *             licensing restrictions.
252      * 
253      * @param downloadUrl
254      */
255     public void setDownloadUrl( String downloadUrl )
256     {
257         this.downloadUrl = downloadUrl;
258     } //-- void setDownloadUrl( String )
259 
260     /**
261      * 
262      * 
263      * @param key
264      * @param location
265      */
266     public void setLocation( Object key, InputLocation location )
267     {
268         if ( location != null )
269         {
270             if ( this.locations == null )
271             {
272                 this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
273             }
274             this.locations.put( key, location );
275         }
276     } //-- void setLocation( Object, InputLocation )
277 
278     /**
279      * Set relocation information of the artifact if it has been
280      * moved to a new group ID
281      *             and/or artifact ID.
282      * 
283      * @param relocation
284      */
285     public void setRelocation( Relocation relocation )
286     {
287         this.relocation = relocation;
288     } //-- void setRelocation( Relocation )
289 
290     /**
291      * Set information needed to deploy the artifacts generated by
292      * the project to a
293      *             remote repository.
294      * 
295      * @param repository
296      */
297     public void setRepository( DeploymentRepository repository )
298     {
299         this.repository = repository;
300     } //-- void setRepository( DeploymentRepository )
301 
302     /**
303      * Set information needed for deploying the web site of the
304      * project.
305      * 
306      * @param site
307      */
308     public void setSite( Site site )
309     {
310         this.site = site;
311     } //-- void setSite( Site )
312 
313     /**
314      * Set where to deploy snapshots of artifacts to. If not given,
315      * it defaults to the
316      *             <code>repository</code> element.
317      * 
318      * @param snapshotRepository
319      */
320     public void setSnapshotRepository( DeploymentRepository snapshotRepository )
321     {
322         this.snapshotRepository = snapshotRepository;
323     } //-- void setSnapshotRepository( DeploymentRepository )
324 
325     /**
326      * Set gives the status of this artifact in the remote
327      * repository.
328      *             This must not be set in your local project, as
329      * it is updated by
330      *             tools placing it in the reposiory. Valid values
331      * are: <code>none</code> (default),
332      *             <code>converted</code> (repository manager
333      * converted this from an Maven 1 POM),
334      *             <code>partner</code>
335      *             (directly synced from a partner Maven 2
336      * repository), <code>deployed</code> (was deployed from a
337      * Maven 2
338      *             instance), <code>verified</code> (has been hand
339      * verified as correct and final).
340      * 
341      * @param status
342      */
343     public void setStatus( String status )
344     {
345         this.status = status;
346     } //-- void setStatus( String )
347 
348 }