Class LocalTempAttachmentsProvider
java.lang.Object
com.webmethods.caf.faces.data.attachments.LocalTempAttachmentsProvider
- All Implemented Interfaces:
IAttachmentsProvider
,EventListener
,HttpSessionBindingListener
- Direct Known Subclasses:
JcrTempAttachmentsProvider
public class LocalTempAttachmentsProvider
extends Object
implements IAttachmentsProvider, HttpSessionBindingListener
Attachment Provider that stores the temp files in a temp
folder on the MWS server. The attachments provided are not
URL addressable so you can not click the link to get them from
the list.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(org.apache.commons.fileupload.FileItem fileItem, String encoding) Add Attachmentprotected void
finalize()
boolean
Returns whether the attachment provider has any attachmentsprotected File
boolean
Returns whether attachments can be addedReturns a list of the current attachmentsvoid
removeAttachment
(String attachmentID) Remove Attachmentvoid
updateAttachment
(String attachmentID, org.apache.commons.fileupload.FileItem fileItem, String encoding) Update an Attachmentvoid
void
-
Field Details
-
fTempFolder
-
-
Constructor Details
-
LocalTempAttachmentsProvider
public LocalTempAttachmentsProvider()
-
-
Method Details
-
getTempFolder
-
valueBound
- Specified by:
valueBound
in interfaceHttpSessionBindingListener
-
valueUnbound
- Specified by:
valueUnbound
in interfaceHttpSessionBindingListener
-
finalize
-
isAddAttachmentsAvailable
public boolean isAddAttachmentsAvailable()Description copied from interface:IAttachmentsProvider
Returns whether attachments can be added- Specified by:
isAddAttachmentsAvailable
in interfaceIAttachmentsProvider
- Returns:
- true or false
-
getHasAttachments
public boolean getHasAttachments()Description copied from interface:IAttachmentsProvider
Returns whether the attachment provider has any attachments- Specified by:
getHasAttachments
in interfaceIAttachmentsProvider
- Returns:
- true or false
-
addAttachment
Description copied from interface:IAttachmentsProvider
Add Attachment- Specified by:
addAttachment
in interfaceIAttachmentsProvider
- Parameters:
fileItem
- the attachment contentencoding
- the encoding of the attachment file (if known)
-
listAttachments
Description copied from interface:IAttachmentsProvider
Returns a list of the current attachments- Specified by:
listAttachments
in interfaceIAttachmentsProvider
- Returns:
- collection of AttachmentItems
-
removeAttachment
Description copied from interface:IAttachmentsProvider
Remove Attachment- Specified by:
removeAttachment
in interfaceIAttachmentsProvider
- Parameters:
attachmentID
- the id of the attachment to remove
-
updateAttachment
public void updateAttachment(String attachmentID, org.apache.commons.fileupload.FileItem fileItem, String encoding) Description copied from interface:IAttachmentsProvider
Update an Attachment- Specified by:
updateAttachment
in interfaceIAttachmentsProvider
- Parameters:
attachmentID
- the id of the attachment to updatefileItem
- the new attachment contentencoding
- the encoding of the attachment file (if known)
-