use of com.zimbra.soap.admin.message.DeleteVolumeResponse in project zm-mailbox by Zimbra.
the class DeleteVolume method handle.
private DeleteVolumeResponse handle(DeleteVolumeRequest req, Map<String, Object> ctx) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(ctx);
checkRight(zsc, ctx, Provisioning.getInstance().getLocalServer(), Admin.R_manageVolume);
VolumeManager mgr = VolumeManager.getInstance();
// make sure the volume exists before doing anything heavyweight...
mgr.getVolume(req.getId());
StoreManager storeManager = StoreManager.getInstance();
if (storeManager.supports(StoreManager.StoreFeature.CUSTOM_STORE_API, String.valueOf(req.getId()))) {
throw ServiceException.INVALID_REQUEST("Operation unsupported, use zxsuite to delete this volume", null);
}
mgr.delete(req.getId());
return new DeleteVolumeResponse();
}
Aggregations