1 16 package org.apache.cocoon.caching; 17 18 import java.util.Map ; 19 20 27 public final class CachedEventObject implements java.io.Serializable { 28 29 private Map validityObjects; 30 private Object saxFragment; 31 32 39 public CachedEventObject(Map validityObjects, 40 Object saxFragment) { 41 this.validityObjects = validityObjects; 42 this.saxFragment = saxFragment; 43 } 44 45 48 public boolean isValid(ComponentCacheKey componentKey, 49 CacheValidity componentValidity) { 50 CacheValidity ownValidity = (CacheValidity)this.validityObjects.get(componentKey); 51 if (ownValidity != null && ownValidity.isValid(componentValidity)) { 52 return true; 53 } 54 return false; 55 } 56 57 61 public CacheValidity getCacheValidity(ComponentCacheKey componentKey) { 62 return (CacheValidity)this.validityObjects.get(componentKey); 63 } 64 65 70 public Object getSAXFragment() { 71 return this.saxFragment; 72 } 73 } 74 | Popular Tags |