@Override protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException { IdRange[] idSet = request.parseIdRange(session); FetchData fetch = fetchRequest(request); // Check if we have VANISHED and and UID FETCH as its only allowed there // // See RFC5162 3.2. VANISHED UID FETCH Modifier if (fetch.getVanished() && !useUids) { throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "VANISHED only allowed in UID FETCH"); } request.eol(); return new FetchRequest(command, useUids, idSet, fetch, tag); }
/** * @see * org.apache.james.imap.decode.parser.AbstractUidCommandParser#decode(org.apache.james.imap.api.ImapCommand, * org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, * boolean, org.apache.james.imap.api.process.ImapSession) */ protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, boolean useUids, ImapSession session) throws DecodingException { IdRange[] idSet = request.parseIdRange(session); FetchData fetch = fetchRequest(request); // Check if we have VANISHED and and UID FETCH as its only allowed there // // See RFC5162 3.2. VANISHED UID FETCH Modifier if (fetch.getVanished() && !useUids) { throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "VANISHED only allowed in UID FETCH"); } request.eol(); final ImapMessage result = new FetchRequest(command, useUids, idSet, fetch, tag); return result; }
final boolean vanished = fetch.getVanished(); if (vanished && !EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC)) { taggedBad(command, tag, responder, HumanReadableText.QRESYNC_NOT_ENABLED);
final boolean vanished = fetch.getVanished(); if (vanished && !EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC)) { taggedBad(command, tag, responder, HumanReadableText.QRESYNC_NOT_ENABLED);