Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## grails.rest
[Groovy] Annotation Type Linkable

    java.lang.Object
      grails.rest.Linkable

    @java.lang.annotation.Retention(RetentionPolicy.SOURCE)
    @java.lang.annotation.Target([ElementType.TYPE])
    @org.codehaus.groovy.transform.GroovyASTTransformationClass("org.grails.plugins.web.rest.transform.LinkableTransform")
    @interface Linkable

A transform that makes it possible to attach Link instances to any class. Two methods are added, one called link(Map args) and another called links() to retrieve the links. Example:

         Linkable:class Book {
                  String title
              }

              def b = new Book()
              b.link(rel:"publisher", href="http://foo.com/books")
              println b.links()

Authors:
  Graeme Rocher

Since:
  2.3

Method Summary

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()

Groovy Documentation