brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [01/16] incubator-brooklyn git commit: Move HasBrooklynManagementContext to o.a.b.core.mgmt
Date Thu, 20 Aug 2015 12:39:39 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master d70091b0c -> 0c2405808


Move HasBrooklynManagementContext to o.a.b.core.mgmt

- Was previously in o.a.b.camp.brooklyn.api, in the core module

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

Branch: refs/heads/master
Commit: 8e439bdb398e12d12c4c7d5aeff31497207be742
Parents: 147f9ec
Author: Aled Sage <aled.sage@gmail.com>
Authored: Thu Aug 20 10:47:38 2015 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Thu Aug 20 10:47:38 2015 +0100

----------------------------------------------------------------------
 .../api/HasBrooklynManagementContext.java       | 27 -----------------
 .../core/mgmt/HasBrooklynManagementContext.java | 31 ++++++++++++++++++++
 .../core/objs/BasicConfigurableObject.java      |  2 +-
 .../camp/brooklyn/BrooklynCampPlatform.java     |  2 +-
 .../BrooklynAssemblyTemplateInstantiator.java   |  2 +-
 .../platform/BrooklynImmutableCampPlatform.java |  2 +-
 .../lite/CampPlatformWithJustBrooklynMgmt.java  |  2 +-
 .../test/lite/TestAppAssemblyInstantiator.java  |  2 +-
 8 files changed, 37 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/core/src/main/java/org/apache/brooklyn/camp/brooklyn/api/HasBrooklynManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/camp/brooklyn/api/HasBrooklynManagementContext.java
b/core/src/main/java/org/apache/brooklyn/camp/brooklyn/api/HasBrooklynManagementContext.java
deleted file mode 100644
index 9523a16..0000000
--- a/core/src/main/java/org/apache/brooklyn/camp/brooklyn/api/HasBrooklynManagementContext.java
+++ /dev/null
@@ -1,27 +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 org.apache.brooklyn.camp.brooklyn.api;
-
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-
-public interface HasBrooklynManagementContext {
-
-    public ManagementContext getBrooklynManagementContext();
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/core/src/main/java/org/apache/brooklyn/core/mgmt/HasBrooklynManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/HasBrooklynManagementContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/HasBrooklynManagementContext.java
new file mode 100644
index 0000000..2048c9e
--- /dev/null
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/HasBrooklynManagementContext.java
@@ -0,0 +1,31 @@
+/*
+ * 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.core.mgmt;
+
+import org.apache.brooklyn.api.mgmt.ManagementContext;
+
+/**
+ * Provides a generic way to obtain a {@link ManagementContext}, which things can implement.

+ * The intent is to reduce coupling between components by only referring to this interface.
+ */
+public interface HasBrooklynManagementContext {
+
+    public ManagementContext getBrooklynManagementContext();
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java
b/core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java
index 5197be6..18b7d85 100644
--- a/core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java
+++ b/core/src/main/java/org/apache/brooklyn/core/objs/BasicConfigurableObject.java
@@ -22,10 +22,10 @@ import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.api.mgmt.Task;
 import org.apache.brooklyn.api.objs.Configurable;
 import org.apache.brooklyn.api.objs.Identifiable;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.config.ConfigMap;
 import org.apache.brooklyn.config.ConfigKey.HasConfigKey;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 import org.apache.brooklyn.core.mgmt.ManagementContextInjectable;
 import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.apache.brooklyn.util.core.flags.SetFromFlag;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java
b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java
index e774300..bc6a9fd 100644
--- a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java
+++ b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/BrooklynCampPlatform.java
@@ -22,12 +22,12 @@ import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.api.mgmt.ManagementContext.PropertiesReloadListener;
 import org.apache.brooklyn.camp.AggregatingCampPlatform;
 import org.apache.brooklyn.camp.CampPlatform;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.camp.brooklyn.spi.creation.BrooklynEntityMatcher;
 import org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslInterpreter;
 import org.apache.brooklyn.camp.brooklyn.spi.platform.BrooklynImmutableCampPlatform;
 import org.apache.brooklyn.camp.spi.PlatformRootSummary;
 import org.apache.brooklyn.core.internal.BrooklynProperties;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 
 /** {@link CampPlatform} implementation which includes Brooklyn entities 
  * (via {@link BrooklynImmutableCampPlatform})

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
index eff9c4f..63fa664 100644
--- a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
+++ b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/creation/BrooklynAssemblyTemplateInstantiator.java
@@ -34,7 +34,6 @@ import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.camp.CampPlatform;
 import org.apache.brooklyn.camp.brooklyn.BrooklynCampConstants;
 import org.apache.brooklyn.camp.brooklyn.api.AssemblyTemplateSpecInstantiator;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.camp.spi.Assembly;
 import org.apache.brooklyn.camp.spi.AssemblyTemplate;
 import org.apache.brooklyn.camp.spi.AssemblyTemplate.Builder;
@@ -45,6 +44,7 @@ import org.apache.brooklyn.core.catalog.internal.BasicBrooklynCatalog.BrooklynLo
 import org.apache.brooklyn.core.entity.Entities;
 import org.apache.brooklyn.core.catalog.internal.CatalogUtils;
 import org.apache.brooklyn.core.mgmt.EntityManagementUtils;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 import org.apache.brooklyn.core.mgmt.EntityManagementUtils.CreationResult;
 import org.apache.brooklyn.core.mgmt.classloading.BrooklynClassLoadingContext;
 import org.apache.brooklyn.core.mgmt.classloading.JavaBrooklynClassLoadingContext;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/platform/BrooklynImmutableCampPlatform.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/platform/BrooklynImmutableCampPlatform.java
b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/platform/BrooklynImmutableCampPlatform.java
index ba3bd99..0d874bf 100644
--- a/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/platform/BrooklynImmutableCampPlatform.java
+++ b/usage/camp/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/platform/BrooklynImmutableCampPlatform.java
@@ -20,7 +20,6 @@ package org.apache.brooklyn.camp.brooklyn.spi.platform;
 
 import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.camp.CampPlatform;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.camp.brooklyn.spi.lookup.AssemblyBrooklynLookup;
 import org.apache.brooklyn.camp.brooklyn.spi.lookup.AssemblyTemplateBrooklynLookup;
 import org.apache.brooklyn.camp.brooklyn.spi.lookup.PlatformComponentBrooklynLookup;
@@ -36,6 +35,7 @@ import org.apache.brooklyn.camp.spi.PlatformTransaction;
 import org.apache.brooklyn.camp.spi.collection.BasicResourceLookup;
 import org.apache.brooklyn.camp.spi.collection.ResourceLookup;
 import org.apache.brooklyn.camp.spi.collection.ResourceLookup.EmptyResourceLookup;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 
 /** Immutable CAMP platform which reflects things in the underlying Brooklyn system */
 public class BrooklynImmutableCampPlatform extends CampPlatform implements HasBrooklynManagementContext
{

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java
b/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java
index e65d49d..20681a6 100644
--- a/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java
+++ b/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/CampPlatformWithJustBrooklynMgmt.java
@@ -21,8 +21,8 @@ package org.apache.brooklyn.camp.brooklyn.test.lite;
 import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.camp.BasicCampPlatform;
 import org.apache.brooklyn.camp.brooklyn.BrooklynCampConstants;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.core.internal.BrooklynProperties;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 
 public class CampPlatformWithJustBrooklynMgmt extends BasicCampPlatform implements HasBrooklynManagementContext
{
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8e439bdb/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/TestAppAssemblyInstantiator.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/TestAppAssemblyInstantiator.java
b/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/TestAppAssemblyInstantiator.java
index b30d889..dc0c33d 100644
--- a/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/TestAppAssemblyInstantiator.java
+++ b/usage/camp/src/test/java/org/apache/brooklyn/camp/brooklyn/test/lite/TestAppAssemblyInstantiator.java
@@ -25,13 +25,13 @@ import org.apache.brooklyn.api.entity.EntitySpec;
 import org.apache.brooklyn.api.mgmt.ManagementContext;
 import org.apache.brooklyn.camp.CampPlatform;
 import org.apache.brooklyn.camp.brooklyn.api.AssemblyTemplateSpecInstantiator;
-import org.apache.brooklyn.camp.brooklyn.api.HasBrooklynManagementContext;
 import org.apache.brooklyn.camp.spi.AbstractResource;
 import org.apache.brooklyn.camp.spi.Assembly;
 import org.apache.brooklyn.camp.spi.AssemblyTemplate;
 import org.apache.brooklyn.camp.spi.PlatformComponentTemplate;
 import org.apache.brooklyn.camp.spi.collection.ResolvableLink;
 import org.apache.brooklyn.camp.spi.instantiate.BasicAssemblyTemplateInstantiator;
+import org.apache.brooklyn.core.mgmt.HasBrooklynManagementContext;
 import org.apache.brooklyn.core.mgmt.classloading.BrooklynClassLoadingContext;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.core.test.entity.TestEntity;


Mime
View raw message