private ArchivaDefaultConfiguration readArchivaDefaultConfiguration( String prefix, Registry registry ) { ArchivaDefaultConfiguration value = new ArchivaDefaultConfiguration(); java.util.List defaultCheckPaths = new java.util.ArrayList/*<RepositoryCheckPath>*/(); List defaultCheckPathsSubsets = registry.getSubsetList( prefix + "defaultCheckPaths.defaultCheckPath" ); for ( Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) { RepositoryCheckPath v = readRepositoryCheckPath( "", (Registry) i.next() ); defaultCheckPaths.add( v ); } value.setDefaultCheckPaths( defaultCheckPaths ); return value; }
private ArchivaDefaultConfiguration readArchivaDefaultConfiguration( String prefix, Registry registry ) { ArchivaDefaultConfiguration value = new ArchivaDefaultConfiguration(); java.util.List defaultCheckPaths = new java.util.ArrayList/*<RepositoryCheckPath>*/(); List defaultCheckPathsSubsets = registry.getSubsetList( prefix + "defaultCheckPaths.defaultCheckPath" ); for ( Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) { RepositoryCheckPath v = readRepositoryCheckPath( "", (Registry) i.next() ); defaultCheckPaths.add( v ); } value.setDefaultCheckPaths( defaultCheckPaths ); return value; }
private RepositoryScanningConfiguration readRepositoryScanningConfiguration( String prefix, Registry registry ) { RepositoryScanningConfiguration value = new RepositoryScanningConfiguration(); java.util.List fileTypes = new java.util.ArrayList/*<FileType>*/(); List fileTypesSubsets = registry.getSubsetList( prefix + "fileTypes.fileType" ); for ( Iterator i = fileTypesSubsets.iterator(); i.hasNext(); ) { FileType v = readFileType( "", (Registry) i.next() ); fileTypes.add( v ); } value.setFileTypes( fileTypes ); java.util.List knownContentConsumers = new java.util.ArrayList/*<String>*/(); knownContentConsumers.addAll( registry.getList( prefix + "knownContentConsumers.knownContentConsumer" ) ); value.setKnownContentConsumers( knownContentConsumers ); java.util.List invalidContentConsumers = new java.util.ArrayList/*<String>*/(); invalidContentConsumers.addAll( registry.getList( prefix + "invalidContentConsumers.invalidContentConsumer" ) ); value.setInvalidContentConsumers( invalidContentConsumers ); return value; }
private RepositoryScanningConfiguration readRepositoryScanningConfiguration( String prefix, Registry registry ) { RepositoryScanningConfiguration value = new RepositoryScanningConfiguration(); java.util.List fileTypes = new java.util.ArrayList/*<FileType>*/(); List fileTypesSubsets = registry.getSubsetList( prefix + "fileTypes.fileType" ); for ( Iterator i = fileTypesSubsets.iterator(); i.hasNext(); ) { FileType v = readFileType( "", (Registry) i.next() ); fileTypes.add( v ); } value.setFileTypes( fileTypes ); java.util.List knownContentConsumers = new java.util.ArrayList/*<String>*/(); knownContentConsumers.addAll( registry.getList( prefix + "knownContentConsumers.knownContentConsumer" ) ); value.setKnownContentConsumers( knownContentConsumers ); java.util.List invalidContentConsumers = new java.util.ArrayList/*<String>*/(); invalidContentConsumers.addAll( registry.getList( prefix + "invalidContentConsumers.invalidContentConsumer" ) ); value.setInvalidContentConsumers( invalidContentConsumers ); return value; }
List proxyConnectorsSubsets = registry.getSubsetList( prefix + "proxyConnectors.proxyConnector" ); for ( Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); )
List proxyConnectorsSubsets = registry.getSubsetList( prefix + "proxyConnectors.proxyConnector" ); for ( Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); )
private void updateCheckPathDefaults(Configuration config, Registry defaultConfiguration) { List<RepositoryCheckPath> existingCheckPathList = config.getArchivaDefaultConfiguration().getDefaultCheckPaths(); HashMap<String, RepositoryCheckPath> existingCheckPaths = new HashMap<>(); HashMap<String, RepositoryCheckPath> newCheckPaths = new HashMap<>(); for (RepositoryCheckPath path : config.getArchivaDefaultConfiguration().getDefaultCheckPaths()) { existingCheckPaths.put(path.getUrl(), path); } List defaultCheckPathsSubsets = defaultConfiguration.getSubsetList("archivaDefaultConfiguration.defaultCheckPaths.defaultCheckPath"); for (Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) { RepositoryCheckPath v = readRepositoryCheckPath((Registry) i.next()); if (existingCheckPaths.containsKey(v.getUrl())) { existingCheckPathList.remove(existingCheckPaths.get(v.getUrl())); } existingCheckPathList.add(v); newCheckPaths.put(v.getUrl(), v); } // Remote repositories update for (RemoteRepositoryConfiguration remoteRepositoryConfiguration : config.getRemoteRepositories()) { String url = remoteRepositoryConfiguration.getUrl().toLowerCase(); if (newCheckPaths.containsKey(url)) { String currentPath = remoteRepositoryConfiguration.getCheckPath(); String newPath = newCheckPaths.get(url).getPath(); log.info("Updating connection check path for repository {}, from '{}' to '{}'.", remoteRepositoryConfiguration.getId(), currentPath, newPath); remoteRepositoryConfiguration.setCheckPath(newPath); } } }
private void updateCheckPathDefaults(Configuration config, Registry defaultConfiguration) { List<RepositoryCheckPath> existingCheckPathList = config.getArchivaDefaultConfiguration().getDefaultCheckPaths(); HashMap<String, RepositoryCheckPath> existingCheckPaths = new HashMap<>(); HashMap<String, RepositoryCheckPath> newCheckPaths = new HashMap<>(); for (RepositoryCheckPath path : config.getArchivaDefaultConfiguration().getDefaultCheckPaths()) { existingCheckPaths.put(path.getUrl(), path); } List defaultCheckPathsSubsets = defaultConfiguration.getSubsetList("archivaDefaultConfiguration.defaultCheckPaths.defaultCheckPath" ); for ( Iterator i = defaultCheckPathsSubsets.iterator(); i.hasNext(); ) { RepositoryCheckPath v = readRepositoryCheckPath( (Registry) i.next() ); if (existingCheckPaths.containsKey(v.getUrl())) { existingCheckPathList.remove(existingCheckPaths.get(v.getUrl())); } existingCheckPathList.add(v); newCheckPaths.put(v.getUrl(), v); } // Remote repositories update for (RemoteRepositoryConfiguration remoteRepositoryConfiguration : config.getRemoteRepositories()) { String url = remoteRepositoryConfiguration.getUrl().toLowerCase(); if (newCheckPaths.containsKey(url)) { String currentPath = remoteRepositoryConfiguration.getCheckPath(); String newPath = newCheckPaths.get(url).getPath(); log.info("Updating connection check path for repository {}, from '{}' to '{}'.", remoteRepositoryConfiguration.getId(), currentPath, newPath); remoteRepositoryConfiguration.setCheckPath(newPath); } } }
List repositoryGroupsSubsets = registry.getSubsetList( prefix + "repositoryGroups.repositoryGroup" ); for ( Iterator i = repositoryGroupsSubsets.iterator(); i.hasNext(); ) List managedRepositoriesSubsets = registry.getSubsetList( prefix + "managedRepositories.managedRepository" ); for ( Iterator i = managedRepositoriesSubsets.iterator(); i.hasNext(); ) List remoteRepositoriesSubsets = registry.getSubsetList( prefix + "remoteRepositories.remoteRepository" ); for ( Iterator i = remoteRepositoriesSubsets.iterator(); i.hasNext(); ) List proxyConnectorsSubsets = registry.getSubsetList( prefix + "proxyConnectors.proxyConnector" ); for ( Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); ) List networkProxiesSubsets = registry.getSubsetList( prefix + "networkProxies.networkProxy" ); for ( Iterator i = networkProxiesSubsets.iterator(); i.hasNext(); ) List legacyArtifactPathsSubsets = registry.getSubsetList( prefix + "legacyArtifactPaths.legacyArtifactPath" ); for ( Iterator i = legacyArtifactPathsSubsets.iterator(); i.hasNext(); ) value.setArchivaRuntimeConfiguration( archivaRuntimeConfiguration ); java.util.List proxyConnectorRuleConfigurations = new java.util.ArrayList/*<ProxyConnectorRuleConfiguration>*/(); List proxyConnectorRuleConfigurationsSubsets = registry.getSubsetList( prefix + "proxyConnectorRuleConfigurations.proxyConnectorRuleConfiguration" ); for ( Iterator i = proxyConnectorRuleConfigurationsSubsets.iterator(); i.hasNext(); )
List repositoriesSubsets = registry.getSubsetList( prefix + "repositories.repository" ); for ( Iterator i = repositoriesSubsets.iterator(); i.hasNext(); ) List repositoryGroupsSubsets = registry.getSubsetList( prefix + "repositoryGroups.repositoryGroup" ); for ( Iterator i = repositoryGroupsSubsets.iterator(); i.hasNext(); ) List managedRepositoriesSubsets = registry.getSubsetList( prefix + "managedRepositories.managedRepository" ); for ( Iterator i = managedRepositoriesSubsets.iterator(); i.hasNext(); ) List remoteRepositoriesSubsets = registry.getSubsetList( prefix + "remoteRepositories.remoteRepository" ); for ( Iterator i = remoteRepositoriesSubsets.iterator(); i.hasNext(); ) List proxyConnectorsSubsets = registry.getSubsetList( prefix + "proxyConnectors.proxyConnector" ); for ( Iterator i = proxyConnectorsSubsets.iterator(); i.hasNext(); ) List networkProxiesSubsets = registry.getSubsetList( prefix + "networkProxies.networkProxy" ); for ( Iterator i = networkProxiesSubsets.iterator(); i.hasNext(); ) List legacyArtifactPathsSubsets = registry.getSubsetList( prefix + "legacyArtifactPaths.legacyArtifactPath" ); for ( Iterator i = legacyArtifactPathsSubsets.iterator(); i.hasNext(); ) value.setArchivaRuntimeConfiguration( archivaRuntimeConfiguration ); java.util.List proxyConnectorRuleConfigurations = new java.util.ArrayList/*<ProxyConnectorRuleConfiguration>*/(); List proxyConnectorRuleConfigurationsSubsets = registry.getSubsetList( prefix + "proxyConnectorRuleConfigurations.proxyConnectorRuleConfiguration" ); for ( Iterator i = proxyConnectorRuleConfigurationsSubsets.iterator(); i.hasNext(); )
private RedbackRuntimeConfiguration readRedbackRuntimeConfiguration( String prefix, Registry registry ) { RedbackRuntimeConfiguration value = new RedbackRuntimeConfiguration(); boolean migratedFromRedbackConfiguration = registry.getBoolean( prefix + "migratedFromRedbackConfiguration", value.isMigratedFromRedbackConfiguration() ); value.setMigratedFromRedbackConfiguration( migratedFromRedbackConfiguration ); java.util.List userManagerImpls = new java.util.ArrayList/*<String>*/(); userManagerImpls.addAll( registry.getList( prefix + "userManagerImpls.userManagerImpl" ) ); value.setUserManagerImpls( userManagerImpls ); java.util.List rbacManagerImpls = new java.util.ArrayList/*<String>*/(); rbacManagerImpls.addAll( registry.getList( prefix + "rbacManagerImpls.rbacManagerImpl" ) ); value.setRbacManagerImpls( rbacManagerImpls ); LdapConfiguration ldapConfiguration = readLdapConfiguration( prefix + "ldapConfiguration.", registry ); value.setLdapConfiguration( ldapConfiguration ); java.util.List ldapGroupMappings = new java.util.ArrayList/*<LdapGroupMapping>*/(); List ldapGroupMappingsSubsets = registry.getSubsetList( prefix + "ldapGroupMappings.ldapGroupMapping" ); for ( Iterator i = ldapGroupMappingsSubsets.iterator(); i.hasNext(); ) { LdapGroupMapping v = readLdapGroupMapping( "", (Registry) i.next() ); ldapGroupMappings.add( v ); } value.setLdapGroupMappings( ldapGroupMappings ); java.util.Map configurationProperties = registry.getProperties( prefix + "configurationProperties" ); value.setConfigurationProperties( configurationProperties ); boolean useUsersCache = registry.getBoolean( prefix + "useUsersCache", value.isUseUsersCache() ); value.setUseUsersCache( useUsersCache ); CacheConfiguration usersCacheConfiguration = readCacheConfiguration( prefix + "usersCacheConfiguration.", registry ); value.setUsersCacheConfiguration( usersCacheConfiguration ); return value; }
private RedbackRuntimeConfiguration readRedbackRuntimeConfiguration( String prefix, Registry registry ) { RedbackRuntimeConfiguration value = new RedbackRuntimeConfiguration(); boolean migratedFromRedbackConfiguration = registry.getBoolean( prefix + "migratedFromRedbackConfiguration", value.isMigratedFromRedbackConfiguration() ); value.setMigratedFromRedbackConfiguration( migratedFromRedbackConfiguration ); java.util.List userManagerImpls = new java.util.ArrayList/*<String>*/(); userManagerImpls.addAll( registry.getList( prefix + "userManagerImpls.userManagerImpl" ) ); value.setUserManagerImpls( userManagerImpls ); java.util.List rbacManagerImpls = new java.util.ArrayList/*<String>*/(); rbacManagerImpls.addAll( registry.getList( prefix + "rbacManagerImpls.rbacManagerImpl" ) ); value.setRbacManagerImpls( rbacManagerImpls ); LdapConfiguration ldapConfiguration = readLdapConfiguration( prefix + "ldapConfiguration.", registry ); value.setLdapConfiguration( ldapConfiguration ); java.util.List ldapGroupMappings = new java.util.ArrayList/*<LdapGroupMapping>*/(); List ldapGroupMappingsSubsets = registry.getSubsetList( prefix + "ldapGroupMappings.ldapGroupMapping" ); for ( Iterator i = ldapGroupMappingsSubsets.iterator(); i.hasNext(); ) { LdapGroupMapping v = readLdapGroupMapping( "", (Registry) i.next() ); ldapGroupMappings.add( v ); } value.setLdapGroupMappings( ldapGroupMappings ); java.util.Map configurationProperties = registry.getProperties( prefix + "configurationProperties" ); value.setConfigurationProperties( configurationProperties ); boolean useUsersCache = registry.getBoolean( prefix + "useUsersCache", value.isUseUsersCache() ); value.setUseUsersCache( useUsersCache ); CacheConfiguration usersCacheConfiguration = readCacheConfiguration( prefix + "usersCacheConfiguration.", registry ); value.setUsersCacheConfiguration( usersCacheConfiguration ); return value; }