com.webmethods.caf.faces.data.attachments
Class TempAttachmentsProvider

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.faces.data.attachments.BasePortalContainerAttachmentsProvider
          extended by com.webmethods.caf.faces.data.attachments.TempAttachmentsProvider
All Implemented Interfaces:
IPageFlowScopeAdapter, IAttachmentsProvider, IWebDavAwareAttachmentsProvider, Serializable

Deprecated. Use LocalTempAttachmentsProvider instead

@Deprecated
public class TempAttachmentsProvider
extends BasePortalContainerAttachmentsProvider

Default implementation of a temporary attachments provider. Holds onto the attachment info until the container they go into is ready.

See Also:
Serialized Form

Nested Class Summary
static class TempAttachmentsProvider.TempThingFileItem
          Deprecated. Simple implementation of FileItem to wrap the temporary files.
 
Field Summary
protected  boolean fAutoCleanup
          Deprecated. Specifies whether to autmatically clean up the temp files when this provider goes out of scope
 
Fields inherited from class com.webmethods.caf.faces.data.attachments.BasePortalContainerAttachmentsProvider
fAttachmentsList, fContainerID, fContainerThingID, useWebDav
 
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
 
Constructor Summary
TempAttachmentsProvider()
          Deprecated.  
 
Method Summary
protected  void _listAttachments(IThingID parentID)
          Deprecated. Builds the list of attachments
 void addAttachment(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 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
 
Methods inherited from class com.webmethods.caf.faces.data.attachments.BasePortalContainerAttachmentsProvider
acquireContext, getContainerThingID, getHasAttachments, isUseWebDav, refresh, releaseContext, removeAttachment, setContainerID, setUseWebDav, updateAttachment
 
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fAutoCleanup

protected boolean fAutoCleanup
Deprecated. 
Specifies whether to autmatically clean up the temp files when this provider goes out of scope

Constructor Detail

TempAttachmentsProvider

public TempAttachmentsProvider()
Deprecated. 
Method Detail

getContainerID

public String getContainerID()
Deprecated. 
Gets the attachments container id

Overrides:
getContainerID in class BasePortalContainerAttachmentsProvider

isAutoCleanup

public boolean isAutoCleanup()
Deprecated. 
Return true if the temp storage container should bean removed when this provider goes out of scope.

Returns:
the autoCleanup flag

setAutoCleanup

public void setAutoCleanup(boolean autoCleanup)
Deprecated. 
Sets whether the temp storage container should be removed when this provider goes out of scope.

Parameters:
autoCleanup - the autoCleanup to set

valueBound

public void valueBound(HttpSessionBindingEvent arg0)
Deprecated. 

valueUnbound

public void valueUnbound(HttpSessionBindingEvent arg0)
Deprecated. 
If autoCleanup is enabled, removes the temp container

See Also:
HttpSessionBindingListener

finalize

protected void finalize()
                 throws Throwable
Deprecated. 
If autoCleanup is enabled, removes the temp container

Overrides:
finalize in class Object
Throws:
Throwable
See Also:
Object.finalize()

isAddAttachmentsAvailable

public boolean isAddAttachmentsAvailable()
Deprecated. 
Overrides the default behavior to always return true

Specified by:
isAddAttachmentsAvailable in interface IAttachmentsProvider
Overrides:
isAddAttachmentsAvailable in class BasePortalContainerAttachmentsProvider
Returns:
true or false
See Also:
BasePortalContainerAttachmentsProvider.isAddAttachmentsAvailable()

addAttachment

public void addAttachment(FileItem fileItem,
                          String fileEncoding)
Deprecated. 
Description copied from interface: IAttachmentsProvider
Add Attachment

Specified by:
addAttachment in interface IAttachmentsProvider
Overrides:
addAttachment in class BasePortalContainerAttachmentsProvider
Parameters:
fileItem - the attachment content
fileEncoding - the encoding of the attachment file (if known)

createTempFolder

protected IThingID createTempFolder()
                             throws PortalException
Deprecated. 
Creates the temp folder where the attachments will be stored

Returns:
the thingID of the created temp folder
Throws:
PortalException

listAttachments

public List listAttachments()
Deprecated. 
Description copied from interface: IAttachmentsProvider
Returns a list of the current attachments

Specified by:
listAttachments in interface IAttachmentsProvider
Overrides:
listAttachments in class BasePortalContainerAttachmentsProvider
Returns:
collection of AttachmentItems

_listAttachments

protected void _listAttachments(IThingID parentID)
                         throws PortalException
Deprecated. 
Builds the list of attachments

Overrides:
_listAttachments in class BasePortalContainerAttachmentsProvider
Parameters:
parentID - the thingID of the parent container
Throws:
PortalException

setWebDavURL

protected String setWebDavURL(IThingID parentId)
Deprecated. 
Gets the base WebDav URL for the specified parent thing

Parameters:
parentId - the thingID of the parent
Returns:
WebDav URL of the specified item

removeTempContainer

public void removeTempContainer()
Deprecated. 
Removes the temporary attachments container


migrateAttachmentsToProvider

public void migrateAttachmentsToProvider(IAttachmentsProvider targetProvider)
Deprecated. 
Call this method to migrate the temporary attachments to the target attachments provider

Parameters:
targetProvider - the destination attachments provider