@Test public void testGetAvailableKnownList() throws Exception { RepositoryContentConsumers consumerutil = lookupRepositoryConsumers(); String expectedKnownIds[] = new String[]{ "update-db-artifact", "create-missing-checksums", "update-db-repository-metadata", "validate-checksum", "index-content", "auto-remove", "auto-rename", "available-but-unselected" }; List<KnownRepositoryContentConsumer> knownConsumers = consumerutil.getAvailableKnownConsumers(); assertNotNull( "known consumers should not be null.", knownConsumers ); assertEquals( "known consumers", expectedKnownIds.length, knownConsumers.size() ); List<String> expectedIds = Arrays.asList( expectedKnownIds ); for ( KnownRepositoryContentConsumer consumer : knownConsumers ) { assertTrue( "Consumer [" + consumer.getId() + "] returned by .getAvailableKnownConsumers() is unexpected.", expectedIds.contains( consumer.getId() ) ); } }
public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); }
RepositoryContentConsumers implements ApplicationContextAware { public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); } }
RepositoryContentConsumers implements ApplicationContextAware { public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); } @Inject  RepositoryContentConsumers( ArchivaAdministration archivaAdministration ); }
RepositoryContentConsumers implements ApplicationContextAware { public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); } @Inject  RepositoryContentConsumers( ArchivaAdministration archivaAdministration ); @Override void setApplicationContext( ApplicationContext applicationContext ); List<String> getSelectedKnownConsumerIds(); List<String> getSelectedInvalidConsumerIds(); Map<String, KnownRepositoryContentConsumer> getSelectedKnownConsumersMap(); Map<String, InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap(); List<KnownRepositoryContentConsumer> getSelectedKnownConsumers(); void releaseSelectedKnownConsumers( List<KnownRepositoryContentConsumer> repositoryContentConsumers ); synchronized List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers(); List<KnownRepositoryContentConsumer> getAvailableKnownConsumers(); List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers(); void executeConsumers( ManagedRepository repository, Path localFile, boolean updateRelatedArtifacts ); void setSelectedKnownConsumers( List<KnownRepositoryContentConsumer> selectedKnownConsumers ); void setSelectedInvalidConsumers( List<InvalidRepositoryContentConsumer> selectedInvalidConsumers ); void setArchivaAdministration( ArchivaAdministration archivaAdministration ); }
RepositoryContentConsumers implements ApplicationContextAware { public List<KnownRepositoryContentConsumer> getAvailableKnownConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class ).values() ); } @Inject  RepositoryContentConsumers( ArchivaAdministration archivaAdministration ); @Override void setApplicationContext( ApplicationContext applicationContext ); List<String> getSelectedKnownConsumerIds(); List<String> getSelectedInvalidConsumerIds(); Map<String, KnownRepositoryContentConsumer> getSelectedKnownConsumersMap(); Map<String, InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap(); List<KnownRepositoryContentConsumer> getSelectedKnownConsumers(); void releaseSelectedKnownConsumers( List<KnownRepositoryContentConsumer> repositoryContentConsumers ); synchronized List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers(); List<KnownRepositoryContentConsumer> getAvailableKnownConsumers(); List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers(); void executeConsumers( ManagedRepository repository, Path localFile, boolean updateRelatedArtifacts ); void setSelectedKnownConsumers( List<KnownRepositoryContentConsumer> selectedKnownConsumers ); void setSelectedInvalidConsumers( List<InvalidRepositoryContentConsumer> selectedInvalidConsumers ); void setArchivaAdministration( ArchivaAdministration archivaAdministration );  }