Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.facelets.impl
Class DefaultFaceletFactory  view DefaultFaceletFactory download DefaultFaceletFactory.java

java.lang.Object
  extended bycom.sun.facelets.FaceletFactory
      extended bycom.sun.facelets.impl.DefaultFaceletFactory

public final class DefaultFaceletFactory
extends com.sun.facelets.FaceletFactory

Default FaceletFactory implementation.

Version:
$Id: DefaultFaceletFactory.java,v 1.8 2006/05/03 04:30:13 jhook Exp $

Field Summary
private  java.net.URL baseUrl
           
private  com.sun.facelets.compiler.Compiler compiler
           
private  java.util.Map facelets
           
protected static java.util.logging.Logger log
           
private  long refreshPeriod
           
private  java.util.Map relativeLocations
           
private  ResourceResolver resolver
           
 
Fields inherited from class com.sun.facelets.FaceletFactory
 
Constructor Summary
DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler, ResourceResolver resolver)
           
DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler, ResourceResolver resolver, long refreshPeriod)
           
 
Method Summary
private  DefaultFacelet createFacelet(java.net.URL url)
          Uses the internal Compiler reference to build a Facelet given the passed URL.
 com.sun.facelets.compiler.Compiler getCompiler()
          Compiler this factory uses
 com.sun.facelets.Facelet getFacelet(java.lang.String uri)
          Return a Facelet instance as specified by the file at the passed URI.
 com.sun.facelets.Facelet getFacelet(java.net.URL url)
          Create a Facelet from the passed URL.
 long getRefreshPeriod()
           
protected  boolean needsToBeRefreshed(DefaultFacelet facelet)
          Template method for determining if the Facelet needs to be refreshed.
 java.net.URL resolveURL(java.net.URL source, java.lang.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log

compiler

private final com.sun.facelets.compiler.Compiler compiler

facelets

private final java.util.Map facelets

relativeLocations

private final java.util.Map relativeLocations

resolver

private final ResourceResolver resolver

baseUrl

private final java.net.URL baseUrl

refreshPeriod

private final long refreshPeriod
Constructor Detail

DefaultFaceletFactory

public DefaultFaceletFactory(com.sun.facelets.compiler.Compiler compiler,
                             ResourceResolver resolver)
                      throws java.io.IOException

DefaultFaceletFactory

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

getFacelet

public com.sun.facelets.Facelet getFacelet(java.lang.String uri)
                                    throws java.io.IOException,
                                           com.sun.facelets.FaceletException,
                                           javax.faces.FacesException,
                                           ELException
Description copied from class: com.sun.facelets.FaceletFactory
Return a Facelet instance as specified by the file at the passed URI.


resolveURL

public java.net.URL resolveURL(java.net.URL source,
                               java.lang.String path)
                        throws java.io.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) 55 . Otherwise create a new URL via URL(URL, String) 55 .


getFacelet

public com.sun.facelets.Facelet getFacelet(java.net.URL url)
                                    throws java.io.IOException,
                                           com.sun.facelets.FaceletException,
                                           javax.faces.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;


needsToBeRefreshed

protected boolean needsToBeRefreshed(DefaultFacelet facelet)
Template method for determining if the Facelet needs to be refreshed.


createFacelet

private DefaultFacelet createFacelet(java.net.URL url)
                              throws java.io.IOException,
                                     com.sun.facelets.FaceletException,
                                     javax.faces.FacesException,
                                     ELException
Uses the internal Compiler reference to build a Facelet given the passed URL.


getCompiler

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


getRefreshPeriod

public long getRefreshPeriod()