|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.attachments.Attachments
public class Attachments
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
Attachments()
Use this constructor when instantiating this to store the attachments set programatically through the SwA API. |
|
Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString)
Sets file cache to false. |
|
Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold)
Moves the pointer to the beginning of the first MIME part. |
|
Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold,
int contentLength)
Moves the pointer to the beginning of the first MIME part. |
|
Attachments(LifecycleManager manager,
java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold)
Moves the pointer to the beginning of the first MIME part. |
|
Attachments(LifecycleManager manager,
java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold,
int contentLength)
Moves the pointer to the beginning of the first MIME part. |
|
| Method Summary | |
|---|---|
void |
addDataHandler(java.lang.String contentID,
javax.activation.DataHandler dataHandler)
Programatically adding an SOAP with Attachments(SwA) Attachment. |
java.lang.String[] |
getAllContentIDs()
Get the content IDs of all MIME parts in the message. |
java.lang.String |
getAttachmentSpecType()
Identify the type of message (MTOM or SOAP with attachments) represented by this object. |
java.util.List |
getContentIDList()
Get the content IDs of the already loaded MIME parts in the message. |
java.util.Set |
getContentIDSet()
Get the content IDs of all MIME parts in the message. |
long |
getContentLength()
If the Attachments is backed by an InputStream, then this method returns the length of the message contents (Length of the entire message - Length of the Transport Headers) |
javax.activation.DataHandler |
getDataHandler(java.lang.String contentID)
Get the DataHandler object for the MIME part with a given content ID. |
java.io.InputStream |
getIncomingAttachmentsAsSingleStream()
Returns the rest of mime stream. |
IncomingAttachmentStreams |
getIncomingAttachmentStreams()
Stream based access |
LifecycleManager |
getLifecycleManager()
|
java.util.Map |
getMap()
Get a map of all MIME parts in the message. |
java.lang.String |
getSOAPPartContentID()
Get the content ID of the SOAP part or the MIME message. |
java.lang.String |
getSOAPPartContentType()
Get the content type of the SOAP part of the MIME message. |
java.io.InputStream |
getSOAPPartInputStream()
|
void |
removeDataHandler(java.lang.String blobContentID)
Removes the DataHandler corresponding to the given contenID. |
protected void |
setEndOfStream(boolean value)
endOfStreamReached will be set to true if the message ended in MIME Style having "--" suffix with the last mime boundary |
void |
setLifecycleManager(LifecycleManager manager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public Attachments(LifecycleManager manager,
java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold)
throws OMException
inStream - contentTypeString - fileCacheEnable - attachmentRepoDir -
OMException
public Attachments(LifecycleManager manager,
java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold,
int contentLength)
throws OMException
inStream - contentTypeString - fileCacheEnable - attachmentRepoDir - fileThreshold - contentLength -
OMException
public Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold)
throws OMException
inStream - contentTypeString - fileCacheEnable - attachmentRepoDir -
OMException
public Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString,
boolean fileCacheEnable,
java.lang.String attachmentRepoDir,
java.lang.String fileThreshold,
int contentLength)
throws OMException
inStream - contentTypeString - fileCacheEnable - attachmentRepoDir - fileThreshold - contentLength -
OMException
public Attachments(java.io.InputStream inStream,
java.lang.String contentTypeString)
throws OMException
inStream - contentTypeString -
OMExceptionpublic Attachments()
| Method Detail |
|---|
public LifecycleManager getLifecycleManager()
public void setLifecycleManager(LifecycleManager manager)
public java.lang.String getAttachmentSpecType()
MTOMConstants.MTOM_TYPE, MTOMConstants.SWA_TYPE
or MTOMConstants.SWA_TYPE_12 constants.
OMException - if the message doesn't have one of the supported types, i.e. is
neither MTOM nor SOAP with attachmentspublic javax.activation.DataHandler getDataHandler(java.lang.String contentID)
DataHandler object for the MIME part with a given content ID.
getDataHandler in interface OMAttachmentAccessorcontentID - the raw content ID (without the surrounding angle brackets and cid:
prefix) of the MIME part
DataHandler of the MIME part referred by the content ID or
null if the MIME part referred by the content ID does not exist
public void addDataHandler(java.lang.String contentID,
javax.activation.DataHandler dataHandler)
contentID - dataHandler - public void removeDataHandler(java.lang.String blobContentID)
blobContentID -
public java.io.InputStream getSOAPPartInputStream()
throws OMException
OMExceptionpublic java.lang.String getSOAPPartContentID()
public java.lang.String getSOAPPartContentType()
OMException - if the content type could not be determined
public IncomingAttachmentStreams getIncomingAttachmentStreams()
throws java.lang.IllegalStateException
IncomingAttachmentStreams
java.lang.IllegalStateException - if application has alreadt started using Part's directlypublic java.lang.String[] getAllContentIDs()
public java.util.Set getContentIDSet()
public java.util.Map getMap()
DataHandler objects as values.public java.util.List getContentIDList()
getAllContentIDs() or getContentIDSet() should be used
instead.
public long getContentLength()
throws java.io.IOException
java.io.IOExceptionprotected void setEndOfStream(boolean value)
value -
public java.io.InputStream getIncomingAttachmentsAsSingleStream()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||