Skip to content

Commit d956dbd

Browse files
authored
Merge pull request #6505 from ConductionNL/quality/arch-independence-4
refactor(flow,notification): flow nodes take handler contracts; the notifier registers in its own component
2 parents ea6efe4 + 58cd16e commit d956dbd

16 files changed

Lines changed: 49 additions & 35 deletions

‎lib/Flow/DossiqTxBesluitvormingPublishNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\BesluitvormingPublishHandler;
20+
use OCA\Dossiq\Kernel\Contracts\BesluitvormingPublishHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -36,14 +36,14 @@ class DossiqTxBesluitvormingPublishNode extends DossiqTransitionNode {
3636
/**
3737
* Constructor.
3838
*
39-
* @param BesluitvormingPublishHandler $handler The transition handler this node runs.
39+
* @param BesluitvormingPublishHandlerInterface $handler The transition handler this node runs.
4040
* @param IL10N $l10n The localisation service.
4141
* @param IURLGenerator $urls The URL generator.
4242
*
4343
* @return void
4444
*/
4545
public function __construct(
46-
private readonly BesluitvormingPublishHandler $handler,
46+
private readonly BesluitvormingPublishHandlerInterface $handler,
4747
IL10N $l10n,
4848
IURLGenerator $urls,
4949
) {

‎lib/Flow/DossiqTxCreateSubCaseNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\CreateSubCaseHandler;
20+
use OCA\Dossiq\Kernel\Contracts\CreateSubCaseHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -36,14 +36,14 @@ class DossiqTxCreateSubCaseNode extends DossiqTransitionNode {
3636
/**
3737
* Constructor.
3838
*
39-
* @param CreateSubCaseHandler $handler The transition handler this node runs.
39+
* @param CreateSubCaseHandlerInterface $handler The transition handler this node runs.
4040
* @param IL10N $l10n The localisation service.
4141
* @param IURLGenerator $urls The URL generator.
4242
*
4343
* @return void
4444
*/
4545
public function __construct(
46-
private readonly CreateSubCaseHandler $handler,
46+
private readonly CreateSubCaseHandlerInterface $handler,
4747
IL10N $l10n,
4848
IURLGenerator $urls,
4949
) {

‎lib/Flow/DossiqTxCreateTaskNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\CreateTaskHandler;
20+
use OCA\Dossiq\Kernel\Contracts\CreateTaskHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -36,14 +36,14 @@ class DossiqTxCreateTaskNode extends DossiqTransitionNode {
3636
/**
3737
* Constructor.
3838
*
39-
* @param CreateTaskHandler $handler The transition handler this node runs.
39+
* @param CreateTaskHandlerInterface $handler The transition handler this node runs.
4040
* @param IL10N $l10n The localisation service.
4141
* @param IURLGenerator $urls The URL generator.
4242
*
4343
* @return void
4444
*/
4545
public function __construct(
46-
private readonly CreateTaskHandler $handler,
46+
private readonly CreateTaskHandlerInterface $handler,
4747
IL10N $l10n,
4848
IURLGenerator $urls,
4949
) {

‎lib/Flow/DossiqTxSendMessageNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\SendTemplateMessageHandler;
20+
use OCA\Dossiq\Kernel\Contracts\SendTemplateMessageHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -35,14 +35,14 @@ class DossiqTxSendMessageNode extends DossiqTransitionNode {
3535
/**
3636
* Constructor.
3737
*
38-
* @param SendTemplateMessageHandler $handler The handler this node runs.
38+
* @param SendTemplateMessageHandlerInterface $handler The handler this node runs.
3939
* @param IL10N $l10n The localisation service.
4040
* @param IURLGenerator $urls The URL generator.
4141
*
4242
* @return void
4343
*/
4444
public function __construct(
45-
private readonly SendTemplateMessageHandler $handler,
45+
private readonly SendTemplateMessageHandlerInterface $handler,
4646
IL10N $l10n,
4747
IURLGenerator $urls,
4848
) {

‎lib/Flow/DossiqTxSetCaseAnswerNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\SetCaseAnswerHandler;
20+
use OCA\Dossiq\Kernel\Contracts\SetCaseAnswerHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -35,14 +35,14 @@ class DossiqTxSetCaseAnswerNode extends DossiqTransitionNode {
3535
/**
3636
* Constructor.
3737
*
38-
* @param SetCaseAnswerHandler $handler The handler this node runs.
38+
* @param SetCaseAnswerHandlerInterface $handler The handler this node runs.
3939
* @param IL10N $l10n The localisation service.
4040
* @param IURLGenerator $urls The URL generator.
4141
*
4242
* @return void
4343
*/
4444
public function __construct(
45-
private readonly SetCaseAnswerHandler $handler,
45+
private readonly SetCaseAnswerHandlerInterface $handler,
4646
IL10N $l10n,
4747
IURLGenerator $urls,
4848
) {

‎lib/Flow/DossiqTxSetStatusNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\SetStatusHandler;
20+
use OCA\Dossiq\Kernel\Contracts\SetStatusHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323
use UnexpectedValueException;
@@ -40,14 +40,14 @@ class DossiqTxSetStatusNode extends DossiqTransitionNode {
4040
/**
4141
* Constructor.
4242
*
43-
* @param SetStatusHandler $handler The transition handler this node runs.
43+
* @param SetStatusHandlerInterface $handler The transition handler this node runs.
4444
* @param IL10N $l10n The localisation service.
4545
* @param IURLGenerator $urls The URL generator.
4646
*
4747
* @return void
4848
*/
4949
public function __construct(
50-
private readonly SetStatusHandler $handler,
50+
private readonly SetStatusHandlerInterface $handler,
5151
IL10N $l10n,
5252
IURLGenerator $urls,
5353
) {

‎lib/Flow/DossiqTxSuspendTermNode.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace OCA\Dossiq\Flow;
1818

1919
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface as TransitionActionHandler;
20-
use OCA\Dossiq\Service\Transitions\SuspendTermHandler;
20+
use OCA\Dossiq\Kernel\Contracts\SuspendTermHandlerInterface;
2121
use OCP\IL10N;
2222
use OCP\IURLGenerator;
2323

@@ -36,14 +36,14 @@ class DossiqTxSuspendTermNode extends DossiqTransitionNode {
3636
/**
3737
* Constructor.
3838
*
39-
* @param SuspendTermHandler $handler The handler this node runs.
39+
* @param SuspendTermHandlerInterface $handler The handler this node runs.
4040
* @param IL10N $l10n The localisation service.
4141
* @param IURLGenerator $urls The URL generator.
4242
*
4343
* @return void
4444
*/
4545
public function __construct(
46-
private readonly SuspendTermHandler $handler,
46+
private readonly SuspendTermHandlerInterface $handler,
4747
IL10N $l10n,
4848
IURLGenerator $urls,
4949
) {

‎lib/Kernel/Contracts/BesluitvormingPublishHandlerInterface.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
namespace OCA\Dossiq\Kernel\Contracts;
2424

25+
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface;
26+
2527
/**
2628
* Contract of BesluitvormingPublishHandler.
2729
*
@@ -33,7 +35,7 @@
3335
*
3436
* @spec exclude Structural contract, no functional requirement.
3537
*/
36-
interface BesluitvormingPublishHandlerInterface {
38+
interface BesluitvormingPublishHandlerInterface extends ActionHandlerInterface {
3739

3840

3941
}//end interface

‎lib/Kernel/Contracts/CreateSubCaseHandlerInterface.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
namespace OCA\Dossiq\Kernel\Contracts;
2424

25+
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface;
26+
2527
/**
2628
* Contract of CreateSubCaseHandler.
2729
*
@@ -33,7 +35,7 @@
3335
*
3436
* @spec exclude Structural contract, no functional requirement.
3537
*/
36-
interface CreateSubCaseHandlerInterface {
38+
interface CreateSubCaseHandlerInterface extends ActionHandlerInterface {
3739

3840

3941
}//end interface

‎lib/Kernel/Contracts/CreateTaskHandlerInterface.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
namespace OCA\Dossiq\Kernel\Contracts;
2424

25+
use OCA\Dossiq\Service\Transitions\ActionHandlerInterface;
26+
2527
/**
2628
* Contract of CreateTaskHandler.
2729
*
@@ -33,7 +35,7 @@
3335
*
3436
* @spec exclude Structural contract, no functional requirement.
3537
*/
36-
interface CreateTaskHandlerInterface {
38+
interface CreateTaskHandlerInterface extends ActionHandlerInterface {
3739

3840

3941
}//end interface

0 commit comments

Comments
 (0)