org.apache.jetspeed.cache.impl
Class EhPortletWindowCache

java.lang.Object
  extended by org.apache.jetspeed.cache.impl.EhCacheImpl
      extended by org.apache.jetspeed.cache.impl.EhPortletWindowCache
All Implemented Interfaces:
JetspeedCache, PortletWindowCache

public class EhPortletWindowCache
extends EhCacheImpl
implements PortletWindowCache

EhPortletWindowCache

Implementation of PortletWindowCache that is backed Ehcache.

Author:
Scott T. Weaver

Field Summary
 
Fields inherited from class org.apache.jetspeed.cache.impl.EhCacheImpl
ehcache, localListeners, remoteListeners
 
Constructor Summary
EhPortletWindowCache(net.sf.ehcache.Ehcache ehcache)
           
 
Method Summary
 java.util.Set getAllPortletWindows()
           
 org.apache.pluto.om.window.PortletWindow getPortletWindow(java.lang.String windowId)
          Gets a PortletWindow from the cache.
 org.apache.pluto.om.window.PortletWindow getPortletWindowByEntityId(java.lang.String portletEntityId)
          Gets a PortletWindow from the cache whose PortletEntity's (PortletWindow.getPortletEntity()) equals portletEntityId.
 void putPortletWindow(org.apache.pluto.om.window.PortletWindow window)
          Stores a PortletWindow in the cache using the PortletWindow#getId()#toString() as the key for the cache.
 void removePortletWindow(java.lang.String portletWindowId)
          Removes a PortletWindow from cache using the windowId as the cache key.
 void removePortletWindowByPortletEntityId(java.lang.String portletEntityId)
          Removes a PortletWindow from the cache whose PortletEntity's id matches portletEntityId.
 
Methods inherited from class org.apache.jetspeed.cache.impl.EhCacheImpl
addEventListener, clear, clone, createCacheKey, createElement, dispose, evictContentForSession, evictContentForUser, get, getTimeToIdleSeconds, getTimeToLiveSeconds, isKeyInCache, notifyListeners, put, remove, removeEventListener, removeQuiet
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhPortletWindowCache

public EhPortletWindowCache(net.sf.ehcache.Ehcache ehcache)
Method Detail

getPortletWindow

public org.apache.pluto.om.window.PortletWindow getPortletWindow(java.lang.String windowId)
Description copied from interface: PortletWindowCache
Gets a PortletWindow from the cache.

Specified by:
getPortletWindow in interface PortletWindowCache
Parameters:
windowId - Id of the window to get from the cache.
Returns:
PortletWindow whose id to PortletWindow.getId() or null if no window exists that matches windowId.

getPortletWindowByEntityId

public org.apache.pluto.om.window.PortletWindow getPortletWindowByEntityId(java.lang.String portletEntityId)
Description copied from interface: PortletWindowCache
Gets a PortletWindow from the cache whose PortletEntity's (PortletWindow.getPortletEntity()) equals portletEntityId.

Specified by:
getPortletWindowByEntityId in interface PortletWindowCache
Parameters:
portletEntityId - id of PortletEntity whose window want want to retrieve from cache.
Returns:
PortletWindow whose PortletEntity's id equals portletEntityId or null if no windows exists in the cache that match said criteria.

putPortletWindow

public void putPortletWindow(org.apache.pluto.om.window.PortletWindow window)
Description copied from interface: PortletWindowCache
Stores a PortletWindow in the cache using the PortletWindow#getId()#toString() as the key for the cache.

Specified by:
putPortletWindow in interface PortletWindowCache
Parameters:
window - PortletWindow to put into the cache.

removePortletWindow

public void removePortletWindow(java.lang.String portletWindowId)
Description copied from interface: PortletWindowCache
Removes a PortletWindow from cache using the windowId as the cache key.

Specified by:
removePortletWindow in interface PortletWindowCache
Parameters:
portletWindowId - Id of the PortletWindow we want to remove from the cache.

removePortletWindowByPortletEntityId

public void removePortletWindowByPortletEntityId(java.lang.String portletEntityId)
Description copied from interface: PortletWindowCache
Removes a PortletWindow from the cache whose PortletEntity's id matches portletEntityId.

Specified by:
removePortletWindowByPortletEntityId in interface PortletWindowCache
Parameters:
portletEntityId - id of the PortletEntity whose parent PortletWindow is to be removed from the cache.

getAllPortletWindows

public java.util.Set getAllPortletWindows()
Specified by:
getAllPortletWindows in interface PortletWindowCache
Returns:
List of all the PortletWindows in the cache. If no cache entries exist an empty list is returned. Never returns null.


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.