KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > apache > SubTemplateEngine


1 /*
2  * Copyright (c) 2001, 2002 The XDoclet team
3  * All rights reserved.
4  */

5 package xdoclet.modules.apache;
6
7 import java.util.Properties JavaDoc;
8
9 import xdoclet.XDocletException;
10
11 /**
12  * Common interface for the subtemplate engines
13  *
14  * @author zluspai
15  * @created July 16, 2003
16  */

17 public interface SubTemplateEngine
18 {
19
20     /**
21      * Set a variable of the engine namespace
22      *
23      * @param name The name of the variable
24      * @param value The value of the varialbe
25      */

26     public void setVariable(String JavaDoc name, Object JavaDoc value);
27
28     /**
29      * Get a value of a variable
30      *
31      * @param name
32      * @return
33      */

34     public Object JavaDoc getVariable(String JavaDoc name);
35
36     /**
37      * Clear all variables
38      */

39     public void clearVariables();
40
41     /**
42      * Generate template results
43      *
44      * @param template The template to parse
45      * @param attributes
46      * @return The results
47      * @exception XDocletException
48      * @throws xdoclet.XDocletException If any problems
49      */

50     public String JavaDoc generate(String JavaDoc template, Properties JavaDoc attributes) throws XDocletException;
51
52 }
53
54
Popular Tags