use of com.zimbra.soap.admin.message.SetCurrentVolumeRequest in project zm-mailbox by Zimbra.
the class VolumeCLI method setCurrentVolume.
private void setCurrentVolume() throws ParseException, SoapFaultException, IOException, ServiceException {
if (id == null) {
throw new ParseException("id is missing");
}
auth(auth);
GetVolumeResponse resp = JaxbUtil.elementToJaxb(getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(new GetVolumeRequest(Short.valueOf(id)))));
VolumeInfo vol = resp.getVolume();
SetCurrentVolumeRequest req = new SetCurrentVolumeRequest(vol.getId(), vol.getType());
getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req));
System.out.println("Volume " + id + " is now the current " + toTypeName(vol.getType()) + " volume.");
}
use of com.zimbra.soap.admin.message.SetCurrentVolumeRequest in project zm-mailbox by Zimbra.
the class VolumeCLI method unsetCurrentSecondaryMessageVolume.
private void unsetCurrentSecondaryMessageVolume() throws SoapFaultException, IOException, ServiceException {
SetCurrentVolumeRequest req = new SetCurrentVolumeRequest(Volume.ID_NONE, Volume.TYPE_MESSAGE_SECONDARY);
auth(auth);
getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req));
System.out.println("Turned off the current secondary message volume.");
}
Aggregations