com.webmethods.caf.faces.data.attachments
Interface IAttachmentsProvider

All Known Subinterfaces:
IWebDavAwareAttachmentsProvider
All Known Implementing Classes:
BasePortalContainerAttachmentsProvider, CSPAttachmentsProvider, JcrAttachmentsProvider, JcrTempAttachmentsProvider, LocalTempAttachmentsProvider, PortalContainerAttachmentsProvider, SubFolderJcrAttachmentsProvider, TaskAttachmentsProvider, TaskJcrAttachmentsProvider, TempAttachmentsProvider

public interface IAttachmentsProvider

This interface describes the contract for a provider of attachments


Method Summary
 void addAttachment(FileItem fileItem, String fileEncoding)
          Add Attachment
 boolean getHasAttachments()
          Returns whether the attachment provider has any attachments
 boolean isAddAttachmentsAvailable()
          Returns whether attachments can be added
 List listAttachments()
          Returns a list of the current attachments
 void removeAttachment(String attachmentID)
          Remove Attachment
 void updateAttachment(String attachmentID, FileItem fileItem, String fileEncoding)
          Update an Attachment
 

Method Detail

isAddAttachmentsAvailable

boolean isAddAttachmentsAvailable()
Returns whether attachments can be added

Returns:
true or false

addAttachment

void addAttachment(FileItem fileItem,
                   String fileEncoding)
Add Attachment

Parameters:
fileItem - the attachment content
fileEncoding - the encoding of the attachment file (if known)

updateAttachment

void updateAttachment(String attachmentID,
                      FileItem fileItem,
                      String fileEncoding)
Update an Attachment

Parameters:
attachmentID - the id of the attachment to update
fileItem - the new attachment content
fileEncoding - the encoding of the attachment file (if known)

removeAttachment

void removeAttachment(String attachmentID)
Remove Attachment

Parameters:
attachmentID - the id of the attachment to remove

listAttachments

List listAttachments()
Returns a list of the current attachments

Returns:
collection of AttachmentItems

getHasAttachments

boolean getHasAttachments()
Returns whether the attachment provider has any attachments

Returns:
true or false