Groovy Documentation

grails.rest
[Groovy] Class Link

java.lang.Object
  grails.rest.Link
All Implemented Interfaces:
java.io.Serializable

@groovy.transform.CompileStatic
@groovy.transform.EqualsAndHashCode(includes = ['rel', 'href'])
class Link
extends java.lang.Object

Represents a Link in a RESTful resource. See http://tools.ietf.org/html/draft-kelly-json-hal-05#section-5

Authors:
Graeme Rocher
Since:
2.3


Property Summary
java.lang.String contentType

The content type of the linked resource

boolean deprecated

Whether the link is deprecated

java.lang.String href

The link's href

java.util.Locale hreflang

The language of the linked resource

java.lang.String rel

The link relationship

boolean templated

Whether the link is a URI template

java.lang.String title

The Human readable title of the resource

 
Constructor Summary
Link(java.lang.String rel, java.lang.String href)

 
Method Summary
static Link createLink(java.util.Map arguments)

Creates a link for the given arguments

 
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()
 

Property Detail

contentType

java.lang.String contentType
The content type of the linked resource


deprecated

boolean deprecated
Whether the link is deprecated


href

final java.lang.String href
The link's href


hreflang

java.util.Locale hreflang
The language of the linked resource


rel

final java.lang.String rel
The link relationship


templated

boolean templated
Whether the link is a URI template


title

java.lang.String title
The Human readable title of the resource


 
Constructor Detail

Link

Link(java.lang.String rel, java.lang.String href)


 
Method Detail

createLink

static Link createLink(java.util.Map arguments)
Creates a link for the given arguments
Parameters:
arguments - The arguments
Returns:
The link


 

Groovy Documentation