use of com.zimbra.soap.admin.message.GetCurrentVolumesResponse in project zm-mailbox by Zimbra.
the class GetCurrentVolumes method handle.
private GetCurrentVolumesResponse handle(@SuppressWarnings("unused") GetCurrentVolumesRequest req, Map<String, Object> ctx) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(ctx);
checkRight(zsc, ctx, Provisioning.getInstance().getLocalServer(), Admin.R_manageVolume);
GetCurrentVolumesResponse resp = new GetCurrentVolumesResponse();
VolumeManager mgr = VolumeManager.getInstance();
Volume msgVol = mgr.getCurrentMessageVolume();
if (msgVol != null) {
resp.addVolume(new GetCurrentVolumesResponse.CurrentVolumeInfo(msgVol.getId(), msgVol.getType()));
}
Volume secondaryMsgVol = mgr.getCurrentSecondaryMessageVolume();
if (secondaryMsgVol != null) {
resp.addVolume(new GetCurrentVolumesResponse.CurrentVolumeInfo(secondaryMsgVol.getId(), secondaryMsgVol.getType()));
}
Volume indexVol = mgr.getCurrentIndexVolume();
if (indexVol != null) {
resp.addVolume(new GetCurrentVolumesResponse.CurrentVolumeInfo(indexVol.getId(), indexVol.getType()));
}
return resp;
}
Aggregations