public class AbstractLinkEnricher extends Object
Modifier and Type | Field and Description |
---|---|
protected RestNavigationService |
navigationService |
protected static String |
ORIGINAL_LINKS_PROPERTY |
protected static String |
SELF_LINK |
Modifier | Constructor and Description |
---|---|
protected |
AbstractLinkEnricher(RestNavigationService navigationService) |
Modifier and Type | Method and Description |
---|---|
protected void |
enrichLinks(RestObject entity)
Removes the "links" Map<LinkType,Link> from a RestObject and replaces it with a "_links" Map<String,String>
containing the same set of urls.
|
protected void |
enrichWithLink(RestObject restObject,
String linkKey,
String linkUrl)
Adds a link to an immutable _links map, creating the map if it doesn't already exist.
|
RestNavigation |
navigation() |
protected static final String SELF_LINK
protected static final String ORIGINAL_LINKS_PROPERTY
protected final RestNavigationService navigationService
protected AbstractLinkEnricher(RestNavigationService navigationService)
public RestNavigation navigation()
protected void enrichLinks(RestObject entity)
entity
- protected void enrichWithLink(RestObject restObject, String linkKey, String linkUrl)
restObject
- object to add a link tolinkKey
- key of the link which is being addedlinkUrl
- url of the link which is being added (to be successfully added, link must have non-null linkUrl)Copyright © 2003–2016 Atlassian. All rights reserved.