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

Revise architecture around exporting properties #52

Closed
ljacqu opened this issue Jan 14, 2018 · 2 comments
Closed

Revise architecture around exporting properties #52

ljacqu opened this issue Jan 14, 2018 · 2 comments
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Jan 14, 2018

I want to rewrite how property types and exporting is handled by ConfigMe.

We avoid doing anything YAML-specific in Property itself because it should be format-agnostic, but this means that specific property types are referenced in the YAML classes. This is not portable since any other format implementation will have to do the same... What would be better is to have a new method on Property that defines the Java type of what gets exported.

@ljacqu ljacqu changed the title Revise architecture Revise architecture around exporting properties Jan 14, 2018
@ljacqu
Copy link
Member Author

ljacqu commented Jan 26, 2018

One idea to make things a little faster is to keep a "register" (?) of values by property. If we validate that no properties overlap (#24) there's no reason why we couldn't read values from the YAML once and then keep everything typed somewhere, instead of going through the YML resource's map every time and performing type checks / conversion etc.

This changes behavior insofar that a bean property (or any other immutable values) would immediately be changed when an object is retrieved and altered. Right now it's necessary to again set the property to the given value.

@ljacqu
Copy link
Member Author

ljacqu commented Aug 5, 2018

Done within #56: on the Property interface we now have a method toExportValue() that should translate its value to simple types of String / Number, and lists/maps of the aforementioned types. More details will be provided once #56 is resolved.

@ljacqu ljacqu closed this as completed Aug 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant