org.apache.james.mailbox.model.MimeDescriptor Maven / Gradle / Ivy
/****************************************************************
* Licensed to the Apache Software Foundation (ASF) under one *
* or more contributor license agreements. See the NOTICE file *
* distributed with this work for additional information *
* regarding copyright ownership. The ASF licenses this file *
* to you under the Apache License, Version 2.0 (the *
* "License"); you may not use this file except in compliance *
* with the License. You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, *
* software distributed under the License is distributed on an *
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
* KIND, either express or implied. See the License for the *
* specific language governing permissions and limitations *
* under the License. *
****************************************************************/
/**
*
*/
package org.apache.james.mailbox.model;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public interface MimeDescriptor extends Headers{
/**
* Gets the top level MIME content media type.
*
* @return top level MIME content media type, or null if default
*/
String getMimeType();
/**
* Gets the MIME content subtype.
*
* @return the MIME content subtype, or null if default
*/
String getMimeSubType();
/**
* Gets the MIME Content-ID
header value.
*
* @return MIME Content-ID
, possibly null
*/
String getContentID();
/**
* Gets MIME Content-Description
header value.
*
* @return MIME Content-Description
, possibly null
*/
String getContentDescription();
/**
* Gets MIME Content-Location
header value.
*
* @return parsed MIME Content-Location
, possibly null
*/
String getContentLocation();
/**
* Gets MIME Content-MD5
header value.
*
* @return parsed MIME Content-MD5
, possibly null
*/
String getContentMD5();
/**
* Gets the MIME content transfer encoding.
*
* @return MIME Content-Transfer-Encoding
, possibly null
*/
String getTransferContentEncoding();
/**
* Gets the languages, From the MIME Content-Language
header
* value.
*
* @return List
of String
names
*/
List getLanguages();
/**
* Gets MIME Content-Disposition
.
*
* @return Content-Disposition
, or null if no disposition
* header exists
*/
String getDisposition();
/**
* Gets MIME Content-Disposition
parameters.
*
* @return Content-Disposition
values indexed by names
*/
Map getDispositionParams();
/**
* Gets the number of lines of text in a part of type TEXT
when
* transfer encoded.
*
* @return CRLF
count when a TEXT
type, otherwise
* -1
*/
long getLines();
/**
* The number of octets contained in the body of this part.
*
* @return number of octets
*/
long getBodyOctets();
/**
* Gets parts.
*
* @return MimeDescriptor
Iterator
when a
* composite top level MIME media type, null otherwise
*/
Iterator parts();
/**
* Gets embedded message.
*
* @return MimeDescriptor
when top level MIME type is
* message
, null otherwise
*/
MimeDescriptor embeddedMessage();
/**
* Gets MIME body parameters parsed from Content-Type
.
*
* @return Header
Iterator
, not null
*/
Map contentTypeParameters();
}