Annotation Interface ResourceProperties


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface ResourceProperties
An optional annotation to customize generated JAX-RS resource.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether this resource operations should be exposed as JAX-RS methods by default.
    boolean
    Generate operations that support HAL content type.
    Name that should be used when generating a HAL collection response.
    boolean
    Return a paged collection from the methods that return collections.
    URL path segment that should be used to access the resources.
    List of the security roles permitted to access the resources.
  • Element Details

    • exposed

      boolean exposed
      Whether this resource operations should be exposed as JAX-RS methods by default. Separate methods can override this setting by using MethodProperties annotation.

      Default: true.

      Default:
      true
    • path

      String path
      URL path segment that should be used to access the resources. This path segment is prepended to the segments specified with the MethodProperties annotations used on this resource's methods.

      Default: hyphenated resource name without a suffix. Ignored suffixes are `Controller` and `Resource`.

      Default:
      ""
    • paged

      boolean paged
      Return a paged collection from the methods that return collections. Requested page number and size are extracted from the query parameters `page` (default 0) and `size` (default 20). These additional headers are injected to the response: first, last, prev (if exists), next (if exists).

      Default: true.

      Default:
      true
    • hal

      boolean hal
      Generate operations that support HAL content type. HAL methods are generated in addition to the standard methods. They accept the same parameters but return a content of `application/hal+json` type. The operations that support HAL responses are `get`, `list`, `add` and `update`.

      Default: false.

      Default:
      false
    • halCollectionName

      String halCollectionName
      Name that should be used when generating a HAL collection response.

      Default: hyphenated resource name without a suffix. Ignored suffixes are `Controller` and `Resource`.

      Default:
      ""
    • rolesAllowed

      String[] rolesAllowed
      List of the security roles permitted to access the resources.

      Default: ""

      Default:
      {}