1 16 17 package org.apache.jetspeed.portal.security.portlets; 18 19 import org.apache.jetspeed.portal.Portlet; 21 import org.apache.jetspeed.portal.expire.Expire; 22 import org.apache.jetspeed.services.portletcache.Cacheable; 23 24 import org.apache.turbine.services.cache.CachedObject; 25 26 27 35 public class CacheableStatefulPortletWrapper extends StatefulPortletWrapper implements Cacheable 36 { 37 38 41 private Cacheable wrappedCacheable = null; 42 43 44 public CacheableStatefulPortletWrapper( Portlet inner ) 45 { 46 super( inner ); 47 if( inner instanceof Cacheable ) 48 { 49 wrappedCacheable = (Cacheable) inner; 50 } 51 else 52 { 53 } 55 56 } 57 58 60 62 public boolean isCacheable() 63 { 64 return wrappedCacheable.isCacheable(); 65 } 66 67 69 public void setCacheable(boolean cacheable) 70 { 71 wrappedCacheable.setCacheable( cacheable ); 72 } 73 74 75 77 public Expire getExpire() 78 { 79 return wrappedCacheable.getExpire(); 80 } 81 82 84 public final String getHandle() 85 { 86 return wrappedCacheable.getHandle(); 87 } 88 89 91 public final void setHandle( String handle ) 92 { 93 wrappedCacheable.setHandle( handle ); 94 } 95 96 99 public Long getExpirationMillis() 100 { 101 return wrappedCacheable.getExpirationMillis(); 102 } 103 104 105 108 public void setExpirationMillis( long expirationMillis) 109 { 110 wrappedCacheable.setExpirationMillis( expirationMillis ); 111 } 112 113 120 public void setCachedObject(CachedObject cachedObject) 121 { 122 wrappedCacheable.setCachedObject( cachedObject ); 123 } 124 125 } 126 | Popular Tags |