Interface ComponentTemplateSource

  • All Known Implementing Classes:
    ComponentTemplateSourceImpl

    public interface ComponentTemplateSource
    Provides access to cached ComponentTemplates. The source acts as a invalidation event hub, and will broadcast invalidation events when any loaded template resource changes. The listener for these invalidation events is the page source, which stores cached page instances. Any search for a template will end with success (a non-null template), but the template returned may be the missing template.
    • Method Detail

      • getTemplate

        ComponentTemplate getTemplate​(ComponentModel componentModel,
                                      ComponentResourceSelector selector)
        Provides access to a template. The template will be parsed as necessary. If no template for the exact component is found, then the template for the component's parent is returned. In this way, it is possible for a component to extend the behavior of its super-class without duplicating the super-class component's template. In some cases, the empty template will be returned.
        Parameters:
        componentModel - model for the component whose template is to be accessed
        selector - defines locale and other information needed to locate template
        Returns:
        the cached template instance