LocalTempAttachmentsProvider
instead@Deprecated public class TempAttachmentsProvider extends BasePortalContainerAttachmentsProvider implements HttpSessionBindingListener
Modifier and Type | Class and Description |
---|---|
static class |
TempAttachmentsProvider.TempThingFileItem
Deprecated.
Simple implementation of FileItem to wrap the temporary
files.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
fAutoCleanup
Deprecated.
Specifies whether to autmatically clean up the temp files when this
provider goes out of scope
|
fAttachmentsList, fContainerID, fContainerThingID, useWebDav
fExpireWithPageFlow
Constructor and Description |
---|
TempAttachmentsProvider()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_listAttachments(IThingID parentID)
Deprecated.
Builds the list of attachments
|
void |
addAttachment(org.apache.commons.fileupload.FileItem fileItem,
String fileEncoding)
Deprecated.
Add Attachment
|
protected IThingID |
createTempFolder()
Deprecated.
Creates the temp folder where the attachments will be stored
|
protected void |
finalize()
Deprecated.
If autoCleanup is enabled, removes the temp container
|
String |
getContainerID()
Deprecated.
Gets the attachments container id
|
boolean |
isAddAttachmentsAvailable()
Deprecated.
Overrides the default behavior to always return true
|
boolean |
isAutoCleanup()
Deprecated.
Return true if the temp storage container should bean removed
when this provider goes out of scope.
|
List<IAttachmentItem> |
listAttachments()
Deprecated.
Returns a list of the current attachments
|
void |
migrateAttachmentsToProvider(IAttachmentsProvider targetProvider)
Deprecated.
Call this method to migrate the temporary attachments to the target attachments
provider
|
void |
removeTempContainer()
Deprecated.
Removes the temporary attachments container
|
void |
setAutoCleanup(boolean autoCleanup)
Deprecated.
Sets whether the temp storage container should be removed when
this provider goes out of scope.
|
protected String |
setWebDavURL(IThingID parentId)
Deprecated.
Gets the base WebDav URL for the specified parent thing
|
void |
valueBound(HttpSessionBindingEvent arg0)
Deprecated.
|
void |
valueUnbound(HttpSessionBindingEvent arg0)
Deprecated.
If autoCleanup is enabled, removes the temp container
|
acquireContext, getContainerThingID, getHasAttachments, isUseWebDav, refresh, releaseContext, removeAttachment, setContainerID, setUseWebDav, updateAttachment
getExpireWithPageFlow, setExpireWithPageFlow
protected boolean fAutoCleanup
public String getContainerID()
getContainerID
in class BasePortalContainerAttachmentsProvider
public boolean isAutoCleanup()
public void setAutoCleanup(boolean autoCleanup)
autoCleanup
- the autoCleanup to setpublic void valueBound(HttpSessionBindingEvent arg0)
valueBound
in interface HttpSessionBindingListener
public void valueUnbound(HttpSessionBindingEvent arg0)
valueUnbound
in interface HttpSessionBindingListener
HttpSessionBindingListener.valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
protected void finalize() throws Throwable
finalize
in class Object
Throwable
Object.finalize()
public boolean isAddAttachmentsAvailable()
isAddAttachmentsAvailable
in interface IAttachmentsProvider
isAddAttachmentsAvailable
in class BasePortalContainerAttachmentsProvider
BasePortalContainerAttachmentsProvider.isAddAttachmentsAvailable()
public void addAttachment(org.apache.commons.fileupload.FileItem fileItem, String fileEncoding)
IAttachmentsProvider
addAttachment
in interface IAttachmentsProvider
addAttachment
in class BasePortalContainerAttachmentsProvider
fileItem
- the attachment contentfileEncoding
- the encoding of the attachment file (if known)protected IThingID createTempFolder() throws PortalException
PortalException
public List<IAttachmentItem> listAttachments()
IAttachmentsProvider
listAttachments
in interface IAttachmentsProvider
listAttachments
in class BasePortalContainerAttachmentsProvider
protected void _listAttachments(IThingID parentID) throws PortalException
_listAttachments
in class BasePortalContainerAttachmentsProvider
parentID
- the thingID of the parent containerPortalException
protected String setWebDavURL(IThingID parentId)
parentId
- the thingID of the parentpublic void removeTempContainer()
public void migrateAttachmentsToProvider(IAttachmentsProvider targetProvider)
targetProvider
- the destination attachments provider