Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Upon creation, the LinkBuilders automatically detects if the target method being invoked is a resource method or a sub-resource method. The "resource" and "subResource" properties of the builder are initialized accordingly. The link builder interfaces reside in the comorg.hpapache.symphonywink.server.utils package.

Link Builders Overview

The JAX-RS specification defines the UriBuilder interface. The UriBuilder interface is used to construct a URI from a template, but does not specify any mechanism that can automatically generate all resource links.
Apache Wink provides the SystemLinksBuilder for automatic generation of all the alternate links to a resource, one link per every supported media type. For example, this is useful for an application that produces Atom feeds to include in the feed all the alternate representations of the resource.

...

Apache Wink supports the special query parameter "alt" that is used to override the value of the request Accept header. When the link builders generate a link that specifies the "type" attribute, then the "alt" query parameter is automatically added to the generated link. This is controlled by setting the symphonywink.addAltParam key of the configuration properties file or by calling the LinksBuilder#addAltParam() method.

Info
titleReference

Refer to section 3 TBD for For more information on the Configuration Properties File refer to section 5.1 Registration and Configuration.

System Links Builder

The SystemLinksBuilder interface enables the generation of all, or a subset of, the system links to a resource or its sub-resources. The links are generated as absolute URIs or as relative to the base URI according to the SystemLinksBuilder state, request information or the application configuration.

...

  1. Use the value that was passed to the relativize() method of the builder.
  2. If the relativize() method was not called, then use the value of the "relative-urls" query parameter from the request. The value must be either true or false.
  3. If the request does not contain the "relative-urls" query parameter, then use the value of the wink.defaultUrisRelative key set in the application configuration properties file. The value must be either true or false.
  4. If the configuration key does not exist, then use true.
Info
titleReference

Refer to section ‎0 TBD for For more information on configuration properties filethe Configuration Properties File refer to section 5.1 Registration and Configuration.