|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attachments
Field Summary | |
---|---|
static Attachments |
INSTANCE
Attachments interface instance. |
Method Summary | |
---|---|
AttachmentMetaData |
addAttachmentContent(java.lang.String contextID,
java.io.InputStream attachment)
Adds Attachment content to the context ID. |
AttachmentMetaData |
addExistingAttachmentContent(java.lang.String contextID,
java.lang.String attachmentID)
This adds existing attachment content to the specified context ID. |
void |
deleteAttachmentContent(java.lang.String contextID,
java.lang.String attachmentID)
Deletes the attachment content specified by the attachment context ID and attachment ID. |
java.util.Iterator |
getAllMetaData(java.lang.String contextID)
Returns an Iterator of attachment metadata objects associated with the specified attachment context ID. |
java.io.InputStream |
getAttachmentContent(java.lang.String contextID,
java.lang.String attachmentID)
Returns an InputStream of the attachment content. |
java.lang.String |
getAttachmentContextIDForSCAMessage(com.ibm.wsspi.sca.message.Message message,
boolean create)
Gets an attachment context ID for an SCA message, with an option to create the attachment context ID during the method call. |
java.lang.String |
getAttachmentContextIDForSMO(com.ibm.websphere.sibx.smobo.ServiceMessageObject smo,
boolean create)
Gets an attachment context ID for an SMO, with an option to create the attachment context ID during the method call. |
int |
getAttachmentCount(java.lang.String contextID)
Returns the number of attachments for the specified attachment context ID. |
int |
getContentSize(java.lang.String contextID,
java.lang.String attachmentID)
Returns the number of bytes in this Attachment object. |
ExpirationPolicy |
getExpirationPolicy(java.lang.String contextID)
Returns the ExpirationPolicy for the specified attachment context ID. |
AttachmentMetaData |
getMetaDataForAttachment(java.lang.String contextID,
java.lang.String attachmentID)
Returns an attachment metadata object for the attachment associated with the attachment context ID and attachment unique ID. |
void |
removeAttachmentContextForSCAMessage(com.ibm.wsspi.sca.message.Message message)
Explicitly removes the attachment context ID for an SCA message. |
void |
removeAttachmentContextForSMO(com.ibm.websphere.sibx.smobo.ServiceMessageObject message)
Explicitly removes the attachment context ID for an SMO. |
void |
setExpirationPolicy(java.lang.String contextID,
ExpirationPolicy policy)
Sets the ExpirationPolicy for the specified attachment context ID. |
void |
setShouldPropagateAtImport(java.lang.String contextID,
boolean val)
Sets the flag controlling whether attachments are propagated through Web Service imports. |
boolean |
shouldPropagateAtImport(java.lang.String contextID)
Returns true if attachments should be propagated through Web Service import. |
Field Detail |
---|
static final Attachments INSTANCE
Method Detail |
---|
java.lang.String getAttachmentContextIDForSMO(com.ibm.websphere.sibx.smobo.ServiceMessageObject smo, boolean create)
message
- The SMO to get a context ID for. May not be nullcreate
- Set to true if an ID should be created if it does not exist.
- Returns:
- An attachment context ID. If create is set to
false
and there is no
existing context ID, then null
will be returned.
- Throws:
java.lang.IllegalArgumentException
- Thrown if the provided SMO is null
.
void removeAttachmentContextForSMO(com.ibm.websphere.sibx.smobo.ServiceMessageObject message) throws AttachmentProcessingException, NoSuchAttachmentContextException
message
- The SMO whose attachment context ID is to be removed. May not be null
AttachmentProcessingException
- Thrown if an error occurs while removing the attachments. If a message references
an invalid attachment (because it was removed previously), this exception will
not be thrown.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied message is null
.java.lang.String getAttachmentContextIDForSCAMessage(com.ibm.wsspi.sca.message.Message message, boolean create)
message
- The SCA message to get a context ID for. May not be null
create
- Set to true if an ID should be created if it does not exist.
false
and there is no
existing context ID, then null
will be returned.
java.lang.IllegalArgumentException
- Thrown if the provided message is null
.void removeAttachmentContextForSCAMessage(com.ibm.wsspi.sca.message.Message message) throws AttachmentProcessingException, NoSuchAttachmentContextException
message
- The SCA message whose attachment context ID is to be removed. May not be
null
AttachmentProcessingException
- Thrown if an error occurs while removing the attachments. If a message references
an invalid attachment (because it was removed previously), this exception will
not be thrown.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied message is null
.ExpirationPolicy getExpirationPolicy(java.lang.String contextID) throws NoSuchAttachmentContextException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied context ID is null
.
AttachmentProcessingException
void setExpirationPolicy(java.lang.String contextID, ExpirationPolicy policy) throws NoSuchAttachmentContextException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
policy
- The expiration policy object to set for the ID. This object should not
be modified once set. May not be null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments is null
.
AttachmentProcessingException
boolean shouldPropagateAtImport(java.lang.String contextID) throws NoSuchAttachmentContextException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied context ID is null
.
AttachmentProcessingException
void setShouldPropagateAtImport(java.lang.String contextID, boolean val) throws NoSuchAttachmentContextException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
val
- The value of the flag to set.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied context ID is null
.
AttachmentProcessingException
int getAttachmentCount(java.lang.String contextID) throws NoSuchAttachmentContextException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied context ID is null
.
AttachmentProcessingException
java.io.InputStream getAttachmentContent(java.lang.String contextID, java.lang.String attachmentID) throws AttachmentProcessingException, NoSuchAttachmentContextException, NoSuchAttachmentException
contextID
- The attachment context ID. May not be null
attachmentID
- the attachment unique ID. May not be null
null
AttachmentProcessingException
- Thrown if an error occurs while opening the attachment stream.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
NoSuchAttachmentException
- Thrown if an invalid attachment ID is provided.
java.lang.IllegalArgumentException
- Thrown if either of the supplied IDs are null
.AttachmentMetaData addAttachmentContent(java.lang.String contextID, java.io.InputStream attachment) throws AttachmentProcessingException, NoSuchAttachmentContextException
contextID
- The attachment context ID. May not be null
attachment
- The attachment content stream. May not be null
null
AttachmentProcessingException
- Thrown if an error occurs while processing the attachment stream.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments are null
.AttachmentMetaData addExistingAttachmentContent(java.lang.String contextID, java.lang.String attachmentID) throws AttachmentProcessingException, NoSuchAttachmentContextException, NoSuchAttachmentException
contextID
- The attachment context ID. May not be null
attachmentID
- The unique attachment ID for the existing content. May not be
null
null
AttachmentProcessingException
- Thrown if an error occurs while processing the attachment.
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
NoSuchAttachmentException
- Thrown if an invalid attachment ID is provided.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments are null
.void deleteAttachmentContent(java.lang.String contextID, java.lang.String attachmentID) throws NoSuchAttachmentContextException, NoSuchAttachmentException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
attachmentID
- The attachment unique ID. May not be null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
NoSuchAttachmentException
- Thrown if an invalid attachment ID is provided.
AttachmentProcessingException
- Thrown if an error occurs while processing the attachment.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments are null
.int getContentSize(java.lang.String contextID, java.lang.String attachmentID) throws NoSuchAttachmentContextException, NoSuchAttachmentException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
attachmentID
- The attachment unique ID. May not be null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
NoSuchAttachmentException
- Thrown if an invalid attachment ID is provided.
AttachmentProcessingException
- Thrown if an error occurs while processing the attachment.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments are null
.java.util.Iterator getAllMetaData(java.lang.String contextID) throws NoSuchAttachmentContextException
AttachmentMetaData
.
contextID
- The attachment context ID. May not be null
null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
java.lang.IllegalArgumentException
- Thrown if the supplied context ID is null
.AttachmentMetaData getMetaDataForAttachment(java.lang.String contextID, java.lang.String attachmentID) throws NoSuchAttachmentContextException, NoSuchAttachmentException, AttachmentProcessingException
contextID
- The attachment context ID. May not be null
attachmentID
- The attachment unique ID. May not be null
null
NoSuchAttachmentContextException
- Thrown if an invalid context is referenced.
NoSuchAttachmentException
- Thrown if an invalid attachment ID is provided.
java.lang.IllegalArgumentException
- Thrown if either of the supplied arguments are null
.
AttachmentProcessingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |