IManager.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\WorkflowEngine;
  7. /**
  8. * Interface IManager
  9. *
  10. * @since 9.1
  11. */
  12. interface IManager {
  13. /**
  14. * @since 18.0.0
  15. */
  16. public const SCOPE_ADMIN = 0;
  17. /**
  18. * @since 18.0.0
  19. */
  20. public const SCOPE_USER = 1;
  21. /**
  22. * @since 21.0.0
  23. */
  24. public const MAX_CHECK_VALUE_BYTES = 2048;
  25. /**
  26. * @since 21.0.0
  27. */
  28. public const MAX_OPERATION_VALUE_BYTES = 4096;
  29. /**
  30. * Listen to `OCP\WorkflowEngine\Events\RegisterEntitiesEvent` at the
  31. * IEventDispatcher for registering your entities.
  32. *
  33. * @since 18.0.0
  34. */
  35. public function registerEntity(IEntity $entity): void;
  36. /**
  37. * Listen to `OCP\WorkflowEngine\Events\RegisterOperationsEvent` at the
  38. * IEventDispatcher for registering your operators.
  39. *
  40. * @since 18.0.0
  41. */
  42. public function registerOperation(IOperation $operator): void;
  43. /**
  44. * Listen to `OCP\WorkflowEngine\Events\RegisterChecksEvent` at the
  45. * IEventDispatcher for registering your operators.
  46. *
  47. * @since 18.0.0
  48. */
  49. public function registerCheck(ICheck $check): void;
  50. /**
  51. * @since 18.0.0
  52. */
  53. public function getRuleMatcher(): IRuleMatcher;
  54. }