diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/WorkflowEngine/IEntity.php | 8 | ||||
-rw-r--r-- | lib/public/WorkflowEngine/IRuleMatcher.php | 31 |
2 files changed, 39 insertions, 0 deletions
diff --git a/lib/public/WorkflowEngine/IEntity.php b/lib/public/WorkflowEngine/IEntity.php index b8205600498..47e2f102199 100644 --- a/lib/public/WorkflowEngine/IEntity.php +++ b/lib/public/WorkflowEngine/IEntity.php @@ -74,4 +74,12 @@ interface IEntity { */ public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void; + /** + * returns whether the provided user id is allowed to run a flow against + * the known context + * + * @since 18.0.0 + */ + public function isLegitimatedForUserId(string $userId): bool; + } diff --git a/lib/public/WorkflowEngine/IRuleMatcher.php b/lib/public/WorkflowEngine/IRuleMatcher.php index 5569800edb7..fa2359edc09 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,36 @@ 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; } |