Package org.apache.tapestry5.internal.services

## Interface LinkSource

- All Known Implementing Classes:
    `LinkSourceImpl`

      @UsesOrderedConfiguration(LinkCreationListener2.class)
      public interface LinkSource

  A source for `Link` objects.
  Since:
    5.1.0.0
  See Also:
    `LinkCreationListener2`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Link` | `createComponentEventLink​(Page page, java.lang.String nestedId, java.lang.String eventType, boolean forForm, java.lang.Object... context)` | Creates a stateful action link.
    `Link` | `createPageRenderLink​(java.lang.String pageName, boolean override, java.lang.Object... pageActivationContext)` | Creates a render link for the page.
    `LinkCreationHub` | `getLinkCreationHub()` | Returns the hub, used to register and de-register `LinkCreationListener2`s.

- - ### Method Detail

    - #### createComponentEventLink

          Link createComponentEventLink​(Page page,
                                        java.lang.String nestedId,
                                        java.lang.String eventType,
                                        boolean forForm,
                                        java.lang.Object... context)

      Creates a stateful action link. Action links are built for components. Action links are encoded by the current request (that is, bound to the current request's session, if any).
      Parameters:
        `page` - the page holding the component
        `nestedId` - the component's qualified id (a sequence of simple ids, separated by dots).
        `eventType` - the type of event to trigger
        `forForm` - true if the link is for a form, false otherwise
        `context` - Additional path data, each value will be converted to a string and appended to the URI @return a link
      See Also:
        `ComponentResourcesCommon.createEventLink(String, Object...)`

    - #### createPageRenderLink

          Link createPageRenderLink​(java.lang.String pageName,
                                    boolean override,
                                    java.lang.Object... pageActivationContext)

      Creates a render link for the page. If an activation context is supplied then that context is built into the URI. If no activation context is supplied, then the activation context is obtained from the page itself, by triggering a passivate event on its root component. When the activationContext is an empty array, the targeted page is checked to see if it can provide an activation context. This is accomplished by triggering a "passivate" event on the targeted page. If the override parameter is true, this will not occur (even when the activation context is empty).
      Parameters:
        `pageName` - name of the page to which a link should be created
        `override` - if true, then the provided activation context is always used even if empty
        `pageActivationContext` - the activation context for the page
      Returns:
        a link
      See Also:
        `PageRenderLinkSource.createPageRenderLink(String)`, `PageRenderLinkSource.createPageRenderLinkWithContext(String, Object[])`

    - #### getLinkCreationHub

          LinkCreationHub getLinkCreationHub()

      Returns the hub, used to register and de-register `LinkCreationListener2`s.
      Returns:
        the hub