Package org.nuxeo.wopi
Interface WOPIService
-
- All Known Implementing Classes:
WOPIServiceImpl
public interface WOPIServiceWOPI Service.- Since:
- 10.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancheckDownloadBlob(DocumentModel doc, String xpath, Blob blob)Checks whether the download of the blob is allowed.StringgetActionURL(Blob blob, String action)Returns the WOPI action url given abloband anaction.WOPIBlobInfogetWOPIBlobInfo(Blob blob)Returns aWOPIBlobInfofor the given blob if it is supported by WOPI,nullotherwise.booleanisEnabled()Returns @{code true} if WOPI is enabled,falseotherwise.default booleanisSupported(Blob blob)Returnstrueif the givenblobis supported by WOPI,falseotherwise.booleanrefreshDiscovery()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)booleanverifyProofKey(String proofKeyHeader, String oldProofKeyHeader, String url, String accessToken, String timestampHeader)Verifies that the request originate from Office Online.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Returns @{code true} if WOPI is enabled,falseotherwise.The WOPI discovery XML file has been loaded.
-
getWOPIBlobInfo
WOPIBlobInfo getWOPIBlobInfo(Blob blob)
Returns aWOPIBlobInfofor the given blob if it is supported by WOPI,nullotherwise.
-
isSupported
default boolean isSupported(Blob blob)
Returnstrueif the givenblobis supported by WOPI,falseotherwise.This method relies on checking that the blob's filename extension is supported by the WOPI discovery.
- Since:
- 2021.43
-
getActionURL
String getActionURL(Blob blob, String action)
Returns the WOPI action url given abloband 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:
trueif refreshing the discovery has succeeded,falseotherwise- Since:
- 10.10
-
checkDownloadBlob
default boolean checkDownloadBlob(DocumentModel doc, String xpath, Blob blob)
Checks whether the download of the blob is allowed.- Returns:
trueif download is allowed- Since:
- 2021.37
-
updateCheckFileInfoProperties
default Map<String,Serializable> updateCheckFileInfoProperties(Map<String,Serializable> checkFileInfoProperties)
- Since:
- 2021.40
-
-