org.apache.jetspeed.portal.security.portlets
Class CacheableStatefulPortletWrapper

java.lang.Object
  extended byorg.apache.jetspeed.portal.security.portlets.PortletWrapper
      extended byorg.apache.jetspeed.portal.security.portlets.StatefulPortletWrapper
          extended byorg.apache.jetspeed.portal.security.portlets.CacheableStatefulPortletWrapper
All Implemented Interfaces:
Cacheable, Portlet, PortletState, java.io.Serializable

public class CacheableStatefulPortletWrapper
extends StatefulPortletWrapper
implements Cacheable

This object is used to wrap a Portlet, ensuring that access control rules are enforced.

Version:
$Id: CacheableStatefulPortletWrapper.java,v 1.4 2004/02/23 03:27:46 jford Exp $
Author:
Santiago Gala
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jetspeed.portal.Portlet
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL
 
Constructor Summary
CacheableStatefulPortletWrapper(Portlet inner)
           
 
Method Summary
 java.lang.Long getExpirationMillis()
          Return the expiration time in milliseconds.
 Expire getExpire()
          Used by a Cacheable object to determine when it should expire itself from the cache.
 java.lang.String getHandle()
          Used by the cache to get a unique reference on what you want to add and then retrieve in the future from the cache
 boolean isCacheable()
          Return true if this Cacheable is allowed to be cached.
 void setCacheable(boolean cacheable)
          Set this cacheable status.
 void setCachedObject(org.apache.turbine.services.cache.CachedObject cachedObject)
          This allows the associated CachedObject to be known.
 void setExpirationMillis(long expirationMillis)
          Set the expiration time in milliseconds.
 void setHandle(java.lang.String handle)
          Set the handle for this Cacheable.
 
Methods inherited from class org.apache.jetspeed.portal.security.portlets.StatefulPortletWrapper
allowClose, allowCustomize, allowInfo, allowMaximize, allowMinimize, allowPrintFriendly, isClosed, isMinimized, setClosed, setMinimized
 
Methods inherited from class org.apache.jetspeed.portal.security.portlets.PortletWrapper
checkPermission, getAllowEdit, getAllowMaximize, getAllowView, getAttribute, getContent, getCreationTime, getDescription, getDescription, getID, getImage, getInstance, getName, getPortlet, getPortletConfig, getTitle, getTitle, init, isShowTitleBar, providesCustomization, setAttribute, setCreationTime, setDescription, setID, setImage, setName, setPortletConfig, setTitle, setTitle, supportsType, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheableStatefulPortletWrapper

public CacheableStatefulPortletWrapper(Portlet inner)
Method Detail

isCacheable

public boolean isCacheable()
Description copied from interface: Cacheable
Return true if this Cacheable is allowed to be cached.

Specified by:
isCacheable in interface Cacheable
Returns:
TRUE if object is cachable
FALSE if object is not cacheable

setCacheable

public void setCacheable(boolean cacheable)
Description copied from interface: Cacheable
Set this cacheable status.

Specified by:
setCacheable in interface Cacheable
Parameters:
cacheable - Set the cacheability of the object

getExpire

public Expire getExpire()
Description copied from interface: Cacheable
Used by a Cacheable object to determine when it should expire itself from the cache.

Specified by:
getExpire in interface Cacheable
Returns:
Expire handle

getHandle

public final java.lang.String getHandle()
Description copied from interface: Cacheable

Used by the cache to get a unique reference on what you want to add and then retrieve in the future from the cache

Most implementations should just call the CacheHandleManager with the given params within the implementation and just return this.

Specified by:
getHandle in interface Cacheable

setHandle

public final void setHandle(java.lang.String handle)
Description copied from interface: Cacheable

Set the handle for this Cacheable.

Note that factories should call setHandle() so that getHandle() always returns a value correctly.

Specified by:
setHandle in interface Cacheable

getExpirationMillis

public java.lang.Long getExpirationMillis()
Description copied from interface: Cacheable
Return the expiration time in milliseconds.

Specified by:
getExpirationMillis in interface Cacheable
Returns:
Expiration time in milliseconds since epoch, or null if the expiration was not set
See Also:
Cacheable.getExpirationMillis()

setExpirationMillis

public void setExpirationMillis(long expirationMillis)
Description copied from interface: Cacheable
Set the expiration time in milliseconds.

Specified by:
setExpirationMillis in interface Cacheable
Parameters:
expirationMillis - Set expiration in millis
See Also:
Cacheable.setExpirationMillis(long)

setCachedObject

public void setCachedObject(org.apache.turbine.services.cache.CachedObject cachedObject)
This allows the associated CachedObject to be known. One use of the cachedObject is to set the expiration time

Specified by:
setCachedObject in interface Cacheable
Parameters:
cachedObject - Handle to the CachedObject


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.