From dbb91fc07855c83a2c5652bd6c5d9eced6a6f07b Mon Sep 17 00:00:00 2001 From: Denis Ungureanu Date: Wed, 10 Jun 2020 14:43:05 +0300 Subject: [PATCH] ACS-304 : ACS Repository: support for content direct access urls (#260) - add default implementation for direct access url feature --- .../alfresco/repo/content/ContentStore.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/java/org/alfresco/repo/content/ContentStore.java b/src/main/java/org/alfresco/repo/content/ContentStore.java index 741427c522..b735532edb 100644 --- a/src/main/java/org/alfresco/repo/content/ContentStore.java +++ b/src/main/java/org/alfresco/repo/content/ContentStore.java @@ -235,4 +235,27 @@ public interface ContentStore * if an IO error occurs */ public boolean delete(String contentUrl); + + /** + * Gets a presigned URL to directly access a binary content. + * + * @param contentUrl A content store URL + * @return A direct access URL for a binary content + * @throws UnsupportedOperationException if the store is unable to provide the information + */ + default String getDirectAccessUrl(String contentUrl) + { + throw new UnsupportedOperationException( + "Retrieving direct access URLs is not supported by this content store."); + } + + /** + * Checks if the store supports the retrieving of direct access URLs. + * + * @return true if direct access URLs retrieving is supported, false otherwise + */ + default boolean isDirectAccessSupported() + { + return false; + } }