站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

PortalTheme - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.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 addElement(ThemeElement themeElement)
          Add an element of this theme.
 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 getAppID()
          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 getElements()
          Get all elements of this theme.
 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

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

Returns:
the servlet context that contains the theme resources

getContextPath

public 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

getAppID

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

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

getName

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

Returns:
the name of this theme

getScripts

public 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

public 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

getElements

public java.util.List getElements()
Get all elements of this theme.

Elements of a theme are all the child nodes in the HEAD tag that are part of this theme. A theme can currently have script and link tags

Returns:
a java.util.List of all elements of the theme

addLink

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

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

addScript

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

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

addElement

public void addElement(ThemeElement themeElement)
Add an element of this theme. The element can be a script of a link tag

Parameters:
themeElement - the element to add to the theme
See Also:
ThemeElement