Class FaceletFactory

java.lang.Object
org.apache.myfaces.view.facelets.FaceletFactory
Direct Known Subclasses:
DefaultFaceletFactory

public abstract class FaceletFactory extends Object
FaceletFactory for producing Facelets relative to the context of the underlying implementation.
Version:
$Id$
Author:
Jacob Hookom
  • Field Details

  • Constructor Details

    • FaceletFactory

      public FaceletFactory()
  • Method Details

    • getFacelet

      public abstract Facelet getFacelet(FacesContext context, String uri) throws IOException
      Return a Facelet instance as specified by the file at the passed URI.
      Parameters:
      context -
      uri -
      Returns:
      Throws:
      IOException
      FaceletException
      FacesException
      jakarta.el.ELException
    • getFacelet

      public abstract Facelet getFacelet(URL url) throws IOException, FaceletException, FacesException, jakarta.el.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
      FaceletException
      FacesException
      jakarta.el.ELException
    • getFacelet

      public abstract Facelet getFacelet(FaceletContext ctx, URL url) throws IOException, FaceletException, FacesException, jakarta.el.ELException
      Create a Facelet from the passed URL, but take into account the context. This method is useful in cases where the facelet instance must replace the one in the cache based on the context, instead take the one from the cache, like for example when the EL expression cache is used.
      Parameters:
      ctx -
      url - source url
      Returns:
      Facelet instance
      Throws:
      IOException
      FaceletException
      FacesException
      jakarta.el.ELException
    • getViewMetadataFacelet

      public abstract Facelet getViewMetadataFacelet(FacesContext context, String uri) throws IOException
      Return a Facelet instance as specified by the file at the passed URI. The returned facelet is used to create view metadata in this form:

      UIViewRoot(in facet jakarta_faces_metadata(one or many UIViewParameter instances))

      This method should be called from FaceletViewMetadata.createMetadataView(FacesContext context)

      Parameters:
      context -
      uri -
      Returns:
      Throws:
      IOException
      Since:
      2.0
    • getViewMetadataFacelet

      public abstract Facelet getViewMetadataFacelet(URL url) throws IOException, FaceletException, FacesException, jakarta.el.ELException
      Create a Facelet used to create view metadata 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
      Since:
      2.0
    • getCompositeComponentMetadataFacelet

      public abstract Facelet getCompositeComponentMetadataFacelet(FacesContext context, String uri) throws IOException
      Return a Facelet instance as specified by the file at the passed URI. The returned facelet is used to create composite component metadata.

      This method should be called from vdl.getComponentMetadata(FacesContext context)

      Parameters:
      context -
      uri -
      Returns:
      Throws:
      IOException
      Since:
      2.0.1
    • getCompositeComponentMetadataFacelet

      public abstract Facelet getCompositeComponentMetadataFacelet(URL url) throws IOException, FaceletException, FacesException, jakarta.el.ELException
      Create a Facelet used to create composite component metadata 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
      Since:
      2.0.1
    • compileComponentFacelet

      public abstract Facelet compileComponentFacelet(String taglibURI, String tagName, Map<String,Object> attributes)
      Compile a component tag on the fly.
      Parameters:
      taglibURI -
      tagName -
      attributes -
      Returns:
    • setInstance

      public static final void setInstance(FaceletFactory factory)
      Set the static instance
      Parameters:
      factory -
    • getInstance

      public static final FaceletFactory getInstance()
      Get the static instance
      Returns: