Skip to content

Commit f5885d8

Browse files
committed
[Feature Web Browser Edition] implementing the WOPI protocol connectors.
1 parent 3bf2817 commit f5885d8

File tree

26 files changed

+2286
-0
lines changed

26 files changed

+2286
-0
lines changed

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Declare files that will always have LF line endings on checkout.
2+
*.properties text eol=lf
3+
*.gitattributes text eol=lf
4+
*.java text eol=lf
5+
*.jsp text eol=lf
6+
*.html text eol=lf
7+
*.js text eol=lf
8+
*.css text eol=lf
9+
*.htm text eol=lf
10+
*.inc text eol=lf
11+
*.txt text eol=lf
12+
*.xml text eol=lf
13+
*.xsd text eol=lf
14+
*.dtd text eol=lf
15+
*.tld text eol=lf
16+
*.sql text eol=lf

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/.idea
2+
**/target/
3+
**/*.iml
4+
**/*.project
5+
**/*.classpath
6+
**/*.settings/

Jenkinsfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
node {
2+
catchError {
3+
def nexusRepo = 'https://www.silverpeas.org/nexus/content/repositories/snapshots/'
4+
docker.image('silverpeas/silverbuild')
5+
.inside('-u root -v $HOME/.m2/settings.xml:/root/.m2/settings.xml -v $HOME/.m2/settings-security.xml:/root/.m2/settings-security.xml -v $HOME/.gitconfig:/root/.gitconfig -v $HOME/.ssh:/root/.ssh -v $HOME/.gnupg:/root/.gnupg') {
6+
stage('Preparation') {
7+
checkout scm
8+
}
9+
stage('Build') {
10+
sh "mvn clean install -Pdeployment -Djava.awt.headless=true -Dcontext=ci"
11+
}
12+
stage('Deployment') {
13+
// deployment to ensure dependencies on this snapshot version of Silverpeas Core for other
14+
// projects to build downstream. By doing so, we keep clean the local maven repository for
15+
// reproducibility reason
16+
sh "mvn deploy -DaltDeploymentRepository=silverpeas::default::${nexusRepo} -Pdeployment -Djava.awt.headless=true -Dmaven.test.skip=true"
17+
}
18+
}
19+
}
20+
step([$class : 'Mailer',
21+
notifyEveryUnstableBuild: true,
22+
recipients : "miguel.moquillon@silverpeas.org, yohann.chastagnier@silverpeas.org, nicolas.eysseric@silverpeas.org",
23+
sendToIndividuals : true])
24+
}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
A project to centralize the different implementations of the Web Browser Edition in Silverpeas.
2+
Each handled implementation corresponds to a MAVEN module.
3+
4+
# WOPI module
5+
6+
This module provides the connectors working with WEB editor suppliers implementing the WOPI protocol (https://wopi.readthedocs.io/en/latest).
7+
For now, LibreOffice Online is verified.

pom.xml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.silverpeas</groupId>
6+
<artifactId>silverpeas-project</artifactId>
7+
<version>1.5-build210329</version>
8+
</parent>
9+
10+
<artifactId>wbe</artifactId>
11+
<version>1.0-SNAPSHOT</version>
12+
<packaging>pom</packaging>
13+
<name>Silverpeas Web Browser Edition</name>
14+
15+
<scm>
16+
<connection>scm:git:git@github.com:Silverpeas/Silverpeas-WebBrowserEdition.git</connection>
17+
<developerConnection>scm:git:git@github.com:Silverpeas/Silverpeas-WebBrowserEdition.git</developerConnection>
18+
<url>https://github.com/Silverpeas/Silverpeas-WebBrowserEdition</url>
19+
<tag>HEAD</tag>
20+
</scm>
21+
22+
<repositories>
23+
<repository>
24+
<id>Silverpeas</id>
25+
<layout>default</layout>
26+
<name>Silverpeas Repository</name>
27+
<url>https://www.silverpeas.org/nexus/content/groups/silverpeas</url>
28+
<releases>
29+
<enabled>true</enabled>
30+
</releases>
31+
<snapshots>
32+
<enabled>true</enabled>
33+
</snapshots>
34+
</repository>
35+
</repositories>
36+
37+
<pluginRepositories>
38+
<pluginRepository>
39+
<id>Silverpeas</id>
40+
<name>Silverpeas Maven 3.x Repository</name>
41+
<url>https://www.silverpeas.org/nexus/content/groups/silverpeas</url>
42+
</pluginRepository>
43+
</pluginRepositories>
44+
45+
<properties>
46+
<!-- property used by the CI to both deploy a build version and release the next stable version -->
47+
<next.release>1.0</next.release>
48+
<!-- Version of Silverpeas on which it depends -->
49+
<silverpeas.version>6.3-SNAPSHOT</silverpeas.version>
50+
</properties>
51+
52+
<dependencies>
53+
<dependency>
54+
<groupId>javax</groupId>
55+
<artifactId>javaee-api</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>javax.servlet.jsp.jstl</groupId>
59+
<artifactId>javax.servlet.jsp.jstl-api</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.glassfish.web</groupId>
63+
<artifactId>javax.servlet.jsp.jstl</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.apache.httpcomponents</groupId>
67+
<artifactId>httpclient</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.silverpeas.core</groupId>
71+
<artifactId>silverpeas-core-api</artifactId>
72+
<version>${silverpeas.version}</version>
73+
<scope>provided</scope>
74+
</dependency>
75+
<dependency>
76+
<groupId>org.silverpeas.core</groupId>
77+
<artifactId>silverpeas-core</artifactId>
78+
<version>${silverpeas.version}</version>
79+
<scope>provided</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.silverpeas.core</groupId>
83+
<artifactId>silverpeas-core-web</artifactId>
84+
<version>${silverpeas.version}</version>
85+
<scope>provided</scope>
86+
</dependency>
87+
<dependency>
88+
<groupId>org.silverpeas.core</groupId>
89+
<artifactId>silverpeas-core-test</artifactId>
90+
<version>${silverpeas.version}</version>
91+
<scope>test</scope>
92+
<type>jar</type>
93+
</dependency>
94+
<dependency>
95+
<groupId>org.jboss.weld</groupId>
96+
<artifactId>weld-junit5</artifactId>
97+
<scope>test</scope>
98+
</dependency>
99+
</dependencies>
100+
101+
<build>
102+
<plugins>
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-source-plugin</artifactId>
106+
<executions>
107+
<execution>
108+
<id>attach-sources</id>
109+
<phase>verify</phase>
110+
<goals>
111+
<goal>jar-no-fork</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
116+
</plugins>
117+
</build>
118+
119+
<modules>
120+
<module>onlyoffice</module>
121+
<module>wopi</module>
122+
</modules>
123+
124+
</project>

wopi/pom.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (C) 2000 - 2019 Silverpeas
4+
~
5+
~ This program is free software: you can redistribute it and/or modify
6+
~ it under the terms of the GNU Affero General Public License as
7+
~ published by the Free Software Foundation, either version 3 of the
8+
~ License, or (at your option) any later version.
9+
~
10+
~ As a special exception to the terms and conditions of version 3.0 of
11+
~ the GPL, you may redistribute this Program in connection with Free/Libre
12+
~ Open Source Software ("FLOSS") applications as described in Silverpeas's
13+
~ FLOSS exception. You should have received a copy of the text describing
14+
~ the FLOSS exception, and it is also available here:
15+
~ "https://www.silverpeas.org/legal/floss_exception.html"
16+
~
17+
~ This program is distributed in the hope that it will be useful,
18+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
~ GNU Affero General Public License for more details.
21+
~
22+
~ You should have received a copy of the GNU Affero General Public License
23+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
24+
-->
25+
26+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
27+
<modelVersion>4.0.0</modelVersion>
28+
<parent>
29+
<groupId>org.silverpeas</groupId>
30+
<artifactId>wbe</artifactId>
31+
<version>1.0-SNAPSHOT</version>
32+
</parent>
33+
34+
<groupId>org.silverpeas.wbe</groupId>
35+
<artifactId>wopi</artifactId>
36+
<packaging>pom</packaging>
37+
<name>Silverpeas - Web Browser Edition with WOPI protocol</name>
38+
<modules>
39+
<module>wopi-configuration</module>
40+
<module>wopi-war</module>
41+
</modules>
42+
</project>

wopi/wopi-configuration/pom.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (C) 2000 - 2019 Silverpeas
4+
~
5+
~ This program is free software: you can redistribute it and/or modify
6+
~ it under the terms of the GNU Affero General Public License as
7+
~ published by the Free Software Foundation, either version 3 of the
8+
~ License, or (at your option) any later version.
9+
~
10+
~ As a special exception to the terms and conditions of version 3.0 of
11+
~ the GPL, you may redistribute this Program in connection with Free/Libre
12+
~ Open Source Software ("FLOSS") applications as described in Silverpeas's
13+
~ FLOSS exception. You should have received a copy of the text describing
14+
~ the FLOSS exception, and it is also available here:
15+
~ "https://www.silverpeas.org/legal/floss_exception.html"
16+
~
17+
~ This program is distributed in the hope that it will be useful,
18+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
~ GNU Affero General Public License for more details.
21+
~
22+
~ You should have received a copy of the GNU Affero General Public License
23+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
24+
-->
25+
26+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
27+
<modelVersion>4.0.0</modelVersion>
28+
<parent>
29+
<groupId>org.silverpeas.wbe</groupId>
30+
<artifactId>wopi</artifactId>
31+
<version>1.0-SNAPSHOT</version>
32+
</parent>
33+
34+
<groupId>org.silverpeas.wbe.wopi</groupId>
35+
<artifactId>silverpeas-wbe-wopi-configuration</artifactId>
36+
<packaging>jar</packaging>
37+
<name>Silverpeas - Configuration of Web Browser Edition with WOPI protocol</name>
38+
39+
<build>
40+
<resources>
41+
<resource>
42+
<directory>src/main/config</directory>
43+
</resource>
44+
</resources>
45+
<plugins>
46+
<plugin>
47+
<groupId>org.silverpeas.maven</groupId>
48+
<artifactId>silverpeas-ui-compressor-maven-plugin</artifactId>
49+
<executions>
50+
<execution>
51+
<goals>
52+
<goal>jslint</goal>
53+
<goal>compress</goal>
54+
</goals>
55+
</execution>
56+
</executions>
57+
<configuration>
58+
<jswarn>false</jswarn>
59+
<excludes>
60+
<exclude>**/*.min.*</exclude>
61+
<exclude>**/*-min.*</exclude>
62+
<exclude>**/*.min-*</exclude>
63+
<exclude>**/*-min-*</exclude>
64+
</excludes>
65+
</configuration>
66+
</plugin>
67+
</plugins>
68+
</build>
69+
</project>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# Copyright (C) 2000 - 2021 Silverpeas
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# As a special exception to the terms and conditions of version 3.0 of
10+
# the GPL, you may redistribute this Program in connection with Free/Libre
11+
# Open Source Software ("FLOSS") applications as described in Silverpeas's
12+
# FLOSS exception. You should have received a copy of the text describing
13+
# the FLOSS exception, and it is also available here:
14+
# "https://www.silverpeas.org/legal/floss_exception.html"
15+
#
16+
# This program is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
# GNU Affero General Public License for more details.
20+
#
21+
# You should have received a copy of the GNU Affero General Public License
22+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
#
24+
25+
# Permits to enable or not the WOPI exchanges.
26+
wopi.enabled = false
27+
28+
# Permits to enable the lock feature on WOPI exchanges (not necessary with LibreOffice Online).
29+
# For LibreOffice by default
30+
wopi.lock.enabled = false
31+
32+
# Timestamp verification can be done on put file operation. The request header containing the
33+
# timestamp to verify MUST be specified to enable the check.
34+
# For LibreOffice by default
35+
wopi.putFile.timestamp.field = X-LOOL-WOPI-Timestamp
36+
37+
# When timestamp verification is enabled, in case of conflict, a json response is required.
38+
# This parameter MUST contains the entirely JSON response needed by the WOPI client.
39+
# For LibreOffice by default
40+
wopi.putFile.timestamp.conflict.json.response = {"LOOLStatusCode":1010}
41+
42+
# This field name is looked into request headers in order to get an information about a close
43+
# of an editor on a particular file.
44+
# For LibreOffice by default
45+
wopi.client.exit.field=X-LOOL-WOPI-IsExitSave
46+
47+
# The base URL of the WOPI host. If empty, the WOPI host is the Silverpeas's server itself.
48+
# So no need to specify this parameter in most of cases
49+
wopi.host.service.baseUrl =
50+
51+
# The base URL of the WOPI client (LibreOffice Online for example)
52+
wopi.client.baseUrl =
53+
54+
# The path to discover the capabilities of client.
55+
# For LibreOffice by default
56+
wopi.client.discovery.path = /hosting/discovery
57+
58+
# The time to live in hours of the discovery cache
59+
wopi.client.discovery.timeToLive = 12
60+
61+
# The path to access WOPI client administration.
62+
# For LibreOffice by default
63+
wopi.client.admin.path = /loleaflet/dist/admin/admin.html
64+
65+
# Some parts of the user interface can be hidden or shown based or what the integration needs.
66+
# The UI defaults MUST be set on iframe loading.
67+
# In Silverpeas's system, it is done by a hidden input.
68+
# See https://github.com/LibreOffice/online/blob/master/wsd/reference.md#user-interface-modifications
69+
wopi.ui.defaults =
70+
71+
# The name of the hidden input in charge of UI defaults
72+
wopi.ui.defaults.param.name = ui_defaults

0 commit comments

Comments
 (0)