Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2016-04-18 10:21:24 -0400
committerFlorian Waibel2016-04-18 16:44:15 -0400
commitecd568ffe9dc25e538e6944f328b61e5ee6eed80 (patch)
tree94b1de40e2a0346d1d827fb7e7476f554caf2526
parent98c8fa77e970c51d6ca60374fe1156622a849a04 (diff)
downloadorg.eclipse.virgo.kernel-ecd568ffe9dc25e538e6944f328b61e5ee6eed80.tar.gz
org.eclipse.virgo.kernel-ecd568ffe9dc25e538e6944f328b61e5ee6eed80.tar.xz
org.eclipse.virgo.kernel-ecd568ffe9dc25e538e6944f328b61e5ee6eed80.zip
Bug 491918 Updates to Gemini Management 2.0.0.RELEASE
-rw-r--r--build.gradle11
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs3
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml4
-rw-r--r--org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs3
-rw-r--r--org.eclipse.virgo.management.fragment/build.xml9
-rw-r--r--org.eclipse.virgo.management.fragment/ivy.xml22
-rw-r--r--org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java50
-rw-r--r--org.eclipse.virgo.management.fragment/src/test/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslatorTests.java77
-rw-r--r--org.eclipse.virgo.management.fragment/template.mf13
9 files changed, 0 insertions, 192 deletions
diff --git a/build.gradle b/build.gradle
index c365ee57..01c99e20 100644
--- a/build.gradle
+++ b/build.gradle
@@ -402,17 +402,6 @@ project(':kernel:org.eclipse.virgo.shell.command') {
}
}
-project(':kernel:org.eclipse.virgo.management.fragment') {
- dependencies {
- testCompile group: 'org.easymock', name: 'easymock', version: easymockVersion
-
- compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.osgi", version: equinoxVersion, configuration: "compile", ext: "jar"
- compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.equinox.region", version: equinoxRegionVersion, configuration: "compile", ext: "jar"
-
- compile group: "org.eclipse.virgo.mirrored", name: "org.eclipse.gemini.management", version: geminiManagementVersion, configuration: "compile", ext: 'jar'
- }
-}
-
project(':kernel:org.eclipse.virgo.management.console') {
dependencies {
testCompile group: "org.slf4j", name: "slf4j-nop", version: slf4jVersion
diff --git a/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs b/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs
deleted file mode 100644
index 61ee8a9b..00000000
--- a/org.eclipse.virgo.management.fragment/.settings/com.springsource.server.ide.bundlor.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 06 09:06:52 BST 2009
-com.springsource.server.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
-eclipse.preferences.version=1
diff --git a/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml b/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 92aa2909..00000000
--- a/org.eclipse.virgo.management.fragment/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
-</faceted-project>
diff --git a/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs b/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
deleted file mode 100644
index e68da314..00000000
--- a/org.eclipse.virgo.management.fragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Jul 06 16:49:15 BST 2009
-eclipse.preferences.version=1
-org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
diff --git a/org.eclipse.virgo.management.fragment/build.xml b/org.eclipse.virgo.management.fragment/build.xml
deleted file mode 100644
index aaabed2e..00000000
--- a/org.eclipse.virgo.management.fragment/build.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.virgo.management.fragment">
-
- <property name="clover.enforce" value="false"/>
- <property file="${basedir}/../build.properties"/>
- <property file="${basedir}/../build.versions"/>
- <import file="${basedir}/../virgo-build/standard/default.xml"/>
-
-</project>
diff --git a/org.eclipse.virgo.management.fragment/ivy.xml b/org.eclipse.virgo.management.fragment/ivy.xml
deleted file mode 100644
index dfb1c39a..00000000
--- a/org.eclipse.virgo.management.fragment/ivy.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" version="2.0">
-
- <info organisation="org.eclipse.virgo.management" module="${ant.project.name}"/>
-
- <configurations>
- <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
- </configurations>
-
- <publications>
- <artifact name="${ant.project.name}"/>
- <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
- </publications>
-
- <dependencies>
- <dependency org="org.eclipse.gemini" name="org.eclipse.gemini.management" rev="${org.eclipse.gemini.management}" conf="compile->runtime"/>
- <dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.equinox.region" rev="${org.eclipse.equinox.region}" conf="compile->runtime" />
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
- <dependency org="org.easymock" name="com.springsource.org.easymock" rev="${org.easymock}" conf="test->runtime"/>
- </dependencies>
-
-</ivy-module>
diff --git a/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java b/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java
deleted file mode 100644
index c69c293d..00000000
--- a/org.eclipse.virgo.management.fragment/src/main/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.management.fragment;
-
-import java.util.Hashtable;
-
-import javax.management.ObjectName;
-
-import org.eclipse.equinox.region.Region;
-import org.eclipse.equinox.region.RegionDigraph;
-import org.eclipse.gemini.management.ObjectNameTranslator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class VirgoObjectNameTranslator implements ObjectNameTranslator{
-
- private static final String REGION_KEY = "region";
-
- private final String regionName;
-
- public VirgoObjectNameTranslator(BundleContext context) {
- ServiceReference<RegionDigraph> serviceReference = context.getServiceReference(RegionDigraph.class);
- RegionDigraph service = context.getService(serviceReference);
- Region region = service.getRegion(context.getBundle().getBundleId());
- this.regionName = region.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- public ObjectName translate(ObjectName originalName) {
- Hashtable<String, String> keyPropertyList = originalName.getKeyPropertyList();
- keyPropertyList.put(REGION_KEY, regionName);
- try {
- return new ObjectName(originalName.getDomain(), keyPropertyList);
- } catch (Exception e) {
- throw new RuntimeException("Error modifying ObjectName for '" + originalName.getCanonicalName() + "'", e);
- }
- }
-
-}
diff --git a/org.eclipse.virgo.management.fragment/src/test/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslatorTests.java b/org.eclipse.virgo.management.fragment/src/test/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslatorTests.java
deleted file mode 100644
index 8b8c4b4a..00000000
--- a/org.eclipse.virgo.management.fragment/src/test/java/org/eclipse/virgo/management/fragment/VirgoObjectNameTranslatorTests.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.virgo.management.fragment;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.Hashtable;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.easymock.EasyMock;
-import org.eclipse.equinox.region.Region;
-import org.eclipse.equinox.region.RegionDigraph;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class VirgoObjectNameTranslatorTests {
-
- private static final String MOCK_REGION_NAME = "testRegion";
-
- private ObjectName testObjectName;
-
- private ObjectName testObjectNameTranslation;
-
- private BundleContext mockContext;
-
- private ServiceReference<RegionDigraph> mockServiceReference;
-
- private Bundle mockBundle;
-
- private RegionDigraph mockRegionDigraph;
-
- private Region mockRegion;
-
-
- @SuppressWarnings("unchecked")
- @Before
- public void setup() throws MalformedObjectNameException, NullPointerException{
- Hashtable<String, String> table = new Hashtable<String, String>();
- table.put("testKey", "testValue");
- testObjectName = ObjectName.getInstance("testDomain", table);
- table.put("region", MOCK_REGION_NAME);
- testObjectNameTranslation = ObjectName.getInstance("testDomain", table);
- mockContext = EasyMock.createMock(BundleContext.class);
- mockServiceReference = (ServiceReference<RegionDigraph>) EasyMock.createMock(ServiceReference.class);
- mockBundle = EasyMock.createMock(Bundle.class);
- mockRegionDigraph = EasyMock.createMock(RegionDigraph.class);
- mockRegion = EasyMock.createMock(Region.class);
- EasyMock.expect(mockContext.getServiceReference(RegionDigraph.class)).andReturn(mockServiceReference);
- EasyMock.expect(mockContext.getService(mockServiceReference)).andReturn(mockRegionDigraph);
- EasyMock.expect(mockContext.getBundle()).andReturn(mockBundle);
- EasyMock.expect(mockBundle.getBundleId()).andReturn(5l);
- EasyMock.expect(mockRegionDigraph.getRegion(5l)).andReturn(mockRegion);
- EasyMock.expect(mockRegion.getName()).andReturn(MOCK_REGION_NAME);
- }
-
- private void replayMocks() {
- EasyMock.replay(mockContext, mockServiceReference, mockBundle, mockRegionDigraph, mockRegion);
- }
-
- @After
- public void tearDown() {
- EasyMock.verify(mockContext, mockServiceReference, mockBundle, mockRegionDigraph, mockRegion);
- }
-
- @Test
- public void test() {
- replayMocks();
- VirgoObjectNameTranslator virgoObjectNameTranslator = new VirgoObjectNameTranslator(mockContext);
- ObjectName translatedObjectName = virgoObjectNameTranslator.translate(testObjectName);
- assertEquals(testObjectNameTranslation, translatedObjectName);
- }
-
-}
diff --git a/org.eclipse.virgo.management.fragment/template.mf b/org.eclipse.virgo.management.fragment/template.mf
deleted file mode 100644
index 86241942..00000000
--- a/org.eclipse.virgo.management.fragment/template.mf
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Virgo Management Fragment
-Fragment-Host: org.eclipse.gemini.management;bundle-version="${geminiManagementVersion:[=.=.=, =.+1)}"
-Bundle-SymbolicName: org.eclipse.virgo.management.fragment
-Bundle-Version: ${version}
-GeminiManagement-ObjectNameTranslator: org.eclipse.virgo.management.fragment.VirgoObjectNameTranslator
-Import-Package:
- org.eclipse.equinox.region;version="${equinoxRegionVersion:[=.=.=, =.+1)}",
- javax.management;version="0",
- org.osgi.framework;version="0"
-Excluded-Imports: org.eclipse.gemini.management
-Excluded-Exports: *

Back to the top