Package org.nuxeo.wopi
Interface WOPIService
- All Known Implementing Classes:
WOPIServiceImpl
public interface WOPIService
WOPI Service.
- Since:
- 10.3
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
checkDownloadBlob
(DocumentModel doc, String xpath, Blob blob) Checks whether the download of the blob is allowed.getActionURL
(Blob blob, String action) Returns the WOPI action url given ablob
and anaction
.getWOPIBlobInfo
(Blob blob) Returns aWOPIBlobInfo
for the given blob if it is supported by WOPI,null
otherwise.boolean
Returns @{code true} if WOPI is enabled,false
otherwise.default boolean
isSupported
(Blob blob) Returnstrue
if the givenblob
is supported by WOPI,false
otherwise.boolean
Refreshes the WOPI discovery: fetches the data from the discovery URL, stores it and loads it in memory.default Map<String,
Serializable> updateCheckFileInfoProperties
(Map<String, Serializable> checkFileInfoProperties) boolean
verifyProofKey
(String proofKeyHeader, String oldProofKeyHeader, String url, String accessToken, String timestampHeader) Verifies that the request originate from Office Online.
-
Method Details
-
isEnabled
boolean isEnabled()Returns @{code true} if WOPI is enabled,false
otherwise.The WOPI discovery XML file has been loaded.
-
getWOPIBlobInfo
Returns aWOPIBlobInfo
for the given blob if it is supported by WOPI,null
otherwise. -
isSupported
Returnstrue
if the givenblob
is supported by WOPI,false
otherwise.This method relies on checking that the blob's filename extension is supported by the WOPI discovery.
- Since:
- 2021.43
-
getActionURL
Returns the WOPI action url given ablob
and anaction
. -
verifyProofKey
boolean verifyProofKey(String proofKeyHeader, String oldProofKeyHeader, String url, String accessToken, String timestampHeader) Verifies that the request originate from Office Online. -
refreshDiscovery
boolean refreshDiscovery()Refreshes the WOPI discovery: fetches the data from the discovery URL, stores it and loads it in memory.- Returns:
true
if refreshing the discovery has succeeded,false
otherwise- Since:
- 10.10
-
checkDownloadBlob
Checks whether the download of the blob is allowed.- Returns:
true
if download is allowed- Since:
- 2021.37
-
updateCheckFileInfoProperties
default Map<String,Serializable> updateCheckFileInfoProperties(Map<String, Serializable> checkFileInfoProperties) - Since:
- 2021.40
-