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

Builder interceptor #5578

Closed
Tracked by #5440
trentjeff opened this issue Dec 1, 2022 · 3 comments
Closed
Tracked by #5440

Builder interceptor #5578

trentjeff opened this issue Dec 1, 2022 · 3 comments
Assignees
Labels
4.x Version 4.x declarative Helidon Declarative P3
Milestone

Comments

@trentjeff
Copy link
Member

trentjeff commented Dec 1, 2022

There is a need to optionally intercept a builder before it is built. This is to allow assigning default or overriding values based upon various conditions, perhaps on other attributes, and perhaps using user-defined context/inputs.

Perhaps something like this added to the build method:
builder = interceptor.intercept(builder);

What complicates matters a bit is the interceptor might be a combination of a user-defined interception, or a service/bean-defined interception. The main use case, however, is that the bean interface writer wants to ensure the integrity of the bean values - this is the main use case we should support.

More thought will be needed on how we implement this, through a combination of attributes on the Builder annotation, etc.

@trentjeff trentjeff self-assigned this Dec 1, 2022
@trentjeff trentjeff added this to the 4.0.0 milestone Dec 1, 2022
@trentjeff trentjeff added 4.x Version 4.x declarative Helidon Declarative labels Dec 1, 2022
@m0mus m0mus added the P3 label Dec 1, 2022
@trentjeff
Copy link
Member Author

Reminder to address comments from #5482

@trentjeff
Copy link
Member Author

See #5591

@trentjeff
Copy link
Member Author

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x declarative Helidon Declarative P3
Projects
Archived in project
Development

No branches or pull requests

2 participants