public class LocalTempAttachmentsProvider extends Object implements IAttachmentsProvider, HttpSessionBindingListener
Modifier and Type | Class and Description |
---|---|
static class |
LocalTempAttachmentsProvider.FileItemImpl |
static class |
LocalTempAttachmentsProvider.TempAttachmentItem |
Modifier and Type | Field and Description |
---|---|
protected File |
fTempFolder |
Constructor and Description |
---|
LocalTempAttachmentsProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(org.apache.commons.fileupload.FileItem fileItem,
String encoding)
Add Attachment
|
protected void |
finalize() |
boolean |
getHasAttachments()
Returns whether the attachment provider has any attachments
|
protected File |
getTempFolder() |
boolean |
isAddAttachmentsAvailable()
Returns whether attachments can be added
|
List<IAttachmentItem> |
listAttachments()
Returns a list of the current attachments
|
void |
removeAttachment(String attachmentID)
Remove Attachment
|
void |
updateAttachment(String attachmentID,
org.apache.commons.fileupload.FileItem fileItem,
String encoding)
Update an Attachment
|
void |
valueBound(HttpSessionBindingEvent arg0) |
void |
valueUnbound(HttpSessionBindingEvent arg0) |
protected File fTempFolder
protected File getTempFolder()
public void valueBound(HttpSessionBindingEvent arg0)
valueBound
in interface HttpSessionBindingListener
public void valueUnbound(HttpSessionBindingEvent arg0)
valueUnbound
in interface HttpSessionBindingListener
protected void finalize() throws Throwable
public boolean isAddAttachmentsAvailable()
IAttachmentsProvider
isAddAttachmentsAvailable
in interface IAttachmentsProvider
public boolean getHasAttachments()
IAttachmentsProvider
getHasAttachments
in interface IAttachmentsProvider
public void addAttachment(org.apache.commons.fileupload.FileItem fileItem, String encoding)
IAttachmentsProvider
addAttachment
in interface IAttachmentsProvider
fileItem
- the attachment contentencoding
- the encoding of the attachment file (if known)public List<IAttachmentItem> listAttachments()
IAttachmentsProvider
listAttachments
in interface IAttachmentsProvider
public void removeAttachment(String attachmentID)
IAttachmentsProvider
removeAttachment
in interface IAttachmentsProvider
attachmentID
- the id of the attachment to removepublic void updateAttachment(String attachmentID, org.apache.commons.fileupload.FileItem fileItem, String encoding)
IAttachmentsProvider
updateAttachment
in interface IAttachmentsProvider
attachmentID
- the id of the attachment to updatefileItem
- the new attachment contentencoding
- the encoding of the attachment file (if known)