org.apache.tapestry5.services.linktransform

## Interface ComponentEventLinkTransformer

- All Known Subinterfaces:
    LinkTransformer
  All Known Implementing Classes:
    LinkTransformerImpl

      @UsesOrderedConfiguration(value=ComponentEventLinkTransformer.class)
      public interface ComponentEventLinkTransformer

  Allows for selective replacement of the default `Link` used to represent a component event request. This is a service, but also the contribution to the service, as a chain of command.

  This transformer follows the same pattern as `PageRenderLinkTransformer`.

  Since:
    5.2.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ComponentEventRequestParameters` | `decodeComponentEventRequest(Request request)` Attempts to decode the page render request, to perform the opposite action for `transformComponentEventLink(Link, ComponentEventRequestParameters)`.
    `Link` | `transformComponentEventLink(Link defaultLink, ComponentEventRequestParameters parameters)` Allows the default Link created for the component event request to be replaced.

- - ### Method Detail

    - #### transformComponentEventLink

          Link transformComponentEventLink(Link defaultLink,
                                         ComponentEventRequestParameters parameters)

      Allows the default Link created for the component event request to be replaced.
      Parameters:
        `defaultLink` - the default Link generated for a component event request
        `parameters` - used to create the default Link
      Returns:
        a replacement Link, or null

    - #### decodeComponentEventRequest

          ComponentEventRequestParameters decodeComponentEventRequest(Request request)

      Attempts to decode the page render request, to perform the opposite action for `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 the `ComponentEventDispatcher` and a non-null value returned from this method will prevent the default `ComponentEventLinkEncoder.decodeComponentEventRequest(Request)` method from being invoked.

      Returns:
        decoded parameters, or null to proceed normally
      See Also:
        `LocalizationSetter.setLocaleFromLocaleName(String)`

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