Class AbstractLinkEnricher

    • Method Detail

      • getEnrichedPropertyTypes

        protected @NonNull Map<String,​Type> getEnrichedPropertyTypes​(String... linkTypes)
        Get the 'links' property type that a link enricher provides.
        Since:
        6.12.0
      • enrichLinks

        protected 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.
        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 to
        linkKey - key of the link which is being added
        linkUrl - 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