org.jboss.portal.server.theme
Interface PortalTheme

All Known Implementing Classes:
PortalThemeImpl

public interface PortalTheme

A portal theme is a collection of tags that will be injected into a layout to govern the look and feel of a portal page.

Themes are links to css, javascript and image/resource files. A theme's css needs to cooperate with the markup in the portal layout, the markup produced by the portlets, and the markup produced by the renderer set.

Any theme that the portal will pick up needs to be defined in a theme descriptor. The theme desciptor is an xml file in WEB-INF/ with the file name *-themes.xml

See Also:
Renderer, PortalLayout

Method Summary
 void addLink(ThemeLink themeLink)
          Add a link element to this theme
 void addScript(ThemeScript themeScript)
          Add a script element to this theme
 java.lang.String getAppName()
          Get the application name of the WAR that contains this theme
 java.lang.String getContextPath()
          Get the context path of the servlet context in which the theme is contained.
 java.util.List getLinks()
          Get all link elements that are defined as part of this theme
 java.lang.String getName()
          Get the name of this theme.
 java.util.List getScripts()
          Get all script elements that are defined as part of this layout
 javax.servlet.ServletContext getServletContext()
          Get the servlet context in which the theme is defined
 

Method Detail

getServletContext

javax.servlet.ServletContext getServletContext()
Get the servlet context in which the theme is defined

Returns:
the servlet context that contains the theme resources

getContextPath

java.lang.String getContextPath()
Get the context path of the servlet context in which the theme is contained.

Returns:
the context path of the WAR that contains this theme

getAppName

java.lang.String getAppName()
Get the application name of the WAR that contains this theme

Returns:
the application name of the WAR that contains this theme

getName

java.lang.String getName()
Get the name of this theme.

Returns:
the name of this theme

getScripts

java.util.List getScripts()
Get all script elements that are defined as part of this layout

Returns:
a java.util.List of script elements that are defined as part of this theme

getLinks

java.util.List getLinks()
Get all link elements that are defined as part of this theme

Returns:
a java.util.List of link elements that are defined as part of this theme

addLink

void addLink(ThemeLink themeLink)
Add a link element to this theme

Parameters:
themeLink - the link element to add
See Also:
ThemeLink

addScript

void addScript(ThemeScript themeScript)
Add a script element to this theme

Parameters:
themeScript - the theme to add
See Also:
ThemeScript