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 Configuration. 010 * 011 * @version $Revision$ $Date$ 012 */ 013@SuppressWarnings( "all" ) 014public class Configuration 015 implements java.io.Serializable 016{ 017 018 //--------------------------/ 019 //- Class/Member Variables -/ 020 //--------------------------/ 021 022 /** 023 * This is the version of the configuration format. 024 */ 025 private String version; 026 027 /** 028 * Field repositories. 029 */ 030 private java.util.List<V1RepositoryConfiguration> repositories; 031 032 /** 033 * Field repositoryGroups. 034 */ 035 private java.util.List<RepositoryGroupConfiguration> repositoryGroups; 036 037 /** 038 * Field managedRepositories. 039 */ 040 private java.util.List<ManagedRepositoryConfiguration> managedRepositories; 041 042 /** 043 * Field remoteRepositories. 044 */ 045 private java.util.List<RemoteRepositoryConfiguration> remoteRepositories; 046 047 /** 048 * Field proxyConnectors. 049 */ 050 private java.util.List<ProxyConnectorConfiguration> proxyConnectors; 051 052 /** 053 * Field networkProxies. 054 */ 055 private java.util.List<NetworkProxyConfiguration> networkProxies; 056 057 /** 058 * Field legacyArtifactPaths. 059 */ 060 private java.util.List<LegacyArtifactPath> legacyArtifactPaths; 061 062 /** 063 * 064 * The repository scanning configuration. 065 * 066 */ 067 private RepositoryScanningConfiguration repositoryScanning; 068 069 /** 070 * 071 * The webapp configuration. 072 * 073 */ 074 private WebappConfiguration webapp; 075 076 /** 077 * 078 * The organisation info. 079 * 080 */ 081 private OrganisationInformation organisationInfo; 082 083 /** 084 * 085 * The NetworkConfiguration . 086 * 087 */ 088 private NetworkConfiguration networkConfiguration; 089 090 /** 091 * The RedbackRuntimeConfiguration. 092 */ 093 private RedbackRuntimeConfiguration redbackRuntimeConfiguration; 094 095 /** 096 * The ArchivaRuntimeConfiguration. 097 */ 098 private ArchivaRuntimeConfiguration archivaRuntimeConfiguration; 099 100 /** 101 * Field proxyConnectorRuleConfigurations. 102 */ 103 private java.util.List<ProxyConnectorRuleConfiguration> proxyConnectorRuleConfigurations; 104 105 /** 106 * Archiva default settings. 107 */ 108 private ArchivaDefaultConfiguration archivaDefaultConfiguration; 109 110 /** 111 * Field modelEncoding. 112 */ 113 private String modelEncoding = "UTF-8"; 114 115 116 //-----------/ 117 //- Methods -/ 118 //-----------/ 119 120 /** 121 * Method addLegacyArtifactPath. 122 * 123 * @param legacyArtifactPath 124 */ 125 public void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath ) 126 { 127 getLegacyArtifactPaths().add( legacyArtifactPath ); 128 } //-- void addLegacyArtifactPath( LegacyArtifactPath ) 129 130 /** 131 * Method addManagedRepository. 132 * 133 * @param managedRepositoryConfiguration 134 */ 135 public void addManagedRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration ) 136 { 137 getManagedRepositories().add( managedRepositoryConfiguration ); 138 } //-- void addManagedRepository( ManagedRepositoryConfiguration ) 139 140 /** 141 * Method addNetworkProxy. 142 * 143 * @param networkProxyConfiguration 144 */ 145 public void addNetworkProxy( NetworkProxyConfiguration networkProxyConfiguration ) 146 { 147 getNetworkProxies().add( networkProxyConfiguration ); 148 } //-- void addNetworkProxy( NetworkProxyConfiguration ) 149 150 /** 151 * Method addProxyConnector. 152 * 153 * @param proxyConnectorConfiguration 154 */ 155 public void addProxyConnector( ProxyConnectorConfiguration proxyConnectorConfiguration ) 156 { 157 getProxyConnectors().add( proxyConnectorConfiguration ); 158 } //-- void addProxyConnector( ProxyConnectorConfiguration ) 159 160 /** 161 * Method addProxyConnectorRuleConfiguration. 162 * 163 * @param proxyConnectorRuleConfiguration 164 */ 165 public void addProxyConnectorRuleConfiguration( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration ) 166 { 167 getProxyConnectorRuleConfigurations().add( proxyConnectorRuleConfiguration ); 168 } //-- void addProxyConnectorRuleConfiguration( ProxyConnectorRuleConfiguration ) 169 170 /** 171 * Method addRemoteRepository. 172 * 173 * @param remoteRepositoryConfiguration 174 */ 175 public void addRemoteRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration ) 176 { 177 getRemoteRepositories().add( remoteRepositoryConfiguration ); 178 } //-- void addRemoteRepository( RemoteRepositoryConfiguration ) 179 180 /** 181 * Method addRepositoryGroup. 182 * 183 * @param repositoryGroupConfiguration 184 */ 185 public void addRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration ) 186 { 187 getRepositoryGroups().add( repositoryGroupConfiguration ); 188 } //-- void addRepositoryGroup( RepositoryGroupConfiguration ) 189 190 /** 191 * Get archiva default settings. 192 * 193 * @return ArchivaDefaultConfiguration 194 */ 195 public ArchivaDefaultConfiguration getArchivaDefaultConfiguration() 196 { 197 return this.archivaDefaultConfiguration; 198 } //-- ArchivaDefaultConfiguration getArchivaDefaultConfiguration() 199 200 /** 201 * Get the ArchivaRuntimeConfiguration. 202 * 203 * @return ArchivaRuntimeConfiguration 204 */ 205 public ArchivaRuntimeConfiguration getArchivaRuntimeConfiguration() 206 { 207 return this.archivaRuntimeConfiguration; 208 } //-- ArchivaRuntimeConfiguration getArchivaRuntimeConfiguration() 209 210 /** 211 * Method getLegacyArtifactPaths. 212 * 213 * @return List 214 */ 215 public java.util.List<LegacyArtifactPath> getLegacyArtifactPaths() 216 { 217 if ( this.legacyArtifactPaths == null ) 218 { 219 this.legacyArtifactPaths = new java.util.ArrayList<LegacyArtifactPath>(); 220 } 221 222 return this.legacyArtifactPaths; 223 } //-- java.util.List<LegacyArtifactPath> getLegacyArtifactPaths() 224 225 /** 226 * Method getManagedRepositories. 227 * 228 * @return List 229 */ 230 public java.util.List<ManagedRepositoryConfiguration> getManagedRepositories() 231 { 232 if ( this.managedRepositories == null ) 233 { 234 this.managedRepositories = new java.util.ArrayList<ManagedRepositoryConfiguration>(); 235 } 236 237 return this.managedRepositories; 238 } //-- java.util.List<ManagedRepositoryConfiguration> getManagedRepositories() 239 240 /** 241 * Get the modelEncoding field. 242 * 243 * @return String 244 */ 245 public String getModelEncoding() 246 { 247 return this.modelEncoding; 248 } //-- String getModelEncoding() 249 250 /** 251 * Get the NetworkConfiguration . 252 * 253 * @return NetworkConfiguration 254 */ 255 public NetworkConfiguration getNetworkConfiguration() 256 { 257 return this.networkConfiguration; 258 } //-- NetworkConfiguration getNetworkConfiguration() 259 260 /** 261 * Method getNetworkProxies. 262 * 263 * @return List 264 */ 265 public java.util.List<NetworkProxyConfiguration> getNetworkProxies() 266 { 267 if ( this.networkProxies == null ) 268 { 269 this.networkProxies = new java.util.ArrayList<NetworkProxyConfiguration>(); 270 } 271 272 return this.networkProxies; 273 } //-- java.util.List<NetworkProxyConfiguration> getNetworkProxies() 274 275 /** 276 * Get the organisation info. 277 * 278 * @return OrganisationInformation 279 */ 280 public OrganisationInformation getOrganisationInfo() 281 { 282 return this.organisationInfo; 283 } //-- OrganisationInformation getOrganisationInfo() 284 285 /** 286 * Method getProxyConnectorRuleConfigurations. 287 * 288 * @return List 289 */ 290 public java.util.List<ProxyConnectorRuleConfiguration> getProxyConnectorRuleConfigurations() 291 { 292 if ( this.proxyConnectorRuleConfigurations == null ) 293 { 294 this.proxyConnectorRuleConfigurations = new java.util.ArrayList<ProxyConnectorRuleConfiguration>(); 295 } 296 297 return this.proxyConnectorRuleConfigurations; 298 } //-- java.util.List<ProxyConnectorRuleConfiguration> getProxyConnectorRuleConfigurations() 299 300 /** 301 * Method getProxyConnectors. 302 * 303 * @return List 304 */ 305 public java.util.List<ProxyConnectorConfiguration> getProxyConnectors() 306 { 307 if ( this.proxyConnectors == null ) 308 { 309 this.proxyConnectors = new java.util.ArrayList<ProxyConnectorConfiguration>(); 310 } 311 312 return this.proxyConnectors; 313 } //-- java.util.List<ProxyConnectorConfiguration> getProxyConnectors() 314 315 /** 316 * Get the RedbackRuntimeConfiguration. 317 * 318 * @return RedbackRuntimeConfiguration 319 */ 320 public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration() 321 { 322 return this.redbackRuntimeConfiguration; 323 } //-- RedbackRuntimeConfiguration getRedbackRuntimeConfiguration() 324 325 /** 326 * Method getRemoteRepositories. 327 * 328 * @return List 329 */ 330 public java.util.List<RemoteRepositoryConfiguration> getRemoteRepositories() 331 { 332 if ( this.remoteRepositories == null ) 333 { 334 this.remoteRepositories = new java.util.ArrayList<RemoteRepositoryConfiguration>(); 335 } 336 337 return this.remoteRepositories; 338 } //-- java.util.List<RemoteRepositoryConfiguration> getRemoteRepositories() 339 340 /** 341 * Method getRepositories. 342 * 343 * @return List 344 */ 345 public java.util.List<V1RepositoryConfiguration> getRepositories() 346 { 347 if ( this.repositories == null ) 348 { 349 this.repositories = new java.util.ArrayList<V1RepositoryConfiguration>(); 350 } 351 352 return this.repositories; 353 } //-- java.util.List<V1RepositoryConfiguration> getRepositories() 354 355 /** 356 * Method getRepositoryGroups. 357 * 358 * @return List 359 */ 360 public java.util.List<RepositoryGroupConfiguration> getRepositoryGroups() 361 { 362 if ( this.repositoryGroups == null ) 363 { 364 this.repositoryGroups = new java.util.ArrayList<RepositoryGroupConfiguration>(); 365 } 366 367 return this.repositoryGroups; 368 } //-- java.util.List<RepositoryGroupConfiguration> getRepositoryGroups() 369 370 /** 371 * Get the repository scanning configuration. 372 * 373 * @return RepositoryScanningConfiguration 374 */ 375 public RepositoryScanningConfiguration getRepositoryScanning() 376 { 377 return this.repositoryScanning; 378 } //-- RepositoryScanningConfiguration getRepositoryScanning() 379 380 /** 381 * Get this is the version of the configuration format. 382 * 383 * @return String 384 */ 385 public String getVersion() 386 { 387 return this.version; 388 } //-- String getVersion() 389 390 /** 391 * Get the webapp configuration. 392 * 393 * @return WebappConfiguration 394 */ 395 public WebappConfiguration getWebapp() 396 { 397 return this.webapp; 398 } //-- WebappConfiguration getWebapp() 399 400 /** 401 * Method removeLegacyArtifactPath. 402 * 403 * @param legacyArtifactPath 404 */ 405 public void removeLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath ) 406 { 407 getLegacyArtifactPaths().remove( legacyArtifactPath ); 408 } //-- void removeLegacyArtifactPath( LegacyArtifactPath ) 409 410 /** 411 * Method removeManagedRepository. 412 * 413 * @param managedRepositoryConfiguration 414 */ 415 public void removeManagedRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration ) 416 { 417 getManagedRepositories().remove( managedRepositoryConfiguration ); 418 } //-- void removeManagedRepository( ManagedRepositoryConfiguration ) 419 420 /** 421 * Method removeNetworkProxy. 422 * 423 * @param networkProxyConfiguration 424 */ 425 public void removeNetworkProxy( NetworkProxyConfiguration networkProxyConfiguration ) 426 { 427 getNetworkProxies().remove( networkProxyConfiguration ); 428 } //-- void removeNetworkProxy( NetworkProxyConfiguration ) 429 430 /** 431 * Method removeProxyConnector. 432 * 433 * @param proxyConnectorConfiguration 434 */ 435 public void removeProxyConnector( ProxyConnectorConfiguration proxyConnectorConfiguration ) 436 { 437 getProxyConnectors().remove( proxyConnectorConfiguration ); 438 } //-- void removeProxyConnector( ProxyConnectorConfiguration ) 439 440 /** 441 * Method removeProxyConnectorRuleConfiguration. 442 * 443 * @param proxyConnectorRuleConfiguration 444 */ 445 public void removeProxyConnectorRuleConfiguration( ProxyConnectorRuleConfiguration proxyConnectorRuleConfiguration ) 446 { 447 getProxyConnectorRuleConfigurations().remove( proxyConnectorRuleConfiguration ); 448 } //-- void removeProxyConnectorRuleConfiguration( ProxyConnectorRuleConfiguration ) 449 450 /** 451 * Method removeRemoteRepository. 452 * 453 * @param remoteRepositoryConfiguration 454 */ 455 public void removeRemoteRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration ) 456 { 457 getRemoteRepositories().remove( remoteRepositoryConfiguration ); 458 } //-- void removeRemoteRepository( RemoteRepositoryConfiguration ) 459 460 /** 461 * Method removeRepositoryGroup. 462 * 463 * @param repositoryGroupConfiguration 464 */ 465 public void removeRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration ) 466 { 467 getRepositoryGroups().remove( repositoryGroupConfiguration ); 468 } //-- void removeRepositoryGroup( RepositoryGroupConfiguration ) 469 470 /** 471 * Set archiva default settings. 472 * 473 * @param archivaDefaultConfiguration 474 */ 475 public void setArchivaDefaultConfiguration( ArchivaDefaultConfiguration archivaDefaultConfiguration ) 476 { 477 this.archivaDefaultConfiguration = archivaDefaultConfiguration; 478 } //-- void setArchivaDefaultConfiguration( ArchivaDefaultConfiguration ) 479 480 /** 481 * Set the ArchivaRuntimeConfiguration. 482 * 483 * @param archivaRuntimeConfiguration 484 */ 485 public void setArchivaRuntimeConfiguration( ArchivaRuntimeConfiguration archivaRuntimeConfiguration ) 486 { 487 this.archivaRuntimeConfiguration = archivaRuntimeConfiguration; 488 } //-- void setArchivaRuntimeConfiguration( ArchivaRuntimeConfiguration ) 489 490 /** 491 * Set the list of custom legacy path to artifact. 492 * 493 * @param legacyArtifactPaths 494 */ 495 public void setLegacyArtifactPaths( java.util.List<LegacyArtifactPath> legacyArtifactPaths ) 496 { 497 this.legacyArtifactPaths = legacyArtifactPaths; 498 } //-- void setLegacyArtifactPaths( java.util.List ) 499 500 /** 501 * Set the list of repositories that this archiva instance 502 * uses. 503 * 504 * @param managedRepositories 505 */ 506 public void setManagedRepositories( java.util.List<ManagedRepositoryConfiguration> managedRepositories ) 507 { 508 this.managedRepositories = managedRepositories; 509 } //-- void setManagedRepositories( java.util.List ) 510 511 /** 512 * Set the modelEncoding field. 513 * 514 * @param modelEncoding 515 */ 516 public void setModelEncoding( String modelEncoding ) 517 { 518 this.modelEncoding = modelEncoding; 519 } //-- void setModelEncoding( String ) 520 521 /** 522 * Set the NetworkConfiguration . 523 * 524 * @param networkConfiguration 525 */ 526 public void setNetworkConfiguration( NetworkConfiguration networkConfiguration ) 527 { 528 this.networkConfiguration = networkConfiguration; 529 } //-- void setNetworkConfiguration( NetworkConfiguration ) 530 531 /** 532 * Set the list of network proxies to use for outgoing 533 * requests. 534 * 535 * @param networkProxies 536 */ 537 public void setNetworkProxies( java.util.List<NetworkProxyConfiguration> networkProxies ) 538 { 539 this.networkProxies = networkProxies; 540 } //-- void setNetworkProxies( java.util.List ) 541 542 /** 543 * Set the organisation info. 544 * 545 * @param organisationInfo 546 */ 547 public void setOrganisationInfo( OrganisationInformation organisationInfo ) 548 { 549 this.organisationInfo = organisationInfo; 550 } //-- void setOrganisationInfo( OrganisationInformation ) 551 552 /** 553 * Set the list of ProxyConnectorRuleConfigurations. 554 * 555 * @param proxyConnectorRuleConfigurations 556 */ 557 public void setProxyConnectorRuleConfigurations( java.util.List<ProxyConnectorRuleConfiguration> proxyConnectorRuleConfigurations ) 558 { 559 this.proxyConnectorRuleConfigurations = proxyConnectorRuleConfigurations; 560 } //-- void setProxyConnectorRuleConfigurations( java.util.List ) 561 562 /** 563 * Set the list of proxy connectors for this archiva instance. 564 * 565 * @param proxyConnectors 566 */ 567 public void setProxyConnectors( java.util.List<ProxyConnectorConfiguration> proxyConnectors ) 568 { 569 this.proxyConnectors = proxyConnectors; 570 } //-- void setProxyConnectors( java.util.List ) 571 572 /** 573 * Set the RedbackRuntimeConfiguration. 574 * 575 * @param redbackRuntimeConfiguration 576 */ 577 public void setRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration ) 578 { 579 this.redbackRuntimeConfiguration = redbackRuntimeConfiguration; 580 } //-- void setRedbackRuntimeConfiguration( RedbackRuntimeConfiguration ) 581 582 /** 583 * Set the list of repositories that this archiva can retrieve 584 * from or publish to. 585 * 586 * @param remoteRepositories 587 */ 588 public void setRemoteRepositories( java.util.List<RemoteRepositoryConfiguration> remoteRepositories ) 589 { 590 this.remoteRepositories = remoteRepositories; 591 } //-- void setRemoteRepositories( java.util.List ) 592 593 /** 594 * Set @deprecated use managedRepositories or 595 * remoteRepositories instead. 596 * 597 * @param repositories 598 */ 599 public void setRepositories( java.util.List<V1RepositoryConfiguration> repositories ) 600 { 601 this.repositories = repositories; 602 } //-- void setRepositories( java.util.List ) 603 604 /** 605 * Set the list of repository groups. 606 * 607 * @param repositoryGroups 608 */ 609 public void setRepositoryGroups( java.util.List<RepositoryGroupConfiguration> repositoryGroups ) 610 { 611 this.repositoryGroups = repositoryGroups; 612 } //-- void setRepositoryGroups( java.util.List ) 613 614 /** 615 * Set the repository scanning configuration. 616 * 617 * @param repositoryScanning 618 */ 619 public void setRepositoryScanning( RepositoryScanningConfiguration repositoryScanning ) 620 { 621 this.repositoryScanning = repositoryScanning; 622 } //-- void setRepositoryScanning( RepositoryScanningConfiguration ) 623 624 /** 625 * Set this is the version of the configuration format. 626 * 627 * @param version 628 */ 629 public void setVersion( String version ) 630 { 631 this.version = version; 632 } //-- void setVersion( String ) 633 634 /** 635 * Set the webapp configuration. 636 * 637 * @param webapp 638 */ 639 public void setWebapp( WebappConfiguration webapp ) 640 { 641 this.webapp = webapp; 642 } //-- void setWebapp( WebappConfiguration ) 643 644 645 private java.util.Map<String, java.util.List<String>> repositoryToGroupMap; 646 647 public java.util.Map<String, java.util.List<String>> getRepositoryToGroupMap() 648 { 649 if ( repositoryGroups != null ) 650 { 651 java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>(); 652 653 for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups ) 654 { 655 for ( String repositoryId : (java.util.List<String>) group.getRepositories() ) 656 { 657 java.util.List<String> groups = map.get( repositoryId ); 658 if ( groups == null ) 659 { 660 groups = new java.util.ArrayList<String>(); 661 map.put( repositoryId, groups ); 662 } 663 groups.add( group.getId() ); 664 } 665 } 666 667 repositoryToGroupMap = map; 668 } 669 return repositoryToGroupMap; 670 } 671 672 public java.util.Map<String, RepositoryGroupConfiguration> getRepositoryGroupsAsMap() 673 { 674 java.util.Map<String, RepositoryGroupConfiguration> map = new java.util.HashMap<String, RepositoryGroupConfiguration>(); 675 if ( repositoryGroups != null ) 676 { 677 for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups ) 678 { 679 map.put( group.getId(), group ); 680 } 681 } 682 return map; 683 } 684 685 public RepositoryGroupConfiguration findRepositoryGroupById( String id ) 686 { 687 if ( repositoryGroups != null ) 688 { 689 for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups ) 690 { 691 if ( group.getId().equals( id ) ) 692 { 693 return group; 694 } 695 } 696 } 697 return null; 698 } 699 700 private java.util.Map<String, java.util.List<String>> groupToRepositoryMap; 701 702 public java.util.Map<String, java.util.List<String>> getGroupToRepositoryMap() 703 { 704 if ( repositoryGroups != null && managedRepositories != null ) 705 { 706 java.util.Map<String, java.util.List<String>> map = new java.util.HashMap<String, java.util.List<String>>(); 707 708 for ( ManagedRepositoryConfiguration repo : (java.util.List<ManagedRepositoryConfiguration>) managedRepositories ) 709 { 710 for ( RepositoryGroupConfiguration group : (java.util.List<RepositoryGroupConfiguration>) repositoryGroups ) 711 { 712 if ( !group.getRepositories().contains( repo.getId() ) ) 713 { 714 String groupId = group.getId(); 715 java.util.List<String> repos = map.get( groupId ); 716 if ( repos == null ) 717 { 718 repos = new java.util.ArrayList<String>(); 719 map.put( groupId, repos ); 720 } 721 repos.add( repo.getId() ); 722 } 723 } 724 } 725 groupToRepositoryMap = map; 726 } 727 return groupToRepositoryMap; 728 } 729 730 731 public java.util.Map<String, NetworkProxyConfiguration> getNetworkProxiesAsMap() 732 { 733 java.util.Map<String, NetworkProxyConfiguration> map = new java.util.HashMap<String, NetworkProxyConfiguration>(); 734 if ( networkProxies != null ) 735 { 736 for ( java.util.Iterator<NetworkProxyConfiguration> i = networkProxies.iterator(); i.hasNext(); ) 737 { 738 NetworkProxyConfiguration proxy = i.next(); 739 map.put( proxy.getId(), proxy ); 740 } 741 } 742 return map; 743 } 744 745 public java.util.Map<String, java.util.List<ProxyConnectorConfiguration>> getProxyConnectorAsMap() 746 { 747 java.util.Map<String, java.util.List<ProxyConnectorConfiguration>> proxyConnectorMap = 748 new java.util.HashMap<String, java.util.List<ProxyConnectorConfiguration>>(); 749 750 if( proxyConnectors != null ) 751 { 752 java.util.Iterator<ProxyConnectorConfiguration> it = proxyConnectors.iterator(); 753 while ( it.hasNext() ) 754 { 755 ProxyConnectorConfiguration proxyConfig = it.next(); 756 String key = proxyConfig.getSourceRepoId(); 757 758 java.util.List<ProxyConnectorConfiguration> connectors = proxyConnectorMap.get( key ); 759 if ( connectors == null ) 760 { 761 connectors = new java.util.ArrayList<ProxyConnectorConfiguration>(); 762 proxyConnectorMap.put( key, connectors ); 763 } 764 765 connectors.add( proxyConfig ); 766 java.util.Collections.sort( connectors, 767 org.apache.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator.getInstance() ); 768 } 769 } 770 771 return proxyConnectorMap; 772 } 773 774 public java.util.Map<String, RemoteRepositoryConfiguration> getRemoteRepositoriesAsMap() 775 { 776 java.util.Map<String, RemoteRepositoryConfiguration> map = new java.util.HashMap<String, RemoteRepositoryConfiguration>(); 777 if ( remoteRepositories != null ) 778 { 779 for ( java.util.Iterator<RemoteRepositoryConfiguration> i = remoteRepositories.iterator(); i.hasNext(); ) 780 { 781 RemoteRepositoryConfiguration repo = i.next(); 782 map.put( repo.getId(), repo ); 783 } 784 } 785 return map; 786 } 787 788 public RemoteRepositoryConfiguration findRemoteRepositoryById( String id ) 789 { 790 if ( remoteRepositories != null ) 791 { 792 for ( java.util.Iterator<RemoteRepositoryConfiguration> i = remoteRepositories.iterator(); i.hasNext(); ) 793 { 794 RemoteRepositoryConfiguration repo = i.next(); 795 if ( repo.getId().equals( id ) ) 796 { 797 return repo; 798 } 799 } 800 } 801 return null; 802 } 803 804 public java.util.Map<String, ManagedRepositoryConfiguration> getManagedRepositoriesAsMap() 805 { 806 java.util.Map<String, ManagedRepositoryConfiguration> map = new java.util.HashMap<String, ManagedRepositoryConfiguration>(); 807 if ( managedRepositories != null ) 808 { 809 for ( java.util.Iterator<ManagedRepositoryConfiguration> i = managedRepositories.iterator(); i.hasNext(); ) 810 { 811 ManagedRepositoryConfiguration repo = i.next(); 812 map.put( repo.getId(), repo ); 813 } 814 } 815 return map; 816 } 817 818 public ManagedRepositoryConfiguration findManagedRepositoryById( String id ) 819 { 820 if ( managedRepositories != null ) 821 { 822 for ( java.util.Iterator<ManagedRepositoryConfiguration> i = managedRepositories.iterator(); i.hasNext(); ) 823 { 824 ManagedRepositoryConfiguration repo = i.next(); 825 if ( repo.getId().equals( id ) ) 826 { 827 return repo; 828 } 829 } 830 } 831 return null; 832 } 833 834}