KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > theme > PortalTheme


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.theme;
10
11 import javax.servlet.ServletContext JavaDoc;
12 import java.util.List JavaDoc;
13
14 /**
15  * A portal theme is a collection of tags that will be injected into a layout to govern the
16  * look and feel of a portal page.
17  * <p>Themes are links to css, javascript and image/resource files. A theme's css needs to cooperate with the
18  * markup in the portal layout, the markup produced by the portlets, and the markup produced by the renderer set.</p>
19  * <p>Any theme that the portal will pick up needs to be defined in a theme descriptor. The theme desciptor is an
20  * xml file in WEB-INF/ with the file name *-themes.xml</p>
21  *
22  * @author <a HREF="mailto:mholzner@novell.com>Martin Holzner</a>
23  * @version $LastChangedRevision$, $LastChangedDate$
24  * @see org.jboss.portal.server.theme.render.Renderer
25  * @see PortalLayout
26  */

27 public interface PortalTheme
28 {
29    /**
30     * Get the servlet context in which the theme is defined
31     *
32     * @return the servlet context that contains the theme resources
33     */

34    ServletContext JavaDoc getServletContext();
35
36    /**
37     * Get the context path of the servlet context in which the theme is contained.
38     *
39     * @return the context path of the WAR that contains this theme
40     */

41    String JavaDoc getContextPath();
42
43    /**
44     * Get the application name of the WAR that contains this theme
45     *
46     * @return the application name of the WAR that contains this theme
47     */

48    String JavaDoc getAppName();
49
50    /**
51     * Get the name of this theme.
52     *
53     * @return the name of this theme
54     */

55    String JavaDoc getName();
56
57    /**
58     * Get all script elements that are defined as part of this layout
59     *
60     * @return a <code>java.util.List</code> of script elements that are defined as part of this theme
61     */

62    List JavaDoc getScripts();
63
64    /**
65     * Get all link elements that are defined as part of this theme
66     *
67     * @return a <code>java.util.List</code> of link elements that are defined as part of this theme
68     */

69    List JavaDoc getLinks();
70
71    /**
72     * Add a link element to this theme
73     *
74     * @param themeLink the link element to add
75     * @see ThemeLink
76     */

77    void addLink(ThemeLink themeLink);
78
79    /**
80     * Add a script element to this theme
81     *
82     * @param themeScript the theme to add
83     * @see ThemeScript
84     */

85    void addScript(ThemeScript themeScript);
86 }
87
Popular Tags