|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.mime4j.message.AbstractMultipart
public abstract class AbstractMultipart
Abstract MIME multipart body.
Field Summary | |
---|---|
protected java.util.List<Entity> |
bodyParts
|
Constructor Summary | |
---|---|
AbstractMultipart(java.lang.String subType)
Creates a new empty Multipart instance. |
Method Summary | |
---|---|
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. |
java.util.List<Entity> |
getBodyParts()
Gets the list of body parts. |
int |
getCount()
Returns the number of body parts. |
abstract java.lang.String |
getEpilogue()
Gets the epilogue or null if the message has no epilogue |
Entity |
getParent()
Gets the parent of this body. |
abstract java.lang.String |
getPreamble()
Gets the preamble or null if the message has no preamble. |
java.lang.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(java.util.List<Entity> bodyParts)
Sets the list of body parts. |
abstract void |
setEpilogue(java.lang.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(java.lang.String preamble)
Sets the preamble with a value or null to remove the preamble. |
void |
setSubType(java.lang.String subType)
Sets the multipart sub-type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Entity> bodyParts
Constructor Detail |
---|
public AbstractMultipart(java.lang.String subType)
Multipart
instance.
Method Detail |
---|
public java.lang.String getSubType()
alternative
(the
default) or parallel
. See RFC 2045 for common sub-types
and their meaning.
getSubType
in interface Multipart
public void setSubType(java.lang.String subType)
alternative
or
parallel
. See RFC 2045 for common sub-types and their
meaning.
subType
- the sub-type.public Entity getParent()
Body
getParent
in interface Body
Body.getParent()
public void setParent(Entity parent)
Body
setParent
in interface Body
parent
- the parent.Body.setParent(org.apache.james.mime4j.dom.Entity)
public int getCount()
getCount
in interface Multipart
Entity
objects.public java.util.List<Entity> getBodyParts()
getBodyParts
in interface Multipart
Entity
objects.public void setBodyParts(java.util.List<Entity> bodyParts)
setBodyParts
in interface Multipart
bodyParts
- the new list of Entity
objects.public void addBodyPart(Entity bodyPart)
addBodyPart
in interface Multipart
bodyPart
- the body part.public void addBodyPart(Entity bodyPart, int index)
addBodyPart
in interface Multipart
bodyPart
- the body part.index
- index at which the specified body part is to be inserted.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >
getCount()).public Entity removeBodyPart(int index)
removeBodyPart
in interface Multipart
index
- index of the body part to be removed.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getCount()).public Entity replaceBodyPart(Entity bodyPart, int index)
replaceBodyPart
in interface Multipart
bodyPart
- body part to be stored at the specified position.index
- index of body part to replace.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
getCount()).public abstract java.lang.String getPreamble()
getPreamble
in interface Multipart
public abstract void setPreamble(java.lang.String preamble)
setPreamble
in interface Multipart
preamble
- the preamble.public abstract java.lang.String getEpilogue()
getEpilogue
in interface Multipart
public abstract void setEpilogue(java.lang.String epilogue)
setEpilogue
in interface Multipart
epilogue
- the epilogue.public void dispose()
dispose
in interface Disposable
Disposable.dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |