public abstract class AbstractMultipart extends Object implements Multipart
| Constructor and Description |
|---|
AbstractMultipart(String subType)
Creates a new empty
Multipart instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addBodyPart(Entity bodyPart)
Adds a body part to the end of the list of body parts.
|
void |
addBodyPart(Entity bodyPart,
int index)
Inserts a body part at the specified position in the list of body parts.
|
void |
dispose()
Disposes of the BodyParts of this Multipart.
|
List<Entity> |
getBodyParts()
Gets the list of body parts.
|
int |
getCount()
Returns the number of body parts.
|
abstract String |
getEpilogue()
Gets the epilogue or null if the message has no epilogue
|
Entity |
getParent()
Gets the parent of this body.
|
abstract String |
getPreamble()
Gets the preamble or null if the message has no preamble.
|
String |
getSubType()
Gets the multipart sub-type.
|
Entity |
removeBodyPart(int index)
Removes the body part at the specified position in the list of body
parts.
|
Entity |
replaceBodyPart(Entity bodyPart,
int index)
Replaces the body part at the specified position in the list of body
parts with the specified body part.
|
void |
setBodyParts(List<Entity> bodyParts)
Sets the list of body parts.
|
abstract void |
setEpilogue(String epilogue)
Sets the epilogue value, or remove it if the value passed is null.
|
void |
setParent(Entity parent)
Sets the parent of this body.
|
abstract void |
setPreamble(String preamble)
Sets the preamble with a value or null to remove the preamble.
|
void |
setSubType(String subType)
Sets the multipart sub-type.
|
public AbstractMultipart(String subType)
Multipart instance.public String getSubType()
alternative (the
default) or parallel. See RFC 2045 for common sub-types
and their meaning.getSubType in interface Multipartpublic void setSubType(String subType)
alternative or
parallel. See RFC 2045 for common sub-types and their
meaning.subType - the sub-type.public Entity getParent()
BodygetParent in interface BodyBody.getParent()public void setParent(Entity parent)
BodysetParent in interface Bodyparent - the parent.Body.setParent(org.apache.james.mime4j.dom.Entity)public int getCount()
public List<Entity> getBodyParts()
getBodyParts in interface MultipartEntity objects.public void setBodyParts(List<Entity> bodyParts)
setBodyParts in interface MultipartbodyParts - the new list of Entity objects.public void addBodyPart(Entity bodyPart)
addBodyPart in interface MultipartbodyPart - the body part.public void addBodyPart(Entity bodyPart, int index)
addBodyPart in interface MultipartbodyPart - the body part.index - index at which the specified body part is to be inserted.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >
getCount()).public Entity removeBodyPart(int index)
removeBodyPart in interface Multipartindex - index of the body part to be removed.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >=
getCount()).public Entity replaceBodyPart(Entity bodyPart, int index)
replaceBodyPart in interface MultipartbodyPart - body part to be stored at the specified position.index - index of body part to replace.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >=
getCount()).public abstract String getPreamble()
getPreamble in interface Multipartpublic abstract void setPreamble(String preamble)
setPreamble in interface Multipartpreamble - the preamble.public abstract String getEpilogue()
getEpilogue in interface Multipartpublic abstract void setEpilogue(String epilogue)
setEpilogue in interface Multipartepilogue - the epilogue.public void dispose()
dispose in interface DisposableDisposable.dispose()Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.