View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:05:12,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.model;
9   
10  /**
11   * A repository contains the information needed for establishing
12   * connections with
13   *         remote repository.
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       * How to handle downloading of releases from this repository.
29       */
30      private RepositoryPolicy releases;
31  
32      /**
33       * How to handle downloading of snapshots from this repository.
34       */
35      private RepositoryPolicy snapshots;
36  
37  
38        //-----------/
39       //- Methods -/
40      //-----------/
41  
42      /**
43       * Method clone.
44       * 
45       * @return Repository
46       */
47      public Repository clone()
48      {
49          try
50          {
51              Repository copy = (Repository) super.clone();
52  
53              if ( this.releases != null )
54              {
55                  copy.releases = (RepositoryPolicy) this.releases.clone();
56              }
57  
58              if ( this.snapshots != null )
59              {
60                  copy.snapshots = (RepositoryPolicy) this.snapshots.clone();
61              }
62  
63              return copy;
64          }
65          catch ( java.lang.Exception ex )
66          {
67              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
68                  + " does not support clone()" ).initCause( ex );
69          }
70      } //-- Repository clone()
71  
72      /**
73       * Get how to handle downloading of releases from this
74       * repository.
75       * 
76       * @return RepositoryPolicy
77       */
78      public RepositoryPolicy getReleases()
79      {
80          return this.releases;
81      } //-- RepositoryPolicy getReleases()
82  
83      /**
84       * Get how to handle downloading of snapshots from this
85       * repository.
86       * 
87       * @return RepositoryPolicy
88       */
89      public RepositoryPolicy getSnapshots()
90      {
91          return this.snapshots;
92      } //-- RepositoryPolicy getSnapshots()
93  
94      /**
95       * Set how to handle downloading of releases from this
96       * repository.
97       * 
98       * @param releases
99       */
100     public void setReleases( RepositoryPolicy releases )
101     {
102         this.releases = releases;
103     } //-- void setReleases( RepositoryPolicy )
104 
105     /**
106      * Set how to handle downloading of snapshots from this
107      * repository.
108      * 
109      * @param snapshots
110      */
111     public void setSnapshots( RepositoryPolicy snapshots )
112     {
113         this.snapshots = snapshots;
114     } //-- void setSnapshots( RepositoryPolicy )
115 
116 }