Class FaceletCache<V>

    • Constructor Detail

      • FaceletCache

        public FaceletCache​()
    • Method Detail

      • getFacelet

        public abstract V getFacelet​(java.net.URL url)
                              throws java.io.IOException

        Returns a cached Facelet instance. If no instance is available, it will be created using the Facelet FaceletCache.MemberFactory and stored in the cache.

        Parameters:
        url - URL for the Facelet being retrieved
        Throws:
        java.lang.NullPointerException - if argument url is null.
        java.io.IOException
      • isFaceletCached

        public abstract boolean isFaceletCached​(java.net.URL url)

        Determines whether a cached Facelet instance exists for this URL. Returns true if a cached instance exists, false otherwise

        Parameters:
        url - URL for the Facelet
        Throws:
        java.lang.NullPointerException - if argument url is null.
      • getViewMetadataFacelet

        public abstract V getViewMetadataFacelet​(java.net.URL url)
                                          throws java.io.IOException

        Returns a cached View Metadata Facelet instance. If no instance is available, it will be created using the View Metadata Facelet FaceletCache.MemberFactory and stored in the cache.

        Parameters:
        url - URL for the View Metadata Facelet being retrieved
        Throws:
        java.lang.NullPointerException - if argument url is null.
        java.io.IOException
      • isViewMetadataFaceletCached

        public abstract boolean isViewMetadataFaceletCached​(java.net.URL url)

        Determines whether a cached View Metadata Facelet instance exists for this URL. Returns true if a cached instance exists, false otherwise

        Parameters:
        url - URL for the View Metadata Facelet
        Throws:
        java.lang.NullPointerException - if argument url is null.
      • setMemberFactories

        protected void setMemberFactories​(FaceletCache.MemberFactory<V> faceletFactory,
                                          FaceletCache.MemberFactory<V> viewMetadataFaceletFactory)

        This must be called by the runtime at startup time, before any requests are serviced, and allows for the FaceletCache implementation to provide the FaceletCache.MemberFactory instances that will be used to create instances of Facelets and View Metadata Facelets.

        Parameters:
        faceletFactory - the FaceletCache.MemberFactory instance that will be used to create instances of Facelets.
        viewMetadataFaceletFactory - the FaceletCache.MemberFactory instance that will be used to create instances of metadata Facelets.
        Throws:
        java.lang.NullPointerException - if either argument is null