001package org.apache.archiva.configuration; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * Class AbstractRepositoryConfiguration. 024 * 025 * @version $Revision$ $Date$ 026 */ 027@SuppressWarnings( "all" ) 028public class AbstractRepositoryConfiguration 029 implements java.io.Serializable 030{ 031 032 //--------------------------/ 033 //- Class/Member Variables -/ 034 //--------------------------/ 035 036 /** 037 * 038 * The repository identifier. 039 * 040 */ 041 private String id; 042 043 /** 044 * 045 * The repository type. Currently only MAVEN type 046 * is known. 047 * 048 */ 049 private String type = "MAVEN"; 050 051 /** 052 * 053 * The descriptive name of the repository. 054 * 055 */ 056 private String name; 057 058 /** 059 * 060 * The layout of the repository. Valid values are 061 * "default" and "legacy". 062 * 063 */ 064 private String layout = "default"; 065 066 /** 067 * 068 * The directory for the indexes of this 069 * repository. 070 * 071 */ 072 private String indexDir = ""; 073 074 /** 075 * 076 * The directory for the packed indexes of this 077 * repository. 078 * 079 */ 080 private String packedIndexDir = ""; 081 082 /** 083 * 084 * The description of this repository. 085 * 086 */ 087 private String description = ""; 088 089 090 //-----------/ 091 //- Methods -/ 092 //-----------/ 093 094 /** 095 * Get the description of this repository. 096 * 097 * @return String 098 */ 099 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 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}