站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

Context.AttachmentsManager - JBOSS Portal 2.6 API 英文版文档


org.jboss.portlet.forums
Class Context.AttachmentsManager

java.lang.Object
  extended byorg.jboss.portlet.forums.Context.AttachmentsManager
All Implemented Interfaces:
java.util.EventListener, javax.servlet.http.HttpSessionBindingListener
Enclosing class:
Context

private class Context.AttachmentsManager
extends java.lang.Object
implements javax.servlet.http.HttpSessionBindingListener

Object that stores binding to uploaded and stored as Temp Files attachments. Object is stored in session and implements HttpSessionBindingListener so when session is invalidated it removes stored files from disk


Field Summary
private  java.util.List deletedAttachments
           
private  java.util.List files
           
private  java.util.Map updatedAttachments
           
 
Constructor Summary
(package private) Context.AttachmentsManager()
           
 
Method Summary
 void addBinding(TempFileBinding tmp)
          Simply adds new TempFileBinding
 java.util.List getDeletedAttachments()
          Stores indexes of persisted attachments which should be deleted
 java.util.List getFiles()
           
 java.util.Map getUpdatedAttachments()
          Stores indexes of persisted attachments and their new comments.
 void removeBinding(java.lang.String id)
          Removes Binding of id such as in argument
 void setDeletedAttachments(java.util.List deletedAttachments)
           
 void setFiles(java.util.List files)
           
 void setUpdatedAttachments(java.util.Map updatedAttachments)
           
 void updateBindingComment(java.lang.String id, java.lang.String comment)
          Updates comment for attachment
 void valueBound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
           
 void valueUnbound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
          If object removed from session we do clean up and removes every file stored to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

files

private java.util.List files

deletedAttachments

private java.util.List deletedAttachments

updatedAttachments

private java.util.Map updatedAttachments
Constructor Detail

Context.AttachmentsManager

Context.AttachmentsManager()
Method Detail

addBinding

public void addBinding(TempFileBinding tmp)
Simply adds new TempFileBinding

Parameters:
tmp -

removeBinding

public void removeBinding(java.lang.String id)
Removes Binding of id such as in argument

Parameters:
id -

updateBindingComment

public void updateBindingComment(java.lang.String id,
                                 java.lang.String comment)
Updates comment for attachment

Parameters:
id -
comment -

valueBound

public void valueBound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
Specified by:
valueBound in interface javax.servlet.http.HttpSessionBindingListener

valueUnbound

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent httpSessionBindingEvent)
If object removed from session we do clean up and removes every file stored to disk

Specified by:
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
httpSessionBindingEvent -

getFiles

public java.util.List getFiles()

setFiles

public void setFiles(java.util.List files)

getDeletedAttachments

public java.util.List getDeletedAttachments()
Stores indexes of persisted attachments which should be deleted

Returns:

setDeletedAttachments

public void setDeletedAttachments(java.util.List deletedAttachments)

getUpdatedAttachments

public java.util.Map getUpdatedAttachments()
Stores indexes of persisted attachments and their new comments.

Returns:

setUpdatedAttachments

public void setUpdatedAttachments(java.util.Map updatedAttachments)