01: package com.opensymphony.sitemesh;
02:
03: import java.io.IOException;
04: import java.io.Writer;
05:
06: /**
07: * @author Joe Walnes
08: * @since SiteMesh 3
09: */
10: public interface Content {
11:
12: /**
13: * Write out the original unprocessed content.
14: */
15: void writeOriginal(Writer writer) throws IOException;
16:
17: /**
18: * Length of the original unprocessed content.
19: */
20: int originalLength();
21:
22: /**
23: * Write the contents of the <code><body></code> tag.
24: */
25: void writeBody(Writer out) throws IOException;
26:
27: /**
28: * Write the contents of the <code><head></code> tag.
29: */
30: void writeHead(Writer out) throws IOException;
31:
32: /**
33: * Get the Title of the document
34: */
35: String getTitle();
36:
37: /**
38: * Get a property embedded into the <code>Page</code> as a <code>String</code>.
39: *
40: * @param name Name of property
41: * @return Property value
42: */
43: String getProperty(String name);
44:
45: /**
46: * Get all available property keys for the <code>Page</code>.
47: *
48: * @return Property keys
49: */
50: String[] getPropertyKeys();
51:
52: /**
53: * Manually add a property to page.
54: */
55: void addProperty(String name, String value);
56:
57: }
|