use of com.zimbra.soap.mail.message.GetIMAPRecentCutoffRequest in project zm-mailbox by Zimbra.
the class GetIMAPRecentCutoff method handle.
@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(context);
Mailbox mbox = getRequestedMailbox(zsc);
OperationContext octxt = getOperationContext(zsc, context);
GetIMAPRecentCutoffRequest req = zsc.elementToJaxb(request);
ItemIdentifier itemIdent = ItemIdentifier.fromOwnerAndRemoteId(mbox.getAccountId(), req.getId());
if (!mbox.getAccountId().equals(itemIdent.accountId)) {
throw MailServiceException.NO_SUCH_FOLDER(req.getId());
}
return zsc.jaxbToElement(new GetIMAPRecentCutoffResponse(mbox.getImapRecentCutoff(octxt, itemIdent.id)));
}
Aggregations