Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.theme.jsf.facelets.vendor
Class DefaultFaceletFactory

java.lang.Object
  extended by com.sun.facelets.FaceletFactory
      extended by org.nuxeo.theme.jsf.facelets.vendor.DefaultFaceletFactory
Direct Known Subclasses:
NXThemesFaceletFactory

public class DefaultFaceletFactory
extends com.sun.facelets.FaceletFactory

Default FaceletFactory implementation.

Copied from facelets-1.1.15.B1 by Jean-Marc Orliaguet - class made non-final, refreshPeriod made protected 2010/10/24.

Version:
$Id: DefaultFaceletFactory.java,v 1.10 2007/04/09 01:13:17 youngm Exp $
Author:
Jacob Hookom

Constructor Summary
DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler, com.sun.facelets.impl.ResourceResolver resolver)
           
DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler, com.sun.facelets.impl.ResourceResolver resolver, long refreshPeriod)
           
 
Method Summary
 com.sun.facelets.compiler.Compiler getCompiler()
          Compiler this factory uses
 com.sun.facelets.Facelet getFacelet(String uri)
           
 com.sun.facelets.Facelet getFacelet(URL url)
          Create a Facelet from the passed URL.
 long getRefreshPeriod()
           
 URL resolveURL(URL source, String path)
          Resolves a path based on the passed URL.
 
Methods inherited from class com.sun.facelets.FaceletFactory
getInstance, setInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFaceletFactory

public DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler,
                             com.sun.facelets.impl.ResourceResolver resolver)
                      throws IOException
Throws:
IOException

DefaultFaceletFactory

public DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler,
                             com.sun.facelets.impl.ResourceResolver resolver,
                             long refreshPeriod)
Method Detail

getFacelet

public com.sun.facelets.Facelet getFacelet(String uri)
                                    throws IOException,
                                           com.sun.facelets.FaceletException,
                                           FacesException,
                                           ELException
Specified by:
getFacelet in class com.sun.facelets.FaceletFactory
Throws:
IOException
com.sun.facelets.FaceletException
FacesException
ELException

resolveURL

public URL resolveURL(URL source,
                      String path)
               throws IOException
Resolves a path based on the passed URL. If the path starts with '/', then resolve the path against javax.faces.context.ExternalContext#getResource(java.lang.String). Otherwise create a new URL via URL(URL, String).

Parameters:
source - base to resolve from
path - relative path to the source
Returns:
resolved URL
Throws:
IOException

getFacelet

public com.sun.facelets.Facelet getFacelet(URL url)
                                    throws IOException,
                                           com.sun.facelets.FaceletException,
                                           FacesException,
                                           ELException
Create a Facelet from the passed URL. This method checks if the cached Facelet needs to be refreshed before returning. If so, uses the passed URL to build a new instance;

Parameters:
url - source url
Returns:
Facelet instance
Throws:
IOException
com.sun.facelets.FaceletException
FacesException
ELException

getCompiler

public com.sun.facelets.compiler.Compiler getCompiler()
Compiler this factory uses

Returns:
final Compiler instance

getRefreshPeriod

public long getRefreshPeriod()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.