Class AbstractLinkEnricher
java.lang.Object
com.atlassian.confluence.plugins.restapi.enrich.AbstractLinkEnricher
- Direct Known Subclasses:
ContentEnricher
,RestListLinkEnricher
,SpaceEnricher
-
Field Summary
Modifier and TypeFieldDescriptionprotected final GraphQL
protected final RestNavigationService
protected static final String
protected static final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractLinkEnricher
(RestNavigationService navigationService, GraphQL graphql) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
enrichLinks
(RestObject entity, SchemaType schemaType) 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, SchemaType schemaType) Adds a link to an immutable _links map, creating the map if it doesn't already exist.getEnrichedPropertyTypes
(String... linkTypes) Get the 'links' property type that a link enricher provides.
-
Field Details
-
SELF_LINK
- See Also:
-
ORIGINAL_LINKS_PROPERTY
- See Also:
-
graphql
-
-
Constructor Details
-
Method Details
-
getEnrichedPropertyTypes
Get the 'links' property type that a link enricher provides.- Since:
- 6.12.0
-
enrichLinks
Removes the "links" Map<LinkType,Link> from a RestObject and replaces it with a "_links" Map<String,String> containing the same set of urls.- Parameters:
entity
-schemaType
-- Since:
- 6.12.0
-
enrichWithLink
protected void enrichWithLink(RestObject restObject, String linkKey, String linkUrl, SchemaType schemaType) Adds a link to an immutable _links map, creating the map if it doesn't already exist. Will not add a link if linkUrl is null- Parameters:
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)schemaType
- rest or graphql- Since:
- 6.12.0