org.apache.myfaces.trinidad.skin
Class SkinFactory

java.lang.Object
  extended by org.apache.myfaces.trinidad.skin.SkinFactory

public abstract class SkinFactory
extends Object

Factory for creating Skin objects.


Constructor Summary
SkinFactory()
           
 
Method Summary
abstract  void addSkin(String skinId, Skin skin)
          Register the specified Skin instance, associated with the specified skinId, to be supported by this SkinFactory, replacing any previously registered Skin for this identifier.
static SkinFactory getFactory()
          Retrieve the current SkinFactory.
abstract  Skin getSkin(javax.faces.context.FacesContext context, String skinId)
          Return a Skin instance for the specified skinId.
abstract  Skin getSkin(javax.faces.context.FacesContext context, String family, String renderKitId)
          Return a Skin instance for the specified skinFamily and renderKitId.
abstract  Skin getSkin(javax.faces.context.FacesContext context, String family, String renderKitId, String version)
          Return a Skin instance for the specified skinFamily and renderKitId, and skin version.
abstract  Iterator<String> getSkinIds()
          Return an Iterator over the set of skin identifiers registered with this factory.
static void setFactory(SkinFactory factory)
          Store the current SkinFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkinFactory

public SkinFactory()
Method Detail

getFactory

public static SkinFactory getFactory()
Retrieve the current SkinFactory.


setFactory

public static void setFactory(SkinFactory factory)
Store the current SkinFactory.


addSkin

public abstract void addSkin(String skinId,
                             Skin skin)

Register the specified Skin instance, associated with the specified skinId, to be supported by this SkinFactory, replacing any previously registered Skin for this identifier.

Parameters:
skinId - Identifier of the Skin to register
skin - Skin instance that we are registering

getSkin

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

Return a Skin instance for the specified skinId. If there is no registered Skin for the specified identifier, return null. The set of available skin identifiers is available via the getSkinIds() method.

Parameters:
context - FacesContext for the request currently being processed, or null if none is available.
skinId - Skin identifier of the requested Skin instance

getSkin

public abstract Skin getSkin(javax.faces.context.FacesContext context,
                             String family,
                             String renderKitId)

Return a Skin instance for the specified skinFamily and renderKitId. If there is no registered Skin for the specified identifier, return null. The set of available skin identifiers is available via the getSkinIds() method.

Parameters:
context - FacesContext for the request currently being processed, or null if none is available.
family - family of the requested Skin instance
renderKitId - RenderKit identifier of the requested Skin instance

getSkin

public abstract Skin getSkin(javax.faces.context.FacesContext context,
                             String family,
                             String renderKitId,
                             String version)

Return a Skin instance for the specified skinFamily and renderKitId, and skin version. The best matched skin is returned. If there is no registered Skin for the specified identifier, return null. The set of available skin identifiers is available via the getSkinIds() method.

Parameters:
context - FacesContext for the request currently being processed, or null if none is available.
family - family of the requested Skin instance
renderKitId - RenderKit identifier of the requested Skin instance
version. - A string that denotes the skin version name. It can be "default" or the name of the version (see the Skin's SkinVersion#getName) or null which returns the skin with no version set.

getSkinIds

public abstract Iterator<String> getSkinIds()

Return an Iterator over the set of skin identifiers registered with this factory.



Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.