001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.7, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.archiva.configuration; 007 008/** 009 * Class RemoteRepositoryConfiguration. 010 * 011 * @version $Revision$ $Date$ 012 */ 013@SuppressWarnings( "all" ) 014public class RemoteRepositoryConfiguration 015 extends AbstractRepositoryConfiguration 016 implements java.io.Serializable 017{ 018 019 //--------------------------/ 020 //- Class/Member Variables -/ 021 //--------------------------/ 022 023 /** 024 * 025 * The URL for this repository. 026 * 027 */ 028 private String url; 029 030 /** 031 * 032 * The Username for this repository. 033 * 034 */ 035 private String username; 036 037 /** 038 * 039 * The Password for this repository. 040 * 041 */ 042 private String password; 043 044 /** 045 * 046 * Timeout in seconds for connections to this 047 * repository 048 * . 049 */ 050 private int timeout = 60; 051 052 /** 053 * 054 * When to run the refresh task. 055 * Default is every sunday at 8H00. 056 * 057 */ 058 private String refreshCronExpression = "0 0 08 ? * SUN"; 059 060 /** 061 * 062 * Activate download of remote index if 063 * remoteIndexUrl is set too. 064 * 065 */ 066 private boolean downloadRemoteIndex = false; 067 068 /** 069 * 070 * Remote Index Url : if not starting with http 071 * will be relative to the remote repository url. 072 * 073 */ 074 private String remoteIndexUrl; 075 076 /** 077 * 078 * Id of the networkProxy to use when downloading 079 * remote index. 080 * 081 */ 082 private String remoteDownloadNetworkProxyId; 083 084 /** 085 * 086 * Timeout in seconds for download remote index. 087 * Default is more long than artifact download. 088 * 089 */ 090 private int remoteDownloadTimeout = 300; 091 092 /** 093 * 094 * Schedule download of remote index when archiva 095 * start 096 * . 097 */ 098 private boolean downloadRemoteIndexOnStartup = false; 099 100 /** 101 * Field extraParameters. 102 */ 103 private java.util.Map extraParameters; 104 105 /** 106 * Field extraHeaders. 107 */ 108 private java.util.Map extraHeaders; 109 110 /** 111 * The path to check the repository availability (relative to 112 * the repository URL). Some repositories do not allow 113 * browsing, so a certain artifact must be checked. 114 */ 115 private String checkPath; 116 117 118 //-----------/ 119 //- Methods -/ 120 //-----------/ 121 122 /** 123 * Method addExtraHeader. 124 * 125 * @param key 126 * @param value 127 */ 128 public void addExtraHeader( Object key, String value ) 129 { 130 getExtraHeaders().put( key, value ); 131 } //-- void addExtraHeader( Object, String ) 132 133 /** 134 * Method addExtraParameter. 135 * 136 * @param key 137 * @param value 138 */ 139 public void addExtraParameter( Object key, String value ) 140 { 141 getExtraParameters().put( key, value ); 142 } //-- void addExtraParameter( Object, String ) 143 144 /** 145 * Get the path to check the repository availability (relative 146 * to the repository URL). Some repositories do not allow 147 * browsing, so a certain artifact must be checked. 148 * 149 * @return String 150 */ 151 public String getCheckPath() 152 { 153 return this.checkPath; 154 } //-- String getCheckPath() 155 156 /** 157 * Method getExtraHeaders. 158 * 159 * @return Map 160 */ 161 public java.util.Map getExtraHeaders() 162 { 163 if ( this.extraHeaders == null ) 164 { 165 this.extraHeaders = new java.util.HashMap(); 166 } 167 168 return this.extraHeaders; 169 } //-- java.util.Map getExtraHeaders() 170 171 /** 172 * Method getExtraParameters. 173 * 174 * @return Map 175 */ 176 public java.util.Map getExtraParameters() 177 { 178 if ( this.extraParameters == null ) 179 { 180 this.extraParameters = new java.util.HashMap(); 181 } 182 183 return this.extraParameters; 184 } //-- java.util.Map getExtraParameters() 185 186 /** 187 * Get the Password for this repository. 188 * 189 * @return String 190 */ 191 public String getPassword() 192 { 193 return this.password; 194 } //-- String getPassword() 195 196 /** 197 * Get when to run the refresh task. 198 * Default is every sunday at 8H00. 199 * 200 * @return String 201 */ 202 public String getRefreshCronExpression() 203 { 204 return this.refreshCronExpression; 205 } //-- String getRefreshCronExpression() 206 207 /** 208 * Get id of the networkProxy to use when downloading remote 209 * index. 210 * 211 * @return String 212 */ 213 public String getRemoteDownloadNetworkProxyId() 214 { 215 return this.remoteDownloadNetworkProxyId; 216 } //-- String getRemoteDownloadNetworkProxyId() 217 218 /** 219 * Get timeout in seconds for download remote index. Default is 220 * more long than artifact download. 221 * 222 * @return int 223 */ 224 public int getRemoteDownloadTimeout() 225 { 226 return this.remoteDownloadTimeout; 227 } //-- int getRemoteDownloadTimeout() 228 229 /** 230 * Get remote Index Url : if not starting with http will be 231 * relative to the remote repository url. 232 * 233 * @return String 234 */ 235 public String getRemoteIndexUrl() 236 { 237 return this.remoteIndexUrl; 238 } //-- String getRemoteIndexUrl() 239 240 /** 241 * Get timeout in seconds for connections to this repository. 242 * 243 * @return int 244 */ 245 public int getTimeout() 246 { 247 return this.timeout; 248 } //-- int getTimeout() 249 250 /** 251 * Get the URL for this repository. 252 * 253 * @return String 254 */ 255 public String getUrl() 256 { 257 return this.url; 258 } //-- String getUrl() 259 260 /** 261 * Get the Username for this repository. 262 * 263 * @return String 264 */ 265 public String getUsername() 266 { 267 return this.username; 268 } //-- String getUsername() 269 270 /** 271 * Get activate download of remote index if remoteIndexUrl is 272 * set too. 273 * 274 * @return boolean 275 */ 276 public boolean isDownloadRemoteIndex() 277 { 278 return this.downloadRemoteIndex; 279 } //-- boolean isDownloadRemoteIndex() 280 281 /** 282 * Get schedule download of remote index when archiva start. 283 * 284 * @return boolean 285 */ 286 public boolean isDownloadRemoteIndexOnStartup() 287 { 288 return this.downloadRemoteIndexOnStartup; 289 } //-- boolean isDownloadRemoteIndexOnStartup() 290 291 /** 292 * Set the path to check the repository availability (relative 293 * to the repository URL). Some repositories do not allow 294 * browsing, so a certain artifact must be checked. 295 * 296 * @param checkPath 297 */ 298 public void setCheckPath( String checkPath ) 299 { 300 this.checkPath = checkPath; 301 } //-- void setCheckPath( String ) 302 303 /** 304 * Set activate download of remote index if remoteIndexUrl is 305 * set too. 306 * 307 * @param downloadRemoteIndex 308 */ 309 public void setDownloadRemoteIndex( boolean downloadRemoteIndex ) 310 { 311 this.downloadRemoteIndex = downloadRemoteIndex; 312 } //-- void setDownloadRemoteIndex( boolean ) 313 314 /** 315 * Set schedule download of remote index when archiva start. 316 * 317 * @param downloadRemoteIndexOnStartup 318 */ 319 public void setDownloadRemoteIndexOnStartup( boolean downloadRemoteIndexOnStartup ) 320 { 321 this.downloadRemoteIndexOnStartup = downloadRemoteIndexOnStartup; 322 } //-- void setDownloadRemoteIndexOnStartup( boolean ) 323 324 /** 325 * Set additional http headers to add to url when requesting 326 * remote repositories. 327 * 328 * @param extraHeaders 329 */ 330 public void setExtraHeaders( java.util.Map extraHeaders ) 331 { 332 this.extraHeaders = extraHeaders; 333 } //-- void setExtraHeaders( java.util.Map ) 334 335 /** 336 * Set additionnal request parameters to add to url when 337 * requesting remote repositories. 338 * 339 * @param extraParameters 340 */ 341 public void setExtraParameters( java.util.Map extraParameters ) 342 { 343 this.extraParameters = extraParameters; 344 } //-- void setExtraParameters( java.util.Map ) 345 346 /** 347 * Set the Password for this repository. 348 * 349 * @param password 350 */ 351 public void setPassword( String password ) 352 { 353 this.password = password; 354 } //-- void setPassword( String ) 355 356 /** 357 * Set when to run the refresh task. 358 * Default is every sunday at 8H00. 359 * 360 * @param refreshCronExpression 361 */ 362 public void setRefreshCronExpression( String refreshCronExpression ) 363 { 364 this.refreshCronExpression = refreshCronExpression; 365 } //-- void setRefreshCronExpression( String ) 366 367 /** 368 * Set id of the networkProxy to use when downloading remote 369 * index. 370 * 371 * @param remoteDownloadNetworkProxyId 372 */ 373 public void setRemoteDownloadNetworkProxyId( String remoteDownloadNetworkProxyId ) 374 { 375 this.remoteDownloadNetworkProxyId = remoteDownloadNetworkProxyId; 376 } //-- void setRemoteDownloadNetworkProxyId( String ) 377 378 /** 379 * Set timeout in seconds for download remote index. Default is 380 * more long than artifact download. 381 * 382 * @param remoteDownloadTimeout 383 */ 384 public void setRemoteDownloadTimeout( int remoteDownloadTimeout ) 385 { 386 this.remoteDownloadTimeout = remoteDownloadTimeout; 387 } //-- void setRemoteDownloadTimeout( int ) 388 389 /** 390 * Set remote Index Url : if not starting with http will be 391 * relative to the remote repository url. 392 * 393 * @param remoteIndexUrl 394 */ 395 public void setRemoteIndexUrl( String remoteIndexUrl ) 396 { 397 this.remoteIndexUrl = remoteIndexUrl; 398 } //-- void setRemoteIndexUrl( String ) 399 400 /** 401 * Set timeout in seconds for connections to this repository. 402 * 403 * @param timeout 404 */ 405 public void setTimeout( int timeout ) 406 { 407 this.timeout = timeout; 408 } //-- void setTimeout( int ) 409 410 /** 411 * Set the URL for this repository. 412 * 413 * @param url 414 */ 415 public void setUrl( String url ) 416 { 417 this.url = url; 418 } //-- void setUrl( String ) 419 420 /** 421 * Set the Username for this repository. 422 * 423 * @param username 424 */ 425 public void setUsername( String username ) 426 { 427 this.username = username; 428 } //-- void setUsername( String ) 429 430 431 public String toString() 432 { 433 return "RemoteRepositoryConfiguration id:'" + getId() + "',name:'" + getName() +"'"; 434 } 435 436 437 438}