brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [5/6] brooklyn-server git commit: Added new helper methods for ConfigKeys
Date Mon, 07 Mar 2016 10:42:12 GMT
Added new helper methods for ConfigKeys


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

Branch: refs/heads/master
Commit: b688347f87f2c352e4161caadaa0f969b1a86336
Parents: 50cf857
Author: Andrew Donald Kennedy <andrew.kennedy@cloudsoftcorp.com>
Authored: Thu Mar 3 17:42:31 2016 +0000
Committer: Andrew Donald Kennedy <andrew.kennedy@cloudsoftcorp.com>
Committed: Fri Mar 4 17:58:49 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/core/config/ConfigKeys.java    | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b688347f/core/src/main/java/org/apache/brooklyn/core/config/ConfigKeys.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/config/ConfigKeys.java b/core/src/main/java/org/apache/brooklyn/core/config/ConfigKeys.java
index ecc1ec0..c9bb2f3 100644
--- a/core/src/main/java/org/apache/brooklyn/core/config/ConfigKeys.java
+++ b/core/src/main/java/org/apache/brooklyn/core/config/ConfigKeys.java
@@ -149,6 +149,15 @@ public class ConfigKeys {
         return new BasicConfigKeyOverwriting<T>(parent, newDescription, defaultValue);
     }
 
+
+    public static <T> AttributeSensorAndConfigKey<T, T> newSensorAndConfigKeyWithDefault(AttributeSensorAndConfigKey<T,
T> parent, T defaultValue) {
+        return new BasicAttributeSensorAndConfigKey(parent, defaultValue);
+    }
+
+    public static PortAttributeSensorAndConfigKey newPortSensorAndConfigKeyWithDefault(PortAttributeSensorAndConfigKey
parent, Object defaultValue) {
+        return new PortAttributeSensorAndConfigKey(parent, defaultValue);
+    }
+
     public static <T> ConfigKey<T> newConfigKeyRenamed(String newName, ConfigKey<T>
key) {
         return new BasicConfigKey<T>(key.getTypeToken(), newName, key.getDescription(),
key.getDefaultValue());
     }


Mime
View raw message