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