Interface ComponentTemplateSource

All Known Implementing Classes:

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 Summary
 InvalidationEventHub getInvalidationEventHub()
          Event hub used to notify listeners that underlying component template files have changed.
 ComponentTemplate getTemplate(ComponentModel componentModel, ComponentResourceSelector selector)
          Provides access to a template.

Method Detail


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.

componentModel - model for the component whose template is to be accessed
selector - defines locale and other information needed to locate template
the cached template instance


InvalidationEventHub getInvalidationEventHub()
Event hub used to notify listeners that underlying component template files have changed.

See Also:

Copyright © 2003-2012 The Apache Software Foundation.