-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat(Event Frame Work): add intermediate superclass for PolicyDefinition Events hierarchy #1915
feat(Event Frame Work): add intermediate superclass for PolicyDefinition Events hierarchy #1915
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1915 +/- ##
=======================================
Coverage 62.78% 62.78%
=======================================
Files 781 782 +1
Lines 16614 16614
Branches 1079 1079
=======================================
Hits 10431 10431
Misses 5732 5732
Partials 451 451
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
||
import org.eclipse.dataspaceconnector.spi.event.EventPayload; | ||
|
||
public class PolicyDefinitionEventPayload extends EventPayload { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about: "Contains data related to policy definition events"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add this additionally to the current information, ok?
public String getPolicyDefinitionId() { | ||
return policyDefinitionId; | ||
} | ||
public static class Payload extends PolicyDefinitionEventPayload { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add documentation
@jimmarino Added the asked documentation. Just give me a feedback if its the way you want it. |
I don't think this is necessarily related to this PR, but the PR highlights an issue: the event class hierarchy seems more complicated than it needs to be. Specifically, there are payload classes, some of which are package level, and others which are inner classes. This contributed to some confusing class hierarchies and a lot of extra classes. @ndr-brt Why can't we flatten the event class structure by keeping payloads in the event? Common fields can be placed on abstract classes and with concrete classes containing the payload data directly. We don't need the ability to partially unwrap events, so wouldn't this make things easier and more concise? We can also move this to a discussion instead of polluting the PR. |
@jimmarino the decision to have the payload separated from the |
So im going to adjust the documentation as you described @jimmarino and push it to the PRs. For the structure you are gonna open a discussion. Are you fine with this @jimmarino and @ndr-brt ? |
Yes I'm fine with it, I would go and merge these "superclass" PRs, then discuss modeling in parallel. |
What this PR changes/adds
Add a 'intermediate' superclass for the Event Payload Classes of the PolicyDefinition classes.
Why it does that
Improve the work with the Event Framework and give the possibility to filter Events on a bigger group of events.
Linked Issue(s)
Closes #1914
Checklist
no-changelog
)