org.richfaces.skin

## Class AbstractSkinFactory

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

- Direct Known Subclasses:
    SkinFactoryImpl, SkinFactoryImpl

      public abstract class AbstractSkinFactory
      extends SkinFactory

  Author:
    Nick Belaevski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSkinFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Skin` | `buildSkin(javax.faces.context.FacesContext context, String name)` Factory method for build skin from properties files.
    `Skin` | `getSkin(javax.faces.context.FacesContext context, String name)`
    `protected Properties` | `loadProperties(String name, String[] paths)`
    `protected void` | `processProperties(javax.faces.context.FacesContext context, Map<Object,Object> properties)`

    - ### Methods inherited from class org.richfaces.skin.SkinFactory

      `getBaseSkin, getDefaultSkin, getInstance, getInstance, getSkin, getTheme`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractSkinFactory

          public AbstractSkinFactory()

  - ### Method Detail

    - #### processProperties

          protected void processProperties(javax.faces.context.FacesContext context,
                                           Map<Object,Object> properties)

    - #### buildSkin

          protected Skin buildSkin(javax.faces.context.FacesContext context,
                                   String name)
                            throws 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.
        `context` -
      Returns:
        skin instance for current name
      Throws:
        `SkinNotFoundException` - - if no skin properies found for name.

    - #### loadProperties

          protected Properties loadProperties(String name,
                                              String[] paths)
                                       throws SkinNotFoundException

      Parameters:
        `name` -
        `paths` -
      Returns:
        properties
      Throws:
        `SkinNotFoundException`

    - #### getSkin

          public Skin getSkin(javax.faces.context.FacesContext context,
                              String name)

      Specified by:
        `getSkin` in class `SkinFactory`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.