Class WOPIServiceImpl

    • Constructor Detail

      • WOPIServiceImpl

        public WOPIServiceImpl()
    • Method Detail

      • hasDiscoveryURL

        protected boolean hasDiscoveryURL()
      • registerInvalidator

        protected void registerInvalidator()
      • unregisterInvalidator

        protected void unregisterInvalidator()
      • loadDiscovery

        protected void loadDiscovery()
      • loadDiscovery

        protected boolean loadDiscovery​(byte[] discoveryBytes)
      • fireRefreshDiscovery

        protected void fireRefreshDiscovery()
      • getSupportedAppNames

        protected List<String> getSupportedAppNames()
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: WOPIService
        Returns @{code true} if WOPI is enabled, false otherwise.

        The WOPI discovery XML file has been loaded.

        Specified by:
        isEnabled in interface WOPIService
      • isSupported

        public boolean isSupported​(Blob blob)
        Description copied from interface: WOPIService
        Returns true if the given blob is supported by WOPI, false otherwise.

        This method relies on checking that the blob's filename extension is supported by the WOPI discovery.

        Specified by:
        isSupported in interface WOPIService
      • getExtension

        protected String getExtension​(Blob blob)
      • refreshDiscovery

        public boolean refreshDiscovery()
        Description copied from interface: WOPIService
        Refreshes the WOPI discovery: fetches the data from the discovery URL, stores it and loads it in memory.
        Specified by:
        refreshDiscovery in interface WOPIService
        Returns:
        true if refreshing the discovery has succeeded, false otherwise
      • fetchDiscovery

        protected byte[] fetchDiscovery()
      • buildHttpClient

        protected org.apache.http.impl.client.CloseableHttpClient buildHttpClient()
      • configureProxy

        protected void configureProxy​(org.apache.http.impl.client.HttpClientBuilder builder)
      • getDiscovery

        protected byte[] getDiscovery()
      • storeDiscovery

        protected void storeDiscovery​(byte[] discoveryBytes)