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

feat: implement before event for asset policy contract definition in their listeners #4035

Closed
wants to merge 11 commits into from

Conversation

suh-rao
Copy link
Contributor

@suh-rao suh-rao commented Mar 21, 2024

What this PR changes/adds

With this change now beforeCreate and beforeUpdate event will be triggered for asset, policy, contract definition entities.
This event will be triggereed before entities gets saved to database.

Why it does that

Currently we have only event which gets triggered after CUD operation successfully performed on databse.
In some scenario it might be necessary to make changes before create or update operation performed on database.

Further notes

In asset, policy and contract definition Listener classes add beforeUpdate and beforeCreate event.
This will triggerred in corresponding service implementation class method create, update before performing DB operation

Linked Issue(s)

Closes #4006

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@suh-rao suh-rao changed the title feat: implement "Before" event for asset, policy, contract definition in their corresponding listener classes feat: implement before event for asset, policy, contract definition in their corresponding listener classes Mar 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 69 lines in your changes are missing coverage. Please review.

Project coverage is 19.09%. Comparing base (7f20ba5) to head (0543d03).
Report is 160 commits behind head on main.

Files Patch % Lines
...dc/connector/service/asset/AssetEventListener.java 0.00% 10 Missing ⚠️
...actdefinition/ContractDefinitionEventListener.java 0.00% 10 Missing ⚠️
...olicydefinition/PolicyDefinitionEventListener.java 0.00% 7 Missing ⚠️
...c/connector/asset/spi/event/AssetBeforeCreate.java 0.00% 5 Missing ⚠️
...c/connector/asset/spi/event/AssetBeforeUpdate.java 0.00% 5 Missing ⚠️
...ractdefinition/ContractDefinitionBeforeCreate.java 0.00% 5 Missing ⚠️
...ractdefinition/ContractDefinitionBeforeUpdate.java 0.00% 5 Missing ⚠️
...policy/spi/event/PolicyDefinitionBeforeCreate.java 0.00% 5 Missing ⚠️
...policy/spi/event/PolicyDefinitionBeforeUpdate.java 0.00% 5 Missing ⚠️
.../edc/connector/service/asset/AssetServiceImpl.java 0.00% 2 Missing ⚠️
... and 5 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4035       +/-   ##
===========================================
- Coverage   71.74%   19.09%   -52.65%     
===========================================
  Files         919      994       +75     
  Lines       18457    20120     +1663     
  Branches     1037     1126       +89     
===========================================
- Hits        13242     3842     -9400     
- Misses       4756    16165    +11409     
+ Partials      459      113      -346     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@suh-rao suh-rao changed the title feat: implement before event for asset, policy, contract definition in their corresponding listener classes feat: implement before event for asset policy contract definition in their corresponding listener classes Mar 25, 2024
@suh-rao suh-rao changed the title feat: implement before event for asset policy contract definition in their corresponding listener classes feat: implement before event for asset policy contract definition in their listeners Mar 25, 2024
Copy link

github-actions bot commented Apr 2, 2024

This pull request is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Apr 2, 2024
Copy link

This pull request was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Open for x days with no activity
Projects
None yet
2 participants