1 /*
2 * Title: Decorator
3 * Description:
4 *
5 * This software is published under the terms of the OpenSymphony Software
6 * License version 1.1, of which a copy has been included with this
7 * distribution in the LICENSE.txt file.
8 */
9
10 package com.opensymphony.module.sitemesh;
11
12 import java.util.Iterator;
13
14 /**
15 * Representation of a Decorator.
16 *
17 * <p>A Decorator is infact a Servlet/JSP, and this is a wrapper to reference it.
18 * An implementation is returned by the {@link com.opensymphony.module.sitemesh.DecoratorMapper}.</p>
19 *
20 * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
21 * @version $Revision: 1.1 $
22 */
23 public interface Decorator {
24 /**
25 * URI of the Servlet/JSP to dispatch the request to (relative to the
26 * web-app context).
27 */
28 String getPage();
29
30 /** Name of the Decorator. For informational purposes only. */
31 String getName();
32
33 /** URI path of the Decorator. Enables support for decorators defined in seperate web-apps. */
34 String getURIPath();
35
36 /** Role the user has to be in to get this decorator applied. */
37 String getRole();
38
39 /**
40 * Returns a String containing the value of the named initialization parameter,
41 * or null if the parameter does not exist.
42 *
43 * @param paramName Key of parameter.
44 * @return Value of the parameter or null if not found.
45 */
46 String getInitParameter(String paramName);
47
48 /**
49 * Returns the names of the Decorator's initialization parameters as an Iterator
50 * of String objects, or an empty Iterator if the Decorator has no initialization parameters.
51 */
52 Iterator getInitParameterNames();
53 }