Package com.sun.faces.facelets.impl
Class DefaultFaceletFactory
java.lang.Object
com.sun.faces.facelets.impl.DefaultFaceletFactory
public class DefaultFaceletFactory extends Object
Default FaceletFactory implementation.
- Version:
- $Id: DefaultFaceletFactory.java,v 1.10 2007/04/09 01:13:17 youngm Exp $
- Author:
- Jacob Hookom
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DefaultFaceletFactory()
DefaultFaceletFactory(Compiler compiler, ResourceResolver resolver)
DefaultFaceletFactory(Compiler compiler, ResourceResolver resolver, long refreshPeriod)
DefaultFaceletFactory(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache)
-
Method Summary
Modifier and Type Method Description UIComponent
_createComponent(FacesContext context, String taglibURI, String tagName, Map<String,Object> attributes)
Facelet
getFacelet(FacesContext context, String uri)
Facelet
getFacelet(FacesContext context, URL url)
Create a Facelet from the passed URL.Facelet
getMetadataFacelet(FacesContext context, String uri)
Facelet
getMetadataFacelet(FacesContext context, URL url)
long
getRefreshPeriod()
ResourceResolver
getResourceResolver()
void
init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache)
boolean
needsToBeRefreshed(URL url)
URL
resolveURL(URL source, String path)
Resolves a path based on the passed URL.
-
Field Details
-
Constructor Details
-
DefaultFaceletFactory
public DefaultFaceletFactory() -
DefaultFaceletFactory
- Throws:
IOException
-
DefaultFaceletFactory
-
DefaultFaceletFactory
public DefaultFaceletFactory(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache)
-
-
Method Details
-
init
public final void init(Compiler compiler, ResourceResolver resolver, long refreshPeriod, FaceletCache cache) -
getResourceResolver
-
getFacelet
- Throws:
IOException
-
getMetadataFacelet
- Throws:
IOException
-
resolveURL
Resolves a path based on the passed URL. If the path starts with '/', then resolve the path againstjakarta.faces.context.ExternalContext#getResource(java.lang.String)
. Otherwise create a new URL viaURL(URL, String)
.- Parameters:
source
- base to resolve frompath
- relative path to the source- Returns:
- resolved URL
- Throws:
IOException
-
getFacelet
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
FaceletException
FacesException
jakarta.el.ELException
-
getMetadataFacelet
- Throws:
IOException
-
needsToBeRefreshed
-
_createComponent
public UIComponent _createComponent(FacesContext context, String taglibURI, String tagName, Map<String,Object> attributes) -
getRefreshPeriod
public long getRefreshPeriod()
-