java.lang.Object
com.sun.faces.facelets.impl.DefaultFaceletFactory
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
-
Method Summary
Modifier and TypeMethodDescription_createComponent
(FacesContext context, String taglibURI, String tagName, Map<String, Object> attributes) getFacelet
(FacesContext context, String viewId) getFacelet
(FacesContext context, URL url) Create a Facelet from the passed URL.getMetadataFacelet
(FacesContext context, String viewId) getMetadataFacelet
(FacesContext context, URL url) long
final void
init
(FacesContext facesContext, Compiler compiler, DefaultResourceResolver resolver, long refreshPeriod, FaceletCache cache) boolean
isContractsResource
(URL url) Returns true if given url is a contracts resource.boolean
needsToBeRefreshed
(URL url) resolveURL
(URL source, String path) Resolves a path based on the passed URL.
-
Field Details
-
log
-
-
Constructor Details
-
DefaultFaceletFactory
public DefaultFaceletFactory()
-
-
Method Details
-
init
public final void init(FacesContext facesContext, Compiler compiler, DefaultResourceResolver resolver, long refreshPeriod, FaceletCache cache) -
getResourceResolver
-
getMetadataFacelet
- Throws:
IOException
-
getFacelet
- 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
- when an I/O exception occurs
-
isContractsResource
Returns true if given url is a contracts resource.- Parameters:
url
- source url- Returns:
- true if given url is a contracts resource.
-
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:
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
- Throws:
IOException
-
needsToBeRefreshed
-
_createComponent
public UIComponent _createComponent(FacesContext context, String taglibURI, String tagName, Map<String, Object> attributes) -
getRefreshPeriod
public long getRefreshPeriod()
-