public static SimpleMailboxMessage copyWithoutAttachments(MailboxId mailboxId, MailboxMessage original) throws MailboxException { return fromWithoutAttachments(original) .mailboxId(mailboxId).build(); }
/** * Sets MIME Content-Transfer-Encoding. * * @param value the MIME Content-Transfer-Encoding * or null to remove */ public void setContentTransferEncoding(String value) { setProperty(MIME_CONTENT_TRANSFER_ENCODING_SPACE, MIME_CONTENT_TRANSFER_ENCODING_NAME, value); }
/** * Gets RFC2183 Content-Disposition parameters. * @return parameter values indexed by lower case local names */ public Map<String,String> getContentDispositionParameters() { return getProperties(MIME_CONTENT_DISPOSITION_PARAMETER_SPACE); }
private boolean isAttachment(Entity part, Context context) { if (context == Context.BODY && isTextPart(part)) { return false; } return attachmentDispositionCriterion(part) || attachmentContentTypeCriterion(part) || hadCID(part); }
/** * Gets the top level MIME content media type. * * @return top level MIME content media type, or null if default */ public String getMediaType() { return getFirstValue(MIME_MIME_TYPE_SPACE, MIME_MEDIA_TYPE_NAME); }
/** * Gets the RFC1766 Content-Language. * * @return list of parsed langauge tags from the RFC1766 Content-Language, * possibly empty */ public List<String> getContentLanguage() { return getValues(MIME_CONTENT_LANGUAGE_SPACE, MIME_CONTENT_LANGUAGE_NAME); }
/** * Sets Content-Disposition parameters. * Parameter names will be normalised to lower case. * @param valuesByParameterName values indexed by parameter name */ public void setContentDispositionParameters(Map<String,String> valuesByParameterName) { setProperties(MIME_CONTENT_DISPOSITION_PARAMETER_SPACE, valuesByParameterName); }
public static Context fromEntity(Entity entity) { if (isMultipartAlternative(entity)) { return BODY; } return OTHER; }
/** * Gets the MIME Content-ID. * * @return the MIME content subtype, or null if default */ public String getContentID() { return getFirstValue(MIME_CONTENT_ID_SPACE, MIME_CONTENT_ID_NAME); }
/** * Sets RFC1864 Content-MD5. * * @param value the RFC1864 Content-MD5 * or null to remove */ public void setContentMD5(String value) { setProperty(MIME_CONTENT_MD5_SPACE, MIME_CONTENT_MD5_NAME, value); }
/** * Gets the MIME Content-Description. * * @return the MIME Content-Description, * or null if this meta data is not present */ public String getContentDescription() { return getFirstValue(MIME_CONTENT_DESCRIPTION_SPACE, MIME_CONTENT_DESCRIPTION_NAME); }
/** * Sets RFC2045 Content-Type "boundary" parameter. * * @param value the RFC2045 Content-Type "boundary" parameter * or null to remove */ public void setBoundary(String value) { setProperty(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME, value); }
/** * Gets the RFC2557 Content-Location. * * @return the RFC2557 Content-Location, * or null if this meta data is not present */ public String getContentLocation() { return getFirstValue(MIME_CONTENT_LOCATION_SPACE, MIME_CONTENT_LOCATION_NAME); }
/** * Sets the MIME content subtype. * * @param value the MIME content subtype, * or null to remove */ public void setSubType(String value) { setProperty(MIME_MIME_TYPE_SPACE, MIME_SUB_TYPE_NAME, value); }
/** * Gets the RFC2183 Content-Disposition disposition-type. * * @return the RFC2183 Content-Disposition, * or null if this meta data is not present */ public String getContentDispositionType() { return getFirstValue(MIME_CONTENT_DISPOSITION_SPACE, MIME_CONTENT_DISPOSITION_TYPE_NAME); }
/** * Sets RFC2557 Content-Location. * * @param value the RFC2557 Content-Location * or null to remove */ public void setContentLocation(String value) { setProperty(MIME_CONTENT_LOCATION_SPACE, MIME_CONTENT_LOCATION_NAME, value); }
/** * Gets the RFC1864 Content-MD5. * * @return the RFC1864 Content-MD5, * or null if this meta data is not present */ public String getContentMD5() { return getFirstValue(MIME_CONTENT_MD5_SPACE, MIME_CONTENT_MD5_NAME); }
/** * Sets RFC2045 Content-Type "charset" parameter. * * @param value the RFC2045 Content-Type "charset" parameter * or null to remove */ public void setCharset(String value) { setProperty(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME, value); }
/** * Gets the RFC2045 Content-Type "charset" parameter. * * @return the RFC2045 Content-Type "charset" parameter, * or null if this meta data is not present */ public String getCharset() { return getFirstValue(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME); }