Annotation Interface RestLink


@Retention(RUNTIME) @Target(METHOD) public @interface RestLink
Represents a Web link to be incorporated into the HTTP response. Only the response of methods or classes annotated with InjectRestLinks will include the "Link" headers.

The RestLink annotation can be used at method level.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Declares a link for the given type of resources.
    If not set, it will default to the method name.
    Intended for labelling the link with a human-readable identifier.
    Hint to indicate the media type expected when dereferencing the target resource.
  • Element Details

    • rel

      String rel
      If not set, it will default to the method name.
      Returns:
      the link relation.
      Default:
      ""
    • title

      String title
      Intended for labelling the link with a human-readable identifier.
      Returns:
      the link title.
      Default:
      ""
    • type

      String type
      Hint to indicate the media type expected when dereferencing the target resource.
      Returns:
      the link expected media type.
      Default:
      ""
    • entityType

      Class<?> entityType
      Declares a link for the given type of resources. If not set, it will default to the returning type of the annotated method.
      Returns:
      the type of returning method.
      Default:
      java.lang.Object.class