You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractRepositoryConfiguration.java 6.0KB

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