1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package nl.hippo.portal.cms.source;
17
18 import java.io.InputStream;
19
20 import nl.hippo.client.api.event.EventValidity;
21 import nl.hippo.portal.cms.cache.EventCacheable;
22 import nl.hippo.portal.cms.cache.PortalCacheKey;
23
24 /***
25 * @author <a href="mailto:d.dam@hippo.nl">Dennis Dam</a>
26 *
27 * @version $Id: EventCacheableSource.java 8564 2007-10-18 15:30:09Z ddam $
28 */
29 public class EventCacheableSource implements EventCacheable, Source {
30
31 private PortalCacheKey key;
32 private EventValidity[] validities;
33 private InputStream stream;
34
35 public EventCacheableSource(InputStream stream, PortalCacheKey key, EventValidity[] validities) {
36 super();
37 this.stream=stream;
38 this.key = key;
39 this.validities = validities;
40 }
41
42 public EventCacheableSource(InputStream stream, PortalCacheKey key, EventValidity validity) {
43 this(stream,key,new EventValidity[]{validity});
44 }
45
46
47
48
49 public PortalCacheKey getCacheKey() {
50 return key;
51 }
52
53
54
55
56 public EventValidity[] getEventValidities() {
57 return validities;
58 }
59
60
61
62
63 public InputStream getInputStream() {
64 return stream;
65 }
66
67 }