org.apache.tapestry5.internal.pageload

## Class DefaultComponentResourceLocator

- java.lang.Object
- - org.apache.tapestry5.internal.pageload.DefaultComponentResourceLocator

- All Implemented Interfaces:
    ComponentResourceLocator

      public class DefaultComponentResourceLocator
      extends Object
      implements ComponentResourceLocator

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultComponentResourceLocator(ComponentTemplateLocator componentTemplateLocator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Resource>` | `locateMessageCatalog(Resource baseResource, ComponentResourceSelector selector)` Locates the properties files that make up the message catalog for a specific component.
    `Resource` | `locateTemplate(ComponentModel model, ComponentResourceSelector selector)` Locates the template for a component (including pages and base classes).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultComponentResourceLocator

          public DefaultComponentResourceLocator(ComponentTemplateLocator componentTemplateLocator)

  - ### Method Detail

    - #### locateTemplate

          public Resource locateTemplate(ComponentModel model,
                                         ComponentResourceSelector selector)

      Description copied from interface: `ComponentResourceLocator`
      Locates the template for a component (including pages and base classes). The implementation takes into account the locale and other axes specified by the selector. If the method returns null, then the component will have no template (which is common for components, but rare for pages).
      Specified by:
        `locateTemplate` in interface `ComponentResourceLocator`
      Parameters:
        `model` - defines the component, including its base resource.
        `selector` - used to identify locale, etc., for the template
      Returns:
        Resource for component template, or null if not found

    - #### locateMessageCatalog

          public List<Resource> locateMessageCatalog(Resource baseResource,
                                                     ComponentResourceSelector selector)

      Description copied from interface: `ComponentResourceLocator`
      Locates the properties files that make up the message catalog for a specific component. The properties files are returned in order of specificity: the properties provided by the first resource override properties in later resources. Only resources specific to the class associated with the model should be concerned (message inheritance from base classes is handled by Tapestry).
      Specified by:
        `locateMessageCatalog` in interface `ComponentResourceLocator`
      Parameters:
        `baseResource` - the resource for the base component properties file (i.e., with the ".properties" file extension)
        `selector` - defined the locale and other axes used to locate individual properties files
      Returns:
        list of properties file Resources
      See Also:
        `LocalizedNameGenerator`

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.