aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/WorkflowEngine/IRuleMatcher.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-28 20:49:42 +0100
committerGitHub <noreply@github.com>2019-11-28 20:49:42 +0100
commite5c95eed69a1d5e96b69147e4e7f6e40d21c8f9b (patch)
tree9ff9cc93aab5354763c9cc4ce4e0304f9a05458d /lib/public/WorkflowEngine/IRuleMatcher.php
parent29bdaf735be1a5ae281c1945822d8881354ccbd3 (diff)
parent2d34274c8a3b2f85f2c6e1b18c8a06fbbacf932c (diff)
downloadnextcloud-server-e5c95eed69a1d5e96b69147e4e7f6e40d21c8f9b.tar.gz
nextcloud-server-e5c95eed69a1d5e96b69147e4e7f6e40d21c8f9b.zip
Merge pull request #18134 from nextcloud/enh/noid/flow-extend-scope
allow user flows when the acting user is legitimate, but not its owner
Diffstat (limited to 'lib/public/WorkflowEngine/IRuleMatcher.php')
-rw-r--r--lib/public/WorkflowEngine/IRuleMatcher.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/public/WorkflowEngine/IRuleMatcher.php b/lib/public/WorkflowEngine/IRuleMatcher.php
index 5569800edb7..28abaa56137 100644
--- a/lib/public/WorkflowEngine/IRuleMatcher.php
+++ b/lib/public/WorkflowEngine/IRuleMatcher.php
@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace OCP\WorkflowEngine;
+use RuntimeException;
+
/**
* Class IRuleMatcher
*
@@ -33,7 +35,45 @@ namespace OCP\WorkflowEngine;
*/
interface IRuleMatcher extends IFileCheck {
/**
+ * This method is left for backwards compatibility and easier porting of
+ * apps. Please use 'getFlows' instead (and setOperation if you implement
+ * an IComplexOperation).
+ *
* @since 18.0.0
+ * @deprecated 18.0.0
*/
public function getMatchingOperations(string $class, bool $returnFirstMatchingOperationOnly = true): array;
+
+ /**
+ * @throws RuntimeException
+ * @since 18.0.0
+ */
+ public function getFlows(bool $returnFirstMatchingOperationOnly = true): array;
+
+ /**
+ * this method can only be called once and is typically called by the
+ * Flow engine, unless for IComplexOperations.
+ *
+ * @throws RuntimeException
+ * @since 18.0.0
+ */
+ public function setOperation(IOperation $operation): void;
+
+ /**
+ * this method can only be called once and is typically called by the
+ * Flow engine, unless for IComplexOperations.
+ *
+ * @throws RuntimeException
+ * @since 18.0.0
+ */
+ public function setEntity(IEntity $entity): void;
+
+ /**
+ * returns the entity which might provide more information, depending on
+ * the interfaces it implements
+ *
+ * @return IEntity
+ * @since 18.0.0
+ */
+ public function getEntity(): IEntity;
}