GitHub user neykov opened a pull request:
https://github.com/apache/brooklyn-server/pull/486
DSL mixins/facade wrappers
Allows us to call custom DSL methods on any object we are interested in
without the object knowing about DSL. Also lets us do chaining.
For example:
```
attributeWhenReady("targetSensor").attributeWhenReady("mySensor")
attributeWhenReady("anyBrooklynObject").config("myConfig")
```
Builds on https://github.com/apache/brooklyn-server/pull/482
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/neykov/brooklyn-server dsl-mixins
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/486.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #486
----
commit 2e0ee180db8713a8251c68538a63550c2c29a537
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-08T09:27:04Z
Basic coverage of DSL YAML parsing and evaluation
commit d71141ef995351ff172ade6e00f6f251a4479ee9
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-08T10:29:51Z
Deferred DSL evaluation, allowing for chaining
commit 498a58c05766374f2fa6484432122b766c1b3ef7
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-12T14:38:31Z
Deprecate BDC.Functions.RegexReplacer - duplicate of
StringFunctions.RegexReplacer
commit ddfe73361d4fb123c91758c2f48fd722247d54e2
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-12T14:40:57Z
Tighten DSL function origin check, apply on deferred
commit 42bc7c136ec885cc43125edfee86a741793aa64b
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-12T16:02:16Z
Non-recursive ValueResolver
commit e831d75471554f57709f14889c7b0ff78dec6e63
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-12T16:03:35Z
Stop recursive resolving of DSL results on DslCallable
Lets us call methods on DslCallable methods and at the same time resolve
the object if it's the last of the chain.
commit 6607ccbc3adff741c23d1aff7fb13fa9e6e16a8d
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-13T06:52:29Z
Move test objects in the allowed package scope
Fixes tests which expect the DSL evaluated objects to be in the correct
package. Adds tests to verify that objects outside of the package scope are
inaccessible to DSL.
commit eb4ac4c1493a563982c98eb8cbd97e47bf9a6700
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-13T09:11:41Z
Split Reflections.invokeMethodArgs into Method find and Method invoke
Gives more control over what method gets executed.
commit b75b45c77aeb51ee8549ae0aab9f6bf040daa935
Author: Svetoslav Neykov <[email protected]>
Date: 2016-12-13T10:06:30Z
Provide mixins/facade DSL methods
Allows us to call custom DSL methods on any object we are interested in
without the object knowing about DSL.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---