aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DirectEditing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/DirectEditing')
-rw-r--r--lib/public/DirectEditing/ACreateEmpty.php26
-rw-r--r--lib/public/DirectEditing/ACreateFromTemplate.php24
-rw-r--r--lib/public/DirectEditing/ATemplate.php27
-rw-r--r--lib/public/DirectEditing/IEditor.php25
-rw-r--r--lib/public/DirectEditing/IManager.php29
-rw-r--r--lib/public/DirectEditing/IToken.php24
-rw-r--r--lib/public/DirectEditing/RegisterDirectEditorEvent.php25
7 files changed, 28 insertions, 152 deletions
diff --git a/lib/public/DirectEditing/ACreateEmpty.php b/lib/public/DirectEditing/ACreateEmpty.php
index cbb17d5d3e2..6ad499ec760 100644
--- a/lib/public/DirectEditing/ACreateEmpty.php
+++ b/lib/public/DirectEditing/ACreateEmpty.php
@@ -1,26 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use OCP\Files\File;
@@ -29,7 +12,6 @@ use OCP\Files\File;
* @since 18.0.0
*/
abstract class ACreateEmpty {
-
/**
* Unique id for the creator to filter templates
*
@@ -72,6 +54,6 @@ abstract class ACreateEmpty {
* @since 18.0.0
* @param File $file
*/
- public function create(File $file, string $creatorId = null, string $templateId = null): void {
+ public function create(File $file, ?string $creatorId = null, ?string $templateId = null): void {
}
}
diff --git a/lib/public/DirectEditing/ACreateFromTemplate.php b/lib/public/DirectEditing/ACreateFromTemplate.php
index 43a21fdf4e9..e56e9c09cbb 100644
--- a/lib/public/DirectEditing/ACreateFromTemplate.php
+++ b/lib/public/DirectEditing/ACreateFromTemplate.php
@@ -1,33 +1,15 @@
<?php
+
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
/**
* @since 18.0.0
*/
abstract class ACreateFromTemplate extends ACreateEmpty {
-
/**
* List of available templates for the create from template action
*
diff --git a/lib/public/DirectEditing/ATemplate.php b/lib/public/DirectEditing/ATemplate.php
index 82e86e8730e..a70488d8e89 100644
--- a/lib/public/DirectEditing/ATemplate.php
+++ b/lib/public/DirectEditing/ATemplate.php
@@ -1,26 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use JsonSerializable;
@@ -31,7 +14,6 @@ use JsonSerializable;
* @since 18.0.0
*/
abstract class ATemplate implements JsonSerializable {
-
/**
* Return a unique id so the app can identify the template
*
@@ -58,9 +40,8 @@ abstract class ATemplate implements JsonSerializable {
/**
* @since 18.0.0
- * @return array|mixed
*/
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->getId(),
'title' => $this->getTitle(),
diff --git a/lib/public/DirectEditing/IEditor.php b/lib/public/DirectEditing/IEditor.php
index 22ec130aee0..096af1d2a24 100644
--- a/lib/public/DirectEditing/IEditor.php
+++ b/lib/public/DirectEditing/IEditor.php
@@ -3,27 +3,9 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use OCP\AppFramework\Http\Response;
@@ -32,7 +14,6 @@ use OCP\AppFramework\Http\Response;
* @since 18.0.0
*/
interface IEditor {
-
/**
* Return a unique identifier for the editor
*
@@ -89,7 +70,7 @@ interface IEditor {
* Return a template response for displaying the editor
*
* open can only be called once when the client requests the editor with a one-time-use token
- * For handling editing and later requests, editors need to impelement their own token handling and take care of invalidation
+ * For handling editing and later requests, editors need to implement their own token handling and take care of invalidation
*
* This behavior is similar to the current direct editing implementation in collabora where we generate a one-time token and switch over to the regular wopi token for the actual editing/saving process
*
diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php
index ce39d014193..dcc3493bcf2 100644
--- a/lib/public/DirectEditing/IManager.php
+++ b/lib/public/DirectEditing/IManager.php
@@ -3,27 +3,9 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use OCP\AppFramework\Http\Response;
@@ -36,7 +18,6 @@ use RuntimeException;
* @since 18.0.0
*/
interface IManager {
-
/**
* Register a new editor
*
@@ -92,4 +73,10 @@ interface IManager {
* @return bool
*/
public function isEnabled(): bool;
+
+ /**
+ * @since 24.0.0
+ * @return IEditor[]
+ */
+ public function getEditors(): array;
}
diff --git a/lib/public/DirectEditing/IToken.php b/lib/public/DirectEditing/IToken.php
index 511b12d4aed..64abbf939f4 100644
--- a/lib/public/DirectEditing/IToken.php
+++ b/lib/public/DirectEditing/IToken.php
@@ -1,26 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use OCP\Files\File;
@@ -30,7 +13,6 @@ use OCP\Files\NotFoundException;
* @since 18.0.0
*/
interface IToken {
-
/**
* Extend the token validity time
*
diff --git a/lib/public/DirectEditing/RegisterDirectEditorEvent.php b/lib/public/DirectEditing/RegisterDirectEditorEvent.php
index cce9649ce0d..cbf9b07185d 100644
--- a/lib/public/DirectEditing/RegisterDirectEditorEvent.php
+++ b/lib/public/DirectEditing/RegisterDirectEditorEvent.php
@@ -1,27 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\DirectEditing;
use OCP\EventDispatcher\Event;
@@ -32,7 +14,6 @@ use OCP\EventDispatcher\Event;
* @since 18.0.0
*/
class RegisterDirectEditorEvent extends Event {
-
/**
* @var IManager
*/