@Test public void getManagedRepository( ) throws Exception { ManagedRepository repo = repositoryRegistry.getManagedRepository( "internal" ); assertNotNull(repo); assertEquals("internal", repo.getId()); assertEquals("Archiva Managed Internal Repository", repo.getName()); assertEquals("This is internal repository.", repo.getDescription()); assertEquals( "default", repo.getLayout( ) ); assertEquals("0 0 * * * ?", repo.getSchedulingDefinition()); assertTrue( repo.hasIndex( ) ); assertTrue(repo.isScanned()); assertEquals(RepositoryType.MAVEN, repo.getType()); assertTrue(repo.getActiveReleaseSchemes().contains( ReleaseScheme.RELEASE)); assertFalse( repo.getActiveReleaseSchemes( ).contains( ReleaseScheme.SNAPSHOT ) ); assertNotNull(repo.getContent()); assertNull(repositoryRegistry.getManagedRepository( "xyu" )); }
@Override public ManagedRepository getManagedRepository( String repoId ) { rwLock.readLock().lock(); try { return managedRepositories.get(repoId); } finally { rwLock.readLock().unlock(); } }
ArchivaRepositoryRegistry implements ConfigurationListener, EventHandler<Event>,
    RepositoryRegistry { @Override public ManagedRepository getManagedRepository( String repoId ) { rwLock.readLock().lock(); try { return managedRepositories.get(repoId); } finally { rwLock.readLock().unlock(); } } }
ArchivaRepositoryRegistry implements ConfigurationListener, EventHandler<Event>,
    RepositoryRegistry { @Override public ManagedRepository getManagedRepository( String repoId ) { rwLock.readLock().lock(); try { return managedRepositories.get(repoId); } finally { rwLock.readLock().unlock(); } } ArchivaRepositoryRegistry(); }
ArchivaRepositoryRegistry implements ConfigurationListener, EventHandler<Event>,
    RepositoryRegistry { @Override public ManagedRepository getManagedRepository( String repoId ) { rwLock.readLock().lock(); try { return managedRepositories.get(repoId); } finally { rwLock.readLock().unlock(); } } ArchivaRepositoryRegistry(); @Override void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration ); @PreDestroy void destroy(); @Override ArchivaIndexManager getIndexManager( RepositoryType type ); @Override MetadataReader getMetadataReader( final RepositoryType type ); @Override Collection<Repository> getRepositories( ); @Override Collection<ManagedRepository> getManagedRepositories( ); @Override Collection<RemoteRepository> getRemoteRepositories( ); @Override Collection<RepositoryGroup> getRepositoryGroups( ); @Override Repository getRepository( String repoId ); @Override ManagedRepository getManagedRepository( String repoId ); @Override RemoteRepository getRemoteRepository( String repoId ); @Override RepositoryGroup getRepositoryGroup( String groupId ); @Override ManagedRepository putRepository( ManagedRepository managedRepository ); @Override ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration ); @Override ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration, Configuration configuration ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroup repositoryGroup ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration, Configuration configuration ); @Override RemoteRepository putRepository( RemoteRepository remoteRepository, Configuration configuration ); @Override RemoteRepository putRepository( RemoteRepository remoteRepository ); @Override RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration ); @Override @SuppressWarnings("unchecked") RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration, Configuration configuration ); @Override void removeRepository( String repoId ); @Override void removeRepository( Repository repo ); @Override void removeRepository( ManagedRepository managedRepository ); @Override void removeRepository( ManagedRepository managedRepository, Configuration configuration ); @Override void removeRepositoryGroup( RepositoryGroup repositoryGroup ); @Override void removeRepositoryGroup( RepositoryGroup repositoryGroup, Configuration configuration ); @Override void removeRepository( RemoteRepository remoteRepository ); @Override void removeRepository( RemoteRepository remoteRepository, Configuration configuration ); @Override void reload( ); @Override void resetIndexingContext( Repository repository ); @Override ManagedRepository clone( ManagedRepository repo, String newId ); @Override Repository clone( T repo, String newId ); @Override RemoteRepository clone( RemoteRepository repo, String newId ); @Override Repository getRepositoryOfAsset( StorageAsset asset ); @Override void configurationEvent(ConfigurationEvent event); @Override void registerEventHandler( EventType<T> type, EventHandler<? super T> eventHandler); @Override void unregisterEventHandler(EventType<T> type, EventHandler<? super T> eventHandler); @Override void handle(Event event); }
ArchivaRepositoryRegistry implements ConfigurationListener, EventHandler<Event>,
    RepositoryRegistry { @Override public ManagedRepository getManagedRepository( String repoId ) { rwLock.readLock().lock(); try { return managedRepositories.get(repoId); } finally { rwLock.readLock().unlock(); } } ArchivaRepositoryRegistry(); @Override void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration ); @PreDestroy void destroy(); @Override ArchivaIndexManager getIndexManager( RepositoryType type ); @Override MetadataReader getMetadataReader( final RepositoryType type ); @Override Collection<Repository> getRepositories( ); @Override Collection<ManagedRepository> getManagedRepositories( ); @Override Collection<RemoteRepository> getRemoteRepositories( ); @Override Collection<RepositoryGroup> getRepositoryGroups( ); @Override Repository getRepository( String repoId ); @Override ManagedRepository getManagedRepository( String repoId ); @Override RemoteRepository getRemoteRepository( String repoId ); @Override RepositoryGroup getRepositoryGroup( String groupId ); @Override ManagedRepository putRepository( ManagedRepository managedRepository ); @Override ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration ); @Override ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration, Configuration configuration ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroup repositoryGroup ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration ); @Override RepositoryGroup putRepositoryGroup( RepositoryGroupConfiguration repositoryGroupConfiguration, Configuration configuration ); @Override RemoteRepository putRepository( RemoteRepository remoteRepository, Configuration configuration ); @Override RemoteRepository putRepository( RemoteRepository remoteRepository ); @Override RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration ); @Override @SuppressWarnings("unchecked") RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration, Configuration configuration ); @Override void removeRepository( String repoId ); @Override void removeRepository( Repository repo ); @Override void removeRepository( ManagedRepository managedRepository ); @Override void removeRepository( ManagedRepository managedRepository, Configuration configuration ); @Override void removeRepositoryGroup( RepositoryGroup repositoryGroup ); @Override void removeRepositoryGroup( RepositoryGroup repositoryGroup, Configuration configuration ); @Override void removeRepository( RemoteRepository remoteRepository ); @Override void removeRepository( RemoteRepository remoteRepository, Configuration configuration ); @Override void reload( ); @Override void resetIndexingContext( Repository repository ); @Override ManagedRepository clone( ManagedRepository repo, String newId ); @Override Repository clone( T repo, String newId ); @Override RemoteRepository clone( RemoteRepository repo, String newId ); @Override Repository getRepositoryOfAsset( StorageAsset asset ); @Override void configurationEvent(ConfigurationEvent event); @Override void registerEventHandler( EventType<T> type, EventHandler<? super T> eventHandler); @Override void unregisterEventHandler(EventType<T> type, EventHandler<? super T> eventHandler); @Override void handle(Event event);  }