/** RFC4315 <code>APPENDUID</code> response code */ public static ResponseCode appendUid(long uidValidity, IdRange[] uids) { String uidParam = formatRanges(uids); return new ResponseCode("APPENDUID", Arrays.asList(uidParam), uidValidity, false); }
/** RFC4315 <code>APPENDUID</code> response code */ public static ResponseCode appendUid(long uidValidity, UidRange[] uids) { String uidParam = formatRanges(uids); return new ResponseCode("APPENDUID", Arrays.asList(uidParam), uidValidity, false); }
/** RFC4551 <code>Conditional STORE</code> response code */ public static ResponseCode condStore(IdRange[] failedRanges) { String failed = formatRanges(failedRanges); return new ResponseCode("MODIFIED", Arrays.asList(new String[] { failed}), 0, false); }
/** * Creates a RFC2060 <code>PERMENANTFLAGS</code> response code. * * @param flags * <code>Collection<String></code> containing flag names * @return <code>ResponseCode</code>, not null */ public static ResponseCode permanentFlags(Flags flags) { return new ResponseCode("PERMANENTFLAGS", MessageFlags.names(flags)); }
/** RFC4551 <code>Conditional STORE</code> response code */ public static ResponseCode condStore(UidRange[] failedRanges) { String failed = formatRanges(failedRanges); return new ResponseCode("MODIFIED", Arrays.asList(new String[] { failed}), 0, false); }
/** * Creates a RFC2060 <code>UIDNEXT</code> response code. * * @param uid * positive non-zero integer * @return <code>ResponseCode</code>, not null */ public static ResponseCode uidNext(long uid) { return new ResponseCode("UIDNEXT", uid); }
/** * Creates a RFC2060 <code>UNSEEN</code> response code. * * @param numberUnseen * positive non-zero integer * @return <code>ResponseCode</code>, not null */ public static ResponseCode unseen(int numberUnseen) { return new ResponseCode("UNSEEN", numberUnseen); }
/** * Creates a RFC2060 <code>BADCHARSET</code> response code. * * @param charsetNames * <code>Collection<String></code> containing charset names * @return <code>ResponseCode</code>, not null */ public static ResponseCode badCharset(Collection<String> charsetNames) { return new ResponseCode("BADCHARSET", charsetNames); }
/** RFC4551 <code>Conditional STORE</code> response code */ public static ResponseCode condStore(IdRange[] failedRanges) { String failed = formatRanges(failedRanges); return new ResponseCode("MODIFIED", Arrays.asList(new String[] { failed}), 0, false); }
/** * Create a RFC5464 getMetadata which support MAXSIZE * @param entryLong positive non-zero long * @return <code>ResponseCode</code> */ public static ResponseCode longestMetadataEntry(long entryLong) { return new ResponseCode("METADATA LONGENTRIES", entryLong); }
/** RFC4315 <code>COPYUID</code> response code */ public static ResponseCode copyUid(long uidValidity, IdRange[] sourceRanges, IdRange[] targetRanges) { String source = formatRanges(sourceRanges); String target = formatRanges(targetRanges); return new ResponseCode("COPYUID", Arrays.asList(new String[] { source, target }), uidValidity, false); }
/** * Creates a RFC2060 <code>UIDVALIDITY</code> response code. * * @param uid * positive non-zero integer * @return <code>ResponseCode</code>, not null */ public static ResponseCode uidValidity(long uid) { return new ResponseCode("UIDVALIDITY", uid); }
/** * Create a RFC4551 <code>HIGESTMODSEQ</code> response code * * @param modSeq positive non-zero long * @return <code>ResponseCode</code> */ public static ResponseCode highestModSeq(long modSeq) { return new ResponseCode("HIGHESTMODSEQ", modSeq); }
/** * Creates a RFC2060 <code>PERMENANTFLAGS</code> response code. * * @param flags * <code>Collection<String></code> containing flag names * @return <code>ResponseCode</code>, not null */ public static ResponseCode permanentFlags(Flags flags) { return new ResponseCode("PERMANENTFLAGS", MessageFlags.names(flags)); }
/** RFC4315 <code>COPYUID</code> response code */ public static ResponseCode copyUid(long uidValidity, IdRange[] sourceRanges, IdRange[] targetRanges) { String source = formatRanges(sourceRanges); String target = formatRanges(targetRanges); return new ResponseCode("COPYUID", Arrays.asList(new String[] { source, target }), uidValidity, false); }
/** * Creates a RFC2060 <code>UIDNEXT</code> response code. * * @param uid * positive non-zero integer * @return <code>ResponseCode</code>, not null */ public static ResponseCode uidNext(MessageUid uid) { return new ResponseCode("UIDNEXT", uid.asLong()); }
/** * Create a RFC4551 <code>NOMODSEQ</code> response code * * @return <code>ResponseCode</code> */ public static ResponseCode noModSeq() { return new ResponseCode("NOMODSEQ"); }
/** * Create a RFC4551 <code>HIGESTMODSEQ</code> response code * * @param modSeq positive non-zero long * @return <code>ResponseCode</code> */ public static ResponseCode highestModSeq(long modSeq) { return new ResponseCode("HIGHESTMODSEQ", modSeq); }
/** * Creates a RFC2060 <code>UNSEEN</code> response code. * * @param numberUnseen * positive non-zero integer * @return <code>ResponseCode</code>, not null */ public static ResponseCode unseen(int numberUnseen) { return new ResponseCode("UNSEEN", numberUnseen); }
/** * Creates a RFC2060 <code>BADCHARSET</code> response code. * * @param charsetNames * <code>Collection<String></code> containing charset names * @return <code>ResponseCode</code>, not null */ public static ResponseCode badCharset(Collection<String> charsetNames) { return new ResponseCode("BADCHARSET", charsetNames); }