|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ws.rs.core.Link de.smartics.resteasy.hypermedia.renderer.LinkDescriptor
public abstract class LinkDescriptor
Provides information on a single link.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.ws.rs.core.Link |
---|
javax.ws.rs.core.Link.Builder, javax.ws.rs.core.Link.JaxbAdapter, javax.ws.rs.core.Link.JaxbLink |
Field Summary | |
---|---|
protected LinkMetadata |
metadata The additional link metadata about the link. |
protected Map<String,String> |
params The path parameters to apply to the template link. |
protected List<String> |
rels The list of tokens that specify the relationship between the document containing the hyperlink and the destination indicated by the hyperlink. |
Fields inherited from class javax.ws.rs.core.Link |
---|
REL, TITLE, TYPE |
Constructor Summary | |
---|---|
protected |
LinkDescriptor(LinkMetadata metadata, Map<String,String> params, List<String> rels) Default constructor. |
Method Summary | |
---|---|
void |
addRels(List<String> rels) Adds the list of relations. |
void |
addRels(String... rels) Adds the list of relations. |
String |
getAccessKey() Returns the key label or list of key labels with which to associate the element; each key label represents a keyboard shortcut which UAs can use to activate the element or give focus to the element. |
String |
getContextMenu() Returns the identifier of a menu with which to associate the element as a context menu. |
String |
getCssClass() Returns the CSS class information to the link. |
String |
getDir() Returns the element’s text directionality. |
String |
getHelp() Returns the detailed help information on the link. |
abstract String |
getHref() Returns the URI to the resource the link points to. |
abstract String |
getHrefLang() Returns the content that describes the language of the resource pointed to by the link. |
String |
getId() Returns the identifier of the link. |
String |
getLabel() Returns the standard label to be rendered as the visible part of the link. |
abstract String |
getLength() Returns the advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced. |
String |
getMedia() Returns the media for which the destination of the hyperlink was designed. |
Map<String,String> |
getParams() Returns the path parameters to apply to the template link. |
String |
getRel() Returns the relation attribute of the link. |
List<String> |
getRels() Returns the relations of this link. |
String |
getShortLabel() Returns the short version of the label to be rendered in confined space. |
Integer |
getTabIndex() Returns the tab index. |
String |
getTarget() Returns the name or keyword giving a browsing context for UAs to use when following the hyperlink. |
String |
getTitle() Returns the advisory information associated with the element. |
abstract String |
getType() Returns the media type of the resource the link points to. |
URI |
getUri() |
javax.ws.rs.core.UriBuilder |
getUriBuilder() |
Boolean |
isHidden() Returns the hidden flag to specify that the element represents an element that is not yet, or is no longer, relevant. |
void |
putParam(String name, String value) Adds the given parameter to the map of parameters. |
void |
setAccessKey(String accessKey) Sets the key label or list of key labels with which to associate the element; each key label represents a keyboard shortcut which UAs can use to activate the element or give focus to the element. |
void |
setContextMenu(String contextMenu) Sets the identifier of a menu with which to associate the element as a context menu. |
void |
setCssClass(String cssClass) Sets the CSS class information to the link. |
void |
setDir(String dir) Sets the element’s text directionality. |
void |
setHelp(String help) Sets the detailed help information on the link. |
void |
setHidden(Boolean hidden) Sets the hidden flag to specify that the element represents an element that is not yet, or is no longer, relevant. |
abstract void |
setHref(String href) Sets the URI to the resource the link points to. |
abstract void |
setHrefLang(String hrefLang) Sets the content that describes the language of the resource pointed to by the link. |
void |
setId(String id) Sets the identifier of the link. |
void |
setLabel(String label) Sets the standard label to be rendered as the visible part of the link. |
abstract void |
setLength(String length) Sets the advisory length of the linked content in octets; it is a hint about the content length of the representation returned when the IRI in the href attribute is mapped to a URI and dereferenced. |
void |
setMedia(String media) Sets the media for which the destination of the hyperlink was designed. |
void |
setShortLabel(String shortLabel) Sets the short version of the label to be rendered in confined space. |
void |
setTabIndex(Integer tabIndex) Sets the tab index. |
void |
setTarget(String target) Sets the name or keyword giving a browsing context for UAs to use when following the hyperlink. |
void |
setTitle(String title) Sets the advisory information associated with the element. |
abstract void |
setType(String type) Sets the media type of the resource the link points to. |
protected static List<String> |
splitRel(String rel) Splits the whitespace separated relation link attribute into its parts. |
String |
toString() |
Methods inherited from class javax.ws.rs.core.Link |
---|
fromLink, fromMethod, fromPath, fromResource, fromUri, fromUri, fromUriBuilder, valueOf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final LinkMetadata metadata
protected final Map<String,String> params
protected final List<String> rels
Constructor Detail |
---|
protected LinkDescriptor(LinkMetadata metadata, Map<String,String> params, List<String> rels)
metadata
- the additional link metadata about the link.
params
- the value for params.
rels
- the relations of this link.
Method Detail |
---|
protected static final List<String> splitRel(String rel)
rel
- the whitespace separated relation link attribute.
public URI getUri()
getUri
in class
javax.ws.rs.core.Link
public javax.ws.rs.core.UriBuilder getUriBuilder()
getUriBuilder
in class
javax.ws.rs.core.Link
public abstract String getHref()
public abstract void setHref(String href)
href
- the URI to the resource the link points to.
public abstract String getHrefLang()
public abstract void setHrefLang(String hrefLang)
hrefLang
- the content that describes the language of the resource pointed to by the link.
public abstract String getType()
getType
in class
javax.ws.rs.core.Link
public abstract void setType(String type)
type
- the media type of the resource the link points to.
public abstract String getLength()
public abstract void setLength(String length)
length
- the advisory length of the linked content in octets.
public List<String> getRels()
getRels
in class
javax.ws.rs.core.Link
public void addRels(String... rels) throws NullPointerException
rels
- the relations to add.
NullPointerException
- if
rels
is
null
.
public void addRels(List<String> rels) throws NullPointerException
rels
- the relations to add.
NullPointerException
- if
rels
is
null
.
public String getRel()
getRel
in class
javax.ws.rs.core.Link
public Map<String,String> getParams()
getParams
in class
javax.ws.rs.core.Link
public void putParam(String name, String value) throws NullPointerException, IllegalArgumentException
name
- the name of the parameter to add.
value
- the value to the parameter to add.
NullPointerException
- if
name
or
value
is
null
.
IllegalArgumentException
- if
name
is blank}.
public final String getAccessKey()
An ordered set of unique space-separated tokens, each of which must be exactly one Unicode code point in length.
public final void setAccessKey(String accessKey)
An ordered set of unique space-separated tokens, each of which must be exactly one Unicode code point in length.
accessKey
- the key label or list of key labels with which to associate the element.
public final Integer getTabIndex()
Specifies whether the element represents an element that is is focusable (that is, an element which is part of the sequence of focusable elements in the document), and the relative order of the element in the sequence of focusable elements in the document.
public final void setTabIndex(Integer tabIndex)
Specifies whether the element represents an element that is is focusable (that is, an element which is part of the sequence of focusable elements in the document), and the relative order of the element in the sequence of focusable elements in the document.
tabIndex
- the tab index.
public final void setTitle(String title)
title
- the advisory information associated with the element.
public final String getDir()
public final void setDir(String dir)
dir
- the element’s text directionality.
public final Boolean isHidden()
public void setHidden(Boolean hidden)
hidden
- the hidden flag to specify that the element represents an element that is not yet, or is no longer, relevant.
public String getLabel()
public final void setLabel(String label)
label
- the standard label to be rendered as the visible part of the link.
public final String getShortLabel()
public final void setShortLabel(String shortLabel)
shortLabel
- the short version of the label to be rendered in confined space.
public final String getHelp()
public final void setHelp(String help)
help
- the detailed help information on the link.
public final String getCssClass()
public final void setCssClass(String cssClass)
cssClass
- the CSS class information to the link.
public String getId()
public void setId(String id)
id
- the identifier of the link.
public String getTitle()
getTitle
in class
javax.ws.rs.core.Link
public String getTarget()
public void setTarget(String target)
target
- the name or keyword giving a browsing context for UAs to use when following the hyperlink.
public String getMedia()
Values are according to Media Queries.
public void setMedia(String media)
Values are according to Media Queries.
media
- the media for which the destination of the hyperlink was designed.
public String getContextMenu()
public void setContextMenu(String contextMenu)
contextMenu
- the identifier of a menu with which to associate the element as a context menu.
public String toString()
toString
in class
javax.ws.rs.core.Link
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |