Class UrlTemplateResolver

    • Constructor Detail

      • UrlTemplateResolver

        public UrlTemplateResolver()
    • Method Detail

      • computeTemplateResource

        protected ITemplateResource computeTemplateResource​(IEngineConfiguration configuration,
                                                            String ownerTemplate,
                                                            String template,
                                                            String resourceName,
                                                            String characterEncoding,
                                                            Map<String,​Object> templateResolutionAttributes)
        Description copied from class: AbstractConfigurableTemplateResolver

        Compute the real resource, once the resource name has been computed using prefix, suffix, and other configured artifacts.

        Specified by:
        computeTemplateResource in class AbstractConfigurableTemplateResolver
        Parameters:
        configuration - the engine configuration in use.
        ownerTemplate - the owner template, if the resource being computed is a fragment. Might be null.
        template - the template (normally the template name, except for String templates).
        resourceName - the resource name, complete with prefix, suffix, aliases, etc.
        characterEncoding - the character encoding to be used for reading the resource.
        templateResolutionAttributes - the template resolution attributes, if any. Might be null.
        Returns:
        the template resource
      • computeValidity

        protected ICacheEntryValidity computeValidity​(IEngineConfiguration configuration,
                                                      String ownerTemplate,
                                                      String template,
                                                      Map<String,​Object> templateResolutionAttributes)
        Description copied from class: AbstractTemplateResolver

        Computes the validity to be applied to the template resolution. This includes determining whether the template can be cached or not, and also in what circumstances (for instance, for how much time) can its cache entry be considered valid.

        Overrides:
        computeValidity in class AbstractConfigurableTemplateResolver
        Parameters:
        configuration - the engine configuration.
        ownerTemplate - the owner template, if the resource being computed is a fragment. Might be null.
        template - the template to be resolved (usually its name).
        templateResolutionAttributes - the template resolution attributes, if any. Might be null.
        Returns:
        the validity