org.apache.tapestry5.internal.services

## Interface PageSource

- All Known Implementing Classes:
    PageSourceImpl

      public interface PageSource

  Access to localized page instances (which are now shared singletons, starting in release 5.2). This service is a wrapper around the `PageLoader` that caches the loaded pages.
  Since:
    5.2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` Clears the source's cache of loaded pages.
    `Set<Page>` | `getAllPages()` Returns all currently loaded pages.
    `Page` | `getPage(String canonicalPageName)` Returns a loaded instance of the indicated page, using the Locale and other information from the `ComponentResourceSelector` obtained from the `ComponentRequestSelectorAnalyzer`.

- - ### Method Detail

    - #### clearCache

          void clearCache()

      Clears the source's cache of loaded pages. This occurs when an outside change to the world invalidates created page instances. Introduced to handle the case where a page has a `DynamicTemplate`, but the underlying `Resource` is noticed to have changed.
      Since:
        5.3

    - #### getPage

          Page getPage(String canonicalPageName)

      Returns a loaded instance of the indicated page, using the Locale and other information from the `ComponentResourceSelector` obtained from the `ComponentRequestSelectorAnalyzer`.
      Parameters:
        `canonicalPageName` -
      Returns:
        existing, or newly created, page instance

    - #### getAllPages

          Set<Page> getAllPages()

      Returns all currently loaded pages. This will include any previously loaded pages not yet reclaimed by the garbage collector, and may include the same page loaded for different `ComponentResourceSelector`s. This is needed for reporting purposes only.
      Since:
        5.3
      See Also:
        `PageCatalog`

5.6.1 - Copyright © 2003-2020 The Apache Software Foundation.