View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.settings;
25  
26  /**
27   * 
28   *         Repository contains the information needed for
29   * establishing
30   *         connections with remote repository
31   *       .
32   * 
33   * @version $Revision$ $Date$
34   */
35  @SuppressWarnings( "all" )
36  public class Repository
37      extends RepositoryBase
38      implements java.io.Serializable, java.lang.Cloneable
39  {
40  
41        //--------------------------/
42       //- Class/Member Variables -/
43      //--------------------------/
44  
45      /**
46       * 
47       *             How to handle downloading of releases from this
48       * repository
49       *           .
50       */
51      private RepositoryPolicy releases;
52  
53      /**
54       * 
55       *             How to handle downloading of snapshots from this
56       * repository
57       *           .
58       */
59      private RepositoryPolicy snapshots;
60  
61  
62        //-----------/
63       //- Methods -/
64      //-----------/
65  
66      /**
67       * Method clone.
68       * 
69       * @return Repository
70       */
71      public Repository clone()
72      {
73          try
74          {
75              Repository copy = (Repository) super.clone();
76  
77              if ( this.releases != null )
78              {
79                  copy.releases = (RepositoryPolicy) this.releases.clone();
80              }
81  
82              if ( this.snapshots != null )
83              {
84                  copy.snapshots = (RepositoryPolicy) this.snapshots.clone();
85              }
86  
87              return copy;
88          }
89          catch ( java.lang.Exception ex )
90          {
91              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
92                  + " does not support clone()" ).initCause( ex );
93          }
94      } //-- Repository clone()
95  
96      /**
97       * Get how to handle downloading of releases from this
98       * repository.
99       * 
100      * @return RepositoryPolicy
101      */
102     public RepositoryPolicy getReleases()
103     {
104         return this.releases;
105     } //-- RepositoryPolicy getReleases()
106 
107     /**
108      * Get how to handle downloading of snapshots from this
109      * repository.
110      * 
111      * @return RepositoryPolicy
112      */
113     public RepositoryPolicy getSnapshots()
114     {
115         return this.snapshots;
116     } //-- RepositoryPolicy getSnapshots()
117 
118     /**
119      * Set how to handle downloading of releases from this
120      * repository.
121      * 
122      * @param releases a releases object.
123      */
124     public void setReleases( RepositoryPolicy releases )
125     {
126         this.releases = releases;
127     } //-- void setReleases( RepositoryPolicy )
128 
129     /**
130      * Set how to handle downloading of snapshots from this
131      * repository.
132      * 
133      * @param snapshots a snapshots object.
134      */
135     public void setSnapshots( RepositoryPolicy snapshots )
136     {
137         this.snapshots = snapshots;
138     } //-- void setSnapshots( RepositoryPolicy )
139 
140     
141             
142     /**
143      * @see org.apache.maven.settings.RepositoryBase#equals(java.lang.Object)
144      */
145     public boolean equals( Object obj )
146     {
147         return super.equals( obj );
148     }
149             
150           
151 }