use of org.exist.collections.CollectionConfigurationException in project exist by eXist-db.
the class RpcConnection method configureCollection.
private boolean configureCollection(final XmldbURI collUri, final String configuration) throws EXistException, PermissionDeniedException {
withDb((broker, transaction) -> {
final Collection colRef = this.<Collection>readCollection(broker, transaction, collUri).apply((collection, broker1, transaction1) -> collection);
final CollectionConfigurationManager mgr = factory.getBrokerPool().getConfigurationManager();
try {
mgr.addConfiguration(transaction, broker, colRef, configuration);
} catch (final CollectionConfigurationException e) {
throw new EXistException(e.getMessage());
}
return null;
});
LOG.info("Configured '{}'", collUri);
return true;
}
Aggregations