01: /*
02: * Template.java
03: *
04: * Brazil project web application Framework,
05: * export version: 1.1
06: * Copyright (c) 1999-2000 Sun Microsystems, Inc.
07: *
08: * Sun Public License Notice
09: *
10: * The contents of this file are subject to the Sun Public License Version
11: * 1.0 (the "License"). You may not use this file except in compliance with
12: * the License. A copy of the License is included as the file "license.terms",
13: * and also available at http://www.sun.com/
14: *
15: * The Original Code is from:
16: * Brazil project web application Framework release 1.1.
17: * The Initial Developer of the Original Code is: cstevens.
18: * Portions created by cstevens are Copyright (C) Sun Microsystems, Inc.
19: * All Rights Reserved.
20: *
21: * Contributor(s): cstevens, suhler.
22: *
23: * Version: 1.3
24: * Created by cstevens on 99/09/29
25: * Last modified by suhler on 00/05/31 13:49:45
26: */
27:
28: package sunlabs.brazil.template;
29:
30: /**
31: * Parent for all classes that are templates. This class is used
32: * primarily as a sanity check, to make sure only classes that intend to
33: * be used as templates actually are. Subclasses are expected to implement
34: * methods whose names corrospond to html/XML tags that are discovered
35: * and called via introspection.
36: * <p>
37: * In the future, various "dummy" subclasses may be used as alternate parents
38: * to indicate which session behavior is expected.
39: */
40:
41: public class Template {
42: /**
43: * Called before this template processes any tags.
44: */
45: public boolean init(RewriteContext hr) {
46: return true;
47: }
48:
49: /**
50: * Called after all tags have been processed, one final chance.
51: */
52: public boolean done(RewriteContext hr) {
53: return true;
54: }
55: }
|