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.
    • Required Element Summary

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

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

      • rel

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

        ApiLink.SCOPE 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:
        com.adobe.granite.haf.annotations.ApiLink.SCOPE.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:
        ""