01: /*
02: * Title: AbstractHTMLPage
03: * Description:
04: *
05: * This software is published under the terms of the OpenSymphony Software
06: * License version 1.1, of which a copy has been included with this
07: * distribution in the LICENSE.txt file.
08: */
09:
10: package com.opensymphony.module.sitemesh.parser;
11:
12: import com.opensymphony.module.sitemesh.HTMLPage;
13:
14: import java.io.IOException;
15: import java.io.Writer;
16:
17: /**
18: * Abstract implementation of {@link com.opensymphony.module.sitemesh.HTMLPage}.
19: *
20: * <p>Adds to {@link com.opensymphony.module.sitemesh.parser.AbstractPage} some HTML methods.
21: * To implement, follow guidelines of super-class, and implement the 2
22: * abstract methods states below.</p>
23: *
24: * @author <a href="joe@truemesh.com">Joe Walnes</a>
25: * @version $Revision: 1.5 $
26: *
27: * @see com.opensymphony.module.sitemesh.parser.AbstractPage
28: * @see com.opensymphony.module.sitemesh.HTMLPage
29: */
30: public abstract class AbstractHTMLPage extends AbstractPage implements
31: HTMLPage {
32:
33: /**
34: * Write data of html <code><head></code> tag.
35: *
36: * <p>Must be implemented. Data written should not actually contain the
37: * head tags, but all the data in between.
38: */
39: public abstract void writeHead(Writer out) throws IOException;
40:
41: public boolean isFrameSet() {
42: return isPropertySet("frameset")
43: && getProperty("frameset").equalsIgnoreCase("true");
44: }
45:
46: public void setFrameSet(boolean frameset) {
47: addProperty("frameset", frameset ? "true" : "false");
48: }
49: }
|