View Javadoc

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