Class PageSourceImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.PageSourceImpl
-
- All Implemented Interfaces:
PageSource
public class PageSourceImpl extends Object implements PageSource
-
-
Constructor Summary
Constructors Constructor Description PageSourceImpl(PageLoader pageLoader, ComponentRequestSelectorAnalyzer selectorAnalyzer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theComponentResourceSelector
obtained from theComponentRequestSelectorAnalyzer
.void
setupInvalidation(InvalidationEventHub classesHub, InvalidationEventHub templatesHub, InvalidationEventHub messagesHub, ResourceChangeTracker resourceChangeTracker)
-
-
-
Constructor Detail
-
PageSourceImpl
public PageSourceImpl(PageLoader pageLoader, ComponentRequestSelectorAnalyzer selectorAnalyzer)
-
-
Method Detail
-
getPage
public Page getPage(String canonicalPageName)
Description copied from interface:PageSource
Returns a loaded instance of the indicated page, using the Locale and other information from theComponentResourceSelector
obtained from theComponentRequestSelectorAnalyzer
.- Specified by:
getPage
in interfacePageSource
- Returns:
- existing, or newly created, page instance
-
setupInvalidation
@PostInjection public void setupInvalidation(@ComponentClasses InvalidationEventHub classesHub, @ComponentTemplates InvalidationEventHub templatesHub, @ComponentMessages InvalidationEventHub messagesHub, ResourceChangeTracker resourceChangeTracker)
-
clearCache
public void clearCache()
Description copied from interface:PageSource
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 aDynamicTemplate
, but the underlyingResource
is noticed to have changed.- Specified by:
clearCache
in interfacePageSource
-
getAllPages
public Set<Page> getAllPages()
Description copied from interface:PageSource
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 differentComponentResourceSelector
s. This is needed for reporting purposes only.- Specified by:
getAllPages
in interfacePageSource
- See Also:
PageCatalog
-
-