|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.webui.theme.ThemeContext
public abstract class ThemeContext
ThemeContext
encapsulates the runtime environment for theme.
The runtime environment and dictates how information, required to locate
theme resources, and make those resources available to an application,
is obtained.
For example:
javax.servlet.Servlet
application environment
information about a theme and its resources is specified by the
application in its web.xml file
FacesContext
which encapsulates servlet and portlet contexts.
Field Summary | |
---|---|
static int |
NOVERSION
If no version can be identified from one of the version methods, this constant is returned. |
static java.lang.String |
SUPPORTED_LOCALES
Deprecated. |
static java.lang.String |
THEME_MESSAGES
Deprecated. |
Method Summary | |
---|---|
java.lang.ClassLoader |
getDefaultClassLoader()
Return the ClassLoader that this ThemeContext
should use when obtaining resources. |
java.util.Locale |
getDefaultLocale()
Return the default locale for thee themes in this ThemeContext . |
java.lang.String |
getDefaultTheme()
Return the the name of the default theme. |
int |
getDefaultThemeMajorVersion()
Deprecated. |
int |
getDefaultThemeMinorVersion()
Deprecated. |
java.lang.String |
getDefaultThemeVersion()
Return the version of the default theme. |
java.lang.String |
getMessages()
Deprecated. |
java.lang.String |
getRequestContextPath()
Return the application context path as a prefix that is prepended to theme resource path references. |
java.lang.String |
getResourcePath(java.lang.String path)
Return a path used as a prefix that is prepended to a a theme resource path reference. |
java.util.Set |
getSupportedLocales()
Deprecated. |
ThemeFactory |
getThemeFactory()
|
java.lang.String |
getThemeFactoryClassName()
Return the class name of a ThemeFactory implementation. |
java.lang.String[] |
getThemeResources()
Return bundle names of theme resources that augment a core theme. |
java.lang.String |
getThemeServletContext()
Return a path prefix of a theme resource. |
void |
setDefaultClassLoader(java.lang.ClassLoader defaultClassLoader)
Set the ClassLoader that this ThemeContext
should use when obtaining resources. |
void |
setDefaultLocale(java.util.Locale defaultLocale)
Set the default locale for the themes in this ThemeContext . |
void |
setDefaultLocale(java.lang.String defaultLocale)
Set the default locale for the themes in this ThemeContext . |
void |
setDefaultTheme(java.lang.String defaultTheme)
Set the default theme name for this ThemeContext . |
void |
setDefaultThemeVersion(java.lang.String defaultThemeVersion)
Set the version of the default theme. |
void |
setMessages(java.lang.String messages)
Deprecated. |
void |
setRequestContextPath(java.lang.String requestContextPath)
Set the application context path prefix that is prepended to theme resource path references. |
void |
setSupportedLocales(java.util.Set supportedLocales)
Deprecated. |
void |
setThemeFactoryClassName(java.lang.String themeFactoryClassName)
Set the class name of a ThemeFactory implementation. |
void |
setThemeResources(java.lang.String[] themeResources)
Set the bundle names of theme resources that augment a core theme. |
void |
setThemeServletContext(java.lang.String themeServletContext)
Set a path prefix of a theme resource. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String THEME_MESSAGES
public static final java.lang.String SUPPORTED_LOCALES
public static final int NOVERSION
Method Detail |
---|
public java.lang.String getMessages()
public void setMessages(java.lang.String messages)
public java.util.Set getSupportedLocales()
public void setSupportedLocales(java.util.Set supportedLocales)
public ThemeFactory getThemeFactory()
public java.lang.String[] getThemeResources()
public void setThemeResources(java.lang.String[] themeResources)
public java.lang.String getRequestContextPath()
public void setRequestContextPath(java.lang.String requestContextPath)
public java.lang.String getResourcePath(java.lang.String path)
getRequestContextPath() + getThemeServletContext()
.
public void setDefaultLocale(java.util.Locale defaultLocale)
ThemeContext
.
public void setDefaultLocale(java.lang.String defaultLocale)
ThemeContext
.
public java.util.Locale getDefaultLocale()
ThemeContext
.
public java.lang.ClassLoader getDefaultClassLoader()
ClassLoader
that this ThemeContext
should use when obtaining resources.
public void setDefaultClassLoader(java.lang.ClassLoader defaultClassLoader)
ClassLoader
that this ThemeContext
should use when obtaining resources.
public java.lang.String getThemeFactoryClassName()
ThemeFactory
implementation.
This class will be used to instantiate an instance of a
ThemeFactory
.
public void setThemeFactoryClassName(java.lang.String themeFactoryClassName)
ThemeFactory
implementation.
This class will be used to instantiate an instance of a
ThemeFactory
.
public java.lang.String getDefaultTheme()
public void setDefaultTheme(java.lang.String defaultTheme)
ThemeContext
.
If a requested resource cannot be found in a specified theme
then the default theme will be used to obtain that resource.
public java.lang.String getDefaultThemeVersion()
defaultThemeVersion
will be used to obtain theme resources.
public void setDefaultThemeVersion(java.lang.String defaultThemeVersion)
defaultThemeVersion
will be used to obtain
Theme
resources.
public java.lang.String getThemeServletContext()
public void setThemeServletContext(java.lang.String themeServletContext)
public int getDefaultThemeMajorVersion()
ThemeContext.NOVERSION
.
public int getDefaultThemeMinorVersion()
ThemeContext.NOVERSION
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |