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
-
-
Constructor Summary
Constructors Constructor Description DefaultFaceletFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UIComponent_createComponent(FacesContext context, String taglibURI, String tagName, Map<String,Object> attributes)FaceletgetFacelet(FacesContext context, String viewId)FaceletgetFacelet(FacesContext context, URL url)Create a Facelet from the passed URL.FaceletgetMetadataFacelet(FacesContext context, String viewId)FaceletgetMetadataFacelet(FacesContext context, URL url)longgetRefreshPeriod()DefaultResourceResolvergetResourceResolver()voidinit(FacesContext facesContext, Compiler compiler, DefaultResourceResolver resolver, long refreshPeriod, FaceletCache cache)booleanneedsToBeRefreshed(URL url)URLresolveURL(URL source, String path)Resolves a path based on the passed URL.
-
-
-
Field Detail
-
log
protected static final Logger log
-
-
Method Detail
-
init
public final void init(FacesContext facesContext, Compiler compiler, DefaultResourceResolver resolver, long refreshPeriod, FaceletCache cache)
-
getResourceResolver
public DefaultResourceResolver getResourceResolver()
-
getMetadataFacelet
public Facelet getMetadataFacelet(FacesContext context, String viewId) throws IOException
- Throws:
IOException
-
getFacelet
public Facelet getFacelet(FacesContext context, String viewId) throws IOException
- Throws:
IOException
-
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 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- when an I/O exception occurs
-
getFacelet
public Facelet getFacelet(FacesContext context, URL url) throws IOException
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:
context- the involved faces contexturl- source url- Returns:
- Facelet instance
- Throws:
IOException- when an I/O exception occursFaceletException- when a Facelet exception occursFacesException- when a Faces exception occursjakarta.el.ELException- when an EL exception occurs
-
getMetadataFacelet
public Facelet getMetadataFacelet(FacesContext context, URL url) throws IOException
- Throws:
IOException
-
needsToBeRefreshed
public boolean needsToBeRefreshed(URL url)
-
_createComponent
public UIComponent _createComponent(FacesContext context, String taglibURI, String tagName, Map<String,Object> attributes)
-
getRefreshPeriod
public long getRefreshPeriod()
-
-