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

Consider Common Type Conversion Service #1025

Open
hantsy opened this issue Jan 25, 2025 · 0 comments
Open

Consider Common Type Conversion Service #1025

hantsy opened this issue Jan 25, 2025 · 0 comments
Labels
EE12 Issues being targetd for Jakarta EE 12

Comments

@hantsy
Copy link

hantsy commented Jan 25, 2025

Currently, Faces, Persistence, Rest, etc., have their converters. I would like to provide a base conversion service.

@FunctionalInterface interface Converter<S,T>{
   T convert(S source);
}

// ConveterRegistry
// ConvertConext/ConvertException
// ConversionService 

Register the conversion between string and basic types/primary types/DateTime types.

  1. To use the common converters, make these specs(Faces, Rest, etc. ) adapt the common conversion service with their converter APIs.
  2. Allow developers to register new converters globally.
  3. Allow developers to customize the conversion of the existing converters.
  4. Also, allow developers to compose spec-related converters as they were, which have a higher order when executing type conversions.
@ivargrimstad ivargrimstad added the EE12 Issues being targetd for Jakarta EE 12 label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE12 Issues being targetd for Jakarta EE 12
Projects
None yet
Development

No branches or pull requests

2 participants