public interface Link
Interface for a hateoas link.
See https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5
Modifier and Type | Interface and Description |
---|---|
static interface |
Link.Builder
Build for creating
Link instances. |
Modifier and Type | Field and Description |
---|---|
static java.lang.CharSequence |
ABOUT
About link.
|
static java.lang.CharSequence |
HELP
Help link.
|
static java.lang.CharSequence |
HREF
Href link.
|
static java.lang.CharSequence |
SELF
Self link.
|
Modifier and Type | Method and Description |
---|---|
static Link.Builder |
build(java.lang.String uri)
Create a link from the given URI.
|
static Link.Builder |
build(java.net.URI uri)
Create a link from the given URI.
|
default java.util.Optional<java.lang.String> |
getDeprecation() |
java.lang.String |
getHref() |
default java.util.Optional<java.lang.String> |
getHreflang() |
default java.util.Optional<java.lang.String> |
getName() |
default java.util.Optional<java.lang.String> |
getProfile() |
default java.util.Optional<java.lang.String> |
getTitle() |
default java.util.Optional<MediaType> |
getType() |
default boolean |
isTemplated() |
static Link |
of(java.lang.String uri)
Create a link from the given URI.
|
static Link |
of(java.net.URI uri)
Create a link from the given URI.
|
static final java.lang.CharSequence HELP
static final java.lang.CharSequence SELF
static final java.lang.CharSequence ABOUT
static final java.lang.CharSequence HREF
java.lang.String getHref()
default boolean isTemplated()
default java.util.Optional<MediaType> getType()
default java.util.Optional<java.lang.String> getDeprecation()
default java.util.Optional<java.lang.String> getProfile()
default java.util.Optional<java.lang.String> getName()
default java.util.Optional<java.lang.String> getTitle()
default java.util.Optional<java.lang.String> getHreflang()
static Link of(java.net.URI uri)
uri
- The URIstatic Link of(java.lang.String uri)
uri
- The URIstatic Link.Builder build(java.net.URI uri)
uri
- The URIstatic Link.Builder build(java.lang.String uri)
uri
- The URI