Class LinkTransformerImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.linktransform.LinkTransformerImpl
-
- All Implemented Interfaces:
ComponentEventLinkTransformer
,LinkTransformer
,PageRenderLinkTransformer
public class LinkTransformerImpl extends Object implements LinkTransformer
-
-
Constructor Summary
Constructors Constructor Description LinkTransformerImpl(ComponentEventLinkTransformer componentEventLinkTransformer, PageRenderLinkTransformer pageRenderLinkTransformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentEventRequestParameters
decodeComponentEventRequest(Request request)
Attempts to decode the page render request, to perform the opposite action forComponentEventLinkTransformer.transformComponentEventLink(Link, ComponentEventRequestParameters)
.PageRenderRequestParameters
decodePageRenderRequest(Request request)
Attempts to decode the page render request, to perform the opposite action forPageRenderLinkTransformer.transformPageRenderLink(Link, PageRenderRequestParameters)
.Link
transformComponentEventLink(Link defaultLink, ComponentEventRequestParameters parameters)
Allows the default Link created for the component event request to be replaced.Link
transformPageRenderLink(Link defaultLink, PageRenderRequestParameters parameters)
Transforms a page render link.
-
-
-
Constructor Detail
-
LinkTransformerImpl
public LinkTransformerImpl(@Primary ComponentEventLinkTransformer componentEventLinkTransformer, @Primary PageRenderLinkTransformer pageRenderLinkTransformer)
-
-
Method Detail
-
transformComponentEventLink
public Link transformComponentEventLink(Link defaultLink, ComponentEventRequestParameters parameters)
Description copied from interface:ComponentEventLinkTransformer
Allows the default Link created for the component event request to be replaced.- Specified by:
transformComponentEventLink
in interfaceComponentEventLinkTransformer
- Parameters:
defaultLink
- the default Link generated for a component event requestparameters
- used to create the default Link- Returns:
- a replacement Link, or null
-
transformPageRenderLink
public Link transformPageRenderLink(Link defaultLink, PageRenderRequestParameters parameters)
Description copied from interface:PageRenderLinkTransformer
Transforms a page render link.- Specified by:
transformPageRenderLink
in interfacePageRenderLinkTransformer
- Parameters:
defaultLink
- default Link for this requestparameters
- that define the request- Returns:
- replacement Link, or null
-
decodeComponentEventRequest
public ComponentEventRequestParameters decodeComponentEventRequest(Request request)
Description copied from interface:ComponentEventLinkTransformer
Attempts to decode the page render request, to perform the opposite action forComponentEventLinkTransformer.transformComponentEventLink(Link, ComponentEventRequestParameters)
. 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 theComponentEventDispatcher
and a non-null value returned from this method will prevent the defaultComponentEventLinkEncoder.decodeComponentEventRequest(Request)
method from being invoked.- Specified by:
decodeComponentEventRequest
in interfaceComponentEventLinkTransformer
- Returns:
- decoded parameters, or null to proceed normally
- See Also:
LocalizationSetter.setLocaleFromLocaleName(String)
-
decodePageRenderRequest
public PageRenderRequestParameters decodePageRenderRequest(Request request)
Description copied from interface:PageRenderLinkTransformer
Attempts to decode the page render request, to perform the opposite action forPageRenderLinkTransformer.transformPageRenderLink(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.- Specified by:
decodePageRenderRequest
in interfacePageRenderLinkTransformer
- Returns:
- decoded parameters, or null to proceed normally
- See Also:
LocalizationSetter.setLocaleFromLocaleName(String)
-
-