private void highestModSeq(Responder responder, MetaData metaData, SelectedMailbox selected) { final StatusResponse untaggedOk; if (metaData.isModSeqPermanent()) { final long highestModSeq = metaData.getHighestModSeq(); untaggedOk = statusResponseFactory.untaggedOk( HumanReadableText.HIGHEST_MOD_SEQ, ResponseCode.highestModSeq(highestModSeq)); } else { untaggedOk = statusResponseFactory.untaggedOk(HumanReadableText.NO_MOD_SEQ, ResponseCode.noModSeq()); } responder.respond(untaggedOk); }
private boolean unseen( Responder responder, MessageUid firstUnseen, SelectedMailbox selected, MailboxSession session) throws MailboxException { if (firstUnseen != null) { final MessageUid unseenUid = firstUnseen; int msn = selected.msn(unseenUid); if (msn == SelectedMailbox.NO_SUCH_MESSAGE) { if (session.getLog().isDebugEnabled()) { session .getLog() .debug( "No message found with uid " + unseenUid + " in mailbox " + selected.getPath().getFullName(session.getPathDelimiter())); } return false; } final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(HumanReadableText.unseen(msn), ResponseCode.unseen(msn)); responder.respond(untaggedOk); } return true; }
private void uidNext(Responder responder, MessageManager.MetaData metaData) throws MailboxException { final MessageUid uid = metaData.getUidNext(); final StatusResponse untaggedOk = statusResponseFactory.untaggedOk(HumanReadableText.UIDNEXT, ResponseCode.uidNext(uid)); responder.respond(untaggedOk); }
private void uidValidity(Responder responder, MessageManager.MetaData metaData) throws MailboxException { final long uidValidity = metaData.getUidValidity(); final StatusResponse untaggedOk = statusResponseFactory.untaggedOk( HumanReadableText.UID_VALIDITY, ResponseCode.uidValidity(uidValidity)); responder.respond(untaggedOk); }