Interface PageRenderLinkTransformer
-
- All Known Subinterfaces:
LinkTransformer
- All Known Implementing Classes:
LinkTransformerImpl
@UsesOrderedConfiguration(PageRenderLinkTransformer.class) public interface PageRenderLinkTransformer
Allows the defaultLink
for a page render request to be replaced. This is a service, but also the contribution to the service, as a chain of command. A contributed implementation of this interface is expected to identify which requests it wants to transform. ThetransformPageRenderLink(Link, PageRenderRequestParameters)
method can return aLink
that is allowed to differ from Tapestry normal default. Later, when that request is triggered,decodePageRenderRequest(Request)
is required to reverse the operation, identifying the original parameters so that request handling can continue.- Since:
- 5.2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PageRenderRequestParameters
decodePageRenderRequest(Request request)
Attempts to decode the page render request, to perform the opposite action fortransformPageRenderLink(Link, PageRenderRequestParameters)
.Link
transformPageRenderLink(Link defaultLink, PageRenderRequestParameters parameters)
Transforms a page render link.
-
-
-
Method Detail
-
transformPageRenderLink
Link transformPageRenderLink(Link defaultLink, PageRenderRequestParameters parameters)
Transforms a page render link.- Parameters:
defaultLink
- default Link for this requestparameters
- that define the request- Returns:
- replacement Link, or null
-
decodePageRenderRequest
PageRenderRequestParameters decodePageRenderRequest(Request request)
Attempts to decode the page render request, to perform the opposite action fortransformPageRenderLink(Link, PageRenderRequestParameters)
. The transformer is also responsible for identifying the locale in the request (as part of the path, or as a query parameter or cookie) and setting the locale for the request. This method will be invoked from thePageRenderDispatcher
and a non-null value returned from this method will prevent the defaultComponentEventLinkEncoder.decodePageRenderRequest(Request)
method from being invoked.- Returns:
- decoded parameters, or null to proceed normally
- See Also:
LocalizationSetter.setLocaleFromLocaleName(String)
-
-