use of com.zimbra.soap.admin.message.ModifyVolumeRequest in project zm-mailbox by Zimbra.
the class VolumeCLI method editVolume.
private void editVolume() throws ParseException, SoapFaultException, IOException, ServiceException {
if (Strings.isNullOrEmpty(id)) {
throw new ParseException("id is missing");
}
VolumeInfo vol = new VolumeInfo();
if (!Strings.isNullOrEmpty(type)) {
vol.setType(toType(type));
}
if (!Strings.isNullOrEmpty(name)) {
vol.setName(name);
}
if (!Strings.isNullOrEmpty(path)) {
vol.setRootPath(path);
}
if (!Strings.isNullOrEmpty(compress)) {
vol.setCompressBlobs(Boolean.parseBoolean(compress));
}
if (!Strings.isNullOrEmpty(compressThreshold)) {
vol.setCompressionThreshold(Long.parseLong(compressThreshold));
}
ModifyVolumeRequest req = new ModifyVolumeRequest(Short.parseShort(id), vol);
auth(auth);
getTransport().invokeWithoutSession(JaxbUtil.jaxbToElement(req));
System.out.println("Edited volume " + id);
}
Aggregations