View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.0.1 on 2009-09-09 03:30:24,
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  public class RepositoryBase
18      implements java.io.Serializable
19  {
20  
21        //--------------------------/
22       //- Class/Member Variables -/
23      //--------------------------/
24  
25      /**
26       * 
27       *             
28       *             A unique identifier for a repository. This is
29       * used to match the repository
30       *             to configuration in the
31       * <code>settings.xml</code> file, for example. Furthermore,
32       * the identifier is
33       *             used during POM inheritance and profile
34       * injection to detect repositories that should be merged.
35       *             
36       *           
37       */
38      private String id;
39  
40      /**
41       * Human readable name of the repository.
42       */
43      private String name;
44  
45      /**
46       * 
47       *             
48       *             The url of the repository, in the form
49       * <code>protocol://hostname/path</code>.
50       *             
51       *           
52       */
53      private String url;
54  
55      /**
56       * 
57       *             
58       *             The type of layout this repository uses for
59       * locating and storing artifacts -
60       *             can be <code>legacy</code> or
61       * <code>default</code>.
62       *             
63       *           
64       */
65      private String layout = "default";
66  
67  
68        //-----------/
69       //- Methods -/
70      //-----------/
71  
72      /**
73       * Get a unique identifier for a repository. This is used to
74       * match the repository
75       *             to configuration in the
76       * <code>settings.xml</code> file, for example. Furthermore,
77       * the identifier is
78       *             used during POM inheritance and profile
79       * injection to detect repositories that should be merged.
80       * 
81       * @return String
82       */
83      public String getId()
84      {
85          return this.id;
86      } //-- String getId()
87  
88      /**
89       * Get the type of layout this repository uses for locating and
90       * storing artifacts -
91       *             can be <code>legacy</code> or
92       * <code>default</code>.
93       * 
94       * @return String
95       */
96      public String getLayout()
97      {
98          return this.layout;
99      } //-- String getLayout()
100 
101     /**
102      * Get human readable name of the repository.
103      * 
104      * @return String
105      */
106     public String getName()
107     {
108         return this.name;
109     } //-- String getName()
110 
111     /**
112      * Get the url of the repository, in the form
113      * <code>protocol://hostname/path</code>.
114      * 
115      * @return String
116      */
117     public String getUrl()
118     {
119         return this.url;
120     } //-- String getUrl()
121 
122     /**
123      * Set a unique identifier for a repository. This is used to
124      * match the repository
125      *             to configuration in the
126      * <code>settings.xml</code> file, for example. Furthermore,
127      * the identifier is
128      *             used during POM inheritance and profile
129      * injection to detect repositories that should be merged.
130      * 
131      * @param id
132      */
133     public void setId( String id )
134     {
135         this.id = id;
136     } //-- void setId( String )
137 
138     /**
139      * Set the type of layout this repository uses for locating and
140      * storing artifacts -
141      *             can be <code>legacy</code> or
142      * <code>default</code>.
143      * 
144      * @param layout
145      */
146     public void setLayout( String layout )
147     {
148         this.layout = layout;
149     } //-- void setLayout( String )
150 
151     /**
152      * Set human readable name of the repository.
153      * 
154      * @param name
155      */
156     public void setName( String name )
157     {
158         this.name = name;
159     } //-- void setName( String )
160 
161     /**
162      * Set the url of the repository, in the form
163      * <code>protocol://hostname/path</code>.
164      * 
165      * @param url
166      */
167     public void setUrl( String url )
168     {
169         this.url = url;
170     } //-- void setUrl( String )
171 
172 
173             
174     /**
175      * @see java.lang.Object#equals(java.lang.Object)
176      */
177     public boolean equals( Object obj )
178     {
179         if ( obj instanceof RepositoryBase ) {
180 
181             final RepositoryBase other =  (RepositoryBase) obj;
182 
183             if ( id != null )
184             {
185                 return id.equals( other.id );
186             }
187             return super.equals(obj);
188         }
189 
190         return false;
191     }
192             
193           
194 }