use of org.apache.archiva.rest.api.model.AdminRepositoryConsumer in project archiva by apache.
the class AddAdminRepoConsumerClosure method execute.
@Override
public void execute(RepositoryContentConsumer input) {
RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
boolean enabled = this.selectedIds.contains(consumer.getId());
AdminRepositoryConsumer adminconsumer = new AdminRepositoryConsumer();
adminconsumer.setEnabled(enabled);
adminconsumer.setId(consumer.getId());
adminconsumer.setDescription(consumer.getDescription());
list.add(adminconsumer);
}
use of org.apache.archiva.rest.api.model.AdminRepositoryConsumer 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.api.model.AdminRepositoryConsumer 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