Details
-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
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.