use of org.apache.archiva.rest.services.utils.AddAdminRepoConsumerClosure in project archiva by apache.
the class DefaultArchivaAdministrationService method getInvalidContentAdminRepositoryConsumers.
@Override
public List<AdminRepositoryConsumer> getInvalidContentAdminRepositoryConsumers() throws ArchivaRestServiceException {
try {
AddAdminRepoConsumerClosure addAdminRepoConsumer = new AddAdminRepoConsumerClosure(archivaAdministration.getInvalidContentConsumers());
IterableUtils.forEach(repoConsumerUtil.getAvailableInvalidConsumers(), addAdminRepoConsumer);
List<AdminRepositoryConsumer> invalidContentConsumers = addAdminRepoConsumer.getList();
invalidContentConsumers.sort(AdminRepositoryConsumerComparator.getInstance());
return invalidContentConsumers;
} catch (RepositoryAdminException e) {
throw new ArchivaRestServiceException(e.getMessage(), e);
}
}
use of org.apache.archiva.rest.services.utils.AddAdminRepoConsumerClosure in project archiva by apache.
the class DefaultArchivaAdministrationService method getKnownContentAdminRepositoryConsumers.
@Override
public List<AdminRepositoryConsumer> getKnownContentAdminRepositoryConsumers() throws ArchivaRestServiceException {
try {
AddAdminRepoConsumerClosure addAdminRepoConsumer = new AddAdminRepoConsumerClosure(archivaAdministration.getKnownContentConsumers());
IterableUtils.forEach(repoConsumerUtil.getAvailableKnownConsumers(), addAdminRepoConsumer);
List<AdminRepositoryConsumer> knownContentConsumers = addAdminRepoConsumer.getList();
knownContentConsumers.sort(AdminRepositoryConsumerComparator.getInstance());
return knownContentConsumers;
} catch (RepositoryAdminException e) {
throw new ArchivaRestServiceException(e.getMessage(), e);
}
}
Aggregations