use of com.zimbra.soap.admin.type.ReindexProgressInfo in project zm-mailbox by Zimbra.
the class SoapProvisioning method reIndex.
public ReIndexInfo reIndex(Account acct, String action, ReIndexBy by, String[] values) throws ServiceException {
Server server = getServer(acct);
ReindexMailboxInfo mbox = new ReindexMailboxInfo(acct.getId());
if (by != null) {
String vals = StringUtil.join(",", values);
if (by == ReIndexBy.types) {
mbox.setTypes(vals);
} else {
mbox.setIds(vals);
}
}
ReIndexRequest req = new ReIndexRequest(action, mbox);
ReIndexResponse resp = this.invokeJaxb(req, server.getAttr(A_zimbraServiceHostname));
ReIndexInfo.Progress progress = null;
ReindexProgressInfo progInfo = resp.getProgress();
if (progInfo != null) {
progress = new ReIndexInfo.Progress(progInfo.getNumSucceeded(), progInfo.getNumFailed(), progInfo.getNumRemaining());
}
return new ReIndexInfo(resp.getStatus(), progress);
}
Aggregations