if(! (filter instanceof WMSRasterFilter)) {
throw new RestletException("The filter " + filter.getName() + " is not a WMSRasterFilter.",
Status.CLIENT_ERROR_BAD_REQUEST);
}
WMSRasterFilter wmsFilter = (WMSRasterFilter) filter;
// Check that the SRS makes sense
if (tl.getGridSubset(gridSetId) == null) {
throw new RestletException("The filter " + wmsFilter.getName()
+ " is associated with a layer that does not support "
+ gridSetId, Status.CLIENT_ERROR_BAD_REQUEST);
}
// Run the actual update
try {
for (int z = zoomStart; z <= zoomStop; z++) {
wmsFilter.setMatrix(tl, gridSetId, z, true);
}
} catch (GeoWebCacheException e) {
throw new RestletException("Error updating " + wmsFilter.getName()
+ ": " + e.getMessage(), Status.SERVER_ERROR_INTERNAL);
}
}