コード例 #1
0
 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);
 }
コード例 #2
0
 private void taggedOk(
     Responder responder,
     String tag,
     ImapCommand command,
     MetaData metaData,
     HumanReadableText text) {
   final boolean writeable = metaData.isWriteable() && !openReadOnly;
   final ResponseCode code;
   if (writeable) {
     code = ResponseCode.readWrite();
   } else {
     code = ResponseCode.readOnly();
   }
   final StatusResponse taggedOk = statusResponseFactory.taggedOk(tag, command, text, code);
   responder.respond(taggedOk);
 }