001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.3,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.model;
007
008/**
009 * This elements describes all that pertains to distribution for a
010 * project. It is
011 *         primarily used for deployment of artifacts and the site
012 * produced by the build.
013 * 
014 * @version $Revision: 965443 $ $Date: 2015-09-14 22:18:52 +0000 (Mon, 14 Sep 2015) $
015 */
016@SuppressWarnings( "all" )
017public class DistributionManagement
018    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
019{
020
021      //--------------------------/
022     //- Class/Member Variables -/
023    //--------------------------/
024
025    /**
026     * Information needed to deploy the artifacts generated by the
027     * project to a
028     *             remote repository.
029     */
030    private DeploymentRepository repository;
031
032    /**
033     * 
034     *             
035     *             Where to deploy snapshots of artifacts to. If
036     * not given, it defaults to the
037     *             <code>repository</code> element.
038     *             
039     *           
040     */
041    private DeploymentRepository snapshotRepository;
042
043    /**
044     * Information needed for deploying the web site of the project.
045     */
046    private Site site;
047
048    /**
049     * 
050     *             
051     *             The URL of the project's download page. If not
052     * given users will be
053     *             referred to the homepage given by
054     * <code>url</code>.
055     *             This is given to assist in locating artifacts
056     * that are not in the repository due to
057     *             licensing restrictions.
058     *             
059     *           
060     */
061    private String downloadUrl;
062
063    /**
064     * Relocation information of the artifact if it has been moved
065     * to a new group ID
066     *             and/or artifact ID.
067     */
068    private Relocation relocation;
069
070    /**
071     * 
072     *             
073     *             Gives the status of this artifact in the remote
074     * repository.
075     *             This must not be set in your local project, as
076     * it is updated by
077     *             tools placing it in the reposiory. Valid values
078     * are: <code>none</code> (default),
079     *             <code>converted</code> (repository manager
080     * converted this from an Maven 1 POM),
081     *             <code>partner</code>
082     *             (directly synced from a partner Maven 2
083     * repository), <code>deployed</code> (was deployed from a
084     * Maven 2
085     *             instance), <code>verified</code> (has been hand
086     * verified as correct and final).
087     *             
088     *           
089     */
090    private String status;
091
092    /**
093     * Field locations.
094     */
095    private java.util.Map<Object, InputLocation> locations;
096
097
098      //-----------/
099     //- 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}