The Web Application Open Platform Interface (WOPI) is an open standard protocol developed by Microsoft that allows web-based applications to integrate with Office Online server products. WOPI enables the edition (with collaboration) of Office documents directly a web browser.
Please consult WOPI documentation.
The Silverpeas's implementation of WOPI protocol has been written by using the LibreOffice Online product in a first time, which is mainly developed by Collabora.
Please consult the SDK documentation of Collabora Online for details. Particularly with regard to Collabora additional stuffs upon WOPI protocol.
Silverpeas is here the file host. The Silverpeas's WBE API is used to interface the Silverpeas's side with the editor server:
WopiClientManager
implementingWbeClientManager
, for client editor managementWopiEdition
extendingWbeEdition
, for representing an edition in WOPI contextWopiRequestDispatcher
implementingWbeFileEdition.ClientRequestDispatcher
, for dispatching to the UI of the editor
The first phase of WOPI processing is to 'discover' the edition possibilities. It is done by
requesting the editor server via an HTTP request returning an XML content. This content contains
mainly the mapping between mime-type
taken in charge and the URL
of the corresponding editor. For example, for
the mime-type
of an ODP
office file, it gives the right editor URL.
Silverpeas implements the endpoints which are necessary to edit a Silverpeas's file. These endpoints
are coded into WopiFileResource
.
In WOPI communications, the editor server have to request the Silverpeas's one. For displaying file content, it has to get the file content for example. So, the Silverpeas's server must be accessible to the editor one over the network.
Adding to silverpeas.gradle
file the following dependencies:
silverpeas "org.silverpeas.wbe.wopi:silverpeas-wbe-wopi-configuration:${wbe_version}"
silverpeas "org.silverpeas.wbe.wopi:silverpeas-wbe-wopi-war:${wbe_version}@war"
wopi.client.baseUrl=[base url of server providing the editor]
The indicated base URL will be automatically set into the registry of authorized servers used to establish CSP and CORS rules.