brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [01/10] incubator-brooklyn git commit: Move EntityLocal.setDisplayName to Entity
Date Wed, 23 Sep 2015 10:51:53 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 93f6f0f6a -> f34f0433b


Move EntityLocal.setDisplayName to Entity


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

Branch: refs/heads/master
Commit: 1a6c4e3f15be543db91fb3dd33d7dc5dea97b683
Parents: 2995471
Author: Aled Sage <aled.sage@gmail.com>
Authored: Mon Sep 21 07:57:15 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Sep 23 10:28:57 2015 +0100

----------------------------------------------------------------------
 api/src/main/java/org/apache/brooklyn/api/entity/Entity.java   | 5 +++++
 .../main/java/org/apache/brooklyn/api/entity/EntityLocal.java  | 6 ------
 .../org/apache/brooklyn/rest/resources/EntityResource.java     | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1a6c4e3f/api/src/main/java/org/apache/brooklyn/api/entity/Entity.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/entity/Entity.java b/api/src/main/java/org/apache/brooklyn/api/entity/Entity.java
index 0e25abb..612ce29 100644
--- a/api/src/main/java/org/apache/brooklyn/api/entity/Entity.java
+++ b/api/src/main/java/org/apache/brooklyn/api/entity/Entity.java
@@ -109,6 +109,11 @@ public interface Entity extends BrooklynObject {
     Collection<Entity> getChildren();
     
     /**
+     * Sets the entity's display name.
+     */
+    void setDisplayName(String displayName);
+
+    /**
      * Sets the parent (i.e. "owner") of this entity. Returns this entity, for convenience.
      *
      * @see #getParent

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1a6c4e3f/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java b/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java
index 7e5e963..b3fa078 100644
--- a/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java
+++ b/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java
@@ -50,12 +50,6 @@ public interface EntityLocal extends Entity {
     // Separate out what is specific to "local jvm", and what is here for an SPI rather than
API.
 
     /**
-     * Sets the entity's display name.
-     * Must be called before the entity is managed.
-     */
-    void setDisplayName(String displayName);
-
-    /**
      * @deprecated since 0.7.0; use {@link #config()}, such as {@code entity.config().set(key,
val)}
      */
     @Deprecated

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1a6c4e3f/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/EntityResource.java
----------------------------------------------------------------------
diff --git a/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/EntityResource.java
b/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/EntityResource.java
index 4ca5add..d1290d2 100644
--- a/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/EntityResource.java
+++ b/usage/rest-server/src/main/java/org/apache/brooklyn/rest/resources/EntityResource.java
@@ -179,7 +179,7 @@ public class EntityResource extends AbstractBrooklynRestResource implements
Enti
 
     @Override
     public Response rename(String application, String entity, String newName) {
-        EntityLocal entityLocal = brooklyn().getEntity(application, entity);
+        Entity entityLocal = brooklyn().getEntity(application, entity);
         entityLocal.setDisplayName(newName);
         return status(Response.Status.OK).build();
     }


Mime
View raw message