summaryrefslogtreecommitdiffstats
path: root/lib/public/WorkflowEngine/ICheck.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/WorkflowEngine/ICheck.php')
-rw-r--r--lib/public/WorkflowEngine/ICheck.php35
1 files changed, 25 insertions, 10 deletions
diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php
index 1d4fc966460..f5586e83d51 100644
--- a/lib/public/WorkflowEngine/ICheck.php
+++ b/lib/public/WorkflowEngine/ICheck.php
@@ -2,6 +2,7 @@
/**
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
*
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Morris Jobke <hey@morrisjobke.de>
*
* @license GNU AGPL version 3 or any later version
@@ -23,9 +24,6 @@
namespace OCP\WorkflowEngine;
-
-use OCP\Files\Storage\IStorage;
-
/**
* Interface ICheck
*
@@ -34,13 +32,6 @@ use OCP\Files\Storage\IStorage;
*/
interface ICheck {
/**
- * @param IStorage $storage
- * @param string $path
- * @since 9.1
- */
- public function setFileInfo(IStorage $storage, $path);
-
- /**
* @param string $operator
* @param string $value
* @return bool
@@ -55,4 +46,28 @@ interface ICheck {
* @since 9.1
*/
public function validateCheck($operator, $value);
+
+ /**
+ * returns a list of Entities the checker supports. The values must match
+ * the class name of the entity.
+ *
+ * An empty result means the check is universally available.
+ *
+ * @since 18.0.0
+ */
+ public function supportedEntities(): array;
+
+ /**
+ * returns whether the operation can be used in the requested scope.
+ *
+ * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At
+ * time of writing these are SCOPE_ADMIN and SCOPE_USER.
+ *
+ * For possibly unknown future scopes the recommended behaviour is: if
+ * user scope is permitted, the default behaviour should return `true`,
+ * otherwise `false`.
+ *
+ * @since 18.0.0
+ */
+ public function isAvailableForScope(int $scope): bool;
}