private void setACL(final ACL acl, final char mod) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setACL(fullName, mod, acl); return null; } }); }
private void setACL(final ACL acl, final char mod) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setACL(fullName, mod, acl); return null; } }); }
/** * Get the access control list entries for this folder. * * @return array of access control list entries * @exception MessagingException if the server doesn't support the * ACL extension */ public ACL[] getACL() throws MessagingException { return (ACL[])doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.getACL(fullName); } }); }
/** * Get the rights allowed to the currently authenticated user. * * @return the rights granted to the current user * @exception MessagingException if the server doesn't support the * ACL extension */ public Rights myRights() throws MessagingException { return (Rights)doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.myRights(fullName); } }); }
/** * Get the access control list entries for this folder. * * @return array of access control list entries * @exception MessagingException if the server doesn't support the * ACL extension */ public ACL[] getACL() throws MessagingException { return (ACL[])doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.getACL(fullName); } }); }
/** * Get the rights allowed to the currently authenticated user. * * @return the rights granted to the current user * @exception MessagingException if the server doesn't support the * ACL extension */ public Rights myRights() throws MessagingException { return (Rights)doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.myRights(fullName); } }); }
/** * Remove any access control list entry for the given identifier * from the access control list for this folder. * * @param name the identifier for which to remove all ACL entries * @exception MessagingException if the server doesn't support the * ACL extension */ public void removeACL(final String name) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { p.deleteACL(fullName, name); return null; } }); }
/** * Remove any access control list entry for the given identifier * from the access control list for this folder. * * @param name the identifier for which to remove all ACL entries * @exception MessagingException if the server doesn't support the * ACL extension */ public void removeACL(final String name) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { p.deleteACL(fullName, name); return null; } }); }
/** * Set the quotas for the quotaroot specified in the quota argument. * Typically this will be one of the quotaroots associated with this * folder, as obtained from the <code>getQuota</code> method, but it * need not be. * * @param quota the quota to set * @exception MessagingException if the server doesn't support the * QUOTA extension */ public void setQuota(final Quota quota) throws MessagingException { doOptionalCommand("QUOTA not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setQuota(quota); return null; } }); }
/** * Set the quotas for the quotaroot specified in the quota argument. * Typically this will be one of the quotaroots associated with this * folder, as obtained from the <code>getQuota</code> method, but it * need not be. * * @param quota the quota to set * @exception MessagingException if the server doesn't support the * QUOTA extension */ public void setQuota(final Quota quota) throws MessagingException { doOptionalCommand("QUOTA not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setQuota(quota); return null; } }); }
/** * Get the quotas for the quotaroot associated with this * folder. Note that many folders may have the same quotaroot. * Quotas are controlled on the basis of a quotaroot, not * (necessarily) a folder. The relationship between folders * and quotaroots depends on the IMAP server. Some servers * might implement a single quotaroot for all folders owned by * a user. Other servers might implement a separate quotaroot * for each folder. A single folder can even have multiple * quotaroots, perhaps controlling quotas for different * resources. * * @return array of Quota objects for the quotaroots associated with * this folder * @exception MessagingException if the server doesn't support the * QUOTA extension */ public Quota[] getQuota() throws MessagingException { return (Quota[])doOptionalCommand("QUOTA not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.getQuotaRoot(fullName); } }); }
/** * Get the quotas for the quotaroot associated with this * folder. Note that many folders may have the same quotaroot. * Quotas are controlled on the basis of a quotaroot, not * (necessarily) a folder. The relationship between folders * and quotaroots depends on the IMAP server. Some servers * might implement a single quotaroot for all folders owned by * a user. Other servers might implement a separate quotaroot * for each folder. A single folder can even have multiple * quotaroots, perhaps controlling quotas for different * resources. * * @return array of Quota objects for the quotaroots associated with * this folder * @exception MessagingException if the server doesn't support the * QUOTA extension */ public Quota[] getQuota() throws MessagingException { return (Quota[])doOptionalCommand("QUOTA not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.getQuotaRoot(fullName); } }); }
/** * Get all the rights that may be allowed to the given identifier. * Rights are grouped per RFC 2086 and each group is returned as an * element of the array. The first element of the array is the set * of rights that are always granted to the identifier. Later * elements are rights that may be optionally granted to the * identifier. <p> * * Note that this method lists the rights that it is possible to * assign to the given identifier, <em>not</em> the rights that are * actually granted to the given identifier. For the latter, see * the <code>getACL</code> method. * * @param name the identifier to list rights for * @return array of Rights objects representing possible * rights for the identifier * @exception MessagingException if the server doesn't support the * ACL extension */ public Rights[] listRights(final String name) throws MessagingException { return (Rights[])doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.listRights(fullName, name); } }); }
/** * Get all the rights that may be allowed to the given identifier. * Rights are grouped per RFC 2086 and each group is returned as an * element of the array. The first element of the array is the set * of rights that are always granted to the identifier. Later * elements are rights that may be optionally granted to the * identifier. <p> * * Note that this method lists the rights that it is possible to * assign to the given identifier, <em>not</em> the rights that are * actually granted to the given identifier. For the latter, see * the <code>getACL</code> method. * * @param name the identifier to list rights for * @return array of Rights objects representing possible * rights for the identifier * @exception MessagingException if the server doesn't support the * ACL extension */ public Rights[] listRights(final String name) throws MessagingException { return (Rights[])doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.listRights(fullName, name); } }); }
/** * Send the IMAP ID command (if supported by the server) and return * the result from the server. The ID command identfies the client * to the server and returns information about the server to the client. * See <A HREF="http://www.ietf.org/rfc/rfc2971.txt">RFC 2971</A>. * The returned Map is unmodifiable. * * @param clientParams a Map of keys and values identifying the client * @return a Map of keys and values identifying the server * @exception MessagingException if the server doesn't support the * ID extension * @since JavaMail 1.5.1 */ @SuppressWarnings("unchecked") public Map<String, String> id(final Map<String, String> clientParams) throws MessagingException { checkOpened(); return (Map<String,String>)doOptionalCommand("ID not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.id(clientParams); } }); }
/** * Send the IMAP ID command (if supported by the server) and return * the result from the server. The ID command identfies the client * to the server and returns information about the server to the client. * See <A HREF="http://www.ietf.org/rfc/rfc2971.txt">RFC 2971</A>. * The returned Map is unmodifiable. * * @param clientParams a Map of keys and values identifying the client * @return a Map of keys and values identifying the server * @exception MessagingException if the server doesn't support the * ID extension * @since JavaMail 1.5.1 */ @SuppressWarnings("unchecked") public Map<String, String> id(final Map<String, String> clientParams) throws MessagingException { checkOpened(); return (Map<String,String>)doOptionalCommand("ID not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { return p.id(clientParams); } }); }
throw new MessagingException( "Folder already being watched by another IdleManager"); Boolean started = (Boolean)doOptionalCommand("IDLE not supported", new ProtocolCommand() { @Override
throw new MessagingException( "Folder already being watched by another IdleManager"); Boolean started = (Boolean)doOptionalCommand("IDLE not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p)
private void setACL(final ACL acl, final char mod) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { @Override public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setACL(fullName, mod, acl); return null; } }); }
private void setACL(final ACL acl, final char mod) throws MessagingException { doOptionalCommand("ACL not supported", new ProtocolCommand() { public Object doCommand(IMAPProtocol p) throws ProtocolException { p.setACL(fullName, mod, acl); return null; } }); }