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    * A repository contains the information needed for establishing
10   * connections with
11   *         remote repository.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class Repository
17      extends RepositoryBase
18      implements java.io.Serializable, java.lang.Cloneable
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * How to handle downloading of releases from this repository.
27       */
28      private RepositoryPolicy releases;
29  
30      /**
31       * How to handle downloading of snapshots from this repository.
32       */
33      private RepositoryPolicy snapshots;
34  
35  
36        //-----------/
37       //- Methods -/
38      //-----------/
39  
40      /**
41       * Method clone.
42       * 
43       * @return Repository
44       */
45      public Repository clone()
46      {
47          try
48          {
49              Repository copy = (Repository) super.clone();
50  
51              if ( this.releases != null )
52              {
53                  copy.releases = (RepositoryPolicy) this.releases.clone();
54              }
55  
56              if ( this.snapshots != null )
57              {
58                  copy.snapshots = (RepositoryPolicy) this.snapshots.clone();
59              }
60  
61              return copy;
62          }
63          catch ( java.lang.Exception ex )
64          {
65              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
66                  + " does not support clone()" ).initCause( ex );
67          }
68      } //-- Repository clone()
69  
70      /**
71       * Get how to handle downloading of releases from this
72       * repository.
73       * 
74       * @return RepositoryPolicy
75       */
76      public RepositoryPolicy getReleases()
77      {
78          return this.releases;
79      } //-- RepositoryPolicy getReleases()
80  
81      /**
82       * Get how to handle downloading of snapshots from this
83       * repository.
84       * 
85       * @return RepositoryPolicy
86       */
87      public RepositoryPolicy getSnapshots()
88      {
89          return this.snapshots;
90      } //-- RepositoryPolicy getSnapshots()
91  
92      /**
93       * Set how to handle downloading of releases from this
94       * repository.
95       * 
96       * @param releases
97       */
98      public void setReleases( RepositoryPolicy releases )
99      {
100         this.releases = releases;
101     } //-- void setReleases( RepositoryPolicy )
102 
103     /**
104      * Set how to handle downloading of snapshots from this
105      * repository.
106      * 
107      * @param snapshots
108      */
109     public void setSnapshots( RepositoryPolicy snapshots )
110     {
111         this.snapshots = snapshots;
112     } //-- void setSnapshots( RepositoryPolicy )
113 
114 }