brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject [1/2] git commit: Add convenience methods to create addon downloaders
Date Wed, 02 Jul 2014 16:49:13 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 1c04ec92d -> 7ddca7248


Add convenience methods to create addon downloaders


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

Branch: refs/heads/master
Commit: 0b4f08d36ca8b67591943cb77cf0e93ecf50cbb8
Parents: 1c04ec9
Author: Andrew Kennedy <grkvlt@apache.org>
Authored: Wed Jul 2 17:48:15 2014 +0100
Committer: Andrew Kennedy <grkvlt@apache.org>
Committed: Wed Jul 2 17:48:15 2014 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/entity/basic/Entities.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0b4f08d3/core/src/main/java/brooklyn/entity/basic/Entities.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/basic/Entities.java b/core/src/main/java/brooklyn/entity/basic/Entities.java
index c315f15..ec83065 100644
--- a/core/src/main/java/brooklyn/entity/basic/Entities.java
+++ b/core/src/main/java/brooklyn/entity/basic/Entities.java
@@ -728,6 +728,15 @@ public class Entities {
         return internal.getManagementContext().getEntityDownloadsManager().newDownloader(driver,
properties);
     }
 
+    public static DownloadResolver newDownloader(EntityDriver driver, String addon) {
+        return newDownloader(driver, addon, ImmutableMap.<String,Object>of());
+    }
+
+    public static DownloadResolver newDownloader(EntityDriver driver, String addon, Map<String,?>
properties) {
+        EntityInternal internal = (EntityInternal) driver.getEntity();
+        return internal.getManagementContext().getEntityDownloadsManager().newDownloader(driver,
addon, properties);
+    }
+
     public static <T> Supplier<T> attributeSupplier(final Entity entity, final
AttributeSensor<T> sensor) {
         return new Supplier<T>() {
             public T get() { return entity.getAttribute(sensor); }


Mime
View raw message