Return-Path: X-Original-To: apmail-brooklyn-commits-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6258118173 for ; Wed, 23 Sep 2015 10:51:58 +0000 (UTC) Received: (qmail 69697 invoked by uid 500); 23 Sep 2015 10:51:58 -0000 Delivered-To: apmail-brooklyn-commits-archive@brooklyn.apache.org Received: (qmail 69671 invoked by uid 500); 23 Sep 2015 10:51:58 -0000 Mailing-List: contact commits-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list commits@brooklyn.incubator.apache.org Received: (qmail 69662 invoked by uid 99); 23 Sep 2015 10:51:58 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 10:51:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C27F91A7BB7 for ; Wed, 23 Sep 2015 10:51:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.774 X-Spam-Level: * X-Spam-Status: No, score=1.774 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id bUCI01yu001s for ; Wed, 23 Sep 2015 10:51:54 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 1B1D344478 for ; Wed, 23 Sep 2015 10:51:54 +0000 (UTC) Received: (qmail 69457 invoked by uid 99); 23 Sep 2015 10:51:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Sep 2015 10:51:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 816D4E048E; Wed, 23 Sep 2015 10:51:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aledsage@apache.org To: commits@brooklyn.incubator.apache.org Date: Wed, 23 Sep 2015 10:51:53 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/10] incubator-brooklyn git commit: Move EntityLocal.setDisplayName to Entity 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 Authored: Mon Sep 21 07:57:15 2015 +0100 Committer: Aled Sage 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 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(); }