From f0f0a7b43ebc4584f5dd6c0473a57eafbaa190d1 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 29 Aug 2019 12:36:35 +0200 Subject: [PATCH] adds a trigger hint for complex operations Signed-off-by: Arthur Schiwon --- apps/workflowengine/lib/Settings/ASettings.php | 1 + lib/public/WorkflowEngine/IComplexOperation.php | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index 7423c51fd9..1781aaa2f5 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -152,6 +152,7 @@ abstract class ASettings implements ISettings { 'description' => $operator->getDescription(), 'fixedEntity' => $operator instanceof ISpecificOperation ? $operator->getEntityId() : '', 'isComplex' => $operator instanceof IComplexOperation, + 'triggerHint' => $operator instanceof IComplexOperation ? $operator->getTriggerHint() : '', ]; }, $operators); } diff --git a/lib/public/WorkflowEngine/IComplexOperation.php b/lib/public/WorkflowEngine/IComplexOperation.php index f3ba6d014a..63a4ca2460 100644 --- a/lib/public/WorkflowEngine/IComplexOperation.php +++ b/lib/public/WorkflowEngine/IComplexOperation.php @@ -38,6 +38,19 @@ namespace OCP\WorkflowEngine; * * @package OCP\WorkflowEngine * - * @sincee 18.0.0 + * @since 18.0.0 */ -interface IComplexOperation extends IOperation { } +interface IComplexOperation extends IOperation { + + /** + * As IComplexOperation chooses the triggering events itself, a hint has + * to be shown to the user so make clear when this operation is becoming + * active. This method returns such a translated string. + * + * Example: "When a file is accessed" (en) + * + * @since 18.0.0 + */ + public function getTriggerHint(): string; + +}