|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.axis.attachments.AttachmentsImpl
Implements the Attachment interface, via an actual Hashmap of actual AttachmentParts.
Field Summary | |
protected java.lang.String |
contentLocation
This is the content location as specified in SOAP with Attachments. |
protected MultiPartInputStream (src) |
mpartStream
The actual stream to manage the multi-related input stream. |
protected int |
sendtype
The form of the attachments, whether MIME or DIME. |
protected MessagePart (src) |
soapPart
Field soapPart. |
Fields inherited from interface org.jboss.axis.attachments.Attachments (src) |
CIDprefix, SEND_TYPE_DEFAULT, SEND_TYPE_DIME, SEND_TYPE_MAX, SEND_TYPE_MIME, SEND_TYPE_NONE, SEND_TYPE_NOTSET |
Constructor Summary | |
AttachmentsImpl(java.lang.Object intialContents,
java.lang.String contentType,
java.lang.String contentLocation)
Construct one of these on a parent Message. |
Method Summary | |
Part (src) |
addAttachmentPart(Part (src) newPart)
Adds an existing attachment to this list. |
Part (src) |
createAttachmentPart()
Create a new attachment Part in this Message. |
Part (src) |
createAttachmentPart(java.lang.Object datahandler)
Create a new attachment Part in this Message. |
protected DimeMultiPart (src) |
createDimeMessage()
Creates the DIME message |
void |
dispose()
dispose of the attachments and their files; do not use the object after making this call. |
Part (src) |
getAttachmentByReference(java.lang.String reference)
This method should look at a refernce and determine if it is a CID: or url to look for attachment. |
int |
getAttachmentCount()
This is the number of attachments. |
java.util.Collection |
getAttachments()
This method will return all attachments as a collection. |
java.util.Iterator |
getAttachments(MimeHeaders (src) headers)
Retrieves all the AttachmentPart objects
that have header entries that match the specified headers. |
long |
getContentLength()
Get the content length of the stream. |
java.lang.String |
getContentType()
Gets the content type for the whole stream. |
Part (src) |
getRootPart()
From the complex stream return the root part. |
int |
getSendType()
Determine if an object is to be treated as an attchment. |
static int |
getSendType(java.lang.String value)
Determine how an object typically sent as attachments are to be represented. |
static java.lang.String |
getSendTypeString(int value)
For a given sendType value, return a string representation. |
boolean |
isAttachment(java.lang.Object value)
Determine if an object is to be treated as an attchment. |
void |
removeAllAttachments()
Removes all AttachmentPart objects that have
been added to this SOAPMessage object. |
Part (src) |
removeAttachmentPart(java.lang.String reference)
This method uses getAttacmentByReference() to look for attachment. |
void |
setAttachmentParts(java.util.Collection parts)
Add the collection of parts. |
void |
setRootPart(Part (src) newRoot)
Sets the root part of this multipart block |
void |
setSendType(int sendtype)
Set the format for attachments. |
void |
writeContentToStream(java.io.OutputStream os)
Write the content to the stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected MessagePart (src) soapPart
protected MultiPartInputStream (src) mpartStream
protected int sendtype
protected java.lang.String contentLocation
Constructor Detail |
public AttachmentsImpl(java.lang.Object intialContents, java.lang.String contentType, java.lang.String contentLocation) throws AxisFault (src)
intialContents
- should be anything but today only a stream is
supported.contentType
- The mime content type of the stream for transports
that provide it.contentLocation
-
AxisFault (src)
Method Detail |
public Part (src) removeAttachmentPart(java.lang.String reference) throws AxisFault (src)
removeAttachmentPart
in interface Attachments (src)
reference
- The reference that referers to an attachment.
AxisFault (src)
public Part (src) addAttachmentPart(Part (src) newPart) throws AxisFault (src)
addAttachmentPart
in interface Attachments (src)
newPart
- new part to add
AxisFault (src)
public Part (src) createAttachmentPart(java.lang.Object datahandler) throws AxisFault (src)
Attachments (src)
createAttachmentPart
in interface Attachments (src)
datahandler
- The part that is referenced
AxisFault (src)
public void setAttachmentParts(java.util.Collection parts) throws AxisFault (src)
setAttachmentParts
in interface Attachments (src)
parts
-
AxisFault (src)
public Part (src) getAttachmentByReference(java.lang.String reference) throws AxisFault (src)
getAttachmentByReference
in interface Attachments (src)
reference
- The reference in the xml that referers to an attachment.
AxisFault (src)
public java.util.Collection getAttachments() throws AxisFault (src)
getAttachments
in interface Attachments (src)
AxisFault (src)
public Part (src) getRootPart()
getRootPart
in interface Attachments (src)
Part
public void setRootPart(Part (src) newRoot)
Attachments (src)
setRootPart
in interface Attachments (src)
newRoot
- the new root Part
public long getContentLength() throws AxisFault (src)
getContentLength
in interface Attachments (src)
AxisFault (src)
protected DimeMultiPart (src) createDimeMessage() throws AxisFault (src)
AxisFault (src)
- if the part could not be builtpublic void writeContentToStream(java.io.OutputStream os) throws AxisFault (src)
writeContentToStream
in interface Attachments (src)
os
-
AxisFault (src)
public java.lang.String getContentType() throws AxisFault (src)
getContentType
in interface Attachments (src)
AxisFault (src)
public int getAttachmentCount()
getAttachmentCount
in interface Attachments (src)
public boolean isAttachment(java.lang.Object value)
isAttachment
in interface Attachments (src)
value
- the value that is to be determined if
its an attachment.
public void removeAllAttachments()
AttachmentPart
objects that have
been added to this SOAPMessage
object.
This method does not touch the SOAP part.
removeAllAttachments
in interface Attachments (src)
public java.util.Iterator getAttachments(MimeHeaders (src) headers)
AttachmentPart
objects
that have header entries that match the specified headers.
Note that a returned attachment could have headers in
addition to those specified.
getAttachments
in interface Attachments (src)
headers
- a MimeHeaders
object containing the MIME headers for which to
search
public Part (src) createAttachmentPart() throws AxisFault (src)
createAttachmentPart
in interface Attachments (src)
AxisFault (src)
public void setSendType(int sendtype)
Attachments (src)
setSendType
in interface Attachments (src)
sendtype
- the format to send.
SEND_TYPE_MIME for Multipart Releated Mail type attachments.
SEND_TYPE_DIME for DIME type attachments.public int getSendType()
Attachments (src)
getSendType
in interface Attachments (src)
public void dispose()
dispose
in interface Attachments (src)
public static int getSendType(java.lang.String value)
value
- a String representing a sending type, treated in a
case-insensetive manner
int
send type codepublic static java.lang.String getSendTypeString(int value)
value
- a type code integer
String
representation of value
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |