Annotation Interface LinkRest


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented public @interface LinkRest
Class or method-level annotation to provide information about linked/embedded subresources of a RestModel.
Author:
Andrea Bollini (andrea.bollini at 4science.it)
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the method to invoke in the associated link repository.
    The rel name to use for the link and/or embed.
  • Element Details

    • name

      String name
      The rel name to use for the link and/or embed.

      This is optional if the annotation is used at the method level. If unspecified at the method level, the bean name (inferred by the the name of the method) will be used as the name.

      This is required if the annotation is used at the class level.

      Returns:
      the name, or the empty string if unspecified by the annotation.
      Default:
      ""
    • method

      String method
      The name of the method to invoke in the associated link repository.

      When this is specified, whether at the class or method level, the value of the resource must be provided by a LinkRestRepository, which is found by its Component name. See Utils.getResourceRepository(String, String)} for details.

      Returns:
      the method name, or the empty string if unspecified by the annotation.
      Default:
      ""