Groovy Documentation

org.grails.plugin.platform.themes
[Groovy] Class Themes

java.lang.Object
  org.grails.plugin.platform.themes.Themes
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

class Themes

Script to allow execution of an existing Closure as if it was a Script


Property Summary
static java.lang.Object ATTRIB_CURRENT_SITEMESH_LAYOUT

static java.lang.Object ATTRIB_CURRENT_THEME

static java.lang.Object ATTRIB_CURRENT_THEME_LAYOUT

static java.lang.Object ATTRIB_CURRENT_THEME_LAYOUT_FOUND

static java.lang.Object CORE_LAYOUTS

static java.lang.Object DEFAULT_LAYOUT

static java.lang.Object DEFAULT_THEME_NAME

java.util.List availableThemes

ThemeDefinition defaultTheme

java.lang.Object grailsApplication

java.lang.Object grailsPluginConfiguration

java.lang.Object grailsUiExtensions

java.lang.Object grailsViewFinder

java.lang.Object log

org.codehaus.groovy.grails.plugins.GrailsPlugin platformUiPlugin

java.lang.Object pluginConfig

java.lang.Object pluginManager

java.util.Map themesByName

 
Constructor Summary
Themes()

 
Method Summary
void afterPropertiesSet()

protected java.lang.Object appendToContentBuffer(java.lang.Object request, java.lang.Object bufferName, java.lang.Object body)

java.lang.Object appendToZone(java.lang.Object request, java.lang.String zone, java.lang.Object content)

ViewInfo getDefaultTemplateForZone(java.lang.Object request, java.lang.Object zone)

Returns the template path for dummy text for the specific zone, for the current theme Tries for files in the theme's _themes//test/_.gsp first If not found falls back to _default provided by the platform.

protected java.lang.Object getPage(java.lang.Object request)

boolean getRequestLayoutFound()

java.lang.String getRequestSitemeshLayout(java.lang.Object request)

java.lang.String getRequestStyle(java.lang.Object request)

ThemeDefinition getRequestTheme(java.lang.Object request = null, boolean returnDefault = true)

ViewInfo getRequestThemeTemplateView(java.lang.Object request, java.lang.Object template)

java.util.List getThemeNames()

void loadConfig()

void loadThemes()

void reload()

void resolveLayoutForStyle(java.lang.Object request, java.lang.String styleName)

Take a requested page layout name and resolve it to a theme sitemesh layout path, and store this in the request.

void setRequestLayoutFound(java.lang.Object request, boolean found)

void setRequestSitemeshLayout(java.lang.Object request, java.lang.Object layout)

void setRequestStyle(java.lang.Object request, java.lang.String layoutName)

void setRequestTheme(java.lang.Object request, java.lang.String theme)

void setSessionTheme(java.lang.Object request, java.lang.String theme)

protected java.lang.Object wrapContentInBuffer(java.lang.Object content)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

ATTRIB_CURRENT_SITEMESH_LAYOUT

static java.lang.Object ATTRIB_CURRENT_SITEMESH_LAYOUT


ATTRIB_CURRENT_THEME

static java.lang.Object ATTRIB_CURRENT_THEME


ATTRIB_CURRENT_THEME_LAYOUT

static java.lang.Object ATTRIB_CURRENT_THEME_LAYOUT


ATTRIB_CURRENT_THEME_LAYOUT_FOUND

static java.lang.Object ATTRIB_CURRENT_THEME_LAYOUT_FOUND


CORE_LAYOUTS

static java.lang.Object CORE_LAYOUTS


DEFAULT_LAYOUT

static java.lang.Object DEFAULT_LAYOUT


DEFAULT_THEME_NAME

static java.lang.Object DEFAULT_THEME_NAME


availableThemes

java.util.List availableThemes


defaultTheme

ThemeDefinition defaultTheme


grailsApplication

java.lang.Object grailsApplication


grailsPluginConfiguration

java.lang.Object grailsPluginConfiguration


grailsUiExtensions

java.lang.Object grailsUiExtensions


grailsViewFinder

java.lang.Object grailsViewFinder


log

final java.lang.Object log


platformUiPlugin

org.codehaus.groovy.grails.plugins.GrailsPlugin platformUiPlugin


pluginConfig

java.lang.Object pluginConfig


pluginManager

java.lang.Object pluginManager


themesByName

java.util.Map themesByName


 
Constructor Detail

Themes

Themes()


 
Method Detail

afterPropertiesSet

void afterPropertiesSet()


appendToContentBuffer

protected java.lang.Object appendToContentBuffer(java.lang.Object request, java.lang.Object bufferName, java.lang.Object body)


appendToZone

java.lang.Object appendToZone(java.lang.Object request, java.lang.String zone, java.lang.Object content)


getDefaultTemplateForZone

ViewInfo getDefaultTemplateForZone(java.lang.Object request, java.lang.Object zone)
Returns the template path for dummy text for the specific zone, for the current theme Tries for files in the theme's _themes//test/_.gsp first If not found falls back to _default provided by the platform. If there is no default for the specified zone in the platform, returns null


getPage

protected java.lang.Object getPage(java.lang.Object request)


getRequestLayoutFound

boolean getRequestLayoutFound()


getRequestSitemeshLayout

java.lang.String getRequestSitemeshLayout(java.lang.Object request)


getRequestStyle

java.lang.String getRequestStyle(java.lang.Object request)


getRequestTheme

ThemeDefinition getRequestTheme(java.lang.Object request = null, boolean returnDefault = true)


getRequestThemeTemplateView

ViewInfo getRequestThemeTemplateView(java.lang.Object request, java.lang.Object template)


getThemeNames

java.util.List getThemeNames()


loadConfig

void loadConfig()


loadThemes

void loadThemes()


reload

void reload()


resolveLayoutForStyle

void resolveLayoutForStyle(java.lang.Object request, java.lang.String styleName)
Take a requested page layout name and resolve it to a theme sitemesh layout path, and store this in the request. The logic is: 1. Check for config-based theme-specific remapping of layouts 2. Check for config-based glocal remapping of layouts 3. See if the layout we've resolved to exists in the theme 4. Fall back to Config default layout 5. Fall back to "main"
Parameters:
request - The current request
styleName - The name of the page layo1ut requested


setRequestLayoutFound

void setRequestLayoutFound(java.lang.Object request, boolean found)


setRequestSitemeshLayout

void setRequestSitemeshLayout(java.lang.Object request, java.lang.Object layout)


setRequestStyle

void setRequestStyle(java.lang.Object request, java.lang.String layoutName)


setRequestTheme

void setRequestTheme(java.lang.Object request, java.lang.String theme)


setSessionTheme

void setSessionTheme(java.lang.Object request, java.lang.String theme)


wrapContentInBuffer

protected java.lang.Object wrapContentInBuffer(java.lang.Object content)


 

Groovy Documentation