|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.soap.AttachmentManager
This class is used to manage SOAP attachments.
Nested Class Summary | |
(package private) static class |
AttachmentManager.MemoryOnlyDataSource This class caches attachments in memory. |
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private static DAILogger |
LOG Logger object for logging in this class |
private java.util.Vector |
mAttachmentParts Collection of attachment parts |
Constructor Summary | |
AttachmentManager() Creates a new AttachmentManager object. |
Method Summary | |
void |
addAttachments(org.apache.axis.Message message) Adds stored attachemnts to a SOAP message. |
java.lang.String |
addFile(java.io.File file) Crates and stores new SOAP attachment created from a file. |
java.lang.String |
addNewOctetStream(byte[] data) Creates and stores new application/octet-stream MIME type attachment. |
java.lang.String |
addNewPlainText(java.lang.String data) Creates and stores new text/plain MIME type attachment. |
void |
addRcvOctetStreamText(byte[] data, java.lang.String contentID) Creates new application/octet-stream MIME type attachment and sets Content-Id MIME header to a user specified value. |
void |
addRcvPlainText(byte[] data, java.lang.String contentID) Creates new text/plain MIME type attachment and sets Content-Id MIME header to a user specified value. |
byte[] |
getAttachmentAsByteArray(java.lang.String contentID) Get attachment data as an array of bytes. |
java.io.InputStream |
getAttachmentAsInputStream(java.lang.String contentID) Get InputStream for data associated with the attachment described by the provided Content-Id MIME header. |
java.lang.String |
getAttachmentAsString(java.lang.String contentID) Get attachment data as an array of bytes. |
org.apache.axis.attachments.AttachmentPart |
getAttachmentPart(java.lang.String contentID) Searches stored attachments for a given value of the Content-Id MIME header and returns its reference. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private java.util.Vector mAttachmentParts
Constructor Detail |
public AttachmentManager()
AttachmentManager
object.
Method Detail |
public void addAttachments(org.apache.axis.Message message)
message
- The SOAP message.public java.lang.String addNewPlainText(java.lang.String data) throws java.io.IOException
data
- Textual data to be sent to the client as a SOAP attachment.java.io.IOException
- When there is a problem with creating DataSource for DataHandler.public void addRcvPlainText(byte[] data, java.lang.String contentID) throws java.io.IOException
data
- Byte array representing attachment data.contentID
- Value of Content-Id MIME headerjava.io.IOException
- When there is a problem with creating DataSource for DataHandler.public java.lang.String addNewOctetStream(byte[] data) throws java.io.IOException
data
- Binary data to be sent to the client as a SOAP attachment.java.io.IOException
- When there is a problem with creating DataSource for DataHandler.public void addRcvOctetStreamText(byte[] data, java.lang.String contentID) throws java.io.IOException
data
- Byte array representing attachment data.contentID
- Value of Content-Id MIME headerjava.io.IOException
- When there is a problem with creating DataSource for DataHandler.public java.lang.String addFile(java.io.File file)
file
- Reference to a File object to be sent to the client as a SOAP attachment.java.io.IOException
- When there is a problem with creating DataSource for DataHandler.public org.apache.axis.attachments.AttachmentPart getAttachmentPart(java.lang.String contentID)
contentID
- Value of attachment's Content-Id MIME header.public java.io.InputStream getAttachmentAsInputStream(java.lang.String contentID) throws SOAPAttachmentException
contentID
- Value of the Content-Id MIME header.SOAPAttachmentException
- If there is a problem with extracting data from attachment.public byte[] getAttachmentAsByteArray(java.lang.String contentID) throws SOAPAttachmentException
getAttachmentAsInputStream()
when processing large attachments.
contentID
- Value of the Content-Id MIME header.SOAPAttachmentException
- If there is a problem with extracting data from attachment.public java.lang.String getAttachmentAsString(java.lang.String contentID) throws SOAPAttachmentException
getAttachmentAsInputStream()
when processing large attachments.
contentID
- Value of the Content-Id MIME header.SOAPAttachmentException
- If there is a problem with extracting data from attachment.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |