ACS-304 : ACS Repository: support for content direct access urls (#260)

- add default implementation for direct access url feature
This commit is contained in:
Denis Ungureanu
2020-06-10 14:43:05 +03:00
committed by GitHub
parent a304b6b7ff
commit dbb91fc078

View File

@@ -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;
}
}