Class ExternalResourceUrlService
java.lang.Object
io.goobi.viewer.model.resources.download.ExternalResourceUrlService
Resolves the set of permitted download URLs for a given record identifier by expanding admin-configured URL templates with record-specific
metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExpands all configured URL templates using the givenVariableReplacer.getAllowedUrls(String pi) Returns a map of expanded URL → URL template for all configured templates applied to the record identified bypi.Returns existence-filtered URLs for the record represented byvr.
-
Constructor Details
-
ExternalResourceUrlService
public ExternalResourceUrlService()
-
-
Method Details
-
getAllowedUrls
Expands all configured URL templates using the givenVariableReplacer. No Solr lookup or caching is performed; use this when the caller already holds record metadata. -
getAllowedUrls
public Map<String,String> getAllowedUrls(String pi) throws PresentationException, IndexUnreachableException Returns a map of expanded URL → URL template for all configured templates applied to the record identified bypi. Caches results per PI to avoid repeated Solr queries. Returns an empty map if the record is unknown or no templates are configured. -
getExistingUrls
Returns existence-filtered URLs for the record represented byvr. Only URLs where the remote resource is reachable are included. The result is cached after the first call.
-