private static String replaceLink(Map<String, String> links, String url) {
        if (url != null) {
            String key = UrlUtil.decodePath(url);
            String replacement = links.get(key);

            if (replacement != null) {
                return replacement;
            }
        }

        return url;
    }
Leaves only required fields for listing.
server/src/main/java/com/epam/aidial/core/server/service/PublicationService.java