Class ExternalResourceUrlService

java.lang.Object
io.goobi.viewer.model.resources.download.ExternalResourceUrlService

public class ExternalResourceUrlService extends Object
Resolves the set of permitted download URLs for a given record identifier by expanding admin-configured URL templates with record-specific metadata.
  • Constructor Details

    • ExternalResourceUrlService

      public ExternalResourceUrlService()
  • Method Details

    • getAllowedUrls

      public Map<String,String> getAllowedUrls(VariableReplacer vr)
      Expands all configured URL templates using the given VariableReplacer. No Solr lookup or caching is performed; use this when the caller already holds record metadata.
    • getAllowedUrls

      Returns a map of expanded URL → URL template for all configured templates applied to the record identified by pi. Caches results per PI to avoid repeated Solr queries. Returns an empty map if the record is unknown or no templates are configured.
      Throws:
      PresentationException
      IndexUnreachableException
    • getExistingUrls

      public Map<String,String> getExistingUrls(VariableReplacer vr)
      Returns existence-filtered URLs for the record represented by vr. Only URLs where the remote resource is reachable are included. The result is cached after the first call.