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 23 import org.apache.jetspeed.services.portletcache.Cacheable; 24 25 import org.apache.turbine.services.cache.CachedObject; 27 28 29 37 public class CacheablePortletWrapper extends PortletWrapper implements Cacheable 38 { 39 40 43 private Cacheable wrappedCacheable = null; 44 45 46 public CacheablePortletWrapper( Portlet inner ) 47 { 48 super( inner ); 49 if( inner instanceof Cacheable ) 50 { 51 wrappedCacheable = (Cacheable) inner; 52 } 53 else 54 { 55 } 57 58 } 59 60 62 64 public boolean isCacheable() 65 { 66 return wrappedCacheable.isCacheable(); 67 } 68 69 71 public void setCacheable(boolean cacheable) 72 { 73 wrappedCacheable.setCacheable( cacheable ); 74 } 75 76 77 79 public Expire getExpire() 80 { 81 return wrappedCacheable.getExpire(); 82 } 83 84 86 public final String getHandle() 87 { 88 return wrappedCacheable.getHandle(); 89 } 90 91 93 public final void setHandle( String handle ) 94 { 95 wrappedCacheable.setHandle( handle ); 96 } 97 98 101 public Long getExpirationMillis() 102 { 103 return wrappedCacheable.getExpirationMillis(); 104 } 105 106 107 110 public void setExpirationMillis( long expirationMillis) 111 { 112 wrappedCacheable.setExpirationMillis( expirationMillis ); 113 } 114 115 122 public void setCachedObject(CachedObject cachedObject) 123 { 124 wrappedCacheable.setCachedObject( cachedObject ); 125 } 126 127 } 128 | Popular Tags |