org.richfaces.skin
Class SkinFactoryImpl
java.lang.Object
org.richfaces.skin.SkinFactory
org.richfaces.skin.SkinFactoryImpl
public class SkinFactoryImpl
- extends org.richfaces.skin.SkinFactory
Implementation of SkinFactory with building skins from properties
files.
- Author:
- shura
|
Field Summary |
static java.lang.String |
RENDER_KIT_PARAMETER
Name of web application init parameter for current default
RenderKit interaction. by default -
org.exadel.chameleon.RENDERKIT_DEFINITION . |
| Fields inherited from class org.richfaces.skin.SkinFactory |
BASE_SKIN_PARAMETER, SERVICE_RESOURCE, SKIN_PARAMETER |
|
Method Summary |
protected org.richfaces.skin.Skin |
buildSkin(java.lang.String name,
java.util.Properties defaultProperties)
Factory method for build skin from properties files. for given skin name,
search in classpath all resources with name 'name'.skin.properties and
append in content to default properties. |
org.richfaces.skin.Skin |
getBaseSkin(javax.faces.context.FacesContext context)
|
org.richfaces.skin.Skin |
getDefaultSkin(javax.faces.context.FacesContext context)
|
protected java.util.Properties |
getDefaultSkinProperties()
|
org.richfaces.skin.Skin |
getSkin(javax.faces.context.FacesContext context)
|
protected org.richfaces.skin.Skin |
getSkinByName(java.lang.Object currentSkinOrName)
|
protected java.lang.Object |
getSkinOrName(javax.faces.context.FacesContext context,
boolean useBase)
Calculate name for current skin. |
protected java.util.Map |
loadProperties(java.lang.String name,
java.util.Properties defaultProperties,
java.lang.String[] paths)
|
| Methods inherited from class org.richfaces.skin.SkinFactory |
getInstance, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RENDER_KIT_PARAMETER
public static final java.lang.String RENDER_KIT_PARAMETER
- Name of web application init parameter for current default
RenderKit interaction. by default -
org.exadel.chameleon.RENDERKIT_DEFINITION . TODO Possible Values
- See Also:
- Constant Field Values
SkinFactoryImpl
public SkinFactoryImpl()
getSkinByName
protected org.richfaces.skin.Skin getSkinByName(java.lang.Object currentSkinOrName)
getDefaultSkin
public org.richfaces.skin.Skin getDefaultSkin(javax.faces.context.FacesContext context)
- Specified by:
getDefaultSkin in class org.richfaces.skin.SkinFactory
getSkin
public org.richfaces.skin.Skin getSkin(javax.faces.context.FacesContext context)
- Specified by:
getSkin in class org.richfaces.skin.SkinFactory
getBaseSkin
public org.richfaces.skin.Skin getBaseSkin(javax.faces.context.FacesContext context)
- Specified by:
getBaseSkin in class org.richfaces.skin.SkinFactory
getDefaultSkinProperties
protected java.util.Properties getDefaultSkinProperties()
getSkinOrName
protected java.lang.Object getSkinOrName(javax.faces.context.FacesContext context,
boolean useBase)
- Calculate name for current skin. For EL init parameter store value
binding for speed calculations.
- Parameters:
context - useBase -
- Returns:
- name of currens skin from init parameter ( "DEFAULT" if no
parameter ) or
Skin as result of evaluation EL
expression.
buildSkin
protected org.richfaces.skin.Skin buildSkin(java.lang.String name,
java.util.Properties defaultProperties)
throws org.richfaces.skin.SkinNotFoundException
- Factory method for build skin from properties files. for given skin name,
search in classpath all resources with name 'name'.skin.properties and
append in content to default properties. First, get it from
META-INF/skins/ , next - from root package. for any place search order
determined by
ClassLoader realisation.
- Parameters:
name - name for builded skin.defaultProperties -
- Returns:
- skin instance for current name
- Throws:
SkinNotFoundException - -
if no skin properies found for name.
loadProperties
protected java.util.Map loadProperties(java.lang.String name,
java.util.Properties defaultProperties,
java.lang.String[] paths)
throws org.richfaces.skin.SkinNotFoundException,
javax.faces.FacesException,
javax.faces.el.ReferenceSyntaxException
- Parameters:
name - defaultProperties -
- Returns:
-
- Throws:
SkinNotFoundException
javax.faces.FacesException
javax.faces.el.ReferenceSyntaxException
Copyright © 2008. All Rights Reserved.