View Javadoc

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