001 002package org.apache.archiva.configuration.io.registry; 003 004/* 005 * Licensed to the Apache Software Foundation (ASF) under one 006 * or more contributor license agreements. See the NOTICE file 007 * distributed with this work for additional information 008 * regarding copyright ownership. The ASF licenses this file 009 * to you under the Apache License, Version 2.0 (the 010 * "License"); you may not use this file except in compliance 011 * with the License. You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, 016 * software distributed under the License is distributed on an 017 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 018 * KIND, either express or implied. See the License for the 019 * specific language governing permissions and limitations 020 * under the License. 021 */ 022 023import org.apache.archiva.configuration.*; 024import org.apache.archiva.components.registry.Registry; 025 026import java.util.Iterator; 027import java.util.List; 028 029// Util imports 030// Model class imports 031 032 033/** 034 * Generate Redback Registry input mechanism for model 'Configuration'. 035 */ 036public class ConfigurationRegistryReader { 037 public Configuration read(Registry registry) { 038 return readConfiguration("", registry); 039 } 040 041 private Configuration readConfiguration(String prefix, Registry registry) { 042 Configuration value = new Configuration(); 043 044 //String version = registry.getString( prefix + "version", value.getVersion() ); 045 046 List<String> versionList = registry.getList(prefix + "version"); 047 String version = value.getVersion(); 048 if (versionList != null && !versionList.isEmpty()) { 049 StringBuilder sb = new StringBuilder(); 050 for (int i = 0, size = versionList.size(); i < size; i++) { 051 sb.append(versionList.get(i)); 052 if (i < size - 1) { 053 sb.append(','); 054 } 055 } 056 version = sb.toString(); 057 } 058 059 value.setVersion(version); 060 //String metadataStore = registry.getString( prefix + "metadataStore", value.getMetadataStore() ); 061 062 List<String> metadataStoreList = registry.getList(prefix + "metadataStore"); 063 String metadataStore = value.getMetadataStore(); 064 if (metadataStoreList != null && !metadataStoreList.isEmpty()) { 065 StringBuilder sb = new StringBuilder(); 066 for (int i = 0, size = metadataStoreList.size(); i < size; i++) { 067 sb.append(metadataStoreList.get(i)); 068 if (i < size - 1) { 069 sb.append(','); 070 } 071 } 072 metadataStore = sb.toString(); 073 } 074 075 value.setMetadataStore(metadataStore); 076 java.util.List repositoryGroups = new java.util.ArrayList/*<RepositoryGroupConfiguration>*/(); 077 List repositoryGroupsSubsets = registry.getSubsetList(prefix + "repositoryGroups.repositoryGroup"); 078 for (Iterator i = repositoryGroupsSubsets.iterator(); i.hasNext(); ) { 079 RepositoryGroupConfiguration v = readRepositoryGroupConfiguration("", (Registry) i.next()); 080 repositoryGroups.add(v); 081 } 082 value.setRepositoryGroups(repositoryGroups); 083 java.util.List managedRepositories = new java.util.ArrayList/*<ManagedRepositoryConfiguration>*/(); 084 List managedRepositoriesSubsets = registry.getSubsetList(prefix + "managedRepositories.managedRepository"); 085 for (Iterator i = managedRepositoriesSubsets.iterator(); i.hasNext(); ) { 086 ManagedRepositoryConfiguration v = readManagedRepositoryConfiguration("", (Registry) i.next()); 087 managedRepositories.add(v); 088 } 089 value.setManagedRepositories(managedRepositories); 090 java.util.List remoteRepositories = new java.util.ArrayList/*<RemoteRepositoryConfiguration>*/(); 091 List remoteRepositoriesSubsets = registry.getSubsetList(prefix + "remoteRepositories.remoteRepository"); 092 for (Iterator i = remoteRepositoriesSubsets.iterator(); i.hasNext(); ) { 093 RemoteRepositoryConfiguration v = readRemoteRepositoryConfiguration("", (Registry) i.next()); 094 remoteRepositories.add(v); 095 } 096 value.setRemoteRepositories(remoteRepositories); 097 java.util.List proxyConnectors = new java.util.ArrayList/*<ProxyConnectorConfiguration>*/(); 098 List proxyConnectorsSubsets = registry.getSubsetList(prefix + "proxyConnectors.proxyConnector"); 099 for (Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); ) { 100 ProxyConnectorConfiguration v = readProxyConnectorConfiguration("", (Registry) i.next()); 101 proxyConnectors.add(v); 102 } 103 value.setProxyConnectors(proxyConnectors); 104 java.util.List networkProxies = new java.util.ArrayList/*<NetworkProxyConfiguration>*/(); 105 List networkProxiesSubsets = registry.getSubsetList(prefix + "networkProxies.networkProxy"); 106 for (Iterator i = networkProxiesSubsets.iterator(); i.hasNext(); ) { 107 NetworkProxyConfiguration v = readNetworkProxyConfiguration("", (Registry) i.next()); 108 networkProxies.add(v); 109 } 110 value.setNetworkProxies(networkProxies); 111 java.util.List legacyArtifactPaths = new java.util.ArrayList/*<LegacyArtifactPath>*/(); 112 List legacyArtifactPathsSubsets = registry.getSubsetList(prefix + "legacyArtifactPaths.legacyArtifactPath"); 113 for (Iterator i = legacyArtifactPathsSubsets.iterator(); i.hasNext(); ) { 114 LegacyArtifactPath v = readLegacyArtifactPath("", (Registry) i.next()); 115 legacyArtifactPaths.add(v); 116 } 117 value.setLegacyArtifactPaths(legacyArtifactPaths); 118 RepositoryScanningConfiguration repositoryScanning = readRepositoryScanningConfiguration(prefix + "repositoryScanning.", registry); 119 value.setRepositoryScanning(repositoryScanning); 120 WebappConfiguration webapp = readWebappConfiguration(prefix + "webapp.", registry); 121 value.setWebapp(webapp); 122 OrganisationInformation organisationInfo = readOrganisationInformation(prefix + "organisationInfo.", registry); 123 value.setOrganisationInfo(organisationInfo); 124 NetworkConfiguration networkConfiguration = readNetworkConfiguration(prefix + "networkConfiguration.", registry); 125 value.setNetworkConfiguration(networkConfiguration); 126 RedbackRuntimeConfiguration redbackRuntimeConfiguration = readRedbackRuntimeConfiguration(prefix + "redbackRuntimeConfiguration.", registry); 127 value.setRedbackRuntimeConfiguration(redbackRuntimeConfiguration); 128 ArchivaRuntimeConfiguration archivaRuntimeConfiguration = readArchivaRuntimeConfiguration(prefix + "archivaRuntimeConfiguration.", registry); 129 value.setArchivaRuntimeConfiguration(archivaRuntimeConfiguration); 130 java.util.List proxyConnectorRuleConfigurations = new java.util.ArrayList/*<ProxyConnectorRuleConfiguration>*/(); 131 List proxyConnectorRuleConfigurationsSubsets = registry.getSubsetList(prefix + "proxyConnectorRuleConfigurations.proxyConnectorRuleConfiguration"); 132 for (Iterator i = proxyConnectorRuleConfigurationsSubsets.iterator(); i.hasNext(); ) { 133 ProxyConnectorRuleConfiguration v = readProxyConnectorRuleConfiguration("", (Registry) i.next()); 134 proxyConnectorRuleConfigurations.add(v); 135 } 136 value.setProxyConnectorRuleConfigurations(proxyConnectorRuleConfigurations); 137 ArchivaDefaultConfiguration archivaDefaultConfiguration = readArchivaDefaultConfiguration(prefix + "archivaDefaultConfiguration.", registry); 138 value.setArchivaDefaultConfiguration(archivaDefaultConfiguration); 139 140 return value; 141 } 142 143 private AbstractRepositoryConfiguration readAbstractRepositoryConfiguration(String prefix, Registry registry) { 144 AbstractRepositoryConfiguration value = new AbstractRepositoryConfiguration(); 145 146 //String id = registry.getString( prefix + "id", value.getId() ); 147 148 List<String> idList = registry.getList(prefix + "id"); 149 String id = value.getId(); 150 if (idList != null && !idList.isEmpty()) { 151 StringBuilder sb = new StringBuilder(); 152 for (int i = 0, size = idList.size(); i < size; i++) { 153 sb.append(idList.get(i)); 154 if (i < size - 1) { 155 sb.append(','); 156 } 157 } 158 id = sb.toString(); 159 } 160 161 value.setId(id); 162 //String type = registry.getString( prefix + "type", value.getType() ); 163 164 List<String> typeList = registry.getList(prefix + "type"); 165 String type = value.getType(); 166 if (typeList != null && !typeList.isEmpty()) { 167 StringBuilder sb = new StringBuilder(); 168 for (int i = 0, size = typeList.size(); i < size; i++) { 169 sb.append(typeList.get(i)); 170 if (i < size - 1) { 171 sb.append(','); 172 } 173 } 174 type = sb.toString(); 175 } 176 177 value.setType(type); 178 //String name = registry.getString( prefix + "name", value.getName() ); 179 180 List<String> nameList = registry.getList(prefix + "name"); 181 String name = value.getName(); 182 if (nameList != null && !nameList.isEmpty()) { 183 StringBuilder sb = new StringBuilder(); 184 for (int i = 0, size = nameList.size(); i < size; i++) { 185 sb.append(nameList.get(i)); 186 if (i < size - 1) { 187 sb.append(','); 188 } 189 } 190 name = sb.toString(); 191 } 192 193 value.setName(name); 194 //String layout = registry.getString( prefix + "layout", value.getLayout() ); 195 196 List<String> layoutList = registry.getList(prefix + "layout"); 197 String layout = value.getLayout(); 198 if (layoutList != null && !layoutList.isEmpty()) { 199 StringBuilder sb = new StringBuilder(); 200 for (int i = 0, size = layoutList.size(); i < size; i++) { 201 sb.append(layoutList.get(i)); 202 if (i < size - 1) { 203 sb.append(','); 204 } 205 } 206 layout = sb.toString(); 207 } 208 209 value.setLayout(layout); 210 //String indexDir = registry.getString( prefix + "indexDir", value.getIndexDir() ); 211 212 List<String> indexDirList = registry.getList(prefix + "indexDir"); 213 String indexDir = value.getIndexDir(); 214 if (indexDirList != null && !indexDirList.isEmpty()) { 215 StringBuilder sb = new StringBuilder(); 216 for (int i = 0, size = indexDirList.size(); i < size; i++) { 217 sb.append(indexDirList.get(i)); 218 if (i < size - 1) { 219 sb.append(','); 220 } 221 } 222 indexDir = sb.toString(); 223 } 224 225 value.setIndexDir(indexDir); 226 //String packedIndexDir = registry.getString( prefix + "packedIndexDir", value.getPackedIndexDir() ); 227 228 List<String> packedIndexDirList = registry.getList(prefix + "packedIndexDir"); 229 String packedIndexDir = value.getPackedIndexDir(); 230 if (packedIndexDirList != null && !packedIndexDirList.isEmpty()) { 231 StringBuilder sb = new StringBuilder(); 232 for (int i = 0, size = packedIndexDirList.size(); i < size; i++) { 233 sb.append(packedIndexDirList.get(i)); 234 if (i < size - 1) { 235 sb.append(','); 236 } 237 } 238 packedIndexDir = sb.toString(); 239 } 240 241 value.setPackedIndexDir(packedIndexDir); 242 //String description = registry.getString( prefix + "description", value.getDescription() ); 243 244 List<String> descriptionList = registry.getList(prefix + "description"); 245 String description = value.getDescription(); 246 if (descriptionList != null && !descriptionList.isEmpty()) { 247 StringBuilder sb = new StringBuilder(); 248 for (int i = 0, size = descriptionList.size(); i < size; i++) { 249 sb.append(descriptionList.get(i)); 250 if (i < size - 1) { 251 sb.append(','); 252 } 253 } 254 description = sb.toString(); 255 } 256 257 value.setDescription(description); 258 259 return value; 260 } 261 262 private RemoteRepositoryConfiguration readRemoteRepositoryConfiguration(String prefix, Registry registry) { 263 RemoteRepositoryConfiguration value = new RemoteRepositoryConfiguration(); 264 265 //String url = registry.getString( prefix + "url", value.getUrl() ); 266 267 List<String> urlList = registry.getList(prefix + "url"); 268 String url = value.getUrl(); 269 if (urlList != null && !urlList.isEmpty()) { 270 StringBuilder sb = new StringBuilder(); 271 for (int i = 0, size = urlList.size(); i < size; i++) { 272 sb.append(urlList.get(i)); 273 if (i < size - 1) { 274 sb.append(','); 275 } 276 } 277 url = sb.toString(); 278 } 279 280 value.setUrl(url); 281 //String username = registry.getString( prefix + "username", value.getUsername() ); 282 283 List<String> usernameList = registry.getList(prefix + "username"); 284 String username = value.getUsername(); 285 if (usernameList != null && !usernameList.isEmpty()) { 286 StringBuilder sb = new StringBuilder(); 287 for (int i = 0, size = usernameList.size(); i < size; i++) { 288 sb.append(usernameList.get(i)); 289 if (i < size - 1) { 290 sb.append(','); 291 } 292 } 293 username = sb.toString(); 294 } 295 296 value.setUsername(username); 297 //String password = registry.getString( prefix + "password", value.getPassword() ); 298 299 List<String> passwordList = registry.getList(prefix + "password"); 300 String password = value.getPassword(); 301 if (passwordList != null && !passwordList.isEmpty()) { 302 StringBuilder sb = new StringBuilder(); 303 for (int i = 0, size = passwordList.size(); i < size; i++) { 304 sb.append(passwordList.get(i)); 305 if (i < size - 1) { 306 sb.append(','); 307 } 308 } 309 password = sb.toString(); 310 } 311 312 value.setPassword(password); 313 int timeout = registry.getInt(prefix + "timeout", value.getTimeout()); 314 value.setTimeout(timeout); 315 //String refreshCronExpression = registry.getString( prefix + "refreshCronExpression", value.getRefreshCronExpression() ); 316 317 List<String> refreshCronExpressionList = registry.getList(prefix + "refreshCronExpression"); 318 String refreshCronExpression = value.getRefreshCronExpression(); 319 if (refreshCronExpressionList != null && !refreshCronExpressionList.isEmpty()) { 320 StringBuilder sb = new StringBuilder(); 321 for (int i = 0, size = refreshCronExpressionList.size(); i < size; i++) { 322 sb.append(refreshCronExpressionList.get(i)); 323 if (i < size - 1) { 324 sb.append(','); 325 } 326 } 327 refreshCronExpression = sb.toString(); 328 } 329 330 value.setRefreshCronExpression(refreshCronExpression); 331 boolean downloadRemoteIndex = registry.getBoolean(prefix + "downloadRemoteIndex", value.isDownloadRemoteIndex()); 332 value.setDownloadRemoteIndex(downloadRemoteIndex); 333 //String remoteIndexUrl = registry.getString( prefix + "remoteIndexUrl", value.getRemoteIndexUrl() ); 334 335 List<String> remoteIndexUrlList = registry.getList(prefix + "remoteIndexUrl"); 336 String remoteIndexUrl = value.getRemoteIndexUrl(); 337 if (remoteIndexUrlList != null && !remoteIndexUrlList.isEmpty()) { 338 StringBuilder sb = new StringBuilder(); 339 for (int i = 0, size = remoteIndexUrlList.size(); i < size; i++) { 340 sb.append(remoteIndexUrlList.get(i)); 341 if (i < size - 1) { 342 sb.append(','); 343 } 344 } 345 remoteIndexUrl = sb.toString(); 346 } 347 348 value.setRemoteIndexUrl(remoteIndexUrl); 349 //String remoteDownloadNetworkProxyId = registry.getString( prefix + "remoteDownloadNetworkProxyId", value.getRemoteDownloadNetworkProxyId() ); 350 351 List<String> remoteDownloadNetworkProxyIdList = registry.getList(prefix + "remoteDownloadNetworkProxyId"); 352 String remoteDownloadNetworkProxyId = value.getRemoteDownloadNetworkProxyId(); 353 if (remoteDownloadNetworkProxyIdList != null && !remoteDownloadNetworkProxyIdList.isEmpty()) { 354 StringBuilder sb = new StringBuilder(); 355 for (int i = 0, size = remoteDownloadNetworkProxyIdList.size(); i < size; i++) { 356 sb.append(remoteDownloadNetworkProxyIdList.get(i)); 357 if (i < size - 1) { 358 sb.append(','); 359 } 360 } 361 remoteDownloadNetworkProxyId = sb.toString(); 362 } 363 364 value.setRemoteDownloadNetworkProxyId(remoteDownloadNetworkProxyId); 365 int remoteDownloadTimeout = registry.getInt(prefix + "remoteDownloadTimeout", value.getRemoteDownloadTimeout()); 366 value.setRemoteDownloadTimeout(remoteDownloadTimeout); 367 boolean downloadRemoteIndexOnStartup = registry.getBoolean(prefix + "downloadRemoteIndexOnStartup", value.isDownloadRemoteIndexOnStartup()); 368 value.setDownloadRemoteIndexOnStartup(downloadRemoteIndexOnStartup); 369 java.util.Map extraParameters = registry.getProperties(prefix + "extraParameters"); 370 value.setExtraParameters(extraParameters); 371 java.util.Map extraHeaders = registry.getProperties(prefix + "extraHeaders"); 372 value.setExtraHeaders(extraHeaders); 373 //String checkPath = registry.getString( prefix + "checkPath", value.getCheckPath() ); 374 375 List<String> checkPathList = registry.getList(prefix + "checkPath"); 376 String checkPath = value.getCheckPath(); 377 if (checkPathList != null && !checkPathList.isEmpty()) { 378 StringBuilder sb = new StringBuilder(); 379 for (int i = 0, size = checkPathList.size(); i < size; i++) { 380 sb.append(checkPathList.get(i)); 381 if (i < size - 1) { 382 sb.append(','); 383 } 384 } 385 checkPath = sb.toString(); 386 } 387 388 value.setCheckPath(checkPath); 389 //String id = registry.getString( prefix + "id", value.getId() ); 390 391 List<String> idList = registry.getList(prefix + "id"); 392 String id = value.getId(); 393 if (idList != null && !idList.isEmpty()) { 394 StringBuilder sb = new StringBuilder(); 395 for (int i = 0, size = idList.size(); i < size; i++) { 396 sb.append(idList.get(i)); 397 if (i < size - 1) { 398 sb.append(','); 399 } 400 } 401 id = sb.toString(); 402 } 403 404 value.setId(id); 405 //String type = registry.getString( prefix + "type", value.getType() ); 406 407 List<String> typeList = registry.getList(prefix + "type"); 408 String type = value.getType(); 409 if (typeList != null && !typeList.isEmpty()) { 410 StringBuilder sb = new StringBuilder(); 411 for (int i = 0, size = typeList.size(); i < size; i++) { 412 sb.append(typeList.get(i)); 413 if (i < size - 1) { 414 sb.append(','); 415 } 416 } 417 type = sb.toString(); 418 } 419 420 value.setType(type); 421 //String name = registry.getString( prefix + "name", value.getName() ); 422 423 List<String> nameList = registry.getList(prefix + "name"); 424 String name = value.getName(); 425 if (nameList != null && !nameList.isEmpty()) { 426 StringBuilder sb = new StringBuilder(); 427 for (int i = 0, size = nameList.size(); i < size; i++) { 428 sb.append(nameList.get(i)); 429 if (i < size - 1) { 430 sb.append(','); 431 } 432 } 433 name = sb.toString(); 434 } 435 436 value.setName(name); 437 //String layout = registry.getString( prefix + "layout", value.getLayout() ); 438 439 List<String> layoutList = registry.getList(prefix + "layout"); 440 String layout = value.getLayout(); 441 if (layoutList != null && !layoutList.isEmpty()) { 442 StringBuilder sb = new StringBuilder(); 443 for (int i = 0, size = layoutList.size(); i < size; i++) { 444 sb.append(layoutList.get(i)); 445 if (i < size - 1) { 446 sb.append(','); 447 } 448 } 449 layout = sb.toString(); 450 } 451 452 value.setLayout(layout); 453 //String indexDir = registry.getString( prefix + "indexDir", value.getIndexDir() ); 454 455 List<String> indexDirList = registry.getList(prefix + "indexDir"); 456 String indexDir = value.getIndexDir(); 457 if (indexDirList != null && !indexDirList.isEmpty()) { 458 StringBuilder sb = new StringBuilder(); 459 for (int i = 0, size = indexDirList.size(); i < size; i++) { 460 sb.append(indexDirList.get(i)); 461 if (i < size - 1) { 462 sb.append(','); 463 } 464 } 465 indexDir = sb.toString(); 466 } 467 468 value.setIndexDir(indexDir); 469 //String packedIndexDir = registry.getString( prefix + "packedIndexDir", value.getPackedIndexDir() ); 470 471 List<String> packedIndexDirList = registry.getList(prefix + "packedIndexDir"); 472 String packedIndexDir = value.getPackedIndexDir(); 473 if (packedIndexDirList != null && !packedIndexDirList.isEmpty()) { 474 StringBuilder sb = new StringBuilder(); 475 for (int i = 0, size = packedIndexDirList.size(); i < size; i++) { 476 sb.append(packedIndexDirList.get(i)); 477 if (i < size - 1) { 478 sb.append(','); 479 } 480 } 481 packedIndexDir = sb.toString(); 482 } 483 484 value.setPackedIndexDir(packedIndexDir); 485 //String description = registry.getString( prefix + "description", value.getDescription() ); 486 487 List<String> descriptionList = registry.getList(prefix + "description"); 488 String description = value.getDescription(); 489 if (descriptionList != null && !descriptionList.isEmpty()) { 490 StringBuilder sb = new StringBuilder(); 491 for (int i = 0, size = descriptionList.size(); i < size; i++) { 492 sb.append(descriptionList.get(i)); 493 if (i < size - 1) { 494 sb.append(','); 495 } 496 } 497 description = sb.toString(); 498 } 499 500 value.setDescription(description); 501 502 return value; 503 } 504 505 private ManagedRepositoryConfiguration readManagedRepositoryConfiguration(String prefix, Registry registry) { 506 ManagedRepositoryConfiguration value = new ManagedRepositoryConfiguration(); 507 508 //String location = registry.getString( prefix + "location", value.getLocation() ); 509 510 List<String> locationList = registry.getList(prefix + "location"); 511 String location = value.getLocation(); 512 if (locationList != null && !locationList.isEmpty()) { 513 StringBuilder sb = new StringBuilder(); 514 for (int i = 0, size = locationList.size(); i < size; i++) { 515 sb.append(locationList.get(i)); 516 if (i < size - 1) { 517 sb.append(','); 518 } 519 } 520 location = sb.toString(); 521 } 522 523 value.setLocation(location); 524 boolean releases = registry.getBoolean(prefix + "releases", value.isReleases()); 525 value.setReleases(releases); 526 boolean blockRedeployments = registry.getBoolean(prefix + "blockRedeployments", value.isBlockRedeployments()); 527 value.setBlockRedeployments(blockRedeployments); 528 boolean snapshots = registry.getBoolean(prefix + "snapshots", value.isSnapshots()); 529 value.setSnapshots(snapshots); 530 boolean scanned = registry.getBoolean(prefix + "scanned", value.isScanned()); 531 value.setScanned(scanned); 532 //String refreshCronExpression = registry.getString( prefix + "refreshCronExpression", value.getRefreshCronExpression() ); 533 534 List<String> refreshCronExpressionList = registry.getList(prefix + "refreshCronExpression"); 535 String refreshCronExpression = value.getRefreshCronExpression(); 536 if (refreshCronExpressionList != null && !refreshCronExpressionList.isEmpty()) { 537 StringBuilder sb = new StringBuilder(); 538 for (int i = 0, size = refreshCronExpressionList.size(); i < size; i++) { 539 sb.append(refreshCronExpressionList.get(i)); 540 if (i < size - 1) { 541 sb.append(','); 542 } 543 } 544 refreshCronExpression = sb.toString(); 545 } 546 547 value.setRefreshCronExpression(refreshCronExpression); 548 int retentionCount = registry.getInt(prefix + "retentionCount", value.getRetentionCount()); 549 value.setRetentionCount(retentionCount); 550 int retentionPeriod = registry.getInt(prefix + "retentionPeriod", value.getRetentionPeriod()); 551 value.setRetentionPeriod(retentionPeriod); 552 boolean deleteReleasedSnapshots = registry.getBoolean(prefix + "deleteReleasedSnapshots", value.isDeleteReleasedSnapshots()); 553 value.setDeleteReleasedSnapshots(deleteReleasedSnapshots); 554 boolean skipPackedIndexCreation = registry.getBoolean(prefix + "skipPackedIndexCreation", value.isSkipPackedIndexCreation()); 555 value.setSkipPackedIndexCreation(skipPackedIndexCreation); 556 boolean stageRepoNeeded = registry.getBoolean(prefix + "stageRepoNeeded", value.isStageRepoNeeded()); 557 value.setStageRepoNeeded(stageRepoNeeded); 558 //String id = registry.getString( prefix + "id", value.getId() ); 559 560 List<String> idList = registry.getList(prefix + "id"); 561 String id = value.getId(); 562 if (idList != null && !idList.isEmpty()) { 563 StringBuilder sb = new StringBuilder(); 564 for (int i = 0, size = idList.size(); i < size; i++) { 565 sb.append(idList.get(i)); 566 if (i < size - 1) { 567 sb.append(','); 568 } 569 } 570 id = sb.toString(); 571 } 572 573 value.setId(id); 574 //String type = registry.getString( prefix + "type", value.getType() ); 575 576 List<String> typeList = registry.getList(prefix + "type"); 577 String type = value.getType(); 578 if (typeList != null && !typeList.isEmpty()) { 579 StringBuilder sb = new StringBuilder(); 580 for (int i = 0, size = typeList.size(); i < size; i++) { 581 sb.append(typeList.get(i)); 582 if (i < size - 1) { 583 sb.append(','); 584 } 585 } 586 type = sb.toString(); 587 } 588 589 value.setType(type); 590 //String name = registry.getString( prefix + "name", value.getName() ); 591 592 List<String> nameList = registry.getList(prefix + "name"); 593 String name = value.getName(); 594 if (nameList != null && !nameList.isEmpty()) { 595 StringBuilder sb = new StringBuilder(); 596 for (int i = 0, size = nameList.size(); i < size; i++) { 597 sb.append(nameList.get(i)); 598 if (i < size - 1) { 599 sb.append(','); 600 } 601 } 602 name = sb.toString(); 603 } 604 605 value.setName(name); 606 //String layout = registry.getString( prefix + "layout", value.getLayout() ); 607 608 List<String> layoutList = registry.getList(prefix + "layout"); 609 String layout = value.getLayout(); 610 if (layoutList != null && !layoutList.isEmpty()) { 611 StringBuilder sb = new StringBuilder(); 612 for (int i = 0, size = layoutList.size(); i < size; i++) { 613 sb.append(layoutList.get(i)); 614 if (i < size - 1) { 615 sb.append(','); 616 } 617 } 618 layout = sb.toString(); 619 } 620 621 value.setLayout(layout); 622 //String indexDir = registry.getString( prefix + "indexDir", value.getIndexDir() ); 623 624 List<String> indexDirList = registry.getList(prefix + "indexDir"); 625 String indexDir = value.getIndexDir(); 626 if (indexDirList != null && !indexDirList.isEmpty()) { 627 StringBuilder sb = new StringBuilder(); 628 for (int i = 0, size = indexDirList.size(); i < size; i++) { 629 sb.append(indexDirList.get(i)); 630 if (i < size - 1) { 631 sb.append(','); 632 } 633 } 634 indexDir = sb.toString(); 635 } 636 637 value.setIndexDir(indexDir); 638 //String packedIndexDir = registry.getString( prefix + "packedIndexDir", value.getPackedIndexDir() ); 639 640 List<String> packedIndexDirList = registry.getList(prefix + "packedIndexDir"); 641 String packedIndexDir = value.getPackedIndexDir(); 642 if (packedIndexDirList != null && !packedIndexDirList.isEmpty()) { 643 StringBuilder sb = new StringBuilder(); 644 for (int i = 0, size = packedIndexDirList.size(); i < size; i++) { 645 sb.append(packedIndexDirList.get(i)); 646 if (i < size - 1) { 647 sb.append(','); 648 } 649 } 650 packedIndexDir = sb.toString(); 651 } 652 653 value.setPackedIndexDir(packedIndexDir); 654 //String description = registry.getString( prefix + "description", value.getDescription() ); 655 656 List<String> descriptionList = registry.getList(prefix + "description"); 657 String description = value.getDescription(); 658 if (descriptionList != null && !descriptionList.isEmpty()) { 659 StringBuilder sb = new StringBuilder(); 660 for (int i = 0, size = descriptionList.size(); i < size; i++) { 661 sb.append(descriptionList.get(i)); 662 if (i < size - 1) { 663 sb.append(','); 664 } 665 } 666 description = sb.toString(); 667 } 668 669 value.setDescription(description); 670 671 return value; 672 } 673 674 private LegacyArtifactPath readLegacyArtifactPath(String prefix, Registry registry) { 675 LegacyArtifactPath value = new LegacyArtifactPath(); 676 677 //String path = registry.getString( prefix + "path", value.getPath() ); 678 679 List<String> pathList = registry.getList(prefix + "path"); 680 String path = value.getPath(); 681 if (pathList != null && !pathList.isEmpty()) { 682 StringBuilder sb = new StringBuilder(); 683 for (int i = 0, size = pathList.size(); i < size; i++) { 684 sb.append(pathList.get(i)); 685 if (i < size - 1) { 686 sb.append(','); 687 } 688 } 689 path = sb.toString(); 690 } 691 692 value.setPath(path); 693 //String artifact = registry.getString( prefix + "artifact", value.getArtifact() ); 694 695 List<String> artifactList = registry.getList(prefix + "artifact"); 696 String artifact = value.getArtifact(); 697 if (artifactList != null && !artifactList.isEmpty()) { 698 StringBuilder sb = new StringBuilder(); 699 for (int i = 0, size = artifactList.size(); i < size; i++) { 700 sb.append(artifactList.get(i)); 701 if (i < size - 1) { 702 sb.append(','); 703 } 704 } 705 artifact = sb.toString(); 706 } 707 708 value.setArtifact(artifact); 709 710 return value; 711 } 712 713 private RepositoryGroupConfiguration readRepositoryGroupConfiguration(String prefix, Registry registry) { 714 RepositoryGroupConfiguration value = new RepositoryGroupConfiguration(); 715 716 //String id = registry.getString( prefix + "id", value.getId() ); 717 718 List<String> idList = registry.getList(prefix + "id"); 719 String id = value.getId(); 720 if (idList != null && !idList.isEmpty()) { 721 StringBuilder sb = new StringBuilder(); 722 for (int i = 0, size = idList.size(); i < size; i++) { 723 sb.append(idList.get(i)); 724 if (i < size - 1) { 725 sb.append(','); 726 } 727 } 728 id = sb.toString(); 729 } 730 731 value.setId(id); 732 733 value.setName(registry.getString(prefix + "name")); 734 value.setType(registry.getString(prefix + "type")); 735 736 //String mergedIndexPath = registry.getString( prefix + "mergedIndexPath", value.getMergedIndexPath() ); 737 738 List<String> mergedIndexPathList = registry.getList(prefix + "mergedIndexPath"); 739 String mergedIndexPath = value.getMergedIndexPath(); 740 if (mergedIndexPathList != null && !mergedIndexPathList.isEmpty()) { 741 StringBuilder sb = new StringBuilder(); 742 for (int i = 0, size = mergedIndexPathList.size(); i < size; i++) { 743 sb.append(mergedIndexPathList.get(i)); 744 if (i < size - 1) { 745 sb.append(','); 746 } 747 } 748 mergedIndexPath = sb.toString(); 749 } 750 751 value.setMergedIndexPath(mergedIndexPath); 752 int mergedIndexTtl = registry.getInt(prefix + "mergedIndexTtl", value.getMergedIndexTtl()); 753 value.setMergedIndexTtl(mergedIndexTtl); 754 //String cronExpression = registry.getString( prefix + "cronExpression", value.getCronExpression() ); 755 756 List<String> cronExpressionList = registry.getList(prefix + "cronExpression"); 757 String cronExpression = value.getCronExpression(); 758 if (cronExpressionList != null && !cronExpressionList.isEmpty()) { 759 StringBuilder sb = new StringBuilder(); 760 for (int i = 0, size = cronExpressionList.size(); i < size; i++) { 761 sb.append(cronExpressionList.get(i)); 762 if (i < size - 1) { 763 sb.append(','); 764 } 765 } 766 cronExpression = sb.toString(); 767 } 768 769 value.setCronExpression(cronExpression); 770 java.util.List repositories = new java.util.ArrayList/*<String>*/(); 771 repositories.addAll(registry.getList(prefix + "repositories.repository")); 772 value.setRepositories(repositories); 773 774 return value; 775 } 776 777 private RepositoryCheckPath readRepositoryCheckPath(String prefix, Registry registry) { 778 RepositoryCheckPath value = new RepositoryCheckPath(); 779 780 //String url = registry.getString( prefix + "url", value.getUrl() ); 781 782 List<String> urlList = registry.getList(prefix + "url"); 783 String url = value.getUrl(); 784 if (urlList != null && !urlList.isEmpty()) { 785 StringBuilder sb = new StringBuilder(); 786 for (int i = 0, size = urlList.size(); i < size; i++) { 787 sb.append(urlList.get(i)); 788 if (i < size - 1) { 789 sb.append(','); 790 } 791 } 792 url = sb.toString(); 793 } 794 795 value.setUrl(url); 796 //String path = registry.getString( prefix + "path", value.getPath() ); 797 798 List<String> pathList = registry.getList(prefix + "path"); 799 String path = value.getPath(); 800 if (pathList != null && !pathList.isEmpty()) { 801 StringBuilder sb = new StringBuilder(); 802 for (int i = 0, size = pathList.size(); i < size; i++) { 803 sb.append(pathList.get(i)); 804 if (i < size - 1) { 805 sb.append(','); 806 } 807 } 808 path = sb.toString(); 809 } 810 811 value.setPath(path); 812 813 return value; 814 } 815 816 private AbstractRepositoryConnectorConfiguration readAbstractRepositoryConnectorConfiguration(String prefix, Registry registry) { 817 AbstractRepositoryConnectorConfiguration value = new AbstractRepositoryConnectorConfiguration(); 818 819 //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() ); 820 821 List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId"); 822 String sourceRepoId = value.getSourceRepoId(); 823 if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) { 824 StringBuilder sb = new StringBuilder(); 825 for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) { 826 sb.append(sourceRepoIdList.get(i)); 827 if (i < size - 1) { 828 sb.append(','); 829 } 830 } 831 sourceRepoId = sb.toString(); 832 } 833 834 value.setSourceRepoId(sourceRepoId); 835 //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() ); 836 837 List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId"); 838 String targetRepoId = value.getTargetRepoId(); 839 if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) { 840 StringBuilder sb = new StringBuilder(); 841 for (int i = 0, size = targetRepoIdList.size(); i < size; i++) { 842 sb.append(targetRepoIdList.get(i)); 843 if (i < size - 1) { 844 sb.append(','); 845 } 846 } 847 targetRepoId = sb.toString(); 848 } 849 850 value.setTargetRepoId(targetRepoId); 851 //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() ); 852 853 List<String> proxyIdList = registry.getList(prefix + "proxyId"); 854 String proxyId = value.getProxyId(); 855 if (proxyIdList != null && !proxyIdList.isEmpty()) { 856 StringBuilder sb = new StringBuilder(); 857 for (int i = 0, size = proxyIdList.size(); i < size; i++) { 858 sb.append(proxyIdList.get(i)); 859 if (i < size - 1) { 860 sb.append(','); 861 } 862 } 863 proxyId = sb.toString(); 864 } 865 866 value.setProxyId(proxyId); 867 java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/(); 868 blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern")); 869 value.setBlackListPatterns(blackListPatterns); 870 java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/(); 871 whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern")); 872 value.setWhiteListPatterns(whiteListPatterns); 873 java.util.Map policies = registry.getProperties(prefix + "policies"); 874 value.setPolicies(policies); 875 java.util.Map properties = registry.getProperties(prefix + "properties"); 876 value.setProperties(properties); 877 boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled()); 878 value.setDisabled(disabled); 879 880 return value; 881 } 882 883 private ProxyConnectorRuleConfiguration readProxyConnectorRuleConfiguration(String prefix, Registry registry) { 884 ProxyConnectorRuleConfiguration value = new ProxyConnectorRuleConfiguration(); 885 886 //String ruleType = registry.getString( prefix + "ruleType", value.getRuleType() ); 887 888 List<String> ruleTypeList = registry.getList(prefix + "ruleType"); 889 String ruleType = value.getRuleType(); 890 if (ruleTypeList != null && !ruleTypeList.isEmpty()) { 891 StringBuilder sb = new StringBuilder(); 892 for (int i = 0, size = ruleTypeList.size(); i < size; i++) { 893 sb.append(ruleTypeList.get(i)); 894 if (i < size - 1) { 895 sb.append(','); 896 } 897 } 898 ruleType = sb.toString(); 899 } 900 901 value.setRuleType(ruleType); 902 //String pattern = registry.getString( prefix + "pattern", value.getPattern() ); 903 904 List<String> patternList = registry.getList(prefix + "pattern"); 905 String pattern = value.getPattern(); 906 if (patternList != null && !patternList.isEmpty()) { 907 StringBuilder sb = new StringBuilder(); 908 for (int i = 0, size = patternList.size(); i < size; i++) { 909 sb.append(patternList.get(i)); 910 if (i < size - 1) { 911 sb.append(','); 912 } 913 } 914 pattern = sb.toString(); 915 } 916 917 value.setPattern(pattern); 918 java.util.List proxyConnectors = new java.util.ArrayList/*<ProxyConnectorConfiguration>*/(); 919 List proxyConnectorsSubsets = registry.getSubsetList(prefix + "proxyConnectors.proxyConnector"); 920 for (Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); ) { 921 ProxyConnectorConfiguration v = readProxyConnectorConfiguration("", (Registry) i.next()); 922 proxyConnectors.add(v); 923 } 924 value.setProxyConnectors(proxyConnectors); 925 926 return value; 927 } 928 929 private ProxyConnectorConfiguration readProxyConnectorConfiguration(String prefix, Registry registry) { 930 ProxyConnectorConfiguration value = new ProxyConnectorConfiguration(); 931 932 int order = registry.getInt(prefix + "order", value.getOrder()); 933 value.setOrder(order); 934 //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() ); 935 936 List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId"); 937 String sourceRepoId = value.getSourceRepoId(); 938 if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) { 939 StringBuilder sb = new StringBuilder(); 940 for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) { 941 sb.append(sourceRepoIdList.get(i)); 942 if (i < size - 1) { 943 sb.append(','); 944 } 945 } 946 sourceRepoId = sb.toString(); 947 } 948 949 value.setSourceRepoId(sourceRepoId); 950 //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() ); 951 952 List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId"); 953 String targetRepoId = value.getTargetRepoId(); 954 if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) { 955 StringBuilder sb = new StringBuilder(); 956 for (int i = 0, size = targetRepoIdList.size(); i < size; i++) { 957 sb.append(targetRepoIdList.get(i)); 958 if (i < size - 1) { 959 sb.append(','); 960 } 961 } 962 targetRepoId = sb.toString(); 963 } 964 965 value.setTargetRepoId(targetRepoId); 966 //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() ); 967 968 List<String> proxyIdList = registry.getList(prefix + "proxyId"); 969 String proxyId = value.getProxyId(); 970 if (proxyIdList != null && !proxyIdList.isEmpty()) { 971 StringBuilder sb = new StringBuilder(); 972 for (int i = 0, size = proxyIdList.size(); i < size; i++) { 973 sb.append(proxyIdList.get(i)); 974 if (i < size - 1) { 975 sb.append(','); 976 } 977 } 978 proxyId = sb.toString(); 979 } 980 981 value.setProxyId(proxyId); 982 java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/(); 983 blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern")); 984 value.setBlackListPatterns(blackListPatterns); 985 java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/(); 986 whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern")); 987 value.setWhiteListPatterns(whiteListPatterns); 988 java.util.Map policies = registry.getProperties(prefix + "policies"); 989 value.setPolicies(policies); 990 java.util.Map properties = registry.getProperties(prefix + "properties"); 991 value.setProperties(properties); 992 boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled()); 993 value.setDisabled(disabled); 994 995 return value; 996 } 997 998 private SyncConnectorConfiguration readSyncConnectorConfiguration(String prefix, Registry registry) { 999 SyncConnectorConfiguration value = new SyncConnectorConfiguration(); 1000 1001 //String cronExpression = registry.getString( prefix + "cronExpression", value.getCronExpression() ); 1002 1003 List<String> cronExpressionList = registry.getList(prefix + "cronExpression"); 1004 String cronExpression = value.getCronExpression(); 1005 if (cronExpressionList != null && !cronExpressionList.isEmpty()) { 1006 StringBuilder sb = new StringBuilder(); 1007 for (int i = 0, size = cronExpressionList.size(); i < size; i++) { 1008 sb.append(cronExpressionList.get(i)); 1009 if (i < size - 1) { 1010 sb.append(','); 1011 } 1012 } 1013 cronExpression = sb.toString(); 1014 } 1015 1016 value.setCronExpression(cronExpression); 1017 //String method = registry.getString( prefix + "method", value.getMethod() ); 1018 1019 List<String> methodList = registry.getList(prefix + "method"); 1020 String method = value.getMethod(); 1021 if (methodList != null && !methodList.isEmpty()) { 1022 StringBuilder sb = new StringBuilder(); 1023 for (int i = 0, size = methodList.size(); i < size; i++) { 1024 sb.append(methodList.get(i)); 1025 if (i < size - 1) { 1026 sb.append(','); 1027 } 1028 } 1029 method = sb.toString(); 1030 } 1031 1032 value.setMethod(method); 1033 //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() ); 1034 1035 List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId"); 1036 String sourceRepoId = value.getSourceRepoId(); 1037 if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) { 1038 StringBuilder sb = new StringBuilder(); 1039 for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) { 1040 sb.append(sourceRepoIdList.get(i)); 1041 if (i < size - 1) { 1042 sb.append(','); 1043 } 1044 } 1045 sourceRepoId = sb.toString(); 1046 } 1047 1048 value.setSourceRepoId(sourceRepoId); 1049 //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() ); 1050 1051 List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId"); 1052 String targetRepoId = value.getTargetRepoId(); 1053 if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) { 1054 StringBuilder sb = new StringBuilder(); 1055 for (int i = 0, size = targetRepoIdList.size(); i < size; i++) { 1056 sb.append(targetRepoIdList.get(i)); 1057 if (i < size - 1) { 1058 sb.append(','); 1059 } 1060 } 1061 targetRepoId = sb.toString(); 1062 } 1063 1064 value.setTargetRepoId(targetRepoId); 1065 //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() ); 1066 1067 List<String> proxyIdList = registry.getList(prefix + "proxyId"); 1068 String proxyId = value.getProxyId(); 1069 if (proxyIdList != null && !proxyIdList.isEmpty()) { 1070 StringBuilder sb = new StringBuilder(); 1071 for (int i = 0, size = proxyIdList.size(); i < size; i++) { 1072 sb.append(proxyIdList.get(i)); 1073 if (i < size - 1) { 1074 sb.append(','); 1075 } 1076 } 1077 proxyId = sb.toString(); 1078 } 1079 1080 value.setProxyId(proxyId); 1081 java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/(); 1082 blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern")); 1083 value.setBlackListPatterns(blackListPatterns); 1084 java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/(); 1085 whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern")); 1086 value.setWhiteListPatterns(whiteListPatterns); 1087 java.util.Map policies = registry.getProperties(prefix + "policies"); 1088 value.setPolicies(policies); 1089 java.util.Map properties = registry.getProperties(prefix + "properties"); 1090 value.setProperties(properties); 1091 boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled()); 1092 value.setDisabled(disabled); 1093 1094 return value; 1095 } 1096 1097 private NetworkProxyConfiguration readNetworkProxyConfiguration(String prefix, Registry registry) { 1098 NetworkProxyConfiguration value = new NetworkProxyConfiguration(); 1099 1100 //String id = registry.getString( prefix + "id", value.getId() ); 1101 1102 List<String> idList = registry.getList(prefix + "id"); 1103 String id = value.getId(); 1104 if (idList != null && !idList.isEmpty()) { 1105 StringBuilder sb = new StringBuilder(); 1106 for (int i = 0, size = idList.size(); i < size; i++) { 1107 sb.append(idList.get(i)); 1108 if (i < size - 1) { 1109 sb.append(','); 1110 } 1111 } 1112 id = sb.toString(); 1113 } 1114 1115 value.setId(id); 1116 //String protocol = registry.getString( prefix + "protocol", value.getProtocol() ); 1117 1118 List<String> protocolList = registry.getList(prefix + "protocol"); 1119 String protocol = value.getProtocol(); 1120 if (protocolList != null && !protocolList.isEmpty()) { 1121 StringBuilder sb = new StringBuilder(); 1122 for (int i = 0, size = protocolList.size(); i < size; i++) { 1123 sb.append(protocolList.get(i)); 1124 if (i < size - 1) { 1125 sb.append(','); 1126 } 1127 } 1128 protocol = sb.toString(); 1129 } 1130 1131 value.setProtocol(protocol); 1132 //String host = registry.getString( prefix + "host", value.getHost() ); 1133 1134 List<String> hostList = registry.getList(prefix + "host"); 1135 String host = value.getHost(); 1136 if (hostList != null && !hostList.isEmpty()) { 1137 StringBuilder sb = new StringBuilder(); 1138 for (int i = 0, size = hostList.size(); i < size; i++) { 1139 sb.append(hostList.get(i)); 1140 if (i < size - 1) { 1141 sb.append(','); 1142 } 1143 } 1144 host = sb.toString(); 1145 } 1146 1147 value.setHost(host); 1148 int port = registry.getInt(prefix + "port", value.getPort()); 1149 value.setPort(port); 1150 //String username = registry.getString( prefix + "username", value.getUsername() ); 1151 1152 List<String> usernameList = registry.getList(prefix + "username"); 1153 String username = value.getUsername(); 1154 if (usernameList != null && !usernameList.isEmpty()) { 1155 StringBuilder sb = new StringBuilder(); 1156 for (int i = 0, size = usernameList.size(); i < size; i++) { 1157 sb.append(usernameList.get(i)); 1158 if (i < size - 1) { 1159 sb.append(','); 1160 } 1161 } 1162 username = sb.toString(); 1163 } 1164 1165 value.setUsername(username); 1166 //String password = registry.getString( prefix + "password", value.getPassword() ); 1167 1168 List<String> passwordList = registry.getList(prefix + "password"); 1169 String password = value.getPassword(); 1170 if (passwordList != null && !passwordList.isEmpty()) { 1171 StringBuilder sb = new StringBuilder(); 1172 for (int i = 0, size = passwordList.size(); i < size; i++) { 1173 sb.append(passwordList.get(i)); 1174 if (i < size - 1) { 1175 sb.append(','); 1176 } 1177 } 1178 password = sb.toString(); 1179 } 1180 1181 value.setPassword(password); 1182 boolean useNtlm = registry.getBoolean(prefix + "useNtlm", value.isUseNtlm()); 1183 value.setUseNtlm(useNtlm); 1184 1185 return value; 1186 } 1187 1188 private RepositoryScanningConfiguration readRepositoryScanningConfiguration(String prefix, Registry registry) { 1189 RepositoryScanningConfiguration value = new RepositoryScanningConfiguration(); 1190 1191 java.util.List fileTypes = new java.util.ArrayList/*<FileType>*/(); 1192 List fileTypesSubsets = registry.getSubsetList(prefix + "fileTypes.fileType"); 1193 for (Iterator i = fileTypesSubsets.iterator(); i.hasNext(); ) { 1194 FileType v = readFileType("", (Registry) i.next()); 1195 fileTypes.add(v); 1196 } 1197 value.setFileTypes(fileTypes); 1198 java.util.List knownContentConsumers = new java.util.ArrayList/*<String>*/(); 1199 knownContentConsumers.addAll(registry.getList(prefix + "knownContentConsumers.knownContentConsumer")); 1200 value.setKnownContentConsumers(knownContentConsumers); 1201 java.util.List invalidContentConsumers = new java.util.ArrayList/*<String>*/(); 1202 invalidContentConsumers.addAll(registry.getList(prefix + "invalidContentConsumers.invalidContentConsumer")); 1203 value.setInvalidContentConsumers(invalidContentConsumers); 1204 1205 return value; 1206 } 1207 1208 private FileType readFileType(String prefix, Registry registry) { 1209 FileType value = new FileType(); 1210 1211 //String id = registry.getString( prefix + "id", value.getId() ); 1212 1213 List<String> idList = registry.getList(prefix + "id"); 1214 String id = value.getId(); 1215 if (idList != null && !idList.isEmpty()) { 1216 StringBuilder sb = new StringBuilder(); 1217 for (int i = 0, size = idList.size(); i < size; i++) { 1218 sb.append(idList.get(i)); 1219 if (i < size - 1) { 1220 sb.append(','); 1221 } 1222 } 1223 id = sb.toString(); 1224 } 1225 1226 value.setId(id); 1227 java.util.List patterns = new java.util.ArrayList/*<String>*/(); 1228 patterns.addAll(registry.getList(prefix + "patterns.pattern")); 1229 value.setPatterns(patterns); 1230 1231 return value; 1232 } 1233 1234 private OrganisationInformation readOrganisationInformation(String prefix, Registry registry) { 1235 OrganisationInformation value = new OrganisationInformation(); 1236 1237 //String name = registry.getString( prefix + "name", value.getName() ); 1238 1239 List<String> nameList = registry.getList(prefix + "name"); 1240 String name = value.getName(); 1241 if (nameList != null && !nameList.isEmpty()) { 1242 StringBuilder sb = new StringBuilder(); 1243 for (int i = 0, size = nameList.size(); i < size; i++) { 1244 sb.append(nameList.get(i)); 1245 if (i < size - 1) { 1246 sb.append(','); 1247 } 1248 } 1249 name = sb.toString(); 1250 } 1251 1252 value.setName(name); 1253 //String url = registry.getString( prefix + "url", value.getUrl() ); 1254 1255 List<String> urlList = registry.getList(prefix + "url"); 1256 String url = value.getUrl(); 1257 if (urlList != null && !urlList.isEmpty()) { 1258 StringBuilder sb = new StringBuilder(); 1259 for (int i = 0, size = urlList.size(); i < size; i++) { 1260 sb.append(urlList.get(i)); 1261 if (i < size - 1) { 1262 sb.append(','); 1263 } 1264 } 1265 url = sb.toString(); 1266 } 1267 1268 value.setUrl(url); 1269 //String logoLocation = registry.getString( prefix + "logoLocation", value.getLogoLocation() ); 1270 1271 List<String> logoLocationList = registry.getList(prefix + "logoLocation"); 1272 String logoLocation = value.getLogoLocation(); 1273 if (logoLocationList != null && !logoLocationList.isEmpty()) { 1274 StringBuilder sb = new StringBuilder(); 1275 for (int i = 0, size = logoLocationList.size(); i < size; i++) { 1276 sb.append(logoLocationList.get(i)); 1277 if (i < size - 1) { 1278 sb.append(','); 1279 } 1280 } 1281 logoLocation = sb.toString(); 1282 } 1283 1284 value.setLogoLocation(logoLocation); 1285 1286 return value; 1287 } 1288 1289 private WebappConfiguration readWebappConfiguration(String prefix, Registry registry) { 1290 WebappConfiguration value = new WebappConfiguration(); 1291 1292 UserInterfaceOptions ui = readUserInterfaceOptions(prefix + "ui.", registry); 1293 value.setUi(ui); 1294 1295 return value; 1296 } 1297 1298 private UserInterfaceOptions readUserInterfaceOptions(String prefix, Registry registry) { 1299 UserInterfaceOptions value = new UserInterfaceOptions(); 1300 1301 boolean showFindArtifacts = registry.getBoolean(prefix + "showFindArtifacts", value.isShowFindArtifacts()); 1302 value.setShowFindArtifacts(showFindArtifacts); 1303 boolean appletFindEnabled = registry.getBoolean(prefix + "appletFindEnabled", value.isAppletFindEnabled()); 1304 value.setAppletFindEnabled(appletFindEnabled); 1305 boolean disableEasterEggs = registry.getBoolean(prefix + "disableEasterEggs", value.isDisableEasterEggs()); 1306 value.setDisableEasterEggs(disableEasterEggs); 1307 //String applicationUrl = registry.getString( prefix + "applicationUrl", value.getApplicationUrl() ); 1308 1309 List<String> applicationUrlList = registry.getList(prefix + "applicationUrl"); 1310 String applicationUrl = value.getApplicationUrl(); 1311 if (applicationUrlList != null && !applicationUrlList.isEmpty()) { 1312 StringBuilder sb = new StringBuilder(); 1313 for (int i = 0, size = applicationUrlList.size(); i < size; i++) { 1314 sb.append(applicationUrlList.get(i)); 1315 if (i < size - 1) { 1316 sb.append(','); 1317 } 1318 } 1319 applicationUrl = sb.toString(); 1320 } 1321 1322 value.setApplicationUrl(applicationUrl); 1323 boolean disableRegistration = registry.getBoolean(prefix + "disableRegistration", value.isDisableRegistration()); 1324 value.setDisableRegistration(disableRegistration); 1325 1326 return value; 1327 } 1328 1329 private NetworkConfiguration readNetworkConfiguration(String prefix, Registry registry) { 1330 NetworkConfiguration value = new NetworkConfiguration(); 1331 1332 int maxTotal = registry.getInt(prefix + "maxTotal", value.getMaxTotal()); 1333 value.setMaxTotal(maxTotal); 1334 int maxTotalPerHost = registry.getInt(prefix + "maxTotalPerHost", value.getMaxTotalPerHost()); 1335 value.setMaxTotalPerHost(maxTotalPerHost); 1336 boolean usePooling = registry.getBoolean(prefix + "usePooling", value.isUsePooling()); 1337 value.setUsePooling(usePooling); 1338 1339 return value; 1340 } 1341 1342 private ArchivaRuntimeConfiguration readArchivaRuntimeConfiguration(String prefix, Registry registry) { 1343 ArchivaRuntimeConfiguration value = new ArchivaRuntimeConfiguration(); 1344 1345 CacheConfiguration urlFailureCacheConfiguration = readCacheConfiguration(prefix + "urlFailureCacheConfiguration.", registry); 1346 value.setUrlFailureCacheConfiguration(urlFailureCacheConfiguration); 1347 FileLockConfiguration fileLockConfiguration = readFileLockConfiguration(prefix + "fileLockConfiguration.", registry); 1348 value.setFileLockConfiguration(fileLockConfiguration); 1349 //String dataDirectory = registry.getString( prefix + "dataDirectory", value.getDataDirectory() ); 1350 1351 List<String> dataDirectoryList = registry.getList(prefix + "dataDirectory"); 1352 String dataDirectory = value.getDataDirectory(); 1353 if (dataDirectoryList != null && !dataDirectoryList.isEmpty()) { 1354 StringBuilder sb = new StringBuilder(); 1355 for (int i = 0, size = dataDirectoryList.size(); i < size; i++) { 1356 sb.append(dataDirectoryList.get(i)); 1357 if (i < size - 1) { 1358 sb.append(','); 1359 } 1360 } 1361 dataDirectory = sb.toString(); 1362 } 1363 1364 value.setDataDirectory(dataDirectory); 1365 //String repositoryBaseDirectory = registry.getString( prefix + "repositoryBaseDirectory", value.getRepositoryBaseDirectory() ); 1366 1367 List<String> repositoryBaseDirectoryList = registry.getList(prefix + "repositoryBaseDirectory"); 1368 String repositoryBaseDirectory = value.getRepositoryBaseDirectory(); 1369 if (repositoryBaseDirectoryList != null && !repositoryBaseDirectoryList.isEmpty()) { 1370 StringBuilder sb = new StringBuilder(); 1371 for (int i = 0, size = repositoryBaseDirectoryList.size(); i < size; i++) { 1372 sb.append(repositoryBaseDirectoryList.get(i)); 1373 if (i < size - 1) { 1374 sb.append(','); 1375 } 1376 } 1377 repositoryBaseDirectory = sb.toString(); 1378 } 1379 1380 value.setRepositoryBaseDirectory(repositoryBaseDirectory); 1381 //String remoteRepositoryBaseDirectory = registry.getString( prefix + "remoteRepositoryBaseDirectory", value.getRemoteRepositoryBaseDirectory() ); 1382 1383 List<String> remoteRepositoryBaseDirectoryList = registry.getList(prefix + "remoteRepositoryBaseDirectory"); 1384 String remoteRepositoryBaseDirectory = value.getRemoteRepositoryBaseDirectory(); 1385 if (remoteRepositoryBaseDirectoryList != null && !remoteRepositoryBaseDirectoryList.isEmpty()) { 1386 StringBuilder sb = new StringBuilder(); 1387 for (int i = 0, size = remoteRepositoryBaseDirectoryList.size(); i < size; i++) { 1388 sb.append(remoteRepositoryBaseDirectoryList.get(i)); 1389 if (i < size - 1) { 1390 sb.append(','); 1391 } 1392 } 1393 remoteRepositoryBaseDirectory = sb.toString(); 1394 } 1395 1396 value.setRemoteRepositoryBaseDirectory(remoteRepositoryBaseDirectory); 1397 //String defaultLanguage = registry.getString( prefix + "defaultLanguage", value.getDefaultLanguage() ); 1398 1399 1400 List<String> repositoryGroupBaseDirectoryList = registry.getList(prefix + "repositoryGroupBaseDirectory"); 1401 String repositoryGroupBaseDirectory = value.getRepositoryGroupBaseDirectory(); 1402 if (repositoryGroupBaseDirectoryList != null && !repositoryGroupBaseDirectoryList.isEmpty()) { 1403 StringBuilder sb = new StringBuilder(); 1404 for (int i = 0, size = repositoryGroupBaseDirectoryList.size(); i < size; i++) { 1405 sb.append(repositoryGroupBaseDirectoryList.get(i)); 1406 if (i < size - 1) { 1407 sb.append(','); 1408 } 1409 } 1410 repositoryGroupBaseDirectory = sb.toString(); 1411 } 1412 1413 value.setRepositoryGroupBaseDirectory(repositoryGroupBaseDirectory); 1414 1415 List<String> defaultLanguageList = registry.getList(prefix + "defaultLanguage"); 1416 String defaultLanguage = value.getDefaultLanguage(); 1417 if (defaultLanguageList != null && !defaultLanguageList.isEmpty()) { 1418 StringBuilder sb = new StringBuilder(); 1419 for (int i = 0, size = defaultLanguageList.size(); i < size; i++) { 1420 sb.append(defaultLanguageList.get(i)); 1421 if (i < size - 1) { 1422 sb.append(','); 1423 } 1424 } 1425 defaultLanguage = sb.toString(); 1426 } 1427 1428 value.setDefaultLanguage(defaultLanguage); 1429 //String languageRange = registry.getString( prefix + "languageRange", value.getLanguageRange() ); 1430 1431 List<String> languageRangeList = registry.getList(prefix + "languageRange"); 1432 String languageRange = value.getLanguageRange(); 1433 if (languageRangeList != null && !languageRangeList.isEmpty()) { 1434 StringBuilder sb = new StringBuilder(); 1435 for (int i = 0, size = languageRangeList.size(); i < size; i++) { 1436 sb.append(languageRangeList.get(i)); 1437 if (i < size - 1) { 1438 sb.append(','); 1439 } 1440 } 1441 languageRange = sb.toString(); 1442 } 1443 1444 value.setLanguageRange(languageRange); 1445 1446 List<String> checksumTypeList = registry.getList(prefix + "checksumTypes.type"); 1447 value.setChecksumTypes(checksumTypeList); 1448 1449 return value; 1450 } 1451 1452 private RedbackRuntimeConfiguration readRedbackRuntimeConfiguration(String prefix, Registry registry) { 1453 RedbackRuntimeConfiguration value = new RedbackRuntimeConfiguration(); 1454 1455 boolean migratedFromRedbackConfiguration = registry.getBoolean(prefix + "migratedFromRedbackConfiguration", value.isMigratedFromRedbackConfiguration()); 1456 value.setMigratedFromRedbackConfiguration(migratedFromRedbackConfiguration); 1457 java.util.List userManagerImpls = new java.util.ArrayList/*<String>*/(); 1458 userManagerImpls.addAll(registry.getList(prefix + "userManagerImpls.userManagerImpl")); 1459 value.setUserManagerImpls(userManagerImpls); 1460 java.util.List rbacManagerImpls = new java.util.ArrayList/*<String>*/(); 1461 rbacManagerImpls.addAll(registry.getList(prefix + "rbacManagerImpls.rbacManagerImpl")); 1462 value.setRbacManagerImpls(rbacManagerImpls); 1463 LdapConfiguration ldapConfiguration = readLdapConfiguration(prefix + "ldapConfiguration.", registry); 1464 value.setLdapConfiguration(ldapConfiguration); 1465 java.util.List ldapGroupMappings = new java.util.ArrayList/*<LdapGroupMapping>*/(); 1466 List ldapGroupMappingsSubsets = registry.getSubsetList(prefix + "ldapGroupMappings.ldapGroupMapping"); 1467 for (Iterator i = ldapGroupMappingsSubsets.iterator(); i.hasNext(); ) { 1468 LdapGroupMapping v = readLdapGroupMapping("", (Registry) i.next()); 1469 ldapGroupMappings.add(v); 1470 } 1471 value.setLdapGroupMappings(ldapGroupMappings); 1472 java.util.Map configurationProperties = registry.getProperties(prefix + "configurationProperties"); 1473 value.setConfigurationProperties(configurationProperties); 1474 boolean useUsersCache = registry.getBoolean(prefix + "useUsersCache", value.isUseUsersCache()); 1475 value.setUseUsersCache(useUsersCache); 1476 CacheConfiguration usersCacheConfiguration = readCacheConfiguration(prefix + "usersCacheConfiguration.", registry); 1477 value.setUsersCacheConfiguration(usersCacheConfiguration); 1478 1479 return value; 1480 } 1481 1482 private ArchivaDefaultConfiguration readArchivaDefaultConfiguration(String prefix, Registry registry) { 1483 ArchivaDefaultConfiguration value = new ArchivaDefaultConfiguration(); 1484 1485 java.util.List defaultCheckPaths = new java.util.ArrayList/*<RepositoryCheckPath>*/(); 1486 List defaultCheckPathsSubsets = registry.getSubsetList(prefix + "defaultCheckPaths.defaultCheckPath"); 1487 for (Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) { 1488 RepositoryCheckPath v = readRepositoryCheckPath("", (Registry) i.next()); 1489 defaultCheckPaths.add(v); 1490 } 1491 value.setDefaultCheckPaths(defaultCheckPaths); 1492 1493 return value; 1494 } 1495 1496 private LdapConfiguration readLdapConfiguration(String prefix, Registry registry) { 1497 LdapConfiguration value = new LdapConfiguration(); 1498 1499 //String hostName = registry.getString( prefix + "hostName", value.getHostName() ); 1500 1501 List<String> hostNameList = registry.getList(prefix + "hostName"); 1502 String hostName = value.getHostName(); 1503 if (hostNameList != null && !hostNameList.isEmpty()) { 1504 StringBuilder sb = new StringBuilder(); 1505 for (int i = 0, size = hostNameList.size(); i < size; i++) { 1506 sb.append(hostNameList.get(i)); 1507 if (i < size - 1) { 1508 sb.append(','); 1509 } 1510 } 1511 hostName = sb.toString(); 1512 } 1513 1514 value.setHostName(hostName); 1515 int port = registry.getInt(prefix + "port", value.getPort()); 1516 value.setPort(port); 1517 boolean ssl = registry.getBoolean(prefix + "ssl", value.isSsl()); 1518 value.setSsl(ssl); 1519 //String baseDn = registry.getString( prefix + "baseDn", value.getBaseDn() ); 1520 1521 List<String> baseDnList = registry.getList(prefix + "baseDn"); 1522 String baseDn = value.getBaseDn(); 1523 if (baseDnList != null && !baseDnList.isEmpty()) { 1524 StringBuilder sb = new StringBuilder(); 1525 for (int i = 0, size = baseDnList.size(); i < size; i++) { 1526 sb.append(baseDnList.get(i)); 1527 if (i < size - 1) { 1528 sb.append(','); 1529 } 1530 } 1531 baseDn = sb.toString(); 1532 } 1533 1534 value.setBaseDn(baseDn); 1535 //String baseGroupsDn = registry.getString( prefix + "baseGroupsDn", value.getBaseGroupsDn() ); 1536 1537 List<String> baseGroupsDnList = registry.getList(prefix + "baseGroupsDn"); 1538 String baseGroupsDn = value.getBaseGroupsDn(); 1539 if (baseGroupsDnList != null && !baseGroupsDnList.isEmpty()) { 1540 StringBuilder sb = new StringBuilder(); 1541 for (int i = 0, size = baseGroupsDnList.size(); i < size; i++) { 1542 sb.append(baseGroupsDnList.get(i)); 1543 if (i < size - 1) { 1544 sb.append(','); 1545 } 1546 } 1547 baseGroupsDn = sb.toString(); 1548 } 1549 1550 value.setBaseGroupsDn(baseGroupsDn); 1551 //String contextFactory = registry.getString( prefix + "contextFactory", value.getContextFactory() ); 1552 1553 List<String> contextFactoryList = registry.getList(prefix + "contextFactory"); 1554 String contextFactory = value.getContextFactory(); 1555 if (contextFactoryList != null && !contextFactoryList.isEmpty()) { 1556 StringBuilder sb = new StringBuilder(); 1557 for (int i = 0, size = contextFactoryList.size(); i < size; i++) { 1558 sb.append(contextFactoryList.get(i)); 1559 if (i < size - 1) { 1560 sb.append(','); 1561 } 1562 } 1563 contextFactory = sb.toString(); 1564 } 1565 1566 value.setContextFactory(contextFactory); 1567 //String bindDn = registry.getString( prefix + "bindDn", value.getBindDn() ); 1568 1569 List<String> bindDnList = registry.getList(prefix + "bindDn"); 1570 String bindDn = value.getBindDn(); 1571 if (bindDnList != null && !bindDnList.isEmpty()) { 1572 StringBuilder sb = new StringBuilder(); 1573 for (int i = 0, size = bindDnList.size(); i < size; i++) { 1574 sb.append(bindDnList.get(i)); 1575 if (i < size - 1) { 1576 sb.append(','); 1577 } 1578 } 1579 bindDn = sb.toString(); 1580 } 1581 1582 value.setBindDn(bindDn); 1583 //String password = registry.getString( prefix + "password", value.getPassword() ); 1584 1585 List<String> passwordList = registry.getList(prefix + "password"); 1586 String password = value.getPassword(); 1587 if (passwordList != null && !passwordList.isEmpty()) { 1588 StringBuilder sb = new StringBuilder(); 1589 for (int i = 0, size = passwordList.size(); i < size; i++) { 1590 sb.append(passwordList.get(i)); 1591 if (i < size - 1) { 1592 sb.append(','); 1593 } 1594 } 1595 password = sb.toString(); 1596 } 1597 1598 value.setPassword(password); 1599 //String authenticationMethod = registry.getString( prefix + "authenticationMethod", value.getAuthenticationMethod() ); 1600 1601 List<String> authenticationMethodList = registry.getList(prefix + "authenticationMethod"); 1602 String authenticationMethod = value.getAuthenticationMethod(); 1603 if (authenticationMethodList != null && !authenticationMethodList.isEmpty()) { 1604 StringBuilder sb = new StringBuilder(); 1605 for (int i = 0, size = authenticationMethodList.size(); i < size; i++) { 1606 sb.append(authenticationMethodList.get(i)); 1607 if (i < size - 1) { 1608 sb.append(','); 1609 } 1610 } 1611 authenticationMethod = sb.toString(); 1612 } 1613 1614 value.setAuthenticationMethod(authenticationMethod); 1615 boolean bindAuthenticatorEnabled = registry.getBoolean(prefix + "bindAuthenticatorEnabled", value.isBindAuthenticatorEnabled()); 1616 value.setBindAuthenticatorEnabled(bindAuthenticatorEnabled); 1617 boolean writable = registry.getBoolean(prefix + "writable", value.isWritable()); 1618 value.setWritable(writable); 1619 boolean useRoleNameAsGroup = registry.getBoolean(prefix + "useRoleNameAsGroup", value.isUseRoleNameAsGroup()); 1620 value.setUseRoleNameAsGroup(useRoleNameAsGroup); 1621 java.util.Map extraProperties = registry.getProperties(prefix + "extraProperties"); 1622 value.setExtraProperties(extraProperties); 1623 1624 return value; 1625 } 1626 1627 private FileLockConfiguration readFileLockConfiguration(String prefix, Registry registry) { 1628 FileLockConfiguration value = new FileLockConfiguration(); 1629 1630 boolean skipLocking = registry.getBoolean(prefix + "skipLocking", value.isSkipLocking()); 1631 value.setSkipLocking(skipLocking); 1632 int lockingTimeout = registry.getInt(prefix + "lockingTimeout", value.getLockingTimeout()); 1633 value.setLockingTimeout(lockingTimeout); 1634 1635 return value; 1636 } 1637 1638 private CacheConfiguration readCacheConfiguration(String prefix, Registry registry) { 1639 CacheConfiguration value = new CacheConfiguration(); 1640 1641 int timeToIdleSeconds = registry.getInt(prefix + "timeToIdleSeconds", value.getTimeToIdleSeconds()); 1642 value.setTimeToIdleSeconds(timeToIdleSeconds); 1643 int timeToLiveSeconds = registry.getInt(prefix + "timeToLiveSeconds", value.getTimeToLiveSeconds()); 1644 value.setTimeToLiveSeconds(timeToLiveSeconds); 1645 int maxElementsInMemory = registry.getInt(prefix + "maxElementsInMemory", value.getMaxElementsInMemory()); 1646 value.setMaxElementsInMemory(maxElementsInMemory); 1647 int maxElementsOnDisk = registry.getInt(prefix + "maxElementsOnDisk", value.getMaxElementsOnDisk()); 1648 value.setMaxElementsOnDisk(maxElementsOnDisk); 1649 1650 return value; 1651 } 1652 1653 private LdapGroupMapping readLdapGroupMapping(String prefix, Registry registry) { 1654 LdapGroupMapping value = new LdapGroupMapping(); 1655 1656 //String group = registry.getString( prefix + "group", value.getGroup() ); 1657 1658 List<String> groupList = registry.getList(prefix + "group"); 1659 String group = value.getGroup(); 1660 if (groupList != null && !groupList.isEmpty()) { 1661 StringBuilder sb = new StringBuilder(); 1662 for (int i = 0, size = groupList.size(); i < size; i++) { 1663 sb.append(groupList.get(i)); 1664 if (i < size - 1) { 1665 sb.append(','); 1666 } 1667 } 1668 group = sb.toString(); 1669 } 1670 1671 value.setGroup(group); 1672 java.util.List roleNames = new java.util.ArrayList/*<String>*/(); 1673 roleNames.addAll(registry.getList(prefix + "roleNames.roleName")); 1674 value.setRoleNames(roleNames); 1675 1676 return value; 1677 } 1678 1679}