Allow arbitrary beans to be added to catalog and used in config, initializers, and elsewhere#1109
Merged
duncangrant merged 16 commits intoapache:masterfrom Sep 14, 2020
Conversation
…deep conversion semantics change (semantics pretty much unchanged by this commit, but prepared for an improvement which does change semantics; this is exploring the impact of that change; and adding the tests as WIP for what we plan to add next)
…ys/lists as values were allowed even if their type didn't allow them
…icies and enrichers (now allowing RTs for enrichers as well as policies (always) and initializers (recent commits in this branch))
…s or brooklyn.config can be passed introduces new conveniences in EntityInitializers misc other tidies
shares code, adds support for 'list' and 'map', adds support for generics
aca1f7f to
3fdab4f
Compare
duncangrant
approved these changes
Sep 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the change to instructions in apache/brooklyn-docs#309 and the tests added here.
In short, you can now add arbitrary types and values for their fields to the catalog, and then use those in config and in initializers.
This can be quite useful eg if you have an initializer which adds an effector you want to add in many places, add that initializer to the catalog as a bean, and then simply refer to that type in any initializer block where you want to use it!