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

AttachmentTokenManager - JBOSS Portal 2.4 API 英文版文档


org.jboss.portlet.forums.helper
Class AttachmentTokenManager

java.lang.Object
  extended byorg.jboss.portlet.forums.helper.AttachmentTokenManager

public class AttachmentTokenManager
extends java.lang.Object

Manager that stores and manages AttachmentToken object instances inside of session.


Constructor Summary
AttachmentTokenManager()
           
 
Method Summary
 void addToken(AttachmentToken newToken)
          Method adds new AttachmentToken into store.
 AttachmentToken createNewToken()
          new Tokens chould be obtained with this method to generate proper Id safely
 AttachmentToken createNewToken(java.lang.Integer attachmentId, java.util.Date expireDate)
          new Tokens chould be obtained with this method to generate proper Id safely
 int getAutoPurgeSize()
           
 AttachmentToken getToken(int id)
          returns token
 boolean hasToken(int id)
          checks if token is in store
 void removeExpiredTokens()
          Validates all tokens.
 void setAutoPurgeSize(int autoPurgeSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentTokenManager

public AttachmentTokenManager()
Method Detail

addToken

public void addToken(AttachmentToken newToken)
Method adds new AttachmentToken into store. If there is one with same attachmentId already it'll be replaced by the new one

Parameters:
newToken -

hasToken

public boolean hasToken(int id)
checks if token is in store

Parameters:
id -
Returns:

getToken

public AttachmentToken getToken(int id)
returns token

Parameters:
id -
Returns:

createNewToken

public AttachmentToken createNewToken()
new Tokens chould be obtained with this method to generate proper Id safely

Returns:

createNewToken

public AttachmentToken createNewToken(java.lang.Integer attachmentId,
                                      java.util.Date expireDate)
new Tokens chould be obtained with this method to generate proper Id safely

Returns:

removeExpiredTokens

public void removeExpiredTokens()
Validates all tokens.


getAutoPurgeSize

public int getAutoPurgeSize()

setAutoPurgeSize

public void setAutoPurgeSize(int autoPurgeSize)