|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={FIELD,TYPE})
@Retention(value=RUNTIME)
@Beta
public @interface InjectLink
Specifies a link injection target in a returned representation bean. May be
used on fields of type String or URI. One of value() or
resource() must be specified.
| Optional Element Summary | |
|---|---|
String |
anchor
Specifies the anchor |
Binding[] |
bindings
Specifies the bindings for embedded URI template parameters. |
String |
condition
Specifies a boolean EL expression whose value determines whether a Ref is set (true) or not (false). |
InjectLink.Extension[] |
extensions
Specifies extension parameters as name-value pairs. |
String |
hreflang
Specifies the lang of the referenced resource |
String |
media
Specifies the media |
String |
method
Used in conjunction with resource() to specify a subresource
locator or method. |
String |
rel
Specifies the relationship. |
Class<?> |
resource
Specifies a resource class whose @Path URI template will be used to build the injected URI. |
String |
rev
Specifies the reverse relationship. |
InjectLink.Style |
style
The style of URI to inject |
String |
title
Specifies the title. |
String |
type
Specifies the media type. |
String |
value
Specifies a URI template that will be used to build the injected URI. |
public abstract InjectLink.Style style
public abstract String value
Binding.value(). URI template parameter values are resolved as
described in resource(). E.g. the following three alternatives
are equivalent:
@Ref("{id}")
@Ref(value="{id}", bindings={
@Binding(name="id" value="${instance.id}"}
)
@Ref("${instance.id}")
public abstract Class<?> resource
bindings() property contains a binding specification
for the parameter then that is usedinstance bean (see Binding).
E.g. assuming a resource class SomeResource with the
following @Path("{id}") annotation, the following two
alternatives are therefore equivalent:
@Ref(resource=SomeResource.class)
@Ref(resource=SomeResource.class, bindings={
@Binding(name="id" value="${instance.id}"}
)
public abstract String method
resource() to specify a subresource
locator or method. The value is the name of the method. The value of the
method's @Path annotation will be appended to the value of the
class-level @Path annotation separated by '/' if necessary.
public abstract Binding[] bindings
Bindingpublic abstract String condition
public abstract String rel
public abstract String rev
public abstract String type
public abstract String title
public abstract String anchor
public abstract String media
public abstract String hreflang
public abstract InjectLink.Extension[] extensions
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||