View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 2.1.2,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.settings;
7   
8   /**
9    * 
10   *         Repository contains the information needed for
11   * establishing
12   *         connections with remote repository
13   *       .
14   * 
15   * @version $Revision$ $Date$
16   */
17  @SuppressWarnings( "all" )
18  public class Repository
19      extends RepositoryBase
20      implements java.io.Serializable, java.lang.Cloneable
21  {
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * 
29       *             How to handle downloading of releases from this
30       * repository
31       *           .
32       */
33      private RepositoryPolicy releases;
34  
35      /**
36       * 
37       *             How to handle downloading of snapshots from this
38       * repository
39       *           .
40       */
41      private RepositoryPolicy snapshots;
42  
43  
44        //-----------/
45       //- Methods -/
46      //-----------/
47  
48      /**
49       * Method clone.
50       * 
51       * @return Repository
52       */
53      public Repository clone()
54      {
55          try
56          {
57              Repository copy = (Repository) super.clone();
58  
59              if ( this.releases != null )
60              {
61                  copy.releases = (RepositoryPolicy) this.releases.clone();
62              }
63  
64              if ( this.snapshots != null )
65              {
66                  copy.snapshots = (RepositoryPolicy) this.snapshots.clone();
67              }
68  
69              return copy;
70          }
71          catch ( java.lang.Exception ex )
72          {
73              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
74                  + " does not support clone()" ).initCause( ex );
75          }
76      } //-- Repository clone()
77  
78      /**
79       * Get how to handle downloading of releases from this
80       * repository.
81       * 
82       * @return RepositoryPolicy
83       */
84      public RepositoryPolicy getReleases()
85      {
86          return this.releases;
87      } //-- RepositoryPolicy getReleases()
88  
89      /**
90       * Get how to handle downloading of snapshots from this
91       * repository.
92       * 
93       * @return RepositoryPolicy
94       */
95      public RepositoryPolicy getSnapshots()
96      {
97          return this.snapshots;
98      } //-- RepositoryPolicy getSnapshots()
99  
100     /**
101      * Set how to handle downloading of releases from this
102      * repository.
103      * 
104      * @param releases a releases object.
105      */
106     public void setReleases( RepositoryPolicy releases )
107     {
108         this.releases = releases;
109     } //-- void setReleases( RepositoryPolicy )
110 
111     /**
112      * Set how to handle downloading of snapshots from this
113      * repository.
114      * 
115      * @param snapshots a snapshots object.
116      */
117     public void setSnapshots( RepositoryPolicy snapshots )
118     {
119         this.snapshots = snapshots;
120     } //-- void setSnapshots( RepositoryPolicy )
121 
122     
123             
124     /**
125      * @see org.apache.maven.settings.RepositoryBase#equals(java.lang.Object)
126      */
127     public boolean equals( Object obj )
128     {
129         return super.equals( obj );
130     }
131             
132           
133 }