brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/2] incubator-brooklyn git commit: Replaced deprecated constructor
Date Mon, 01 Dec 2014 12:13:30 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master dea4a5195 -> 3f4ac851e


Replaced deprecated constructor

So as not to break usage of deprecated class


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

Branch: refs/heads/master
Commit: 433b55131b5b242642599e21a35ff2f513d158ea
Parents: dea4a51
Author: Duncan Grant <duncan.grant@cloudsoftcorp.com>
Authored: Mon Dec 1 11:25:31 2014 +0000
Committer: Duncan Grant <duncan.grant@cloudsoftcorp.com>
Committed: Mon Dec 1 11:46:43 2014 +0000

----------------------------------------------------------------------
 .../access/PortForwardManagerAuthority.java      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/433b5513/core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java
b/core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java
index 98786e9..a5f16f7 100644
--- a/core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java
+++ b/core/src/main/java/brooklyn/location/access/PortForwardManagerAuthority.java
@@ -19,9 +19,28 @@
 package brooklyn.location.access;
 
 
+import brooklyn.entity.Entity;
+import brooklyn.entity.basic.EntityInternal;
+
 /**
  * @deprecated since 0.7.0; use {@link PortForwardManagerImpl}
  */
 @Deprecated
 public class PortForwardManagerAuthority extends PortForwardManagerImpl {
+    private Entity owningEntity;
+
+    public PortForwardManagerAuthority() {
+    }
+
+    public PortForwardManagerAuthority(Entity owningEntity) {
+        this.owningEntity = owningEntity;
+    }
+
+    protected void onChanged() {
+        if (owningEntity != null) {
+            ((EntityInternal) owningEntity).requestPersist();
+        } else {
+            super.onChanged();
+        }
+    }
 }


Mime
View raw message