1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.jetspeed.aggregator;
24
25 import java.io.PrintWriter;
26
27 import org.apache.jetspeed.cache.ContentCacheKey;
28
29 /***
30 * <p>
31 * PortletContent
32 * </p>
33 * <p>
34 *
35 * </p>
36 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
37 * @author <a href="mailto:taylor@apache.org">David S. Taylor</a>
38 * @version $Id: PortletContent.java 554756 2007-07-09 20:33:26Z ate $
39 *
40 */
41 public interface PortletContent
42 {
43 /***
44 * Retrieve the actual content of a portlet as a string
45 *
46 * @return
47 */
48 String getContent();
49
50 /***
51 * Has the renderer completed rendering the content?
52 *
53 * @return
54 */
55 boolean isComplete();
56
57 /***
58 * Notify that this content is completed.
59 *
60 */
61 void complete();
62
63 /***
64 * Notify that this content is complete with error
65 *
66 */
67 void completeWithError();
68
69 /***
70 * Get a writer to the content to stream content into this object
71 * @return
72 */
73 PrintWriter getWriter();
74
75 /***
76 * Get the expiration setting for this content if it is cached.
77 * @return
78 */
79 int getExpiration();
80 void setExpiration(int expiration);
81
82 /***
83 * Get the cache key used to cache this content
84 * @since 2.1.2
85 * @return
86 */
87 ContentCacheKey getCacheKey();
88
89 /***
90 * Get the title of the portlet, used during caching
91 *
92 * @return
93 */
94 String getTitle();
95
96 /***
97 * Set the title of this portlet, used during caching
98 * @param title
99 */
100 void setTitle(String title);
101
102 }