|
||||||||||
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 |
consumes(String type)
Convenience method to set a consumes type on this link. |
Link.Builder |
method(String method)
Convenience method to set a type on this link. |
Link.Builder |
param(String name,
String value)
Set an arbitrary parameter on this link. |
Link.Builder |
produces(String type)
Convenience method to set a produces type on this link. |
Link.Builder |
rel(String name)
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 invalidpublic Link.Builder rel(String name)
name
- relation name
public Link.Builder title(String title)
title
- title parameter of this link
public Link.Builder type(String type)
type
- link type as string
public Link.Builder method(String method)
method
- HTTP method name
public Link.Builder produces(String type)
type
- link type as string
public Link.Builder consumes(String type)
type
- link type as string
public Link.Builder param(String name, String value) throws IllegalArgumentException
method(java.lang.String)
or title(java.lang.String)
when setting these single-valued parameters.
name
- the name of the parametervalue
- the value set for the parameter
IllegalArgumentException
- if either the name or value are nullpublic Link build()
public Link build(Object... values) throws UriBuilderException
values
- parameters used to build underlying URI
UriBuilderException
- maybe thrown when building underlying URI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |