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

jocument DDSG features #102

Merged
merged 68 commits into from
May 17, 2022
Merged

jocument DDSG features #102

merged 68 commits into from
May 17, 2022

Conversation

AntonOellerer
Copy link
Contributor

@AntonOellerer AntonOellerer commented Dec 21, 2021

This PR includes the mapping of placeholders and the resolving of futures to be able to interface w/ ddsg internals

Shortcut

@AntonOellerer AntonOellerer added the enhancement New feature or request label Dec 21, 2021
@AntonOellerer AntonOellerer self-assigned this Dec 21, 2021
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch 4 times, most recently from bec84ed to f36aeea Compare December 21, 2021 14:18
@AntonOellerer AntonOellerer changed the title WIP Jocument DDSG features jocument DDSG features Dec 21, 2021
@AntonOellerer AntonOellerer marked this pull request as draft December 21, 2021 14:58
@AntonOellerer AntonOellerer marked this pull request as ready for review December 21, 2021 14:58
@AntonOellerer AntonOellerer changed the title jocument DDSG features WIP jocument DDSG features Dec 21, 2021
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from 8511202 to e22f758 Compare December 21, 2021 16:27
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch 2 times, most recently from 549a91a to 672e2d8 Compare January 28, 2022 13:32
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from 0daaabd to c97a7eb Compare February 15, 2022 12:47
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from a8a637e to 5ae6dde Compare March 15, 2022 14:38
@betorcs betorcs force-pushed the feature/placeholder-mapping branch from f7e1284 to ae20b83 Compare April 12, 2022 23:41
AntonOellerer and others added 12 commits May 9, 2022 13:14
To be able to do more complex operations,
`CustomPlaceholderResolver` is refactored to also
receive the bean of the resolver
…nResolver

Before falling back on the mappings for reflection placeholders we first probe
if the placeholder name can be directly accessed. If so, we resolve it  right
away, otherwise we fallback.
betorcs and others added 12 commits May 9, 2022 14:17
Since we are using SXSSF (streamed xssf), it might be
that we can only refer to cells which are currently
in the buffer and that this implemenation does not
work for very large documents.
To be able to deal with `Optional` values, this
commit adds the resolving of `Optionals` to jocument,
similarly to how `Futures` are resolved.
To be able to resolve properties in optionals
in futures, the optional is resolved from
the resolved future property
To be able to use the `GenerationOptions` formatting
in custom placeholders for resolving single classes,
an additional `tryToFormat` method is added, which
can be used to format any type.
To be able to translate field values, an annotation
is added which marks properties whose value can be
translated via the translation functionality in the
`GeneratorOptions`.
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from 61a3f13 to a2f4003 Compare May 9, 2022 12:25
Due to recursive parent resolving not existing in the
`FutureReflectionResolver`, bugs were uncovered when merging it into the
`ReflectionResolver`.
To fix this, the logic of when and where mapping and recursing into
parents is done has now be changed.
Basically, the flow now is
* can we resolve?
-> if no, map
-> can we resolve?
-> if no, recurse into the parent
quitting if we hit a yes along the way.

Additionally, the mapping is checked when trying to resolve
conditionals.
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from 1a435a2 to 1902036 Compare May 12, 2022 09:58
@AntonOellerer AntonOellerer force-pushed the feature/placeholder-mapping branch from 02b24c7 to 9d930aa Compare May 12, 2022 11:01
@AntonOellerer AntonOellerer changed the title WIP jocument DDSG features jocument DDSG features May 12, 2022
@alexpartsch alexpartsch merged commit 12f4f0e into master May 17, 2022
@alexpartsch alexpartsch deleted the feature/placeholder-mapping branch May 17, 2022 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants