protected FaceletFactory createFaceletFactory ( FacesContext context , Compiler compiler ) { ExternalContext eContext = context . getExternalContext ( ) ; // refresh period long refreshPeriod ; if ( context . isProjectStage ( ProjectStage . Production ) ) { refreshPeriod = WebConfigParamUtils . getLongInitParameter ( eContext , PARAMS_REFRESH_PERIOD , DEFAULT_REFRESH_PERIOD_PRODUCTION ) ; } else { refreshPeriod = WebConfigParamUtils . getLongInitParameter ( eContext , PARAMS_REFRESH_PERIOD , DEFAULT_REFRESH_PERIOD ) ; } // resource resolver ResourceResolver resolver = new DefaultResourceResolver ( ) ; ArrayList < String > classNames = new ArrayList < String > ( ) ; String faceletsResourceResolverClassName = WebConfigParamUtils . getStringInitParameter ( eContext , PARAMS_RESOURCE_RESOLVER , null ) ; List < String > resourceResolversFromAnnotations = RuntimeConfig . getCurrentInstance ( context . getExternalContext ( ) ) . getResourceResolvers ( ) ; if ( faceletsResourceResolverClassName != null ) { classNames . add ( faceletsResourceResolverClassName ) ; } if ( ! resourceResolversFromAnnotations . isEmpty ( ) ) { classNames . addAll ( resourceResolversFromAnnotations ) ; } if ( ! classNames . isEmpty ( ) ) { resolver = ClassUtils . buildApplicationObject ( ResourceResolver . class , classNames , resolver ) ; } _resourceResolver = resolver ; return new DefaultFaceletFactory ( compiler , resolver , refreshPeriod ) ; }
Creates a FaceletFactory instance using the specified compiler .