brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [01/27] brooklyn-server git commit: remove REST reference to removed method
Date Fri, 30 Jun 2017 14:02:49 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master edfc80e93 -> 69cce32c1


remove REST reference to removed method


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

Branch: refs/heads/master
Commit: 36ffdeeca0ac5290727b3bf5d2a7267664e9638a
Parents: 30292c9
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Fri Jun 16 09:49:44 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Jun 16 09:49:44 2017 +0100

----------------------------------------------------------------------
 .../brooklyn/rest/transform/EntityTransformer.java     | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/36ffdeec/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/transform/EntityTransformer.java
----------------------------------------------------------------------
diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/transform/EntityTransformer.java
b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/transform/EntityTransformer.java
index fcbe671..8a15020 100644
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/transform/EntityTransformer.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/transform/EntityTransformer.java
@@ -32,6 +32,7 @@ import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.objs.SpecParameter;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.render.RendererHints;
+import org.apache.brooklyn.core.typereg.RegisteredTypes;
 import org.apache.brooklyn.rest.domain.EnricherConfigSummary;
 import org.apache.brooklyn.rest.domain.EntityConfigSummary;
 import org.apache.brooklyn.rest.domain.EntitySummary;
@@ -90,19 +91,15 @@ public class EntityTransformer {
                 .put("spec", URI.create(entityUri + "/spec"))
             ;
 
-        if (entity.getIconUrl()!=null)
+        if (RegisteredTypes.getIconUrl(entity)!=null)
             lb.put("iconUrl", URI.create(entityUri + "/icon"));
 
         if (entity.getCatalogItemId() != null) {
             String versionedId = entity.getCatalogItemId();
             URI catalogUri;
-            if (CatalogUtils.looksLikeVersionedId(versionedId)) {
-                String symbolicName = CatalogUtils.getSymbolicNameFromVersionedId(versionedId);
-                String version = CatalogUtils.getVersionFromVersionedId(versionedId);
-                catalogUri = serviceUriBuilder(ub, CatalogApi.class, "getEntity").build(symbolicName,
version);
-            } else {
-                catalogUri = serviceUriBuilder(ub, CatalogApi.class, "getEntity_0_7_0").build(versionedId);
-            }
+            String symbolicName = CatalogUtils.getSymbolicNameFromVersionedId(versionedId);
+            String version = CatalogUtils.getVersionFromVersionedId(versionedId);
+            catalogUri = serviceUriBuilder(ub, CatalogApi.class, "getEntity").build(symbolicName,
version);
             lb.put("catalog", catalogUri);
         }
 


Mime
View raw message