|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.Link.Builder
public static class Link.Builder
Builder class for hypermedia links.
Link| Constructor Summary | |
|---|---|
Link.Builder()
|
|
| Method Summary | |
|---|---|
Link |
build()
Finish building this link and return the instance. |
Link |
build(Object... values)
Finish building this link using the supplied values as URI parameters. |
Link.Builder |
param(String name,
String value)
Set an arbitrary parameter on this link. |
Link.Builder |
rel(String rel)
Convenience method to set a link relation. |
Link.Builder |
title(String title)
Convenience method to set a "title" on this link. |
Link.Builder |
type(String type)
Convenience method to set a "type" on this link. |
Link.Builder |
uri(String uri)
Set underlying string representing URI template for the link being constructed. |
Link.Builder |
uri(URI uri)
Set underlying URI template for the link being constructed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Link.Builder()
| Method Detail |
|---|
public Link.Builder uri(URI uri)
uri - underlying URI for link
public Link.Builder uri(String uri)
throws IllegalArgumentException
uri - underlying URI for link.
IllegalArgumentException - if string representation of URI is invalid.public Link.Builder rel(String rel)
rel - relation name.
IllegalArgumentException - if the name is null.public Link.Builder title(String title)
title - title parameter of this link.
IllegalArgumentException - if the title is null.public Link.Builder type(String type)
type - type parameter of this link.
IllegalArgumentException - if the type is null.
public Link.Builder param(String name,
String value)
throws IllegalArgumentException
name - the name of the parameter.value - the value set for the parameter.
IllegalArgumentException - if either the name or value are null.public Link build()
IllegalArgumentException - if there are any URI template parameters
without a supplied value.
UriBuilderException - if a URI cannot be constructed based on the
current state of the builder.
public Link build(Object... values)
throws UriBuilderException
values - parameters used to build underlying URI.
IllegalArgumentException - if there are any URI template parameters
without a supplied value, or if a value is null.
UriBuilderException - if a URI cannot be constructed based on the
current state of the underlying URI builder.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||