if (null == info.getType()) {
throw new IllegalArgumentException("Coverage type has not been set");
}
final Catalog catalog = getCatalog();
final ResourcePool resourcePool = catalog.getResourcePool();
resourcePool.clear(info);
// Map<String, Serializable> connectionParameters = info.getConnectionParameters();
if (info.isEnabled()) {
// store's enabled, make sure it works
LOGGER.finer("Store " + info.getName() + " is enabled, verifying factory availability "
+ "before saving it...");
AbstractGridFormat gridFormat = resourcePool.getGridCoverageFormat(info);
if (gridFormat == null) {
throw new IllegalArgumentException(
"No grid format found capable of connecting to the provided URL."
+ " To save the store disable it, and check the required libraries are in place");
}
try {
// get the reader through ResourcePool so it resolves relative URL's for us
GridCoverageReader reader = resourcePool.getGridCoverageReader(info, null);
LOGGER.info("Connection to store " + info.getName() + " validated. Got a "
+ reader.getClass().getName() + ". Saving store");
doSaveStore(info);
setResponsePage(StorePage.class);
} catch (IOException e) {