brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [3/9] incubator-brooklyn git commit: fix package name of RelationshipType
Date Mon, 02 Nov 2015 16:43:00 GMT
fix package name of RelationshipType


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

Branch: refs/heads/master
Commit: 4585e2c496a528fe83bcbf2b76bf41603c4fda7c
Parents: 6d00890
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Fri Oct 30 02:50:34 2015 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Oct 30 02:54:07 2015 +0000

----------------------------------------------------------------------
 .../basic/relations/RelationshipType.java       | 38 --------------------
 .../brooklyn/api/objs/BrooklynObject.java       |  3 +-
 .../api/relations/RelationshipType.java         | 38 ++++++++++++++++++++
 .../brooklyn/core/entity/EntityRelations.java   |  3 +-
 .../AbstractBrooklynObjectRebindSupport.java    |  3 +-
 .../mgmt/rebind/dto/MementosGenerators.java     |  3 +-
 .../relations/AbstractBasicRelationSupport.java |  3 +-
 .../relations/ByObjectBasicRelationSupport.java |  3 +-
 .../core/relations/EmptyRelationSupport.java    |  3 +-
 .../core/relations/RelationshipTypes.java       |  4 +--
 .../core/relations/RelationshipTest.java        |  3 +-
 11 files changed, 48 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/api/src/main/java/brooklyn/basic/relations/RelationshipType.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/brooklyn/basic/relations/RelationshipType.java b/api/src/main/java/brooklyn/basic/relations/RelationshipType.java
deleted file mode 100644
index f7d6abb..0000000
--- a/api/src/main/java/brooklyn/basic/relations/RelationshipType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package brooklyn.basic.relations;
-
-import brooklyn.basic.relations.RelationshipType;
-
-
-public interface RelationshipType<SourceType,TargetType> {
-
-    public String getRelationshipTypeName();
-    public Class<SourceType> getSourceType();
-    public Class<TargetType> getTargetType();
-    
-    public String getSourceName();
-    public String getSourceNamePlural();
-
-    public String getTargetName();
-    public String getTargetNamePlural();
-
-    public RelationshipType<TargetType,SourceType> getInverseRelationshipType();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/api/src/main/java/org/apache/brooklyn/api/objs/BrooklynObject.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/objs/BrooklynObject.java b/api/src/main/java/org/apache/brooklyn/api/objs/BrooklynObject.java
index f388bd6..b42bc58 100644
--- a/api/src/main/java/org/apache/brooklyn/api/objs/BrooklynObject.java
+++ b/api/src/main/java/org/apache/brooklyn/api/objs/BrooklynObject.java
@@ -28,14 +28,13 @@ import org.apache.brooklyn.api.entity.Group;
 import org.apache.brooklyn.api.mgmt.SubscriptionContext;
 import org.apache.brooklyn.api.mgmt.SubscriptionHandle;
 import org.apache.brooklyn.api.mgmt.SubscriptionManager;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.api.sensor.Sensor;
 import org.apache.brooklyn.api.sensor.SensorEventListener;
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableMap;
 
-import brooklyn.basic.relations.RelationshipType;
-
 /**
  * Super-type of entity, location, policy and enricher.
  */

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/api/src/main/java/org/apache/brooklyn/api/relations/RelationshipType.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/relations/RelationshipType.java b/api/src/main/java/org/apache/brooklyn/api/relations/RelationshipType.java
new file mode 100644
index 0000000..54162f2
--- /dev/null
+++ b/api/src/main/java/org/apache/brooklyn/api/relations/RelationshipType.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.api.relations;
+
+import org.apache.brooklyn.api.relations.RelationshipType;
+
+
+public interface RelationshipType<SourceType,TargetType> {
+
+    public String getRelationshipTypeName();
+    public Class<SourceType> getSourceType();
+    public Class<TargetType> getTargetType();
+    
+    public String getSourceName();
+    public String getSourceNamePlural();
+
+    public String getTargetName();
+    public String getTargetNamePlural();
+
+    public RelationshipType<TargetType,SourceType> getInverseRelationshipType();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/entity/EntityRelations.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityRelations.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityRelations.java
index 6203f22..d29b80c 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityRelations.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityRelations.java
@@ -28,6 +28,7 @@ import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.api.objs.BrooklynObject;
 import org.apache.brooklyn.api.objs.BrooklynObject.RelationSupport;
 import org.apache.brooklyn.api.policy.Policy;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.core.objs.BrooklynObjectInternal;
 import org.apache.brooklyn.core.relations.AbstractBasicRelationSupport;
 import org.apache.brooklyn.core.relations.RelationshipTypes;
@@ -35,8 +36,6 @@ import org.apache.brooklyn.util.collections.MutableMap;
 
 import com.google.common.annotations.Beta;
 
-import brooklyn.basic.relations.RelationshipType;
-
 /** TODO these relations are not used yet; see issue where this is introduced and email thread
*/
 @Beta
 public class EntityRelations<T extends BrooklynObject> {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/AbstractBrooklynObjectRebindSupport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/AbstractBrooklynObjectRebindSupport.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/AbstractBrooklynObjectRebindSupport.java
index 8c5abdf..114a455 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/AbstractBrooklynObjectRebindSupport.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/AbstractBrooklynObjectRebindSupport.java
@@ -26,6 +26,7 @@ import org.apache.brooklyn.api.mgmt.rebind.RebindSupport;
 import org.apache.brooklyn.api.mgmt.rebind.mementos.Memento;
 import org.apache.brooklyn.api.objs.BrooklynObject;
 import org.apache.brooklyn.api.objs.EntityAdjunct;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.core.entity.EntityRelations;
 import org.apache.brooklyn.core.mgmt.rebind.dto.MementosGenerators;
 import org.apache.brooklyn.core.objs.AbstractBrooklynObject;
@@ -34,8 +35,6 @@ import org.apache.brooklyn.util.text.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import brooklyn.basic.relations.RelationshipType;
-
 public abstract class AbstractBrooklynObjectRebindSupport<T extends Memento> implements
RebindSupport<T> {
 
     private static final Logger LOG = LoggerFactory.getLogger(AbstractBrooklynObjectRebindSupport.class);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java
index f0c08a6..934a8e8 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java
@@ -43,6 +43,7 @@ import org.apache.brooklyn.api.mgmt.rebind.mementos.PolicyMemento;
 import org.apache.brooklyn.api.objs.BrooklynObject;
 import org.apache.brooklyn.api.objs.EntityAdjunct;
 import org.apache.brooklyn.api.policy.Policy;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.api.sensor.AttributeSensor;
 import org.apache.brooklyn.api.sensor.AttributeSensor.SensorPersistenceMode;
 import org.apache.brooklyn.api.sensor.Enricher;
@@ -68,8 +69,6 @@ import com.google.common.base.Function;
 import com.google.common.base.Predicates;
 import com.google.common.collect.Sets;
 
-import brooklyn.basic.relations.RelationshipType;
-
 public class MementosGenerators {
 
     private MementosGenerators() {}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/relations/AbstractBasicRelationSupport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/relations/AbstractBasicRelationSupport.java
b/core/src/main/java/org/apache/brooklyn/core/relations/AbstractBasicRelationSupport.java
index a76d349..14cde82 100644
--- a/core/src/main/java/org/apache/brooklyn/core/relations/AbstractBasicRelationSupport.java
+++ b/core/src/main/java/org/apache/brooklyn/core/relations/AbstractBasicRelationSupport.java
@@ -21,11 +21,10 @@ package org.apache.brooklyn.core.relations;
 import java.util.Set;
 
 import org.apache.brooklyn.api.objs.BrooklynObject;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.core.entity.EntityRelations;
 import org.apache.brooklyn.core.objs.BrooklynObjectInternal.RelationSupportInternal;
 
-import brooklyn.basic.relations.RelationshipType;
-
 /** This abstract impl delegates to {@link EntityRelations} for all changes, routing through
a local backing store.
  * This allows us to make the changes in both directions simultaneously when a relationship
is bi-directional,
  * and should facilitate changing a backing datastore or remote instances when that is supported.

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/relations/ByObjectBasicRelationSupport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/relations/ByObjectBasicRelationSupport.java
b/core/src/main/java/org/apache/brooklyn/core/relations/ByObjectBasicRelationSupport.java
index 5e065c0..7c78e97 100644
--- a/core/src/main/java/org/apache/brooklyn/core/relations/ByObjectBasicRelationSupport.java
+++ b/core/src/main/java/org/apache/brooklyn/core/relations/ByObjectBasicRelationSupport.java
@@ -24,6 +24,7 @@ import java.util.Set;
 
 import org.apache.brooklyn.api.objs.BrooklynObject;
 import org.apache.brooklyn.api.objs.BrooklynObject.RelationSupport;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.util.collections.MutableMap;
 import org.apache.brooklyn.util.collections.MutableSet;
 
@@ -31,8 +32,6 @@ import com.google.common.base.Supplier;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Multimaps;
 
-import brooklyn.basic.relations.RelationshipType;
-
 public class ByObjectBasicRelationSupport<SourceType extends BrooklynObject> extends
AbstractBasicRelationSupport<SourceType> {
 
     DataForBasicRelations<SourceType> data;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/relations/EmptyRelationSupport.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/relations/EmptyRelationSupport.java
b/core/src/main/java/org/apache/brooklyn/core/relations/EmptyRelationSupport.java
index e1e721d..947f4bd 100644
--- a/core/src/main/java/org/apache/brooklyn/core/relations/EmptyRelationSupport.java
+++ b/core/src/main/java/org/apache/brooklyn/core/relations/EmptyRelationSupport.java
@@ -23,10 +23,9 @@ import java.util.Set;
 
 import org.apache.brooklyn.api.objs.BrooklynObject;
 import org.apache.brooklyn.api.objs.BrooklynObject.RelationSupport;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.core.objs.BrooklynObjectInternal.RelationSupportInternal;
 
-import brooklyn.basic.relations.RelationshipType;
-
 public final class EmptyRelationSupport<SourceType extends BrooklynObject> implements
RelationSupportInternal<SourceType> {
 
     final SourceType source;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/main/java/org/apache/brooklyn/core/relations/RelationshipTypes.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/relations/RelationshipTypes.java
b/core/src/main/java/org/apache/brooklyn/core/relations/RelationshipTypes.java
index b358039..1768e46 100644
--- a/core/src/main/java/org/apache/brooklyn/core/relations/RelationshipTypes.java
+++ b/core/src/main/java/org/apache/brooklyn/core/relations/RelationshipTypes.java
@@ -18,9 +18,9 @@
  */
 package org.apache.brooklyn.core.relations;
 
-import com.google.common.base.Objects;
+import org.apache.brooklyn.api.relations.RelationshipType;
 
-import brooklyn.basic.relations.RelationshipType;
+import com.google.common.base.Objects;
 
 public class RelationshipTypes {
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4585e2c4/core/src/test/java/org/apache/brooklyn/core/relations/RelationshipTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/relations/RelationshipTest.java b/core/src/test/java/org/apache/brooklyn/core/relations/RelationshipTest.java
index 5d73652..5f1c2bc 100644
--- a/core/src/test/java/org/apache/brooklyn/core/relations/RelationshipTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/relations/RelationshipTest.java
@@ -19,12 +19,11 @@
 package org.apache.brooklyn.core.relations;
 
 import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.api.relations.RelationshipType;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import brooklyn.basic.relations.RelationshipType;
-
 @Test
 public class RelationshipTest {
 


Mime
View raw message