Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No implementation for onBeforeLinkDelete and onAfterLinkDelete in ValidatingRepositoryEventListener [DATAREST-1424] #1783

Open
spring-projects-issues opened this issue Sep 7, 2019 · 2 comments
Assignees

Comments

@spring-projects-issues
Copy link

Pieter Noyens opened DATAREST-1424 and commented

For some reason, there are no override implementations for the onBeforeLinkDelete and onAfterLinkDelete event handler methods in ValidatingRepositoryEventListener. This is also reflected in the documentation at

https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/core/event/ValidatingRepositoryEventListener.html 

Strange enough, these are the only two methods that are not overridden. Also in the official Spring Data REST Reference, at

https://docs.spring.io/spring-data/rest/docs/current/reference/html/#events

for some reason, the BeforeLinkDeleteEvent and AfterLinkDeleteEvent are not documented.

In practice it means that it is not convenient to trigger a set of validators that are linked to the "beforeLinkDelete" and "afterLinkDelete" event strings.

I can see no reason why there is no implementation, completely similar to the onBeforeLinkSave and onAfterLinkSave methods


Affects: 3.1.10 (Lovelace SR10)

Reference URL: https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/core/event/ValidatingRepositoryEventListener.html

@spring-projects-issues
Copy link
Author

Pieter Noyens commented

Made a working workaround by adding an extra ValidatingRepositoryEventListener class with the additional implementations. Manually registered the beforeLinkDelete and afterLinkDelete events to the appropriate validators, linked to this new class

@spring-projects-issues
Copy link
Author

Chris Midgley commented

I have filed a PR for this at

#373

Please let me know if there is anything I need to do to progress this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants