diff options
Diffstat (limited to 'lib/public/WorkflowEngine/IManager.php')
-rw-r--r-- | lib/public/WorkflowEngine/IManager.php | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php index cd323a816f3..78fd718ec9e 100644 --- a/lib/public/WorkflowEngine/IManager.php +++ b/lib/public/WorkflowEngine/IManager.php @@ -23,9 +23,6 @@ namespace OCP\WorkflowEngine; - -use OCP\Files\Storage\IStorage; - /** * Interface IManager * @@ -33,18 +30,40 @@ use OCP\Files\Storage\IStorage; * @since 9.1 */ interface IManager { + + const SCOPE_ADMIN = 0; + const SCOPE_USER = 1; + + const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations'; + const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities'; + const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks'; + + /** + * Listen to `\OCP\WorkflowEngine::EVENT_NAME_REG_ENTITY` at the + * EventDispatcher for registering your entities. + * + * @since 18.0.0 + */ + public function registerEntity(IEntity $entity): void; + + /** + * Listen to `\OCP\WorkflowEngine::EVENT_NAME_REG_OPERATION` at the + * EventDispatcher for registering your operators. + * + * @since 18.0.0 + */ + public function registerOperation(IOperation $operator): void; + /** - * @param IStorage $storage - * @param string $path - * @since 9.1 + * Listen to `\OCP\WorkflowEngine::EVENT_NAME_REG_CHECK` at the + * EventDispatcher for registering your operators. + * + * @since 18.0.0 */ - public function setFileInfo(IStorage $storage, $path); + public function registerCheck(ICheck $check): void; /** - * @param string $class - * @param bool $returnFirstMatchingOperationOnly - * @return array - * @since 9.1 + * @since 18.0.0 */ - public function getMatchingOperations($class, $returnFirstMatchingOperationOnly = true); + public function getRuleMatcher(): IRuleMatcher; } |