brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [07/28] brooklyn-server git commit: comments on parameter/config inheritance/merging
Date Wed, 15 Feb 2017 18:31:00 GMT
comments on parameter/config inheritance/merging


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/944757ce
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/944757ce
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/944757ce

Branch: refs/heads/master
Commit: 944757ce916c3d70f84612ec26a647c1fe3865c2
Parents: 5c6c721
Author: Alex Heneveld <alex@Alexs-MacBook-Pro.local>
Authored: Fri Dec 2 09:17:01 2016 +0000
Committer: Alex Heneveld <alex@Alexs-MacBook-Pro.local>
Committed: Tue Dec 6 10:05:21 2016 +0000

----------------------------------------------------------------------
 .../spi/creation/BrooklynComponentTemplateResolver.java        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/944757ce/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
index e968792..6e1bede 100644
--- a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
+++ b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynComponentTemplateResolver.java
@@ -391,6 +391,9 @@ public class BrooklynComponentTemplateResolver {
         // relying on ordering. We should also respect the ordered returned by 
         // EntityDynamicType.getConfigKeys, which is much better (it respects `BasicConfigKeyOverwriting`

         // etc).
+    	//  Or rather if the parameter fields are incomplete they might be merged with those
defined 
+    	// on the type (eg description, default value) or ancestor, so that it isn't necessary
for users
+    	// to re-declare those in a parameter definition, just anything they wish to overwrite.
         // 
         // However, that is hard/fiddly because of the way a config key can be referenced
by
         // its real name or flag-name.
@@ -404,7 +407,8 @@ public class BrooklynComponentTemplateResolver {
         //
         // I plan to propose a change on dev@brooklyn, to replace `@SetFromFlag`!
         
-        Set<FlagConfigKeyAndValueRecord> allKeys = MutableSet.of();
+    	// need to de-dupe? (can't use Set bc FCKVR doesn't impl equals/hashcode)
+        List<FlagConfigKeyAndValueRecord> allKeys = MutableList.of();
         allKeys.addAll(FlagUtils.findAllParameterConfigKeys(spec.getParameters(), bagFlags));
         if (spec.getImplementation() != null) {
             allKeys.addAll(FlagUtils.findAllFlagsAndConfigKeys(null, spec.getImplementation(),
bagFlags));


Mime
View raw message