Annotation Type ApiLink


@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface ApiLink
This annotation can be used on a public field or method. The return type must be a string, an iterator of strings or a collection that is iterable.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Defines the scope in which the link will be serialized in.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The relation type that this link represents.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Set this to true if you do not need this path mapped into the API space.
    The content type returned when following the link.
    The scope in which the link should be serialized.
  • Element Details

    • rel

      String rel
      The relation type that this link represents.
      Returns:
      the relation type
    • scope

      The scope in which the link should be serialized. If SCOPE.RESOURCE the link will be serialized for a resource that is the main entity. If SCOPE.INLINE the link will be serialized for a resource that is a sub-entity of another resource. By default the link will be serialized in both cases.
      Returns:
      The scope in which this link should be serialized.
      Default:
      RESOURCE
    • absolute

      boolean absolute
      Set this to true if you do not need this path mapped into the API space.
      Returns:
      true if path is absolute, false otherwise
      Default:
      false
    • contentType

      String contentType
      The content type returned when following the link.
      Returns:
      The content type
      Default:
      ""