Package: grails.rest

## [Groovy] Annotation Type Resource

- grails.rest.Resource

- All Implemented Interfaces and Traits:
    java.lang.annotation.Annotation

      @java.lang.annotation.Retention(value: RetentionPolicy.RUNTIME)
      @java.lang.annotation.Target(value: [ElementType.TYPE])
      @org.codehaus.groovy.transform.GroovyASTTransformationClass(value: org.grails.plugins.web.rest.transform.ResourceTransform)
      @interface Resource

  Meta Annotation to applied to a domain class if it is a REST resource

  Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract java.lang.String[]` | `formats()` Returns: The allowed response formats
    `` | `abstract java.lang.String` | `namespace()` Returns: The namespace of the resource.
    `` | `abstract boolean` | `readOnly()` Returns: Whether this is a read-only resource (one that doesn't allow DELETE, POST, PUT or PATCH requests)
    `` | `abstract java.lang.Class<?>` | `superClass()` Returns: The super class to use for the generated controller class
    `` | `abstract java.lang.String` | `uri()` Returns: The URI of the resource.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### abstract java.lang.String[] formats()

      Returns:
        The allowed response formats

    - #### abstract java.lang.String namespace()

      Returns:
        The namespace of the resource. If specified a UrlMapping with this namespace will automatically be registered for the resource

    - #### abstract boolean readOnly()

      Returns:
        Whether this is a read-only resource (one that doesn't allow DELETE, POST, PUT or PATCH requests)

    - #### abstract java.lang.Class<?> superClass()

      Returns:
        The super class to use for the generated controller class

    - #### abstract java.lang.String uri()

      Returns:
        The URI of the resource. If specified a UrlMapping will automatically be registered for the resource