Refine search
protected Argument messageid(MessageIDTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("HEADER"); result.writeString("Message-ID"); // XXX confirm that charset conversion ought to be done result.writeString(term.getPattern(), charset); return result; }
/** * PROXYAUTH Command. * * @param u the PROXYAUTH user name * @exception ProtocolException for protocol failures * @see "Netscape/iPlanet/SunONE Messaging Server extension" */ public void proxyauth(String u) throws ProtocolException { Argument args = new Argument(); args.writeString(u); simpleCommand("PROXYAUTH", args); proxyAuthUser = u; }
protected Argument from(String address, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("FROM"); result.writeString(address, charset); return result; }
protected Argument messageid(MessageIDTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("HEADER"); result.writeString("Message-ID"); // XXX confirm that charset conversion ought to be done result.writeString(term.getPattern(), charset); return result; }
protected Argument from(String address, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("FROM"); result.writeString(address, charset); return result; }
/** * PROXYAUTH Command. * * @param u the PROXYAUTH user name * @exception ProtocolException for protocol failures * @see "Netscape/iPlanet/SunONE Messaging Server extension" */ public void proxyauth(String u) throws ProtocolException { Argument args = new Argument(); args.writeString(u); simpleCommand("PROXYAUTH", args); proxyAuthUser = u; }
protected Argument header(HeaderTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("HEADER"); result.writeString(term.getHeaderName()); result.writeString(term.getPattern(), charset); return result; }
protected Argument header(HeaderTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("HEADER"); result.writeString(term.getHeaderName()); result.writeString(term.getPattern(), charset); return result; }
protected Argument body(BodyTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("BODY"); result.writeString(term.getPattern(), charset); return result; }
protected Argument subject(SubjectTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("SUBJECT"); result.writeString(term.getPattern(), charset); return result; }
protected Argument subject(SubjectTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("SUBJECT"); result.writeString(term.getPattern(), charset); return result; }
protected Argument body(BodyTerm term, String charset) throws SearchException, IOException { Argument result = new Argument(); result.writeAtom("BODY"); result.writeString(term.getPattern(), charset); return result; }
/** * SUBSCRIBE Command. * * @param mbox the mailbox * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.6" */ public void subscribe(String mbox) throws ProtocolException { Argument args = new Argument(); // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); args.writeString(mbox); simpleCommand("SUBSCRIBE", args); }
/** * UNSUBSCRIBE Command. * * @param mbox the mailbox * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.7" */ public void unsubscribe(String mbox) throws ProtocolException { Argument args = new Argument(); // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); args.writeString(mbox); simpleCommand("UNSUBSCRIBE", args); }
/** * DELETE Command. * * @param mbox the mailbox to delete * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.4" */ public void delete(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); simpleCommand("DELETE", args); }
/** * RENAME Command. * * @param o old mailbox name * @param n new mailbox name * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.5" */ public void rename(String o, String n) throws ProtocolException { // encode the mbox as per RFC2060 o = BASE64MailboxEncoder.encode(o); n = BASE64MailboxEncoder.encode(n); Argument args = new Argument(); args.writeString(o); args.writeString(n); simpleCommand("RENAME", args); }
/** * CREATE Command. * * @param mbox the mailbox to create * @exception ProtocolException for protocol failures * @see "RFC2060, section 6.3.3" */ public void create(String mbox) throws ProtocolException { // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); simpleCommand("CREATE", args); }
protected Argument recipient(Message.RecipientType type, String address, String charset) throws SearchException, IOException { Argument result = new Argument(); if (type == Message.RecipientType.TO) result.writeAtom("TO"); else if (type == Message.RecipientType.CC) result.writeAtom("CC"); else if (type == Message.RecipientType.BCC) result.writeAtom("BCC"); else throw new SearchException("Illegal Recipient type"); result.writeString(address, charset); return result; }
protected Argument recipient(Message.RecipientType type, String address, String charset) throws SearchException, IOException { Argument result = new Argument(); if (type == Message.RecipientType.TO) result.writeAtom("TO"); else if (type == Message.RecipientType.CC) result.writeAtom("CC"); else if (type == Message.RecipientType.BCC) result.writeAtom("BCC"); else throw new SearchException("Illegal Recipient type"); result.writeString(address, charset); return result; }
/** * DELETEACL Command. * * @param mbox the mailbox * @param user the user * @exception ProtocolException for protocol failures * @see "RFC2086" */ public void deleteACL(String mbox, String user) throws ProtocolException { if (!hasCapability("ACL")) throw new BadCommandException("ACL not supported"); // encode the mbox as per RFC2060 mbox = BASE64MailboxEncoder.encode(mbox); Argument args = new Argument(); args.writeString(mbox); args.writeString(user); Response[] r = command("DELETEACL", args); Response response = r[r.length-1]; // dispatch untagged responses notifyResponseHandlers(r); handleResult(response); }