This project has retired. For details please refer to its Attic page.
AbstractRepositoryConfiguration xref
View Javadoc
1   package org.apache.archiva.configuration;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  /**
23   * Class AbstractRepositoryConfiguration.
24   * 
25   * @version $Revision$ $Date$
26   */
27  @SuppressWarnings( "all" )
28  public class AbstractRepositoryConfiguration
29      implements java.io.Serializable
30  {
31  
32        //--------------------------/
33       //- Class/Member Variables -/
34      //--------------------------/
35  
36      /**
37       * 
38       *             The repository identifier.
39       *           
40       */
41      private String id;
42  
43      /**
44       * 
45       *             The repository type. Currently only MAVEN type
46       * is known.
47       *           
48       */
49      private String type = "MAVEN";
50  
51      /**
52       * 
53       *             The descriptive name of the repository.
54       *           
55       */
56      private String name;
57  
58      /**
59       * 
60       *             The layout of the repository. Valid values are
61       * "default" and "legacy".
62       *           
63       */
64      private String layout = "default";
65  
66      /**
67       * 
68       *             The directory for the indexes of this
69       * repository.
70       *           
71       */
72      private String indexDir = "";
73  
74      /**
75       * 
76       *             The directory for the packed indexes of this
77       * repository.
78       *           
79       */
80      private String packedIndexDir = "";
81  
82      /**
83       * 
84       *             The description of this repository.
85       *           
86       */
87      private String description = "";
88  
89  
90        //-----------/
91       //- Methods -/
92      //-----------/
93  
94      /**
95       * Get the description of this repository.
96       * 
97       * @return String
98       */
99      public String getDescription()
100     {
101         return this.description;
102     } //-- String getDescription()
103 
104     /**
105      * Get the repository identifier.
106      * 
107      * @return String
108      */
109     public String getId()
110     {
111         return this.id;
112     } //-- String getId()
113 
114     /**
115      * Get the directory for the indexes of this repository.
116      * 
117      * @return String
118      */
119     public String getIndexDir()
120     {
121         return this.indexDir;
122     } //-- String getIndexDir()
123 
124     /**
125      * Get the layout of the repository. Valid values are "default"
126      * and "legacy".
127      * 
128      * @return String
129      */
130     public String getLayout()
131     {
132         return this.layout;
133     } //-- String getLayout()
134 
135     /**
136      * Get the descriptive name of the repository.
137      * 
138      * @return String
139      */
140     public String getName()
141     {
142         return this.name;
143     } //-- String getName()
144 
145     /**
146      * Get the directory for the packed indexes of this repository.
147      * 
148      * @return String
149      */
150     public String getPackedIndexDir()
151     {
152         return this.packedIndexDir;
153     } //-- String getPackedIndexDir()
154 
155     /**
156      * Get the repository type. Currently only MAVEN type is known.
157      * 
158      * @return String
159      */
160     public String getType()
161     {
162         return this.type;
163     } //-- String getType()
164 
165     /**
166      * Set the description of this repository.
167      * 
168      * @param description
169      */
170     public void setDescription( String description )
171     {
172         this.description = description;
173     } //-- void setDescription( String )
174 
175     /**
176      * Set the repository identifier.
177      * 
178      * @param id
179      */
180     public void setId( String id )
181     {
182         this.id = id;
183     } //-- void setId( String )
184 
185     /**
186      * Set the directory for the indexes of this repository.
187      * 
188      * @param indexDir
189      */
190     public void setIndexDir( String indexDir )
191     {
192         this.indexDir = indexDir;
193     } //-- void setIndexDir( String )
194 
195     /**
196      * Set the layout of the repository. Valid values are "default"
197      * and "legacy".
198      * 
199      * @param layout
200      */
201     public void setLayout( String layout )
202     {
203         this.layout = layout;
204     } //-- void setLayout( String )
205 
206     /**
207      * Set the descriptive name of the repository.
208      * 
209      * @param name
210      */
211     public void setName( String name )
212     {
213         this.name = name;
214     } //-- void setName( String )
215 
216     /**
217      * Set the directory for the packed indexes of this repository.
218      * 
219      * @param packedIndexDir
220      */
221     public void setPackedIndexDir( String packedIndexDir )
222     {
223         this.packedIndexDir = packedIndexDir;
224     } //-- void setPackedIndexDir( String )
225 
226     /**
227      * Set the repository type. Currently only MAVEN type is known.
228      * 
229      * @param type
230      */
231     public void setType( String type )
232     {
233         this.type = type;
234     } //-- void setType( String )
235 
236     
237             public int hashCode()
238             {
239                 int result = 17;
240                 result = 37 * result + ( id != null ? id.hashCode() : 0 );
241                 return result;
242             }
243 
244             public boolean equals( Object other )
245             {
246                 if ( this == other )
247                 {
248                     return true;
249                 }
250 
251                 if ( !( other instanceof AbstractRepositoryConfiguration ) )
252                 {
253                     return false;
254                 }
255 
256                 AbstractRepositoryConfigurationarchiva/configuration/AbstractRepositoryConfiguration.html#AbstractRepositoryConfiguration">AbstractRepositoryConfiguration that = (AbstractRepositoryConfiguration) other;
257                 boolean result = true;
258                 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
259                 return result;
260             }
261        
262 }