View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:15:43,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.settings;
9   
10  /**
11   * 
12   *         
13   *         Repository contains the information needed
14   *         for establishing connections with remote repoistory
15   *         
16   *       .
17   * 
18   * @version $Revision$ $Date$
19   */
20  @SuppressWarnings( "all" )
21  public class RepositoryBase
22      implements java.io.Serializable, java.lang.Cloneable
23  {
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * 
31       *             
32       *             A unique identifier for a repository.
33       *             
34       *           
35       */
36      private String id;
37  
38      /**
39       * 
40       *             
41       *             Human readable name of the repository.
42       *             
43       *           
44       */
45      private String name;
46  
47      /**
48       * 
49       *             
50       *             The url of the repository.
51       *             
52       *           
53       */
54      private String url;
55  
56      /**
57       * 
58       *             The type of layout this repository uses for
59       * locating and
60       *             storing artifacts - can be "legacy" or
61       * "default".
62       *           
63       */
64      private String layout = "default";
65  
66  
67        //-----------/
68       //- Methods -/
69      //-----------/
70  
71      /**
72       * Method clone.
73       * 
74       * @return RepositoryBase
75       */
76      public RepositoryBase clone()
77      {
78          try
79          {
80              RepositoryBase copy = (RepositoryBase) super.clone();
81  
82              return copy;
83          }
84          catch ( java.lang.Exception ex )
85          {
86              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
87                  + " does not support clone()" ).initCause( ex );
88          }
89      } //-- RepositoryBase clone()
90  
91      /**
92       * Get a unique identifier for a repository.
93       * 
94       * @return String
95       */
96      public String getId()
97      {
98          return this.id;
99      } //-- String getId()
100 
101     /**
102      * Get the type of layout this repository uses for locating and
103      *             storing artifacts - can be "legacy" or
104      * "default".
105      * 
106      * @return String
107      */
108     public String getLayout()
109     {
110         return this.layout;
111     } //-- String getLayout()
112 
113     /**
114      * Get human readable name of the repository.
115      * 
116      * @return String
117      */
118     public String getName()
119     {
120         return this.name;
121     } //-- String getName()
122 
123     /**
124      * Get the url of the repository.
125      * 
126      * @return String
127      */
128     public String getUrl()
129     {
130         return this.url;
131     } //-- String getUrl()
132 
133     /**
134      * Set a unique identifier for a repository.
135      * 
136      * @param id
137      */
138     public void setId( String id )
139     {
140         this.id = id;
141     } //-- void setId( String )
142 
143     /**
144      * Set the type of layout this repository uses for locating and
145      *             storing artifacts - can be "legacy" or
146      * "default".
147      * 
148      * @param layout
149      */
150     public void setLayout( String layout )
151     {
152         this.layout = layout;
153     } //-- void setLayout( String )
154 
155     /**
156      * Set human readable name of the repository.
157      * 
158      * @param name
159      */
160     public void setName( String name )
161     {
162         this.name = name;
163     } //-- void setName( String )
164 
165     /**
166      * Set the url of the repository.
167      * 
168      * @param url
169      */
170     public void setUrl( String url )
171     {
172         this.url = url;
173     } //-- void setUrl( String )
174 
175     
176             
177     /**
178      * @see java.lang.Object#equals(java.lang.Object)
179      */
180     public boolean equals( Object obj )
181     {
182         RepositoryBase other =  (RepositoryBase) obj;
183 
184         boolean retValue = false;
185 
186         if ( id != null )
187         {
188             retValue = id.equals( other.id );
189         }
190 
191         return retValue;
192     }
193             
194           
195 }