com.sun.rave.web.ui.theme
Class ThemeFactory

java.lang.Object
  extended by com.sun.rave.web.ui.theme.ThemeFactory

public class ThemeFactory
extends java.lang.Object

Factory class responsible for setting up the Sun Web Component application's ThemeManager.


Field Summary
static java.lang.String CLASSMAPPER
           
static java.lang.String COMPONENTS_SECTION
           
static java.lang.String DEFAULT
           
static java.lang.String DEFAULT_THEME
          The init parameter name used to set the default theme name.
static java.lang.String FILENAME
           
static java.lang.String IMAGES
           
static java.lang.String JSFILES
           
static java.lang.String MANIFEST
           
static java.lang.String MESSAGES
           
static java.lang.String MESSAGES_PARAM
          The init parameter name used to override the default message bundle location.
static java.lang.String NAME
           
static java.lang.String PREFIX
           
static java.lang.String STYLESHEETS
           
static java.lang.String THEME_SECTION
           
static java.lang.String THEME_VERSION
           
static java.lang.String THEME_VERSION_REQUIRED
           
 
Method Summary
 java.util.Iterator getThemeAttributes()
           
static ThemeManager initializeThemeManager(javax.faces.context.ExternalContext context)
          Initializes a ThemeManager based on an External Context.
static ThemeManager initializeThemeManager(javax.servlet.ServletContext context, java.util.Set locales)
          This method initializes the ThemeManager for the Sun Web Component's application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_THEME

public static final java.lang.String DEFAULT_THEME
The init parameter name used to set the default theme name.

See Also:
Constant Field Values

MESSAGES_PARAM

public static final java.lang.String MESSAGES_PARAM
The init parameter name used to override the default message bundle location.

See Also:
Constant Field Values

MANIFEST

public static final java.lang.String MANIFEST
See Also:
Constant Field Values

FILENAME

public static final java.lang.String FILENAME
See Also:
Constant Field Values

COMPONENTS_SECTION

public static final java.lang.String COMPONENTS_SECTION
See Also:
Constant Field Values

THEME_SECTION

public static final java.lang.String THEME_SECTION
See Also:
Constant Field Values

THEME_VERSION_REQUIRED

public static final java.lang.String THEME_VERSION_REQUIRED
See Also:
Constant Field Values

THEME_VERSION

public static final java.lang.String THEME_VERSION
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
See Also:
Constant Field Values

STYLESHEETS

public static final java.lang.String STYLESHEETS
See Also:
Constant Field Values

JSFILES

public static final java.lang.String JSFILES
See Also:
Constant Field Values

CLASSMAPPER

public static final java.lang.String CLASSMAPPER
See Also:
Constant Field Values

IMAGES

public static final java.lang.String IMAGES
See Also:
Constant Field Values

MESSAGES

public static final java.lang.String MESSAGES
See Also:
Constant Field Values
Method Detail

initializeThemeManager

public static ThemeManager initializeThemeManager(javax.servlet.ServletContext context,
                                                  java.util.Set locales)
This method initializes the ThemeManager for the Sun Web Component's application. It is invoked by the ThemeServlet's init method. To initialize the ThemeManager and the Themes during web application startup, declare the load-on-startup property of the ThemeServlet in the web application deployment descriptor.

Parameters:
context - the ServletContext in which the application
locales - a Set of locales supported by the application If this parameter is null, the supported locales will be retrieved from the JSF runtime. is running

initializeThemeManager

public static ThemeManager initializeThemeManager(javax.faces.context.ExternalContext context)
Initializes a ThemeManager based on an External Context. This method is invoked by ThemeUtilities.getTheme() if the ThemeManager has not been initialized during the context initialization phase.

Parameters:
context - The ExternalContext used to access Session and Context attributes
Returns:
The ThemeManager constructed

getThemeAttributes

public java.util.Iterator getThemeAttributes()