]> source.dussan.org Git - archiva.git/blob
27146f5e6ebc65d20dcb13a6c9d7e29b2eea9621
[archiva.git] /
1
2 package org.apache.archiva.configuration.io.registry;
3
4 /*
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements.  See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership.  The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License.  You may obtain a copy of the License at
12  *
13  *   http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied.  See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  */
22
23 import org.apache.archiva.configuration.*;
24 import org.apache.archiva.components.registry.Registry;
25
26 import java.util.Iterator;
27 import java.util.List;
28
29 // Util imports
30 // Model class imports
31
32
33 /**
34  * Generate Redback Registry input mechanism for model 'Configuration'.
35  */
36 public class ConfigurationRegistryReader {
37     public Configuration read(Registry registry) {
38         return readConfiguration("", registry);
39     }
40
41     private Configuration readConfiguration(String prefix, Registry registry) {
42         Configuration value = new Configuration();
43
44         //String version = registry.getString( prefix + "version", value.getVersion() );
45
46         List<String> versionList = registry.getList(prefix + "version");
47         String version = value.getVersion();
48         if (versionList != null && !versionList.isEmpty()) {
49             StringBuilder sb = new StringBuilder();
50             for (int i = 0, size = versionList.size(); i < size; i++) {
51                 sb.append(versionList.get(i));
52                 if (i < size - 1) {
53                     sb.append(',');
54                 }
55             }
56             version = sb.toString();
57         }
58
59         value.setVersion(version);
60         //String metadataStore = registry.getString( prefix + "metadataStore", value.getMetadataStore() );
61
62         List<String> metadataStoreList = registry.getList(prefix + "metadataStore");
63         String metadataStore = value.getMetadataStore();
64         if (metadataStoreList != null && !metadataStoreList.isEmpty()) {
65             StringBuilder sb = new StringBuilder();
66             for (int i = 0, size = metadataStoreList.size(); i < size; i++) {
67                 sb.append(metadataStoreList.get(i));
68                 if (i < size - 1) {
69                     sb.append(',');
70                 }
71             }
72             metadataStore = sb.toString();
73         }
74
75         value.setMetadataStore(metadataStore);
76         java.util.List repositoryGroups = new java.util.ArrayList/*<RepositoryGroupConfiguration>*/();
77         List repositoryGroupsSubsets = registry.getSubsetList(prefix + "repositoryGroups.repositoryGroup");
78         for (Iterator i = repositoryGroupsSubsets.iterator(); i.hasNext(); ) {
79             RepositoryGroupConfiguration v = readRepositoryGroupConfiguration("", (Registry) i.next());
80             repositoryGroups.add(v);
81         }
82         value.setRepositoryGroups(repositoryGroups);
83         java.util.List managedRepositories = new java.util.ArrayList/*<ManagedRepositoryConfiguration>*/();
84         List managedRepositoriesSubsets = registry.getSubsetList(prefix + "managedRepositories.managedRepository");
85         for (Iterator i = managedRepositoriesSubsets.iterator(); i.hasNext(); ) {
86             ManagedRepositoryConfiguration v = readManagedRepositoryConfiguration("", (Registry) i.next());
87             managedRepositories.add(v);
88         }
89         value.setManagedRepositories(managedRepositories);
90         java.util.List remoteRepositories = new java.util.ArrayList/*<RemoteRepositoryConfiguration>*/();
91         List remoteRepositoriesSubsets = registry.getSubsetList(prefix + "remoteRepositories.remoteRepository");
92         for (Iterator i = remoteRepositoriesSubsets.iterator(); i.hasNext(); ) {
93             RemoteRepositoryConfiguration v = readRemoteRepositoryConfiguration("", (Registry) i.next());
94             remoteRepositories.add(v);
95         }
96         value.setRemoteRepositories(remoteRepositories);
97         java.util.List proxyConnectors = new java.util.ArrayList/*<ProxyConnectorConfiguration>*/();
98         List proxyConnectorsSubsets = registry.getSubsetList(prefix + "proxyConnectors.proxyConnector");
99         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         value.setLocation( registry.getString( prefix + "location" ) );
757
758         List<String> cronExpressionList = registry.getList(prefix + "cronExpression");
759         String cronExpression = value.getCronExpression();
760         if (cronExpressionList != null && !cronExpressionList.isEmpty()) {
761             StringBuilder sb = new StringBuilder();
762             for (int i = 0, size = cronExpressionList.size(); i < size; i++) {
763                 sb.append(cronExpressionList.get(i));
764                 if (i < size - 1) {
765                     sb.append(',');
766                 }
767             }
768             cronExpression = sb.toString();
769         }
770
771         value.setCronExpression(cronExpression);
772         java.util.List repositories = new java.util.ArrayList/*<String>*/();
773         repositories.addAll(registry.getList(prefix + "repositories.repository"));
774         value.setRepositories(repositories);
775
776         return value;
777     }
778
779     private RepositoryCheckPath readRepositoryCheckPath(String prefix, Registry registry) {
780         RepositoryCheckPath value = new RepositoryCheckPath();
781
782         //String url = registry.getString( prefix + "url", value.getUrl() );
783
784         List<String> urlList = registry.getList(prefix + "url");
785         String url = value.getUrl();
786         if (urlList != null && !urlList.isEmpty()) {
787             StringBuilder sb = new StringBuilder();
788             for (int i = 0, size = urlList.size(); i < size; i++) {
789                 sb.append(urlList.get(i));
790                 if (i < size - 1) {
791                     sb.append(',');
792                 }
793             }
794             url = sb.toString();
795         }
796
797         value.setUrl(url);
798         //String path = registry.getString( prefix + "path", value.getPath() );
799
800         List<String> pathList = registry.getList(prefix + "path");
801         String path = value.getPath();
802         if (pathList != null && !pathList.isEmpty()) {
803             StringBuilder sb = new StringBuilder();
804             for (int i = 0, size = pathList.size(); i < size; i++) {
805                 sb.append(pathList.get(i));
806                 if (i < size - 1) {
807                     sb.append(',');
808                 }
809             }
810             path = sb.toString();
811         }
812
813         value.setPath(path);
814
815         return value;
816     }
817
818     private AbstractRepositoryConnectorConfiguration readAbstractRepositoryConnectorConfiguration(String prefix, Registry registry) {
819         AbstractRepositoryConnectorConfiguration value = new AbstractRepositoryConnectorConfiguration();
820
821         //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() );
822
823         List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId");
824         String sourceRepoId = value.getSourceRepoId();
825         if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) {
826             StringBuilder sb = new StringBuilder();
827             for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) {
828                 sb.append(sourceRepoIdList.get(i));
829                 if (i < size - 1) {
830                     sb.append(',');
831                 }
832             }
833             sourceRepoId = sb.toString();
834         }
835
836         value.setSourceRepoId(sourceRepoId);
837         //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() );
838
839         List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId");
840         String targetRepoId = value.getTargetRepoId();
841         if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) {
842             StringBuilder sb = new StringBuilder();
843             for (int i = 0, size = targetRepoIdList.size(); i < size; i++) {
844                 sb.append(targetRepoIdList.get(i));
845                 if (i < size - 1) {
846                     sb.append(',');
847                 }
848             }
849             targetRepoId = sb.toString();
850         }
851
852         value.setTargetRepoId(targetRepoId);
853         //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() );
854
855         List<String> proxyIdList = registry.getList(prefix + "proxyId");
856         String proxyId = value.getProxyId();
857         if (proxyIdList != null && !proxyIdList.isEmpty()) {
858             StringBuilder sb = new StringBuilder();
859             for (int i = 0, size = proxyIdList.size(); i < size; i++) {
860                 sb.append(proxyIdList.get(i));
861                 if (i < size - 1) {
862                     sb.append(',');
863                 }
864             }
865             proxyId = sb.toString();
866         }
867
868         value.setProxyId(proxyId);
869         java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/();
870         blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern"));
871         value.setBlackListPatterns(blackListPatterns);
872         java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/();
873         whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern"));
874         value.setWhiteListPatterns(whiteListPatterns);
875         java.util.Map policies = registry.getProperties(prefix + "policies");
876         value.setPolicies(policies);
877         java.util.Map properties = registry.getProperties(prefix + "properties");
878         value.setProperties(properties);
879         boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled());
880         value.setDisabled(disabled);
881
882         return value;
883     }
884
885     private ProxyConnectorRuleConfiguration readProxyConnectorRuleConfiguration(String prefix, Registry registry) {
886         ProxyConnectorRuleConfiguration value = new ProxyConnectorRuleConfiguration();
887
888         //String ruleType = registry.getString( prefix + "ruleType", value.getRuleType() );
889
890         List<String> ruleTypeList = registry.getList(prefix + "ruleType");
891         String ruleType = value.getRuleType();
892         if (ruleTypeList != null && !ruleTypeList.isEmpty()) {
893             StringBuilder sb = new StringBuilder();
894             for (int i = 0, size = ruleTypeList.size(); i < size; i++) {
895                 sb.append(ruleTypeList.get(i));
896                 if (i < size - 1) {
897                     sb.append(',');
898                 }
899             }
900             ruleType = sb.toString();
901         }
902
903         value.setRuleType(ruleType);
904         //String pattern = registry.getString( prefix + "pattern", value.getPattern() );
905
906         List<String> patternList = registry.getList(prefix + "pattern");
907         String pattern = value.getPattern();
908         if (patternList != null && !patternList.isEmpty()) {
909             StringBuilder sb = new StringBuilder();
910             for (int i = 0, size = patternList.size(); i < size; i++) {
911                 sb.append(patternList.get(i));
912                 if (i < size - 1) {
913                     sb.append(',');
914                 }
915             }
916             pattern = sb.toString();
917         }
918
919         value.setPattern(pattern);
920         java.util.List proxyConnectors = new java.util.ArrayList/*<ProxyConnectorConfiguration>*/();
921         List proxyConnectorsSubsets = registry.getSubsetList(prefix + "proxyConnectors.proxyConnector");
922         for (Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); ) {
923             ProxyConnectorConfiguration v = readProxyConnectorConfiguration("", (Registry) i.next());
924             proxyConnectors.add(v);
925         }
926         value.setProxyConnectors(proxyConnectors);
927
928         return value;
929     }
930
931     private ProxyConnectorConfiguration readProxyConnectorConfiguration(String prefix, Registry registry) {
932         ProxyConnectorConfiguration value = new ProxyConnectorConfiguration();
933
934         int order = registry.getInt(prefix + "order", value.getOrder());
935         value.setOrder(order);
936         //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() );
937
938         List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId");
939         String sourceRepoId = value.getSourceRepoId();
940         if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) {
941             StringBuilder sb = new StringBuilder();
942             for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) {
943                 sb.append(sourceRepoIdList.get(i));
944                 if (i < size - 1) {
945                     sb.append(',');
946                 }
947             }
948             sourceRepoId = sb.toString();
949         }
950
951         value.setSourceRepoId(sourceRepoId);
952         //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() );
953
954         List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId");
955         String targetRepoId = value.getTargetRepoId();
956         if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) {
957             StringBuilder sb = new StringBuilder();
958             for (int i = 0, size = targetRepoIdList.size(); i < size; i++) {
959                 sb.append(targetRepoIdList.get(i));
960                 if (i < size - 1) {
961                     sb.append(',');
962                 }
963             }
964             targetRepoId = sb.toString();
965         }
966
967         value.setTargetRepoId(targetRepoId);
968         //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() );
969
970         List<String> proxyIdList = registry.getList(prefix + "proxyId");
971         String proxyId = value.getProxyId();
972         if (proxyIdList != null && !proxyIdList.isEmpty()) {
973             StringBuilder sb = new StringBuilder();
974             for (int i = 0, size = proxyIdList.size(); i < size; i++) {
975                 sb.append(proxyIdList.get(i));
976                 if (i < size - 1) {
977                     sb.append(',');
978                 }
979             }
980             proxyId = sb.toString();
981         }
982
983         value.setProxyId(proxyId);
984         java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/();
985         blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern"));
986         value.setBlackListPatterns(blackListPatterns);
987         java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/();
988         whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern"));
989         value.setWhiteListPatterns(whiteListPatterns);
990         java.util.Map policies = registry.getProperties(prefix + "policies");
991         value.setPolicies(policies);
992         java.util.Map properties = registry.getProperties(prefix + "properties");
993         value.setProperties(properties);
994         boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled());
995         value.setDisabled(disabled);
996
997         return value;
998     }
999
1000     private SyncConnectorConfiguration readSyncConnectorConfiguration(String prefix, Registry registry) {
1001         SyncConnectorConfiguration value = new SyncConnectorConfiguration();
1002
1003         //String cronExpression = registry.getString( prefix + "cronExpression", value.getCronExpression() );
1004
1005         List<String> cronExpressionList = registry.getList(prefix + "cronExpression");
1006         String cronExpression = value.getCronExpression();
1007         if (cronExpressionList != null && !cronExpressionList.isEmpty()) {
1008             StringBuilder sb = new StringBuilder();
1009             for (int i = 0, size = cronExpressionList.size(); i < size; i++) {
1010                 sb.append(cronExpressionList.get(i));
1011                 if (i < size - 1) {
1012                     sb.append(',');
1013                 }
1014             }
1015             cronExpression = sb.toString();
1016         }
1017
1018         value.setCronExpression(cronExpression);
1019         //String method = registry.getString( prefix + "method", value.getMethod() );
1020
1021         List<String> methodList = registry.getList(prefix + "method");
1022         String method = value.getMethod();
1023         if (methodList != null && !methodList.isEmpty()) {
1024             StringBuilder sb = new StringBuilder();
1025             for (int i = 0, size = methodList.size(); i < size; i++) {
1026                 sb.append(methodList.get(i));
1027                 if (i < size - 1) {
1028                     sb.append(',');
1029                 }
1030             }
1031             method = sb.toString();
1032         }
1033
1034         value.setMethod(method);
1035         //String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() );
1036
1037         List<String> sourceRepoIdList = registry.getList(prefix + "sourceRepoId");
1038         String sourceRepoId = value.getSourceRepoId();
1039         if (sourceRepoIdList != null && !sourceRepoIdList.isEmpty()) {
1040             StringBuilder sb = new StringBuilder();
1041             for (int i = 0, size = sourceRepoIdList.size(); i < size; i++) {
1042                 sb.append(sourceRepoIdList.get(i));
1043                 if (i < size - 1) {
1044                     sb.append(',');
1045                 }
1046             }
1047             sourceRepoId = sb.toString();
1048         }
1049
1050         value.setSourceRepoId(sourceRepoId);
1051         //String targetRepoId = registry.getString( prefix + "targetRepoId", value.getTargetRepoId() );
1052
1053         List<String> targetRepoIdList = registry.getList(prefix + "targetRepoId");
1054         String targetRepoId = value.getTargetRepoId();
1055         if (targetRepoIdList != null && !targetRepoIdList.isEmpty()) {
1056             StringBuilder sb = new StringBuilder();
1057             for (int i = 0, size = targetRepoIdList.size(); i < size; i++) {
1058                 sb.append(targetRepoIdList.get(i));
1059                 if (i < size - 1) {
1060                     sb.append(',');
1061                 }
1062             }
1063             targetRepoId = sb.toString();
1064         }
1065
1066         value.setTargetRepoId(targetRepoId);
1067         //String proxyId = registry.getString( prefix + "proxyId", value.getProxyId() );
1068
1069         List<String> proxyIdList = registry.getList(prefix + "proxyId");
1070         String proxyId = value.getProxyId();
1071         if (proxyIdList != null && !proxyIdList.isEmpty()) {
1072             StringBuilder sb = new StringBuilder();
1073             for (int i = 0, size = proxyIdList.size(); i < size; i++) {
1074                 sb.append(proxyIdList.get(i));
1075                 if (i < size - 1) {
1076                     sb.append(',');
1077                 }
1078             }
1079             proxyId = sb.toString();
1080         }
1081
1082         value.setProxyId(proxyId);
1083         java.util.List blackListPatterns = new java.util.ArrayList/*<String>*/();
1084         blackListPatterns.addAll(registry.getList(prefix + "blackListPatterns.blackListPattern"));
1085         value.setBlackListPatterns(blackListPatterns);
1086         java.util.List whiteListPatterns = new java.util.ArrayList/*<String>*/();
1087         whiteListPatterns.addAll(registry.getList(prefix + "whiteListPatterns.whiteListPattern"));
1088         value.setWhiteListPatterns(whiteListPatterns);
1089         java.util.Map policies = registry.getProperties(prefix + "policies");
1090         value.setPolicies(policies);
1091         java.util.Map properties = registry.getProperties(prefix + "properties");
1092         value.setProperties(properties);
1093         boolean disabled = registry.getBoolean(prefix + "disabled", value.isDisabled());
1094         value.setDisabled(disabled);
1095
1096         return value;
1097     }
1098
1099     private NetworkProxyConfiguration readNetworkProxyConfiguration(String prefix, Registry registry) {
1100         NetworkProxyConfiguration value = new NetworkProxyConfiguration();
1101
1102         //String id = registry.getString( prefix + "id", value.getId() );
1103
1104         List<String> idList = registry.getList(prefix + "id");
1105         String id = value.getId();
1106         if (idList != null && !idList.isEmpty()) {
1107             StringBuilder sb = new StringBuilder();
1108             for (int i = 0, size = idList.size(); i < size; i++) {
1109                 sb.append(idList.get(i));
1110                 if (i < size - 1) {
1111                     sb.append(',');
1112                 }
1113             }
1114             id = sb.toString();
1115         }
1116
1117         value.setId(id);
1118         //String protocol = registry.getString( prefix + "protocol", value.getProtocol() );
1119
1120         List<String> protocolList = registry.getList(prefix + "protocol");
1121         String protocol = value.getProtocol();
1122         if (protocolList != null && !protocolList.isEmpty()) {
1123             StringBuilder sb = new StringBuilder();
1124             for (int i = 0, size = protocolList.size(); i < size; i++) {
1125                 sb.append(protocolList.get(i));
1126                 if (i < size - 1) {
1127                     sb.append(',');
1128                 }
1129             }
1130             protocol = sb.toString();
1131         }
1132
1133         value.setProtocol(protocol);
1134         //String host = registry.getString( prefix + "host", value.getHost() );
1135
1136         List<String> hostList = registry.getList(prefix + "host");
1137         String host = value.getHost();
1138         if (hostList != null && !hostList.isEmpty()) {
1139             StringBuilder sb = new StringBuilder();
1140             for (int i = 0, size = hostList.size(); i < size; i++) {
1141                 sb.append(hostList.get(i));
1142                 if (i < size - 1) {
1143                     sb.append(',');
1144                 }
1145             }
1146             host = sb.toString();
1147         }
1148
1149         value.setHost(host);
1150         int port = registry.getInt(prefix + "port", value.getPort());
1151         value.setPort(port);
1152         //String username = registry.getString( prefix + "username", value.getUsername() );
1153
1154         List<String> usernameList = registry.getList(prefix + "username");
1155         String username = value.getUsername();
1156         if (usernameList != null && !usernameList.isEmpty()) {
1157             StringBuilder sb = new StringBuilder();
1158             for (int i = 0, size = usernameList.size(); i < size; i++) {
1159                 sb.append(usernameList.get(i));
1160                 if (i < size - 1) {
1161                     sb.append(',');
1162                 }
1163             }
1164             username = sb.toString();
1165         }
1166
1167         value.setUsername(username);
1168         //String password = registry.getString( prefix + "password", value.getPassword() );
1169
1170         List<String> passwordList = registry.getList(prefix + "password");
1171         String password = value.getPassword();
1172         if (passwordList != null && !passwordList.isEmpty()) {
1173             StringBuilder sb = new StringBuilder();
1174             for (int i = 0, size = passwordList.size(); i < size; i++) {
1175                 sb.append(passwordList.get(i));
1176                 if (i < size - 1) {
1177                     sb.append(',');
1178                 }
1179             }
1180             password = sb.toString();
1181         }
1182
1183         value.setPassword(password);
1184         boolean useNtlm = registry.getBoolean(prefix + "useNtlm", value.isUseNtlm());
1185         value.setUseNtlm(useNtlm);
1186
1187         return value;
1188     }
1189
1190     private RepositoryScanningConfiguration readRepositoryScanningConfiguration(String prefix, Registry registry) {
1191         RepositoryScanningConfiguration value = new RepositoryScanningConfiguration();
1192
1193         java.util.List fileTypes = new java.util.ArrayList/*<FileType>*/();
1194         List fileTypesSubsets = registry.getSubsetList(prefix + "fileTypes.fileType");
1195         for (Iterator i = fileTypesSubsets.iterator(); i.hasNext(); ) {
1196             FileType v = readFileType("", (Registry) i.next());
1197             fileTypes.add(v);
1198         }
1199         value.setFileTypes(fileTypes);
1200         java.util.List knownContentConsumers = new java.util.ArrayList/*<String>*/();
1201         knownContentConsumers.addAll(registry.getList(prefix + "knownContentConsumers.knownContentConsumer"));
1202         value.setKnownContentConsumers(knownContentConsumers);
1203         java.util.List invalidContentConsumers = new java.util.ArrayList/*<String>*/();
1204         invalidContentConsumers.addAll(registry.getList(prefix + "invalidContentConsumers.invalidContentConsumer"));
1205         value.setInvalidContentConsumers(invalidContentConsumers);
1206
1207         return value;
1208     }
1209
1210     private FileType readFileType(String prefix, Registry registry) {
1211         FileType value = new FileType();
1212
1213         //String id = registry.getString( prefix + "id", value.getId() );
1214
1215         List<String> idList = registry.getList(prefix + "id");
1216         String id = value.getId();
1217         if (idList != null && !idList.isEmpty()) {
1218             StringBuilder sb = new StringBuilder();
1219             for (int i = 0, size = idList.size(); i < size; i++) {
1220                 sb.append(idList.get(i));
1221                 if (i < size - 1) {
1222                     sb.append(',');
1223                 }
1224             }
1225             id = sb.toString();
1226         }
1227
1228         value.setId(id);
1229         java.util.List patterns = new java.util.ArrayList/*<String>*/();
1230         patterns.addAll(registry.getList(prefix + "patterns.pattern"));
1231         value.setPatterns(patterns);
1232
1233         return value;
1234     }
1235
1236     private OrganisationInformation readOrganisationInformation(String prefix, Registry registry) {
1237         OrganisationInformation value = new OrganisationInformation();
1238
1239         //String name = registry.getString( prefix + "name", value.getName() );
1240
1241         List<String> nameList = registry.getList(prefix + "name");
1242         String name = value.getName();
1243         if (nameList != null && !nameList.isEmpty()) {
1244             StringBuilder sb = new StringBuilder();
1245             for (int i = 0, size = nameList.size(); i < size; i++) {
1246                 sb.append(nameList.get(i));
1247                 if (i < size - 1) {
1248                     sb.append(',');
1249                 }
1250             }
1251             name = sb.toString();
1252         }
1253
1254         value.setName(name);
1255         //String url = registry.getString( prefix + "url", value.getUrl() );
1256
1257         List<String> urlList = registry.getList(prefix + "url");
1258         String url = value.getUrl();
1259         if (urlList != null && !urlList.isEmpty()) {
1260             StringBuilder sb = new StringBuilder();
1261             for (int i = 0, size = urlList.size(); i < size; i++) {
1262                 sb.append(urlList.get(i));
1263                 if (i < size - 1) {
1264                     sb.append(',');
1265                 }
1266             }
1267             url = sb.toString();
1268         }
1269
1270         value.setUrl(url);
1271         //String logoLocation = registry.getString( prefix + "logoLocation", value.getLogoLocation() );
1272
1273         List<String> logoLocationList = registry.getList(prefix + "logoLocation");
1274         String logoLocation = value.getLogoLocation();
1275         if (logoLocationList != null && !logoLocationList.isEmpty()) {
1276             StringBuilder sb = new StringBuilder();
1277             for (int i = 0, size = logoLocationList.size(); i < size; i++) {
1278                 sb.append(logoLocationList.get(i));
1279                 if (i < size - 1) {
1280                     sb.append(',');
1281                 }
1282             }
1283             logoLocation = sb.toString();
1284         }
1285
1286         value.setLogoLocation(logoLocation);
1287
1288         return value;
1289     }
1290
1291     private WebappConfiguration readWebappConfiguration(String prefix, Registry registry) {
1292         WebappConfiguration value = new WebappConfiguration();
1293
1294         UserInterfaceOptions ui = readUserInterfaceOptions(prefix + "ui.", registry);
1295         value.setUi(ui);
1296
1297         return value;
1298     }
1299
1300     private UserInterfaceOptions readUserInterfaceOptions(String prefix, Registry registry) {
1301         UserInterfaceOptions value = new UserInterfaceOptions();
1302
1303         boolean showFindArtifacts = registry.getBoolean(prefix + "showFindArtifacts", value.isShowFindArtifacts());
1304         value.setShowFindArtifacts(showFindArtifacts);
1305         boolean appletFindEnabled = registry.getBoolean(prefix + "appletFindEnabled", value.isAppletFindEnabled());
1306         value.setAppletFindEnabled(appletFindEnabled);
1307         boolean disableEasterEggs = registry.getBoolean(prefix + "disableEasterEggs", value.isDisableEasterEggs());
1308         value.setDisableEasterEggs(disableEasterEggs);
1309         //String applicationUrl = registry.getString( prefix + "applicationUrl", value.getApplicationUrl() );
1310
1311         List<String> applicationUrlList = registry.getList(prefix + "applicationUrl");
1312         String applicationUrl = value.getApplicationUrl();
1313         if (applicationUrlList != null && !applicationUrlList.isEmpty()) {
1314             StringBuilder sb = new StringBuilder();
1315             for (int i = 0, size = applicationUrlList.size(); i < size; i++) {
1316                 sb.append(applicationUrlList.get(i));
1317                 if (i < size - 1) {
1318                     sb.append(',');
1319                 }
1320             }
1321             applicationUrl = sb.toString();
1322         }
1323
1324         value.setApplicationUrl(applicationUrl);
1325         boolean disableRegistration = registry.getBoolean(prefix + "disableRegistration", value.isDisableRegistration());
1326         value.setDisableRegistration(disableRegistration);
1327
1328         return value;
1329     }
1330
1331     private NetworkConfiguration readNetworkConfiguration(String prefix, Registry registry) {
1332         NetworkConfiguration value = new NetworkConfiguration();
1333
1334         int maxTotal = registry.getInt(prefix + "maxTotal", value.getMaxTotal());
1335         value.setMaxTotal(maxTotal);
1336         int maxTotalPerHost = registry.getInt(prefix + "maxTotalPerHost", value.getMaxTotalPerHost());
1337         value.setMaxTotalPerHost(maxTotalPerHost);
1338         boolean usePooling = registry.getBoolean(prefix + "usePooling", value.isUsePooling());
1339         value.setUsePooling(usePooling);
1340
1341         return value;
1342     }
1343
1344     private ArchivaRuntimeConfiguration readArchivaRuntimeConfiguration(String prefix, Registry registry) {
1345         ArchivaRuntimeConfiguration value = new ArchivaRuntimeConfiguration();
1346
1347         CacheConfiguration urlFailureCacheConfiguration = readCacheConfiguration(prefix + "urlFailureCacheConfiguration.", registry);
1348         value.setUrlFailureCacheConfiguration(urlFailureCacheConfiguration);
1349         FileLockConfiguration fileLockConfiguration = readFileLockConfiguration(prefix + "fileLockConfiguration.", registry);
1350         value.setFileLockConfiguration(fileLockConfiguration);
1351         //String dataDirectory = registry.getString( prefix + "dataDirectory", value.getDataDirectory() );
1352
1353         List<String> dataDirectoryList = registry.getList(prefix + "dataDirectory");
1354         String dataDirectory = value.getDataDirectory();
1355         if (dataDirectoryList != null && !dataDirectoryList.isEmpty()) {
1356             StringBuilder sb = new StringBuilder();
1357             for (int i = 0, size = dataDirectoryList.size(); i < size; i++) {
1358                 sb.append(dataDirectoryList.get(i));
1359                 if (i < size - 1) {
1360                     sb.append(',');
1361                 }
1362             }
1363             dataDirectory = sb.toString();
1364         }
1365
1366         value.setDataDirectory(dataDirectory);
1367         //String repositoryBaseDirectory = registry.getString( prefix + "repositoryBaseDirectory", value.getRepositoryBaseDirectory() );
1368
1369         List<String> repositoryBaseDirectoryList = registry.getList(prefix + "repositoryBaseDirectory");
1370         String repositoryBaseDirectory = value.getRepositoryBaseDirectory();
1371         if (repositoryBaseDirectoryList != null && !repositoryBaseDirectoryList.isEmpty()) {
1372             StringBuilder sb = new StringBuilder();
1373             for (int i = 0, size = repositoryBaseDirectoryList.size(); i < size; i++) {
1374                 sb.append(repositoryBaseDirectoryList.get(i));
1375                 if (i < size - 1) {
1376                     sb.append(',');
1377                 }
1378             }
1379             repositoryBaseDirectory = sb.toString();
1380         }
1381
1382         value.setRepositoryBaseDirectory(repositoryBaseDirectory);
1383         //String remoteRepositoryBaseDirectory = registry.getString( prefix + "remoteRepositoryBaseDirectory", value.getRemoteRepositoryBaseDirectory() );
1384
1385         List<String> remoteRepositoryBaseDirectoryList = registry.getList(prefix + "remoteRepositoryBaseDirectory");
1386         String remoteRepositoryBaseDirectory = value.getRemoteRepositoryBaseDirectory();
1387         if (remoteRepositoryBaseDirectoryList != null && !remoteRepositoryBaseDirectoryList.isEmpty()) {
1388             StringBuilder sb = new StringBuilder();
1389             for (int i = 0, size = remoteRepositoryBaseDirectoryList.size(); i < size; i++) {
1390                 sb.append(remoteRepositoryBaseDirectoryList.get(i));
1391                 if (i < size - 1) {
1392                     sb.append(',');
1393                 }
1394             }
1395             remoteRepositoryBaseDirectory = sb.toString();
1396         }
1397
1398         value.setRemoteRepositoryBaseDirectory(remoteRepositoryBaseDirectory);
1399         //String defaultLanguage = registry.getString( prefix + "defaultLanguage", value.getDefaultLanguage() );
1400
1401
1402         List<String> repositoryGroupBaseDirectoryList = registry.getList(prefix + "repositoryGroupBaseDirectory");
1403         String repositoryGroupBaseDirectory = value.getRepositoryGroupBaseDirectory();
1404         if (repositoryGroupBaseDirectoryList != null && !repositoryGroupBaseDirectoryList.isEmpty()) {
1405             StringBuilder sb = new StringBuilder();
1406             for (int i = 0, size = repositoryGroupBaseDirectoryList.size(); i < size; i++) {
1407                 sb.append(repositoryGroupBaseDirectoryList.get(i));
1408                 if (i < size - 1) {
1409                     sb.append(',');
1410                 }
1411             }
1412             repositoryGroupBaseDirectory = sb.toString();
1413         }
1414
1415         value.setRepositoryGroupBaseDirectory(repositoryGroupBaseDirectory);
1416
1417         List<String> defaultLanguageList = registry.getList(prefix + "defaultLanguage");
1418         String defaultLanguage = value.getDefaultLanguage();
1419         if (defaultLanguageList != null && !defaultLanguageList.isEmpty()) {
1420             StringBuilder sb = new StringBuilder();
1421             for (int i = 0, size = defaultLanguageList.size(); i < size; i++) {
1422                 sb.append(defaultLanguageList.get(i));
1423                 if (i < size - 1) {
1424                     sb.append(',');
1425                 }
1426             }
1427             defaultLanguage = sb.toString();
1428         }
1429
1430         value.setDefaultLanguage(defaultLanguage);
1431         //String languageRange = registry.getString( prefix + "languageRange", value.getLanguageRange() );
1432
1433         List<String> languageRangeList = registry.getList(prefix + "languageRange");
1434         String languageRange = value.getLanguageRange();
1435         if (languageRangeList != null && !languageRangeList.isEmpty()) {
1436             StringBuilder sb = new StringBuilder();
1437             for (int i = 0, size = languageRangeList.size(); i < size; i++) {
1438                 sb.append(languageRangeList.get(i));
1439                 if (i < size - 1) {
1440                     sb.append(',');
1441                 }
1442             }
1443             languageRange = sb.toString();
1444         }
1445
1446         value.setLanguageRange(languageRange);
1447
1448         List<String> checksumTypeList = registry.getList(prefix + "checksumTypes.type");
1449         value.setChecksumTypes(checksumTypeList);
1450
1451         return value;
1452     }
1453
1454     private RedbackRuntimeConfiguration readRedbackRuntimeConfiguration(String prefix, Registry registry) {
1455         RedbackRuntimeConfiguration value = new RedbackRuntimeConfiguration();
1456
1457         boolean migratedFromRedbackConfiguration = registry.getBoolean(prefix + "migratedFromRedbackConfiguration", value.isMigratedFromRedbackConfiguration());
1458         value.setMigratedFromRedbackConfiguration(migratedFromRedbackConfiguration);
1459         java.util.List userManagerImpls = new java.util.ArrayList/*<String>*/();
1460         userManagerImpls.addAll(registry.getList(prefix + "userManagerImpls.userManagerImpl"));
1461         value.setUserManagerImpls(userManagerImpls);
1462         java.util.List rbacManagerImpls = new java.util.ArrayList/*<String>*/();
1463         rbacManagerImpls.addAll(registry.getList(prefix + "rbacManagerImpls.rbacManagerImpl"));
1464         value.setRbacManagerImpls(rbacManagerImpls);
1465         LdapConfiguration ldapConfiguration = readLdapConfiguration(prefix + "ldapConfiguration.", registry);
1466         value.setLdapConfiguration(ldapConfiguration);
1467         java.util.List ldapGroupMappings = new java.util.ArrayList/*<LdapGroupMapping>*/();
1468         List ldapGroupMappingsSubsets = registry.getSubsetList(prefix + "ldapGroupMappings.ldapGroupMapping");
1469         for (Iterator i = ldapGroupMappingsSubsets.iterator(); i.hasNext(); ) {
1470             LdapGroupMapping v = readLdapGroupMapping("", (Registry) i.next());
1471             ldapGroupMappings.add(v);
1472         }
1473         value.setLdapGroupMappings(ldapGroupMappings);
1474         java.util.Map configurationProperties = registry.getProperties(prefix + "configurationProperties");
1475         value.setConfigurationProperties(configurationProperties);
1476         boolean useUsersCache = registry.getBoolean(prefix + "useUsersCache", value.isUseUsersCache());
1477         value.setUseUsersCache(useUsersCache);
1478         CacheConfiguration usersCacheConfiguration = readCacheConfiguration(prefix + "usersCacheConfiguration.", registry);
1479         value.setUsersCacheConfiguration(usersCacheConfiguration);
1480
1481         return value;
1482     }
1483
1484     private ArchivaDefaultConfiguration readArchivaDefaultConfiguration(String prefix, Registry registry) {
1485         ArchivaDefaultConfiguration value = new ArchivaDefaultConfiguration();
1486
1487         java.util.List defaultCheckPaths = new java.util.ArrayList/*<RepositoryCheckPath>*/();
1488         List defaultCheckPathsSubsets = registry.getSubsetList(prefix + "defaultCheckPaths.defaultCheckPath");
1489         for (Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) {
1490             RepositoryCheckPath v = readRepositoryCheckPath("", (Registry) i.next());
1491             defaultCheckPaths.add(v);
1492         }
1493         value.setDefaultCheckPaths(defaultCheckPaths);
1494
1495         return value;
1496     }
1497
1498     private LdapConfiguration readLdapConfiguration(String prefix, Registry registry) {
1499         LdapConfiguration value = new LdapConfiguration();
1500
1501         //String hostName = registry.getString( prefix + "hostName", value.getHostName() );
1502
1503         List<String> hostNameList = registry.getList(prefix + "hostName");
1504         String hostName = value.getHostName();
1505         if (hostNameList != null && !hostNameList.isEmpty()) {
1506             StringBuilder sb = new StringBuilder();
1507             for (int i = 0, size = hostNameList.size(); i < size; i++) {
1508                 sb.append(hostNameList.get(i));
1509                 if (i < size - 1) {
1510                     sb.append(',');
1511                 }
1512             }
1513             hostName = sb.toString();
1514         }
1515
1516         value.setHostName(hostName);
1517         int port = registry.getInt(prefix + "port", value.getPort());
1518         value.setPort(port);
1519         boolean ssl = registry.getBoolean(prefix + "ssl", value.isSsl());
1520         value.setSsl(ssl);
1521         //String baseDn = registry.getString( prefix + "baseDn", value.getBaseDn() );
1522
1523         List<String> baseDnList = registry.getList(prefix + "baseDn");
1524         String baseDn = value.getBaseDn();
1525         if (baseDnList != null && !baseDnList.isEmpty()) {
1526             StringBuilder sb = new StringBuilder();
1527             for (int i = 0, size = baseDnList.size(); i < size; i++) {
1528                 sb.append(baseDnList.get(i));
1529                 if (i < size - 1) {
1530                     sb.append(',');
1531                 }
1532             }
1533             baseDn = sb.toString();
1534         }
1535
1536         value.setBaseDn(baseDn);
1537         //String baseGroupsDn = registry.getString( prefix + "baseGroupsDn", value.getBaseGroupsDn() );
1538
1539         List<String> baseGroupsDnList = registry.getList(prefix + "baseGroupsDn");
1540         String baseGroupsDn = value.getBaseGroupsDn();
1541         if (baseGroupsDnList != null && !baseGroupsDnList.isEmpty()) {
1542             StringBuilder sb = new StringBuilder();
1543             for (int i = 0, size = baseGroupsDnList.size(); i < size; i++) {
1544                 sb.append(baseGroupsDnList.get(i));
1545                 if (i < size - 1) {
1546                     sb.append(',');
1547                 }
1548             }
1549             baseGroupsDn = sb.toString();
1550         }
1551
1552         value.setBaseGroupsDn(baseGroupsDn);
1553         //String contextFactory = registry.getString( prefix + "contextFactory", value.getContextFactory() );
1554
1555         List<String> contextFactoryList = registry.getList(prefix + "contextFactory");
1556         String contextFactory = value.getContextFactory();
1557         if (contextFactoryList != null && !contextFactoryList.isEmpty()) {
1558             StringBuilder sb = new StringBuilder();
1559             for (int i = 0, size = contextFactoryList.size(); i < size; i++) {
1560                 sb.append(contextFactoryList.get(i));
1561                 if (i < size - 1) {
1562                     sb.append(',');
1563                 }
1564             }
1565             contextFactory = sb.toString();
1566         }
1567
1568         value.setContextFactory(contextFactory);
1569         //String bindDn = registry.getString( prefix + "bindDn", value.getBindDn() );
1570
1571         List<String> bindDnList = registry.getList(prefix + "bindDn");
1572         String bindDn = value.getBindDn();
1573         if (bindDnList != null && !bindDnList.isEmpty()) {
1574             StringBuilder sb = new StringBuilder();
1575             for (int i = 0, size = bindDnList.size(); i < size; i++) {
1576                 sb.append(bindDnList.get(i));
1577                 if (i < size - 1) {
1578                     sb.append(',');
1579                 }
1580             }
1581             bindDn = sb.toString();
1582         }
1583
1584         value.setBindDn(bindDn);
1585         //String password = registry.getString( prefix + "password", value.getPassword() );
1586
1587         List<String> passwordList = registry.getList(prefix + "password");
1588         String password = value.getPassword();
1589         if (passwordList != null && !passwordList.isEmpty()) {
1590             StringBuilder sb = new StringBuilder();
1591             for (int i = 0, size = passwordList.size(); i < size; i++) {
1592                 sb.append(passwordList.get(i));
1593                 if (i < size - 1) {
1594                     sb.append(',');
1595                 }
1596             }
1597             password = sb.toString();
1598         }
1599
1600         value.setPassword(password);
1601         //String authenticationMethod = registry.getString( prefix + "authenticationMethod", value.getAuthenticationMethod() );
1602
1603         List<String> authenticationMethodList = registry.getList(prefix + "authenticationMethod");
1604         String authenticationMethod = value.getAuthenticationMethod();
1605         if (authenticationMethodList != null && !authenticationMethodList.isEmpty()) {
1606             StringBuilder sb = new StringBuilder();
1607             for (int i = 0, size = authenticationMethodList.size(); i < size; i++) {
1608                 sb.append(authenticationMethodList.get(i));
1609                 if (i < size - 1) {
1610                     sb.append(',');
1611                 }
1612             }
1613             authenticationMethod = sb.toString();
1614         }
1615
1616         value.setAuthenticationMethod(authenticationMethod);
1617         boolean bindAuthenticatorEnabled = registry.getBoolean(prefix + "bindAuthenticatorEnabled", value.isBindAuthenticatorEnabled());
1618         value.setBindAuthenticatorEnabled(bindAuthenticatorEnabled);
1619         boolean writable = registry.getBoolean(prefix + "writable", value.isWritable());
1620         value.setWritable(writable);
1621         boolean useRoleNameAsGroup = registry.getBoolean(prefix + "useRoleNameAsGroup", value.isUseRoleNameAsGroup());
1622         value.setUseRoleNameAsGroup(useRoleNameAsGroup);
1623         java.util.Map extraProperties = registry.getProperties(prefix + "extraProperties");
1624         value.setExtraProperties(extraProperties);
1625
1626         return value;
1627     }
1628
1629     private FileLockConfiguration readFileLockConfiguration(String prefix, Registry registry) {
1630         FileLockConfiguration value = new FileLockConfiguration();
1631
1632         boolean skipLocking = registry.getBoolean(prefix + "skipLocking", value.isSkipLocking());
1633         value.setSkipLocking(skipLocking);
1634         int lockingTimeout = registry.getInt(prefix + "lockingTimeout", value.getLockingTimeout());
1635         value.setLockingTimeout(lockingTimeout);
1636
1637         return value;
1638     }
1639
1640     private CacheConfiguration readCacheConfiguration(String prefix, Registry registry) {
1641         CacheConfiguration value = new CacheConfiguration();
1642
1643         int timeToIdleSeconds = registry.getInt(prefix + "timeToIdleSeconds", value.getTimeToIdleSeconds());
1644         value.setTimeToIdleSeconds(timeToIdleSeconds);
1645         int timeToLiveSeconds = registry.getInt(prefix + "timeToLiveSeconds", value.getTimeToLiveSeconds());
1646         value.setTimeToLiveSeconds(timeToLiveSeconds);
1647         int maxElementsInMemory = registry.getInt(prefix + "maxElementsInMemory", value.getMaxElementsInMemory());
1648         value.setMaxElementsInMemory(maxElementsInMemory);
1649         int maxElementsOnDisk = registry.getInt(prefix + "maxElementsOnDisk", value.getMaxElementsOnDisk());
1650         value.setMaxElementsOnDisk(maxElementsOnDisk);
1651
1652         return value;
1653     }
1654
1655     private LdapGroupMapping readLdapGroupMapping(String prefix, Registry registry) {
1656         LdapGroupMapping value = new LdapGroupMapping();
1657
1658         //String group = registry.getString( prefix + "group", value.getGroup() );
1659
1660         List<String> groupList = registry.getList(prefix + "group");
1661         String group = value.getGroup();
1662         if (groupList != null && !groupList.isEmpty()) {
1663             StringBuilder sb = new StringBuilder();
1664             for (int i = 0, size = groupList.size(); i < size; i++) {
1665                 sb.append(groupList.get(i));
1666                 if (i < size - 1) {
1667                     sb.append(',');
1668                 }
1669             }
1670             group = sb.toString();
1671         }
1672
1673         value.setGroup(group);
1674         java.util.List roleNames = new java.util.ArrayList/*<String>*/();
1675         roleNames.addAll(registry.getList(prefix + "roleNames.roleName"));
1676         value.setRoleNames(roleNames);
1677
1678         return value;
1679     }
1680
1681 }