[MGNLCDEP-107] Allow to check dependencies for more actions than just delete Created: 11/Feb/20  Updated: 12/Feb/20

Status: Open
Project: Content Dependencies
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Šimon Demočko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Currently, module is only usable for checking content dependencies of deleted node. 

The module currently does not support checking dependencies for any other action. Users could want to create their own classes for:

  • dependency aware renaming (renaming a page that is referred to by path, not by id)
  • dependency aware moving (same thing)
  • dependency aware exporting (possibly if exporting data to include)
  • ..?

The name of the class DependencyAwareConfirmationAction suggests such extendability, hiding that it is just for deletion (it extends DeleteNodesConfirmationAction.)

Better API would allow Content Dependencies to be extended for other non-envisioned use cases, making it useful in any broken references situations, which the module name Content Dependencies implies.

Thoughts on architecture

We could rewrite the API to not use inheritance for ConfirmationAction, but rather decoration. This way, we would not have tightly coupled ConfirmationAction -> DeleteNodesConfirmationAction -> DependencyAwareDeletionConfirmationAction, but rather sth like ConfirmationAction that could be decorated with different things to be confirmed on the action. Other option would be to make use of ChainedAction. However, at the moment, the class would probably just execute all ConfirmationAction s at once, resulting in multiple confirmation dialogs on top of each other. Cancelling one would likely not cancel the whole action and would leave the other warnings open.



 Comments   
Comment by Šimon Demočko [ 12/Feb/20 ]

Discussing with Roman and Scot, it appears referring to content by path is very rarely used, which would make the other use cases here somewhat irrelevant (except for export, but that one was made up)

Generated at Mon Feb 12 00:12:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.