IOperation

interface OCP\WorkflowEngine\IOperation
Interface IOperation
Source:lib/public/WorkflowEngine/IOperation.php#34

Methods

public OCP\WorkflowEngine\IOperation::getDisplayName()
returns a translated name to be presented in the web interface
Example: “Automated tagging” (en), “Aŭtomata etikedado” (eo)
Source:lib/public/WorkflowEngine/IOperation.php#42
Since:18.0.0
public OCP\WorkflowEngine\IOperation::getDescription()
returns a translated, descriptive text to be presented in the web interface.
It should be short and precise.

Example: “Tag based automatic deletion of files after a given time.” (en)
Source:lib/public/WorkflowEngine/IOperation.php#53
Since:18.0.0
public OCP\WorkflowEngine\IOperation::getIcon()
returns the URL to the icon of the operator for display in the web interface.
Usually, the implementation would utilize the `imagePath()` method of the
`\OCP\IURLGenerator` instance and simply return its result.

Example implementation: return $this->urlGenerator->imagePath(‘myApp’, ‘cat.svg’);
Source:lib/public/WorkflowEngine/IOperation.php#65
Since:18.0.0
public OCP\WorkflowEngine\IOperation::isAvailableForScope($scope)
returns whether the operation can be used in the requested scope.
Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At
time of writing these are SCOPE_ADMIN and SCOPE_USER.

For possibly unknown future scopes the recommended behaviour is: if
user scope is permitted, the default behaviour should return `true`,
otherwise `false`.
Source:lib/public/WorkflowEngine/IOperation.php#79
Since:18.0.0
public OCP\WorkflowEngine\IOperation::validateOperation($name, $checks, $operation)
Validates whether a configured workflow rule is valid. If it is not,
an `\UnexpectedValueException` is supposed to be thrown.
Source:lib/public/WorkflowEngine/IOperation.php#88
Throws:\UnexpectedValueException
Since:9.1
public OCP\WorkflowEngine\IOperation::onEvent($eventName, $event, $ruleMatcher)
Is being called by the workflow engine when an event was triggered that
is configured for this operation. An evaluation whether the event
qualifies for this operation to run has still to be done by the
implementor by calling the RuleMatchers getMatchingOperations method
and evaluating the results.
If the implementor is an IComplexOperation, this method will not be
called automatically. It can be used or left as no-op by the implementor.
Source:lib/public/WorkflowEngine/IOperation.php#102
Since:18.0.0