-
Notifications
You must be signed in to change notification settings - Fork 161
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
Remove domain classes #3939
Remove domain classes #3939
Conversation
/request-license-review |
License review requests: After all reviews have concluded, re-run the license-vetting check from the Github Actions web-interface to update its status. Workflow run (with attached summary files): |
0ea8658
to
a83500e
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #3939 +/- ##
=============================================
- Coverage 20.74% 20.57% -0.17%
- Complexity 6 8 +2
=============================================
Files 1951 1916 -35
Lines 41767 41777 +10
Branches 3956 3970 +14
=============================================
- Hits 8664 8596 -68
- Misses 32700 32776 +76
- Partials 403 405 +2
|
7332bd6
to
2b0c919
Compare
03574b9
to
a1663f0
Compare
…e dependencies in the future Signed-off-by: dseurotech <[email protected]>
…y methods Signed-off-by: dseurotech <[email protected]>
… wiring to the ones in the database Signed-off-by: dseurotech <[email protected]>
… included in the equality comparison, as it has no effect at all (and could be removed completely as a property) Signed-off-by: dseurotech <[email protected]>
… and present in the DB Signed-off-by: dseurotech <[email protected]>
Signed-off-by: dseurotech <[email protected]>
a1663f0
to
e2e1439
Compare
Brief description of the PR
This PR replaces cumbersome Domain classes with String constants and moves the declaration of expected Domains to a more flexible DI mechanism.
Related Issue
This PR fixes/closes 3938
Description of the solution adopted
This PR replaces Domain classes with String constants in a Domains utility class in kapua-commons (just to find all instances), and moves the declaration of desired Domains to Guice's Wiring.
Also, a DB populator pattern is introduced - used to programmatically initialise all necessary data once the db tables have been initialized. The first instance of such populators is a class which compares Domains declared in wiring to the ones present in the database, creating the missing one and logging discrepancies.
Any side note on the changes made
Potentially breaking:
org.eclipse.kapua.service.authorization.permission.PermissionFactory#newPermission (all overloads) now take a simple String as first parameter, instead of a Domain.