1 package org.apache.turbine.modules;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.ecs.ConcreteElement;
20
21 import org.apache.turbine.util.InputFilterUtils;
22 import org.apache.turbine.util.RunData;
23
24 /***
25 * This is the base class that defines what a Navigation module is.
26 *
27 * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
28 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
29 * @version $Id: Navigation.java 264148 2005-08-29 14:21:04Z henning $
30 */
31 public abstract class Navigation
32 extends Assembler
33 {
34 /***
35 * A subclass must override this method to build itself.
36 * Subclasses override this method to store the navigation in
37 * RunData or to write the navigation to the output stream
38 * referenced in RunData.
39 *
40 * @param data Turbine information.
41 * @exception Exception a generic exception.
42 */
43 protected abstract ConcreteElement doBuild(RunData data)
44 throws Exception;
45
46 /***
47 * Subclasses can override this method to add additional
48 * functionality. This method is protected to force clients to
49 * use NavigationLoader to build a Navigation.
50 *
51 * @param data Turbine information.
52 * @exception Exception a generic exception.
53 */
54 protected ConcreteElement build(RunData data)
55 throws Exception
56 {
57 return doBuild(data);
58 }
59
60 /***
61 * This function can/should be used in any screen that will output
62 * User entered text. This will help prevent users from entering
63 * html (<SCRIPT>) tags that will get executed by the browser.
64 *
65 * @param s The string to prepare.
66 * @return A string with the input already prepared.
67 * @deprecated Use InputFilterUtils.prepareText(String s)
68 */
69 public static String prepareText(String s)
70 {
71 return InputFilterUtils.prepareText(s);
72 }
73 }