Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.skin
Class SkinFactory

    java.lang.Object
      org.richfaces.skin.SkinFactory

    public abstract class SkinFactory

extends java.lang.Object

Base factory class ( implement Singleton design pattern ). Produce self instance to build current skin configuration. At present, realised as lazy creation factory. TODO - select point to initialize.

Version:
  $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:43 $
Author:
  asmirnov@exadel.com (latest modification by $Author: alexsmirnov $)

Field Summary
`static java.lang.String` | `BASE_SKIN_PARAMETER`
`static java.lang.String` | `SKIN_PARAMETER` Name of web application init parameter for current skin .

Constructor Summary
`SkinFactory()`

Method Summary
`abstract Skin` | `getBaseSkin(javax.faces.context.FacesContext facesContext)` Get base `Skin` implementation
`abstract Skin` | `getDefaultSkin(javax.faces.context.FacesContext context)` Get default `Skin` implementation.
`static SkinFactory` | `getInstance()` Initialize skin factory.
`abstract Skin` | `getSkin(javax.faces.context.FacesContext context)` Get current `Skin` implementation.
`abstract Theme` | `getTheme(javax.faces.context.FacesContext facesContext, java.lang.String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BASE_SKIN_PARAMETER

    public static final java.lang.String BASE_SKIN_PARAMETER

See Also:
  Constant Field Values

### SKIN_PARAMETER

    public static final java.lang.String SKIN_PARAMETER

  Name of web application init parameter for current skin . Can be simple String for non-modified name, or EL-expression for calculate current skin. If EL evaluated to `String` - used as skin name, if to instance of `Skin` - used this instance. by default - "org.exadel.chameleon.SKIN"

  See Also:
    Constant Field Values

Constructor Detail

### SkinFactory

    public SkinFactory()

Method Detail

### getInstance

    public static final SkinFactory getInstance()

  Initialize skin factory. TODO - make call from init() method of any servlet or custom faces element method ??? If exist resource META-INF/services/org.richfaces.skin.SkinFactory , create instance of class by name from first line of this file. If such class have constructor with `SkinFactory` parameter, instantiate it with instance of default factory ( as usual in JSF ). If any error occurs in instantiate custom factory, return default.

### getDefaultSkin

    public abstract Skin getDefaultSkin(javax.faces.context.FacesContext context)

  Get default `Skin` implementation.

  Parameters:
    `context` -
  Returns:

### getSkin

    public abstract Skin getSkin(javax.faces.context.FacesContext context)

  Get current `Skin` implementation.

  Parameters:
    `context` -
  Returns:

### getBaseSkin

    public abstract Skin getBaseSkin(javax.faces.context.FacesContext facesContext)

  Get base `Skin` implementation

  Parameters:
    `facesContext` -
  Returns:

### getTheme

    public abstract Theme getTheme(javax.faces.context.FacesContext facesContext,
                                   java.lang.String name)

  Parameters:
    `facesContext` -
    `name` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.