Merge branch 'master' into 352217-new-admin-console
Conflicts:
org.eclipse.virgo.apps.admin.core/.classpath
org.eclipse.virgo.apps.admin.web/.classpath
diff --git a/build-apps/build.xml b/build-apps/build.xml
index b7ced4d..aaa0264 100644
--- a/build-apps/build.xml
+++ b/build-apps/build.xml
@@ -3,8 +3,7 @@
<path id="unit.test.bundles">
<pathelement location="../org.eclipse.virgo.apps.splash"/>
- <pathelement location="../org.eclipse.virgo.apps.admin.core"/>
- <pathelement location="../org.eclipse.virgo.apps.admin.web"/>
+ <pathelement location="../org.eclipse.virgo.apps.admin"/>
<pathelement location="../org.eclipse.virgo.apps.repository.core"/>
<pathelement location="../org.eclipse.virgo.apps.repository.web"/>
</path>
diff --git a/build-apps/virgo.profile.js b/build-apps/virgo.profile.js
deleted file mode 100644
index e002bdc..0000000
--- a/build-apps/virgo.profile.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// How to build the dojo libary
-// author Christopher Frost (vmware employee)
-
-// The virgo dojo build is run by calling:
-// ./build.sh profile=virgo action=clean,release
-// from the /util/buildscripts directory of dojo source
-
-dependencies = {
- stripConsole: "normal",
-
- layers: [
- {
- name: "virgo-dojo.js",
- dependencies: [
- "dijit.TitlePane",
- "dijit.tree.ForestStoreModel",
- "dijit.Tree",
- "dojox.data.QueryReadStore",
- "dijit.form.Button"
- ]
- }
- ],
-
- prefixes: [
- [ "dijit", "../dijit" ],
- [ "dojox", "../dojox" ]
- ]
-}
-// After running this to produce the required build layers the following can be deleted.
-// ./dojox
-// much more can be deleted but there is no need to do so as it will only mean extra work adding them back in if these features are required later.
\ No newline at end of file
diff --git a/build.versions b/build.versions
index 14e529c..d6452e4 100644
--- a/build.versions
+++ b/build.versions
@@ -22,6 +22,8 @@
org.springframework=3.0.5.RELEASE
org.eclipse.osgi.services=3.3.0.v20110513
org.eclipse.equinox.cm=1.0.300.v20101204
+org.jolokia.osgi=1.0.0
+org.eclipse.gemini.management=1.0.0.M01-incubation
# Test
org.eclipse.virgo.teststubs=3.5.0.D-20120329112850
diff --git a/org.eclipse.virgo.apps.admin.core/.classpath b/org.eclipse.virgo.apps.admin.core/.classpath
deleted file mode 100644
index 5c878ea..0000000
--- a/org.eclipse.virgo.apps.admin.core/.classpath
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path="src/main/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/APPS_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.services/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.services-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.5.0.D-20120403110031/org.eclipse.virgo.kernel.core-3.5.0.D-20120403110031.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.core/2.0.0.D-164/org.eclipse.virgo.kernel.core-sources-2.0.0.D-164.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.deployer-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer.core/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.deployer.core-sources-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.osgi-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.osgi/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.osgi-sources-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120403104609/org.eclipse.virgo.util.common-3.5.0.D-20120403104609.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-3.3.0.v20110513.jar" sourcepath="/APPS_IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.5.0.D-20120403105015/org.eclipse.virgo.teststubs.osgi-3.5.0.D-20120403105015.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.teststubs.osgi/3.5.0.D-20120403105015/org.eclipse.virgo.teststubs.osgi-sources-3.5.0.D-20120403105015.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.shell/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.shell-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.shell/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.shell-sources-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.model/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.model-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.model/2.0.0.D-20091006155952/org.eclipse.virgo.kernel.model-sources-2.0.0.D-20091006155952.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120403104609/org.eclipse.virgo.util.io-3.5.0.D-20120403104609.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120403104609/org.eclipse.virgo.util.osgi.manifest-3.5.0.D-20120403104609.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.artifact/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.artifact-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.5.0.D-20120403110031/org.eclipse.virgo.deployer.api-3.5.0.D-20120403110031.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/org.eclipse.virgo.apps.admin.core/.project b/org.eclipse.virgo.apps.admin.core/.project
deleted file mode 100644
index 0a6f985..0000000
--- a/org.eclipse.virgo.apps.admin.core/.project
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.apps.admin.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.springsource.server.ide.bundlor.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.virgo.apps.admin.core/.settings/org.eclipse.virgo.ide.bundlor.core.prefs b/org.eclipse.virgo.apps.admin.core/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
deleted file mode 100644
index ff53e65..0000000
--- a/org.eclipse.virgo.apps.admin.core/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Dec 07 16:22:36 GMT 2009
-org.eclipse.virgo.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
-eclipse.preferences.version=1
diff --git a/org.eclipse.virgo.apps.admin.core/.settings/org.eclipse.wst.common.project.facet.core.xml b/org.eclipse.virgo.apps.admin.core/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 801f856..0000000
--- a/org.eclipse.virgo.apps.admin.core/.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="com.springsource.server.bundle" version="1.0"/>
-</faceted-project>
diff --git a/org.eclipse.virgo.apps.admin.core/.settings/org.springframework.ide.eclipse.core.prefs b/org.eclipse.virgo.apps.admin.core/.settings/org.springframework.ide.eclipse.core.prefs
deleted file mode 100644
index 5bdb54c..0000000
--- a/org.eclipse.virgo.apps.admin.core/.settings/org.springframework.ide.eclipse.core.prefs
+++ /dev/null
@@ -1,32 +0,0 @@
-#Mon Dec 07 16:22:36 GMT 2009
-eclipse.preferences.version=1
-org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true
-org.springframework.ide.eclipse.core.enable.project.preferences=false
-org.springframework.ide.eclipse.core.validator.enable.com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivationPolicyRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivatorRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleManifestVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.exportPackageRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.importRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.parsingProblemsRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.requireBundleRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false
-org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false
diff --git a/org.eclipse.virgo.apps.admin.core/.springBeans b/org.eclipse.virgo.apps.admin.core/.springBeans
deleted file mode 100644
index 34b281c..0000000
--- a/org.eclipse.virgo.apps.admin.core/.springBeans
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beansProjectDescription>
- <version>1</version>
- <pluginVersion><![CDATA[2.3.0.200912170948-RELEASE]]></pluginVersion>
- <configSuffixes>
- <configSuffix><![CDATA[xml]]></configSuffix>
- </configSuffixes>
- <enableImports><![CDATA[false]]></enableImports>
- <configs>
- </configs>
- <configSets>
- </configSets>
-</beansProjectDescription>
diff --git a/org.eclipse.virgo.apps.admin.core/build.xml b/org.eclipse.virgo.apps.admin.core/build.xml
deleted file mode 100644
index 03c2a83..0000000
--- a/org.eclipse.virgo.apps.admin.core/build.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.virgo.apps.admin.core">
-
- <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.apps.admin.core/ivy.xml b/org.eclipse.virgo.apps.admin.core/ivy.xml
deleted file mode 100644
index 805467e..0000000
--- a/org.eclipse.virgo.apps.admin.core/ivy.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
-<ivy-module
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
- version="1.3">
-
- <info organisation="org.eclipse.virgo.apps" 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>
- <!-- === PROVIDED-COMPILE============================================ -->
- <dependency org="org.eclipse.virgo.nano" name="org.eclipse.virgo.kernel.core" rev="${org.eclipse.virgo.nano}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.nano" name="org.eclipse.virgo.deployer.api" rev="${org.eclipse.virgo.nano}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.model" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.shell" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.osgi.manifest" rev="${org.eclipse.virgo.util}" conf="provided->compile"/>
- <!-- === RUNTIME-DEFAULT =========================================== -->
-
- <!-- === PROVIDED-RUNTIME =========================================== -->
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="provided->runtime"/>
- <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="${org.apache.commons.fileupload}" conf="provided->runtime"/>
- <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.io" rev="${org.apache.commons.io}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.eclipse.gemini" name="org.eclipse.gemini.blueprint.core" rev="${org.eclipse.gemini.blueprint}" conf="provided->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="compile->runtime"/>
- <!-- === TEST ====================================================== -->
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
- <dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
- <dependency org="org.easymock" name="com.springsource.org.easymock" rev="${org.easymock}" conf="test->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
-
- <override org="org.springframework" rev="${org.springframework}"/>
- </dependencies>
-
-</ivy-module>
diff --git a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem1.txt b/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem1.txt
deleted file mode 100644
index 0b00812..0000000
--- a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem1.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Line1
-Line2
-Line3
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem2.foo b/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem2.foo
deleted file mode 100644
index e69de29..0000000
--- a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/dumpItem2.foo
+++ /dev/null
diff --git a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/osgi.zip b/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/osgi.zip
deleted file mode 100644
index a4f59e9..0000000
--- a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithContent/osgi.zip
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithNoContent/.gitignore b/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithNoContent/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/org.eclipse.virgo.apps.admin.core/serviceability/dumps/testDumpWithNoContent/.gitignore
+++ /dev/null
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ArtifactService.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ArtifactService.java
deleted file mode 100644
index 3f1f597..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ArtifactService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.io.File;
-
-/**
- * <code>ApplicationManagerService</code> defines a simple service API for managing applications within the server.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations should be thread-safe.
- *
- */
-public interface ArtifactService {
-
- /**
- * @param stagedFile
- * @return string describing result
- */
- String deploy(File stagedFile);
-
- /**
- * Request a reference to the staging directory where artefacts to be deployed should be placed.
- *
- * @return the staging directory.
- */
- File getStagingDirectory();
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/BundleHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/BundleHolder.java
deleted file mode 100644
index 7710e8b..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/BundleHolder.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.List;
-
-import org.osgi.framework.Bundle;
-
-import org.eclipse.virgo.kernel.module.Component;
-
-/**
- * <p>
- * BundleHolder represents a bundle artifact with Spring information contained within it.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * BundleHolder implementations should be thread safe
- *
- */
-public interface BundleHolder extends Comparable<BundleHolder>{
-
- public Long getBundleId();
-
- public String getSymbolicName();
-
- public String getState();
-
- public String getRegion();
-
- public boolean isResolved();
-
- public String getVersion();
-
- public String getBundleLocation();
-
- public String getSpringName();
-
- public List<Component> getBeans();
-
- public List<ExportedPackageHolder> getExportPackages();
-
- public List<ImportedPackageHolder> getImportPackages();
-
- public List<RequiredBundleHolder> getRequiredBundles();
-
- public List<BundleHolder> getHosts();
-
- public Bundle getRawBundle();
-
- public List<BundleHolder> getFragments();
-
- /**
- * A list of {@link ServiceHolder}s that are published by this {@link BundleHolder}
- * @return list of services
- */
- public List<ServiceHolder> getExportedServices();
-
- /**
- * A list of {@link ServiceHolder}s that are consumed by this {@link BundleHolder}
- * @return list of services
- */
- public List<ServiceHolder> getImportedServices();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpInspectorService.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpInspectorService.java
deleted file mode 100644
index a2ac7a2..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpInspectorService.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * <code>DumpManagerService</code> defines a simple service API for viewing dumps within the server.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations should be thread-safe.
- *
- */
-public interface DumpInspectorService {
-
- /**
- * @return a list of {@link File} of the dumps available for inspection.
- */
- public List<File> findAvaliableDumps();
-
- /**
- * @param dumpID as returned by a call to {@link DumpInspectorService#findAvaliableDumps}.
- * @return list of Strings
- */
- public List<String> getDumpEntries(String dumpID);
-
- /**
- * Read the contents of a dump entry and return it as a string
- * @param dumpID of dump
- * @param entryName in dump
- *
- * @return the raw contents of the requested dump entry as a String
- */
- public String getDumpEntry(String dumpID, String entryName);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpLocator.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpLocator.java
deleted file mode 100644
index a8e1a39..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/DumpLocator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.zip.ZipException;
-
-/**
- * <p>
- * DumpExtractor provides an interface for clients to obtain dump directories.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br/>
- *
- * Implementations of this interface must be thread safe.
- *
- */
-public interface DumpLocator {
-
- /**
- * Returns a dump directory with the given dump name.
- *
- * @param dump name
- * @return the dump directory
- * @throws ZipException when zipping
- * @throws IOException when reading
- */
- public File getDumpDir(String dump) throws ZipException, IOException;
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ExportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ExportedPackageHolder.java
deleted file mode 100644
index bdc4625..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ExportedPackageHolder.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>
- * PackageRelationHolder represents a single mapping of and exported
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations of PackageRelationHolder should be threadsafe
- *
- */
-public interface ExportedPackageHolder {
-
- /**
- *
- * @return the name of the package being exported
- */
- public String getPackageName();
-
- /**
- *
- * @return the <code>Version</code> that the package is exported at as a String.
- */
- public String getVersion();
-
- /**
- *
- * @return the {@link BundleHolder} that provides this <code>ExportedPackageHolder</code>
- */
- public BundleHolder getExportingBundle();
-
- /**
- *
- * @return A list {@link ImportedPackageHolder}s that are consuming this export
- */
- public List<ImportedPackageHolder> getConsumers();
-
- /**
- * Returns the directives for a header.
- *
- * @return a map containing the directives
- */
- Map<String, String> getDirectives();
-
- /**
- * Returns the attributes for a header.
- *
- * @return a map containing the attributes
- */
- Map<String, String> getAttributes();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/FailedResolutionHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/FailedResolutionHolder.java
deleted file mode 100644
index c075761..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/FailedResolutionHolder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-/**
- * <p>
- * FailedResolutionHolder represents the cause of a bundle failing to resovle.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations of FailedResolutionHolder must be thread-safe
- *
- */
-public interface FailedResolutionHolder {
-
- /**
- * Gets a human readable description of the failure.
- *
- * @return a human readable String
- */
- String getDescription();
-
- /**
- * Gets the unresolved {@link BundleHolder}.
- *
- * @return the unresolved <code>BundleHolder</code>
- */
- BundleHolder getUnresolvedBundle();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ImportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ImportedPackageHolder.java
deleted file mode 100644
index acf7b5b..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ImportedPackageHolder.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.Map;
-
-/**
- * <p>
- * PackageRelationHolder represents a single mapping of and exported
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations of PackageRelationHolder should be threadsafe
- *
- */
-public interface ImportedPackageHolder {
-
- /**
- * The name of the package being imported.
- *
- * @return The package name
- */
- public String getPackageName();
-
- /**
- * The version range that the exporting package must be within to satisfy this <code>ImportedPackageHolder</code>.
- *
- * @return The VersionRange constraint as a String
- */
- public String getVersionConstraint();
-
- /**
- * Returns whether or not this import is resolved.
- *
- * @return true if this import is resolved
- */
- public boolean isResolved();
-
- /**
- * If this import is resolved, return the {@link ExportedPackageHolder} that satisfies it. If this import is not
- * resolved or if it is resolved but is an optional import that was not satisfied, return null.
- *
- * @return The <code>ExportedPackageHolder</code> that satisfies this import.
- */
- public ExportedPackageHolder getProvider();
-
- /**
- * The {@link BundleHolder} that specifies this import package.
- *
- * @return The specifying <code>BundleHolder</code>.
- */
- public BundleHolder getImportingBundle();
-
- /**
- * Returns the directives for a header.
- *
- * @return a map containing the directives
- */
- Map<String, String> getDirectives();
-
- /**
- * Returns the attributes for a header.
- *
- * @return a map containing the attributes
- */
- Map<String, String> getAttributes();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/PackagesCollection.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/PackagesCollection.java
deleted file mode 100644
index 51e02a6..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/PackagesCollection.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.List;
-
-/**
- * <p>
- * PackagesCollection holds an exclusive collection of packages sorted by imports and exports.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * PackagesCollection implementations should be thread-safe
- *
- */
-public interface PackagesCollection {
-
-
- /**
- * The name of the package this {@link PackagesCollection} represents.
- * Will never be null.
- *
- * @return packageName
- */
- public String getPackageName();
-
- /**
- * A list of all the {@link ImportedPackageHolder}s that are imports of this package.
- *
- * @return list of imports
- */
- public List<ImportedPackageHolder> getImported();
-
- /**
- * A list of all the {@link ExportedPackageHolder}s that are exports of this package.
- *
- * @return list of exports
- */
- public List<ExportedPackageHolder> getExported();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/RequiredBundleHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/RequiredBundleHolder.java
deleted file mode 100644
index 90c8cf2..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/RequiredBundleHolder.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.Map;
-
-/**
- * <p>
- * RequiredBundleHolder represents a requirement from one bundle to another.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * RequiredBundleHolder implementations should be thread-safe
- *
- */
-public interface RequiredBundleHolder {
-
- /**
- * If this require bundle is resolved, return any specific {@link BundleHolder} that satisfies it. If this require
- * bundle is not resolved or if it is resolved but is optional and was not satisfied, return null.
- *
- * @return any <code>BundleHolder</code> that satisfies this <code>RequiredBundleHolder</code>
- */
- public BundleHolder getProvider();
-
- /**
- * @return The symbolic name of the Bundle required.
- */
- public String getRequiredBundleName();
-
- /**
- * The version range that must be satisfied by any matching bundles.
- *
- * @return the <code>VersionRange</code> constraint as a String
- */
- public String getVersionConstraint();
-
- /**
- * Returns whether this require bundle is resolved.
- *
- * @return true if this require bundle is resolved
- */
- public boolean isResolved();
-
- /**
- * Returns the directives for a header.
- *
- * @return a map containing the directives
- */
- Map<String, String> getDirectives();
-
- /**
- * Returns the attributes for a header.
- *
- * @return a map containing the attributes
- */
- Map<String, String> getAttributes();
-
- /**
- * The {@link BundleHolder} that specifies this <code>RequiredBundleHolder</code> clause.
- *
- * @return The requiring QuasiBundle
- */
- public BundleHolder getRequiringBundle();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ServiceHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ServiceHolder.java
deleted file mode 100644
index 69870f2..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/ServiceHolder.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>
- * ServiceHolder represents a single service within OSGi. It will have a single provider and zero to many consumers.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations of ServiceHolder should be thread-safe
- *
- */
-public interface ServiceHolder extends Comparable<ServiceHolder> {
-
- /**
- * Return the Id of this service within OSGi.
- *
- * @return long service Id
- */
- long getServiceId();
-
- String getFormattedObjectClass();
-
- /**
- * A list of {@link BundleHolder}s of bundles that use the service of this {@link ServiceHolder}.
- *
- * @return List of <code>QuasiLiveBundle</code>s that are using this service
- */
- List<BundleHolder> getConsumers();
-
- /**
- * The {@link BundleHolder} of a bundle that provides the service of this {@link ServiceHolder}.
- *
- * @return <code>BundleHolder</code> of bundle that registered this service
- */
- BundleHolder getProvider();
-
- /**
- * A map of the Service's properties.
- *
- * @return The service's properties
- */
- Map<String, String> getProperties();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/StateHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/StateHolder.java
deleted file mode 100644
index a6714b1..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/StateHolder.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core;
-
-import java.util.List;
-
-/**
- * <p>
- * <code>StateInspectorService</code>
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations should be thread-safe.
- *
- */
-public interface StateHolder {
-
- /**
- * Obtains {@link BundleHolder} representations of all the bundles present
- * in the underlying state.
- *
- * @param dumpName can be null to request the live state
- * @return all the bundles or the empty list if the source can't be found
- */
- public List<BundleHolder> getAllBundles(String dumpName);
-
- /**
- * Obtains {@link ServiceHolder} representations of all the services present
- * in the underlying osgi instance.
- *
- * @param dumpName can be null to request the live state
- * @return all the services or the empty list if the source can't be found
- */
- public List<ServiceHolder> getAllServices(String dumpName);
-
- /**
- * Looks at all the bundles in the underlying state and return the one with
- * the given id, if no such bundle exists then null is returned.
- *
- * @param dumpName can be null to request the live state
- * @param bundleId of required bundle
- * @return the requested bundle or null
- */
- public BundleHolder getBundle(String dumpName, long bundleId);
-
- /**
- * Looks at all the bundles in the underlying state and return the one with
- * the given name and version, if no such bundle exists then null is returned.
- *
- * @param source dump name
- * @param name of bundle
- * @param version of bundle
- * @param region to look in
- * @return holder holding bundle
- */
- public BundleHolder getBundle(String source, String name, String version, String region);
-
- /**
- * Returns the {@link ServiceHolder} that represents the service with
- * the requested service Id. If no such service exists then null is
- * returned.
- *
- * @param dumpName can be null to request the live state
- * @param serviceId of service to look for
- * @return service representation
- */
- public ServiceHolder getService(String dumpName, long serviceId) ;
-
- /**
- * Will return {@link FailedResolutionHolder} for the requested bundle.
- * If there are no resolution failures then null will be returned.
- *
- * @param dumpName can be null to request the live state
- * @param bundleId of the fail bundle
- * @return <code>FailedResolutionHolder</code>
- */
- public List<FailedResolutionHolder> getResolverReport(String dumpName, long bundleId);
-
- /**
- *
- * @param dumpName can be null to request the live state
- * @param packageName to find
- * @return packages matching packageName
- */
- public PackagesCollection getPackages(String dumpName, String packageName);
-
- /**
- * Search the requested state for bundles matching the given string
- *
- * @param dumpName can be null to request the live state
- * @param term to search for
- * @return list of matching bundles
- */
- public List<BundleHolder> search(String dumpName, String term);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactService.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactService.java
deleted file mode 100644
index 10c9ef1..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.artifact;
-
-import java.io.File;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.eclipse.virgo.apps.admin.core.ArtifactService;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.services.work.WorkArea;
-
-/**
- * Standard implementation of {@link ArtifactService}.
- *
- */
-final class StandardArtifactService implements ArtifactService {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(StandardArtifactService.class);
-
- private final ApplicationDeployer applicationDeployer;
-
- private final File stagingDir;
-
- /**
- * @param applicationDeployer
- * @param subsystemRegistry
- * @param workAreaManager
- * @param bundleContext
- * @param serverApplicationInfoSource
- */
- StandardArtifactService(ApplicationDeployer applicationDeployer, WorkArea workArea) {
- this.applicationDeployer = applicationDeployer;
- this.stagingDir = workArea.getWorkDirectory().newChild("upload").createDirectory().toFile();
- }
-
- /**
- * {@inheritDoc}
- */
- public String deploy(File stagedFile) {
- try {
- this.applicationDeployer.deploy(stagedFile.toURI());
- return "Artifact deployed";
- } catch (DeploymentException e) {
- if (!stagedFile.delete()) {
- LOGGER.warn(String.format("Failed to delete %s after a deployment exception.", stagedFile));
- }
- return String.format("Deployment Error '%s'", e.getMessage());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public File getStagingDirectory() {
- return this.stagingDir;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/DumpPathLocator.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/DumpPathLocator.java
deleted file mode 100644
index 7caab85..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/DumpPathLocator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.dump;
-
-import java.io.File;
-
-
-/**
- * <p>
- * DumpPathLocator is used internally to locate the location of the dumps
- * folder, the dumps within it and the individual dump entries within those.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations of DumpPathLocator should be threadsafe
- *
- */
-public interface DumpPathLocator {
-
- /**
- * @return directory where the dumps are to be found.
- */
- File getDumpDirectory();
-
- /**
- * When given a folder name, this will return that dump as a directory
- * Will return null if there is no such dump.
- *
- * @param folderName
- * @return dump directory
- */
- File getDumpFolder(String folderName);
-
- /**
- * When given a folder name and an entry name, this will return a file representing that dump entry.
- * Will return null if there is no such entry.
- *
- * @param folderName
- * @param fileName
- * @return entry in dump
- */
- File getDumpEntryFile(String folderName, String fileName);
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpInspectorService.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpInspectorService.java
deleted file mode 100644
index 901eb9e..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpInspectorService.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.dump;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.DumpInspectorService;
-import org.eclipse.virgo.util.io.FileSystemUtils;
-
-
-
-/**
- * <p>
- * StandardDumpInspectorService is an implementation of {@link DumpInspectorService}
- * that uses a {@link DumpPathLocator} to find dumps that the system has produced.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardDumpInspectorService is threadsafe
- *
- */
-final class StandardDumpInspectorService implements DumpInspectorService {
-
- private final static String LINE_SEPARATOR = System.getProperty("line.separator");
-
- private final DumpPathLocator dumpPathLocator;
-
- public StandardDumpInspectorService(DumpPathLocator dumpPathLocator) {
- this.dumpPathLocator = dumpPathLocator;
-
- }
-
- /**
- * {@inheritDoc}
- */
- public List<File> findAvaliableDumps() {
- List<File> dumps = new ArrayList<File>();
- File dumpDir = this.dumpPathLocator.getDumpDirectory();
- if(dumpDir != null){
- File[] dumpFolders = FileSystemUtils.listFiles(dumpDir, new FileFilter(){
-
- public boolean accept(File pathname) {
- return pathname.isDirectory();
- }
-
- });
- if(dumpFolders.length > 0){
- for(File dumpFolder : dumpFolders){
- dumps.add(dumpFolder);
- }
- }
- }
- return dumps;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<String> getDumpEntries(String dumpID) {
- if(dumpID == null){
- return Collections.emptyList();
- }
- List<String> dumpEntries = new ArrayList<String>();
- File dumpDir = this.dumpPathLocator.getDumpFolder(dumpID);
- if(dumpDir == null){
- dumpEntries.add(String.format("No Entries have been found for '%s'", dumpID));
- }else{
- String[] dumpEntriesArray = FileSystemUtils.list(dumpDir);
- if(dumpEntriesArray.length ==0){
- dumpEntries.add(String.format("No Entries have been found for '%s'", dumpID));
- } else {
- dumpEntries.addAll(Arrays.asList(dumpEntriesArray));
- }
- }
- return dumpEntries;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getDumpEntry(String dumpID, String entryName) {
- if(dumpID == null || entryName == null){
- return "";
- }
- StringBuilder inspection = new StringBuilder();
- File dumpEntry = this.dumpPathLocator.getDumpEntryFile(dumpID, entryName);
- if(dumpEntry != null){
- LineNumberReader reader = null;
- try {
- reader = new LineNumberReader(new FileReader(dumpEntry));
- while (reader.ready()){
- String rawLine = reader.readLine();
- if(rawLine != null){
- inspection.append(this.escapeAngleBrackets(rawLine));
- inspection.append(LINE_SEPARATOR);
- }
- }
- reader.close();
- } catch (IOException e) {
- try {
- if(reader != null){
- reader.close();
- }
- } catch (IOException e1) {
- // no-op to close stream
- }
- // no-op just return the default null value and let the jsp deal with it
- }
- }
- return inspection.toString();
- }
-
- private String escapeAngleBrackets(String unfriendlyHTML) {
- String processed = unfriendlyHTML.replace("<", "<");
- processed = processed.replace(">", ">");
- processed = processed.replace("°", "∞");
- return processed;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocator.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocator.java
deleted file mode 100644
index 1ad78ca..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.dump;
-
-import java.io.File;
-import java.lang.management.ManagementFactory;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.TabularDataSupport;
-
-import org.osgi.framework.InvalidSyntaxException;
-
-
-/**
- * <p>
- * StandardDumpPathLocator is an implementation of {@link DumpPathLocator} that
- * gets the location of the dumps directory from config admin.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardDumpPathLocator is threadsafe
- *
- */
-final class StandardDumpPathLocator implements DumpPathLocator{
-
- private final static String FILE_SEPARATOR = System.getProperty("file.separator");
-
- private static final String CONFIG_PROPERTY = "dump.root.directory";
-
- private static final String MEDIC_MBEAN_QUERY = "org.eclipse.virgo.kernel:type=Configuration,name=org.eclipse.virgo.medic";
-
- private String dumpConfigValue;
-
- public StandardDumpPathLocator() throws InvalidSyntaxException {
- MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
- try {
- Object attribute = mBeanServer.getAttribute(new ObjectName(MEDIC_MBEAN_QUERY), "Properties");
- TabularDataSupport table = (TabularDataSupport) attribute;
- CompositeDataSupport composite = (CompositeDataSupport) table.get(new Object[]{CONFIG_PROPERTY});
- this.dumpConfigValue = composite.get("value").toString();
- } catch (Exception e) {
- //no-op
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpDirectory(){
- String path = this.dumpConfigValue;
- if(path != null){
- File dumpDir = new File(path);
- if(dumpDir.exists() && dumpDir.isDirectory()){
- return dumpDir;
- }
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpFolder(String folderName){
- String path = String.format("%s%s%s", this.dumpConfigValue, FILE_SEPARATOR, folderName);
- File dumpDir = new File(path);
- if(dumpDir.exists() && dumpDir.isDirectory()){
- return dumpDir;
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpEntryFile(String folderName, String fileName){
- String path = String.format("%s%s%s%s%s", this.dumpConfigValue, FILE_SEPARATOR, folderName, FILE_SEPARATOR, fileName);
- File dumpEntry = new File(path);
- if(dumpEntry.exists() && dumpEntry.isFile()){
- return dumpEntry;
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatter.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatter.java
deleted file mode 100644
index b3e334d..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.springframework.util.StringUtils;
-
-
-/**
- */
-final class ObjectFormatter {
-
-
- private ObjectFormatter() {
- // stop construction
- }
-
- /**
- * Return the object after a best attempt to format the object as a string
- *
- * @param value object
- * @return best attempt to convert object to string representation
- */
- public static String formatObject(Object value) {
- if(value instanceof Object[]) {
- return StringUtils.arrayToDelimitedString((Object[]) value, ", ");
- }
- return value.toString();
- }
-
- /**
- * Will return a Map<String, String> after doing a best attempt to make the values nicely formatted Strings.
- *
- * @param properties arbitrary property map
- * @return String->String version of properties
- */
- public static Map<String, String> formatMapValues(Map<String, Object> properties){
- Map<String, String> formattedProperties = new HashMap<String, String>();
- for(Entry<String, Object> entry : properties.entrySet()) {
- formattedProperties.put(entry.getKey(), formatObject(entry.getValue()));
- }
- return formattedProperties;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardBundleHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardBundleHolder.java
deleted file mode 100644
index ca1d9c9..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardBundleHolder.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.osgi.framework.Bundle;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.RequiredBundleHolder;
-import org.eclipse.virgo.apps.admin.core.ServiceHolder;
-import org.eclipse.virgo.kernel.module.Component;
-import org.eclipse.virgo.kernel.module.ModuleContext;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.module.NoSuchComponentException;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiRequiredBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-
-/**
- * <p>
- * StandardArtifactHolder is the standard implementation of BundleHolder. It represents a
- * bundle artifact and will provide formatting friendly strings where possible.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardArtifactHolder is thread-safe
- *
- */
-final class StandardBundleHolder implements BundleHolder {
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final QuasiBundle quasiBundle;
-
- private final StateService stateService;
-
- public StandardBundleHolder(QuasiBundle bundle, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- if(bundle == null || moduleContextAccessor == null) {
- throw new IllegalArgumentException("StandardBundleHolder must be provided with non-null QuasiBundle and ModuleContextAccessor.");
- }
- this.quasiBundle = bundle;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public Long getBundleId() {
- return this.quasiBundle.getBundleId();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getRegion(){
- return this.stateService.getBundleRegionName(getBundleId());
- }
-
- /**
- * {@inheritDoc}
- */
- public String getSymbolicName() {
- return quasiBundle.getSymbolicName();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getState() {
- if(this.quasiBundle instanceof QuasiLiveBundle) {
- QuasiLiveBundle quasiLiveBundle = (QuasiLiveBundle) this.quasiBundle;
- return quasiLiveBundle.getState();
- }
- return this.quasiBundle.isResolved() ? "Resolved" : "Unresolved";
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolved() {
- return this.quasiBundle.isResolved();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersion() {
- return quasiBundle.getVersion().toString();
- }
-
- /**
- * {@inheritDoc}
- */
- public Bundle getRawBundle() {
- return this.quasiBundle.getBundle();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getBundleLocation() {
- Bundle bundle2 = this.quasiBundle.getBundle();
- if(bundle2 != null) {
- return bundle2.getLocation();
- }
- return "";
- }
-
- /**
- * {@inheritDoc}
- */
- public String getSpringName() {
- Bundle realBundle = quasiBundle.getBundle();
- if(realBundle != null) {
- ModuleContext moduleContext = this.moduleContextAccessor.getModuleContext(realBundle);
- if(moduleContext != null) {
- return moduleContext.getDisplayName();
- }
- }
- return "";
- }
-
- /**
- * {@inheritDoc}
- */
- public List<Component> getBeans(){
- List<Component> beans = new ArrayList<Component>();
- Bundle realBundle = quasiBundle.getBundle();
- if(realBundle != null) {
- ModuleContext moduleContext = this.moduleContextAccessor.getModuleContext(realBundle);
- if(moduleContext != null) {
- for(String name : moduleContext.getComponentNames()) {
- try {
- beans.add(moduleContext.getComponent(name));
- } catch (NoSuchComponentException e) {
- // no-op it is possible the bean has been removed since getting the list of names, thread safety.
- }
- }
- }
- }
- return beans;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ExportedPackageHolder> getExportPackages() {
- List<ExportedPackageHolder> exportedPackageHolders = new ArrayList<ExportedPackageHolder>();
- List<QuasiExportPackage> exportPackages = quasiBundle.getExportPackages();
- for(QuasiExportPackage exportPackage : exportPackages) {
- exportedPackageHolders.add(new StandardExportedPackageHolder(exportPackage, this.moduleContextAccessor, this.stateService));
- }
- return exportedPackageHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ImportedPackageHolder> getImportPackages() {
- List<ImportedPackageHolder> importedPackageHolders = new ArrayList<ImportedPackageHolder>();
- List<QuasiImportPackage> importPackages = quasiBundle.getImportPackages();
- for(QuasiImportPackage importPackage : importPackages) {
- importedPackageHolders.add(new StandardImportedPackageHolder(importPackage, this.moduleContextAccessor, this.stateService));
- }
- return importedPackageHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<RequiredBundleHolder> getRequiredBundles(){
- List<QuasiRequiredBundle> quasiRequiredBundles = this.quasiBundle.getRequiredBundles();
- List<RequiredBundleHolder> requiredBundleHolders = new ArrayList<RequiredBundleHolder>();
- if(quasiRequiredBundles != null) {
- for(QuasiRequiredBundle quasiRequiredBundle : quasiRequiredBundles) {
- requiredBundleHolders.add(new StandardRequiredBundleHolder(quasiRequiredBundle, this.moduleContextAccessor, this.stateService));
- }
- }
- return requiredBundleHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<BundleHolder> getHosts() {
- List<BundleHolder> artifactHolders = new ArrayList<BundleHolder>();
- List<QuasiBundle> hosts = quasiBundle.getHosts();
- if(hosts != null) {
- for(QuasiBundle hostQuasiBundle : hosts) {
- artifactHolders.add(new StandardBundleHolder(hostQuasiBundle, this.moduleContextAccessor, this.stateService));
- }
- }
- return artifactHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<BundleHolder> getFragments() {
- List<BundleHolder> artifactHolders = new ArrayList<BundleHolder>();
- List<QuasiBundle> fragments = quasiBundle.getFragments();
- if(fragments != null) {
- for(QuasiBundle fragmentQuasiBundle : fragments) {
- artifactHolders.add(new StandardBundleHolder(fragmentQuasiBundle, this.moduleContextAccessor, this.stateService));
- }
- }
- return artifactHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ServiceHolder> getExportedServices(){
- List<ServiceHolder> serviceHolders = new ArrayList<ServiceHolder>();
- if(this.quasiBundle instanceof QuasiLiveBundle) {
- QuasiLiveBundle quasiLiveBundle = (QuasiLiveBundle) this.quasiBundle;
- List<QuasiLiveService> exportedServices = quasiLiveBundle.getExportedServices();
- for(QuasiLiveService quasiLiveService : exportedServices) {
- serviceHolders.add(new StandardServiceHolder(quasiLiveService, this.moduleContextAccessor, this.stateService));
- }
- }
- return serviceHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ServiceHolder> getImportedServices(){
- List<ServiceHolder> serviceHolders = new ArrayList<ServiceHolder>();
- if(this.quasiBundle instanceof QuasiLiveBundle) {
- QuasiLiveBundle quasiLiveBundle = (QuasiLiveBundle) this.quasiBundle;
- List<QuasiLiveService> importedServices = quasiLiveBundle.getImportedServices();
- for(QuasiLiveService quasiLiveService : importedServices) {
- serviceHolders.add(new StandardServiceHolder(quasiLiveService, this.moduleContextAccessor, this.stateService));
- }
- }
- return serviceHolders;
- }
-
- public int compareTo(BundleHolder o) {
- return getBundleId().compareTo(o.getBundleId());
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (int) this.quasiBundle.getBundleId();
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- StandardBundleHolder other = (StandardBundleHolder) obj;
- if (quasiBundle.getBundleId() != other.quasiBundle.getBundleId()) {
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardDumpLocator.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardDumpLocator.java
deleted file mode 100644
index bcedae9..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardDumpLocator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.virgo.apps.admin.core.DumpLocator;
-import org.eclipse.virgo.apps.admin.core.dump.DumpPathLocator;
-
-/**
- * <p>
- * DumpStateExtractor can extract the osgi state from an equinox dump and place it in a staging location for use by
- * clients of this class.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * DumpStateExtractor is threadsafe
- *
- */
-final class StandardDumpLocator implements DumpLocator {
-
- private final DumpPathLocator dumpPathLocator;
-
- /**
- * @param dumpPathLocator to get dumps from
- */
- public StandardDumpLocator(DumpPathLocator dumpPathLocator) {
- this.dumpPathLocator = dumpPathLocator;
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpDir(String dump) throws IOException {
- if (dump == null) {
- throw new IllegalArgumentException("Requested dump cannot be null");
- }
- File dumpFolder = this.dumpPathLocator.getDumpFolder(dump);
- if (dumpFolder == null) {
- throw new IOException(String.format("Requested dump does not exist or is not a folder '%s'", dump));
- }
- return dumpFolder;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardExportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardExportedPackageHolder.java
deleted file mode 100644
index ab169c5..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardExportedPackageHolder.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-
-/**
- * <p>
- * StandardExportedPackageHolder is the standard implementation of {@link ExportedPackageHolder}.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardExportedPackageHolder is thread-safe
- *
- */
-final class StandardExportedPackageHolder implements ExportedPackageHolder {
-
- private final QuasiExportPackage exportPackage;
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final StateService stateService;
-
- public StandardExportedPackageHolder(QuasiExportPackage exportPackage, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- this.exportPackage = exportPackage;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.exportPackage.getPackageName();
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ImportedPackageHolder> getConsumers() {
- List<QuasiImportPackage> consumers = this.exportPackage.getConsumers();
- List<ImportedPackageHolder> importedPackageHolders = new ArrayList<ImportedPackageHolder>();
- if(consumers != null) {
- for(QuasiImportPackage quasiImportPackage : consumers) {
- importedPackageHolders.add(new StandardImportedPackageHolder(quasiImportPackage, this.moduleContextAccessor, this.stateService));
- }
- }
- return importedPackageHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getExportingBundle() {
- QuasiBundle exportingBundle = this.exportPackage.getExportingBundle();
- if(exportingBundle != null) {
- return new StandardBundleHolder(exportingBundle, this.moduleContextAccessor, this.stateService) ;
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersion() {
- return this.exportPackage.getVersion().toString();
- }
-
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAttributes() {
- return ObjectFormatter.formatMapValues(this.exportPackage.getAttributes());
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getDirectives() {
- return ObjectFormatter.formatMapValues(this.exportPackage.getDirectives());
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolder.java
deleted file mode 100644
index 690d603..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolder.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.FailedResolutionHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-
-
-/**
- * <p>
- * StandardFailedResolutionHolder represents a single cause of a bundle resolution
- * failure. A bundle may fail to resolve for many reasons.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardFailedResolutionHolder is threadsafe
- *
- */
-final class StandardFailedResolutionHolder implements FailedResolutionHolder {
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final QuasiResolutionFailure quasiResolutionFailure;
-
- private final StateService stateService;
-
- /**
- *
- * @param quasiResolutionFailure to be held
- * @param moduleContextAccessor used for {@link BundleHolder} creation
- */
- public StandardFailedResolutionHolder(QuasiResolutionFailure quasiResolutionFailure, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- this.quasiResolutionFailure = quasiResolutionFailure;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getDescription() {
- return escapeAngleBrackets(this.quasiResolutionFailure.getDescription());
- }
-
- private String escapeAngleBrackets(String unfriendlyHTML) {
- String processed = unfriendlyHTML.replace("<", "<");
- processed = processed.replace(">", ">");
- processed = processed.replace("°", "∞");
- return processed;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getUnresolvedBundle() {
- return new StandardBundleHolder(this.quasiResolutionFailure.getUnresolvedQuasiBundle(), this.moduleContextAccessor, this.stateService);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardImportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardImportedPackageHolder.java
deleted file mode 100644
index e8f284b..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardImportedPackageHolder.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-import org.eclipse.virgo.util.osgi.manifest.VersionRange;
-
-/**
- * <p>
- * StandardImportedPackageHolder is the standard implementation of {@link ImportedPackageHolder}.
- * It is backed by a {@link QuasiImportPackage}.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardImportedPackageHolder is thread-safe
- *
- */
-final class StandardImportedPackageHolder implements ImportedPackageHolder {
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final QuasiImportPackage importPackage;
-
- private final StateService stateService;
-
- public StandardImportedPackageHolder(QuasiImportPackage importPackage, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- this.importPackage = importPackage;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getImportingBundle() {
- QuasiBundle importingBundle = this.importPackage.getImportingBundle();
- if(importingBundle != null) {
- return new StandardBundleHolder(importingBundle, this.moduleContextAccessor, this.stateService);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.importPackage.getPackageName();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersionConstraint() {
- VersionRange versionConstraint = this.importPackage.getVersionConstraint();
- return versionConstraint.toString().replace("°", "∞");
- }
-
- /**
- * {@inheritDoc}
- */
- public ExportedPackageHolder getProvider() {
- QuasiExportPackage provider = this.importPackage.getProvider();
- if(provider != null) {
- return new StandardExportedPackageHolder(provider, this.moduleContextAccessor, this.stateService);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolved() {
- return this.importPackage.isResolved();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAttributes() {
- return ObjectFormatter.formatMapValues(this.importPackage.getAttributes());
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getDirectives() {
- return ObjectFormatter.formatMapValues(this.importPackage.getDirectives());
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollection.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollection.java
deleted file mode 100644
index 70896da..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollection.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.PackagesCollection;
-
-
-
-/**
- * <p>
- * StandardPackagesCollection is the an implementation of {@link PackagesCollection}.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardPackagesCollection is threadsafe
- *
- */
-final class StandardPackagesCollection implements PackagesCollection {
-
- private final List<ExportedPackageHolder> exported;
-
- private final List<ImportedPackageHolder> imported;
-
- private final String packageName;
-
- public StandardPackagesCollection(String packageName, List<ImportedPackageHolder> imported, List<ExportedPackageHolder> exported) {
- if(packageName == null) {
- throw new IllegalArgumentException("Package name must be specified for a collection of packages");
- }
- this.packageName = packageName;
- this.imported = imported == null ? new ArrayList<ImportedPackageHolder>() : imported;
- this.exported = exported == null ? new ArrayList<ExportedPackageHolder>() : exported;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ExportedPackageHolder> getExported() {
- return this.exported;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ImportedPackageHolder> getImported() {
- return this.imported;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.packageName;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolder.java
deleted file mode 100644
index 2d21a74..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolder.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.RequiredBundleHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiRequiredBundle;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-import org.eclipse.virgo.util.osgi.manifest.VersionRange;
-
-
-/**
- * <p>
- * StandardRequiredBundleHolder is the standard implementation of {@link RequiredBundleHolder}.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardRequiredBundleHolder is thread-safe
- *
- */
-final class StandardRequiredBundleHolder implements RequiredBundleHolder {
-
- private final QuasiRequiredBundle quasiRequiredBundle;
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final StateService stateService;
-
- public StandardRequiredBundleHolder(QuasiRequiredBundle quasiRequiredBundle, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- this.quasiRequiredBundle = quasiRequiredBundle;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getProvider() {
- return new StandardBundleHolder(this.quasiRequiredBundle.getProvider(), this.moduleContextAccessor, this.stateService);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getRequiredBundleName() {
- return this.quasiRequiredBundle.getRequiredBundleName();
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getRequiringBundle() {
- return new StandardBundleHolder(this.quasiRequiredBundle.getRequiringBundle(), this.moduleContextAccessor, this.stateService);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersionConstraint() {
- VersionRange versionConstraint = this.quasiRequiredBundle.getVersionConstraint();
- if(versionConstraint == null) {
- versionConstraint = VersionRange.NATURAL_NUMBER_RANGE;
- }
- return versionConstraint.toString().replace(", oo]", ", ∞]").replace(", oo)", ", ∞)");
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAttributes() {
- return ObjectFormatter.formatMapValues(this.quasiRequiredBundle.getAttributes());
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getDirectives() {
- return ObjectFormatter.formatMapValues(this.quasiRequiredBundle.getDirectives());
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolved() {
- return this.quasiRequiredBundle.isResolved();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardServiceHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardServiceHolder.java
deleted file mode 100644
index 402e49e..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardServiceHolder.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.osgi.framework.Constants;
-import org.springframework.util.StringUtils;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ServiceHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-
-/**
- * <p>
- * StandardServiceHolder is the default implementation of ServiceHolder
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardServiceHolder is thread-safe
- *
- */
-final class StandardServiceHolder implements ServiceHolder {
-
- private static final String MULTIPLE_OBJECT_CLASSES_SUFFIX = ", ...";
-
- private final QuasiLiveService quasiLiveService;
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final StateService stateService;
-
- public StandardServiceHolder(QuasiLiveService quasiLiveService, ModuleContextAccessor moduleContextAccessor, StateService stateService) {
- if(quasiLiveService == null || moduleContextAccessor == null) {
- throw new IllegalArgumentException("QuasiLiveService and ModuleContextAccessor must not be null");
- }
- this.quasiLiveService = quasiLiveService;
- this.moduleContextAccessor = moduleContextAccessor;
- this.stateService = stateService;
- }
-
- /**
- * {@inheritDoc}
- */
- public long getServiceId() {
- return this.quasiLiveService.getServiceId();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getFormattedObjectClass() {
- return this.formatObjectClass(this.quasiLiveService.getProperties().get(Constants.OBJECTCLASS));
- }
-
- /**
- * {@inheritDoc}
- */
- public List<BundleHolder> getConsumers() {
- List<QuasiLiveBundle> consumers = this.quasiLiveService.getConsumers();
- List<BundleHolder> bundleHolders = new ArrayList<BundleHolder>();
- for(QuasiLiveBundle quasiLiveBundle : consumers) {
- bundleHolders.add(new StandardBundleHolder(quasiLiveBundle, this.moduleContextAccessor, this.stateService));
- }
- return bundleHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getProperties() {
- return ObjectFormatter.formatMapValues(this.quasiLiveService.getProperties());
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getProvider() {
- return new StandardBundleHolder(this.quasiLiveService.getProvider(), this.moduleContextAccessor, this.stateService);
- }
-
- /**
- * {@inheritDoc}
- */
- public int compareTo(ServiceHolder o) {
- return Long.valueOf(this.getServiceId()).compareTo(Long.valueOf(o.getServiceId()));
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + quasiLiveService.hashCode();
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- StandardServiceHolder other = (StandardServiceHolder) obj;
- if (!quasiLiveService.equals(other.quasiLiveService))
- return false;
- return true;
- }
-
- private String formatObjectClass(Object objectClass) {
- StringBuilder sb = new StringBuilder();
- if(objectClass == null) {
- objectClass = new String[0];
- }
- String[] objectClasses;
- if(objectClass instanceof String) {
- objectClasses = StringUtils.commaDelimitedListToStringArray((String) objectClass);
- } else if(objectClass instanceof Object[]) {
- objectClasses = (String[]) objectClass;
- } else {
- objectClasses = StringUtils.commaDelimitedListToStringArray(objectClass.toString());
- }
-
- if (objectClasses.length == 0) {
- sb.append("<none>");
- } else {
-
- String formattedObjectClass = objectClasses[0];
- sb.append(formattedObjectClass);
-
- if (objectClasses.length > 1) {
- sb.append(MULTIPLE_OBJECT_CLASSES_SUFFIX);
- }
- }
-
- return sb.toString();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolder.java b/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolder.java
deleted file mode 100644
index d0611fb..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolder.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.DumpLocator;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.FailedResolutionHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.PackagesCollection;
-import org.eclipse.virgo.apps.admin.core.ServiceHolder;
-import org.eclipse.virgo.apps.admin.core.StateHolder;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiFramework;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * <p>
- * StandardStateInspectorService is the standard implementation of {@link StateHolder}.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StandardStateInspectorService is Thread-safe
- *
- */
-final class StandardStateHolder implements StateHolder {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(StandardStateHolder.class);
-
- private static final String LIVE = "Live";
-
- private static final Object KERNEL_REGION_NAME = "org.eclipse.equinox.region.kernel";
-
- private final StateService stateService;
-
- private final DumpLocator dumpLocator;
-
- private final ModuleContextAccessor moduleContextAccessor;
-
- private final QuasiFrameworkFactory quasiFrameworkFactory;
-
- public StandardStateHolder(StateService stateService, DumpLocator dumpLocator, ModuleContextAccessor moduleContextAccessor,
- QuasiFrameworkFactory quasiFrameworkFactory) {
- this.stateService = stateService;
- this.dumpLocator = dumpLocator;
- this.moduleContextAccessor = moduleContextAccessor;
- this.quasiFrameworkFactory = quasiFrameworkFactory;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<BundleHolder> getAllBundles(String source) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- List<QuasiBundle> allBundles = this.stateService.getAllBundles(dumpDirectory);
- List<BundleHolder> heldBundles = new ArrayList<BundleHolder>();
- for (QuasiBundle quasiBundle : allBundles) {
- if (quasiBundle != null && (!KERNEL_REGION_NAME.equals(this.stateService.getBundleRegionName(quasiBundle.getBundleId())) || 0l == quasiBundle.getBundleId())) {
- heldBundles.add(new StandardBundleHolder(quasiBundle, this.moduleContextAccessor, this.stateService));
- }
- }
- return heldBundles;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ServiceHolder> getAllServices(String source) {
- File dumpDirectory = null;
- List<ServiceHolder> serviceHolders = new ArrayList<ServiceHolder>();
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- List<QuasiLiveService> allServices = this.stateService.getAllServices(dumpDirectory);
- for (QuasiLiveService quasiLiveService : allServices) {
- serviceHolders.add(new StandardServiceHolder(quasiLiveService, moduleContextAccessor, this.stateService));
- }
- return serviceHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getBundle(String source, long bundleId) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
-
- QuasiBundle bundle = stateService.getBundle(dumpDirectory, bundleId);
- if (bundle != null) {
- return new StandardBundleHolder(bundle, this.moduleContextAccessor, this.stateService);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getBundle(String source, String name, String version, String region) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- QuasiBundle result = null;
- if (name != null && version != null) {
- List<QuasiBundle> allBundles = this.stateService.getAllBundles(dumpDirectory);
- for (QuasiBundle quasiBundle : allBundles) {
- if (quasiBundle.getSymbolicName().equals(name) && quasiBundle.getVersion().toString().equals(version) && this.stateService.getBundleRegionName(quasiBundle.getBundleId()).equals(region)) {
- result = quasiBundle;
- }
- }
- }
- if (result != null) {
- return new StandardBundleHolder(result, this.moduleContextAccessor, this.stateService);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public ServiceHolder getService(String source, long serviceId) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- QuasiLiveService service = this.stateService.getService(dumpDirectory, serviceId);
- if (service != null) {
- return new StandardServiceHolder(service, this.moduleContextAccessor, this.stateService);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public PackagesCollection getPackages(String source, String packageName) {
- QuasiFramework quasiFramework = this.getQuasiFramework(source);
- List<QuasiBundle> bundles = quasiFramework.getBundles();
-
- List<ImportedPackageHolder> importedPackageHolders = new ArrayList<ImportedPackageHolder>();
- List<ExportedPackageHolder> exportedPackageHolders = new ArrayList<ExportedPackageHolder>();
-
- for (QuasiBundle qBundle : bundles) {
- ImportedPackageHolder importPackage = processImporters(qBundle, packageName);
- if (importPackage != null) {
- importedPackageHolders.add(importPackage);
- }
- ExportedPackageHolder exportPackage = processExporters(qBundle, packageName);
- if (exportPackage != null) {
- exportedPackageHolders.add(exportPackage);
- }
- }
- return new StandardPackagesCollection(packageName, importedPackageHolders, exportedPackageHolders);
- }
-
- /**
- * {@inheritDoc}
- */
- public List<FailedResolutionHolder> getResolverReport(String source, long bundleId) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- List<QuasiResolutionFailure> resolverReport = this.stateService.getResolverReport(dumpDirectory, bundleId);
- List<FailedResolutionHolder> failedResolutionHolders = new ArrayList<FailedResolutionHolder>();
- if (resolverReport != null) {
- for (QuasiResolutionFailure quasiResolutionFailure : resolverReport) {
- failedResolutionHolders.add(new StandardFailedResolutionHolder(quasiResolutionFailure, this.moduleContextAccessor, this.stateService));
- }
- }
- return failedResolutionHolders;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<BundleHolder> search(String source, String term) {
- File dumpDirectory = null;
- if (source != null && !LIVE.equals(source)) {
- dumpDirectory = this.getDumpDirectory(source);
- }
- List<QuasiBundle> matchingBundles = this.stateService.search(dumpDirectory, term);
- List<BundleHolder> heldMatchingBundles = new ArrayList<BundleHolder>();
- for (QuasiBundle quasiBundle : matchingBundles) {
- if (quasiBundle != null) {
- heldMatchingBundles.add(new StandardBundleHolder(quasiBundle, this.moduleContextAccessor, this.stateService));
- }
- }
- return heldMatchingBundles;
- }
-
- private File getDumpDirectory(String source) {
- File dumpDirectory = null;
- try {
- dumpDirectory = this.dumpLocator.getDumpDir(source);
- } catch (Exception e) {
- LOGGER.warn(String.format("Unable to obtain the dump directory '%s'", source), e);
- }
- return dumpDirectory;
- }
-
- private QuasiFramework getQuasiFramework(String source) {
- File dumpDirectory = getDumpDirectory(source);
- if (dumpDirectory != null) {
- try {
- return this.quasiFrameworkFactory.create(dumpDirectory);
- } catch (Exception e) {
- throw new RuntimeException("Failed to create quasi-framework", e);
- }
- } else {
- return this.quasiFrameworkFactory.create();
- }
- }
-
- private ImportedPackageHolder processImporters(QuasiBundle qBundle, String packageName) {
- for (QuasiImportPackage qImportPackage : qBundle.getImportPackages()) {
- if (qImportPackage.getPackageName().equals(packageName)) {
- return new StandardImportedPackageHolder(qImportPackage, this.moduleContextAccessor, this.stateService);
- }
- }
- return null;
- }
-
- private ExportedPackageHolder processExporters(QuasiBundle qBundle, String packageName) {
- for (QuasiExportPackage qExportPackage : qBundle.getExportPackages()) {
- if (qExportPackage.getPackageName().equals(packageName)) {
- return new StandardExportedPackageHolder(qExportPackage, this.moduleContextAccessor, this.stateService);
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/module-context.xml b/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/module-context.xml
deleted file mode 100644
index 7607dfb..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/module-context.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
-<!-- ARTEFACT MANAGER -->
-
- <bean id="artefactManagerContent" class="org.eclipse.virgo.apps.admin.core.artifact.StandardArtifactService">
- <constructor-arg ref="applicationDeployer"/>
- <constructor-arg ref="workArea"/>
- </bean>
-
-<!-- DUMP INSPECTOR -->
-
- <bean id="dumpPathLocator" class="org.eclipse.virgo.apps.admin.core.dump.StandardDumpPathLocator" />
-
- <bean id="dumpInspectorService" class="org.eclipse.virgo.apps.admin.core.dump.StandardDumpInspectorService">
- <constructor-arg ref="dumpPathLocator"/>
- </bean>
-
-<!-- STATE INSPECTOR -->
-
- <bean id="dumpLocator" class="org.eclipse.virgo.apps.admin.core.state.StandardDumpLocator">
- <constructor-arg ref="dumpPathLocator"/>
- </bean>
-
- <bean id="stateHolder" class="org.eclipse.virgo.apps.admin.core.state.StandardStateHolder">
- <constructor-arg ref="stateService" />
- <constructor-arg ref="dumpLocator"/>
- <constructor-arg ref="moduleContextAccessor"/>
- <constructor-arg ref="quasiFrameworkFactory" />
- </bean>
-
-</beans>
diff --git a/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/osgi-context.xml b/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/osgi-context.xml
deleted file mode 100644
index ec795f4..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/main/resources/META-INF/spring/osgi-context.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:osgi="http://www.springframework.org/schema/osgi"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
-
-<!-- ARTEFACT MANAGER -->
- <osgi:reference id="applicationDeployer" interface="org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer" />
-
- <osgi:reference id="workArea" interface="org.eclipse.virgo.kernel.services.work.WorkArea" />
-
- <osgi:service ref="artefactManagerContent" interface="org.eclipse.virgo.apps.admin.core.ArtifactService"/>
-
- <osgi:reference id="moduleContextAccessor" interface="org.eclipse.virgo.kernel.module.ModuleContextAccessor"/>
-
-<!-- DUMP INSPECTOR -->
-
- <osgi:service ref="dumpInspectorService" interface="org.eclipse.virgo.apps.admin.core.DumpInspectorService"/>
-
-<!-- STATE INSPECTOR -->
-
- <osgi:reference id="quasiFrameworkFactory" interface="org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory" />
-
- <osgi:reference id="stateService" interface="org.eclipse.virgo.kernel.shell.state.StateService" />
-
- <osgi:service ref="stateHolder" interface="org.eclipse.virgo.apps.admin.core.StateHolder"/>
-
-</beans>
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactServiceTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactServiceTests.java
deleted file mode 100644
index 387494e..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/artifact/StandardArtifactServiceTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.artifact;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import org.easymock.EasyMock;
-import org.junit.Test;
-
-import org.eclipse.virgo.apps.admin.core.artifact.StandardArtifactService;
-import org.eclipse.virgo.apps.admin.core.stubs.StubWorkArea;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-
-/**
- */
-public class StandardArtifactServiceTests {
-
- private final ApplicationDeployer deployer = EasyMock.createNiceMock(ApplicationDeployer.class);
-
- private final StandardArtifactService standardArtifactService = new StandardArtifactService(this.deployer, new StubWorkArea());
-
- @Test
- public void testDeploy() {
- String deploy = this.standardArtifactService.deploy(new File("IExist"));
- assertEquals("Artifact deployed", deploy);
- }
-
- @Test
- public void testDeployError() throws DeploymentException {
- File stagedFile = new File("IDontExist");
-
- EasyMock.expect(this.deployer.deploy(stagedFile.toURI())).andThrow(new DeploymentException("it went wrong"));
- EasyMock.replay(this.deployer);
-
- String deploy = this.standardArtifactService.deploy(stagedFile);
- assertEquals("Deployment Error 'it went wrong'", deploy);
- }
-
- @Test
- public void testGetStagingDirectory() {
- assertTrue(this.standardArtifactService.getStagingDirectory().getPath().contains("target"));
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpManagerServiceTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpManagerServiceTests.java
deleted file mode 100644
index c3c35ae..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpManagerServiceTests.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.dump;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.dump.StandardDumpInspectorService;
-import org.eclipse.virgo.apps.admin.core.stubs.StubDumpPathLocator;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- */
-public final class StandardDumpManagerServiceTests {
-
- private StandardDumpInspectorService dumpInspectorService;
-
- private final String DUMP_FOLDER_CONTENT = "testDumpWithContent";
-
- private final String DUMP_FOLDER_NO_CONTENT = "testDumpWithNoContent";
-
- private final String DUMP_FOLDER_NOT_EXIST = "notHere";
-
- private final String DUMP_ITEM_ONE = "dumpItem1.txt";
-
- private final String DUMP_ITEM_TWO = "dumpItem2.foo";
-
- private final String DUMP_ITEM_FAKE = "Not_Here";
-
- private final static String LINE_SEPARATOR = System.getProperty("line.separator");
-
- @Before
- public void setup() {
- this.dumpInspectorService = new StandardDumpInspectorService(new StubDumpPathLocator());
- }
-
- @Test
- public void testFindAvaliableDumps(){
- List<File> result = this.dumpInspectorService.findAvaliableDumps();
- assertNotNull(result);
- assertEquals(2, result.size());
- }
-
- @Test
- public void testGetDumpEntriesNoFolder() {
- List<String> result = this.dumpInspectorService.getDumpEntries(DUMP_FOLDER_NOT_EXIST);
- assertNotNull(result);
- assertEquals(1, result.size());
- }
-
- @Test
- public void testGetDumpEntriesNotExists() {
- List<String> result = this.dumpInspectorService.getDumpEntries(DUMP_FOLDER_NO_CONTENT);
- assertNotNull(result);
- assertEquals(1, result.size());
- }
-
- @Test
- public void testGetDumpEntriesExists() {
- List<String> result = this.dumpInspectorService.getDumpEntries(DUMP_FOLDER_CONTENT);
- assertNotNull(result);
- assertEquals(3, result.size());
- }
-
- @Test
- public void testGetDumpEntriesWithNullFolderName() {
- List<String> result = this.dumpInspectorService.getDumpEntries(null);
- assertNotNull(result);
- assertEquals(0, result.size());
- }
-
- @Test
- public void testGetEntryNoFolder() {
- String result = this.dumpInspectorService.getDumpEntry(DUMP_FOLDER_NOT_EXIST, DUMP_ITEM_TWO);
- assertEquals("", result);
- }
-
- @Test
- public void testGetEntryNotExists() {
- String result = this.dumpInspectorService.getDumpEntry(DUMP_FOLDER_NO_CONTENT, DUMP_ITEM_TWO);
- assertEquals("", result);
- }
-
- @Test
- public void testGetEntryNotExists2() {
- String result = this.dumpInspectorService.getDumpEntry(DUMP_FOLDER_CONTENT, DUMP_ITEM_FAKE);
- assertEquals("", result);
- }
-
- @Test
- public void testGetEntryExists() {
- String result = this.dumpInspectorService.getDumpEntry(DUMP_FOLDER_CONTENT, DUMP_ITEM_ONE);
- assertEquals("Line1" + LINE_SEPARATOR + "Line2" + LINE_SEPARATOR + "Line3" + LINE_SEPARATOR, result);
- }
-
- @Test
- public void testGetEntryNullDump() {
- String result = this.dumpInspectorService.getDumpEntry(null, DUMP_ITEM_ONE);
- assertEquals("", result);
- }
-
- @Test
- public void testGetEntryNullItem() {
- String result = this.dumpInspectorService.getDumpEntry(DUMP_FOLDER_CONTENT, null);
- assertEquals("", result);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocatorTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocatorTests.java
deleted file mode 100644
index 5ad71cc..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/dump/StandardDumpPathLocatorTests.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.dump;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MXBean;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.InvalidSyntaxException;
-
-/**
- */
-public class StandardDumpPathLocatorTests {
-
- private final static String FILE_SEPARATOR = System.getProperty("file.separator");
-
- private static final String CONFIG_PROPERTY = "dump.root.directory";
-
- private static final String MEDIC_MBEAN_QUERY = "org.eclipse.virgo.kernel:type=Configuration,name=org.eclipse.virgo.medic";
-
- private static final String TEST_DUMPS_FOLDER = "serviceability" + FILE_SEPARATOR + "dumps";
-
- private static final String TEST_DUMP_CONTENT = "testDumpWithContent";
-
- private static final String TEST_DUMP_NO_CONTENT = "testDumpWithNoContent";
-
- private static final String TEST_DUMP_CONTENT_ITEM = "dumpItem2.foo";
-
- private static final String TEST_DUMP_CONTENT_STATE = "osgi.zip";
-
- private StandardDumpPathLocator standardDumpPathLocator;
-
- @Before
- public void setUp() throws Exception {
- MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
- if(!mBeanServer.isRegistered(new ObjectName(MEDIC_MBEAN_QUERY))){
- mBeanServer.registerMBean(new MedicMXBean(), new ObjectName(MEDIC_MBEAN_QUERY));
- }
- this.standardDumpPathLocator = new StandardDumpPathLocator();
- }
-
- @Test
- public void testGetDumpDirectory() {
- File dumpDirectory = standardDumpPathLocator.getDumpDirectory();
- assertNotNull(dumpDirectory);
- assertEquals(TEST_DUMPS_FOLDER, dumpDirectory.getPath());
- }
-
- @Test
- public void testGetDumpDirectoryNoConfig() throws InvalidSyntaxException, MBeanRegistrationException, InstanceNotFoundException, MalformedObjectNameException, NullPointerException {
- MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
- mBeanServer.unregisterMBean(new ObjectName(MEDIC_MBEAN_QUERY));
- standardDumpPathLocator = new StandardDumpPathLocator();
- File dumpDirectory = standardDumpPathLocator.getDumpDirectory();
- assertNull(dumpDirectory);
- }
-
- @Test
- public void testGetDumpFolder() {
- File dumpFolder = standardDumpPathLocator.getDumpFolder(TEST_DUMP_CONTENT);
- assertNotNull(dumpFolder);
- assertEquals(TEST_DUMPS_FOLDER + FILE_SEPARATOR + TEST_DUMP_CONTENT, dumpFolder.getPath());
- }
-
- @Test
- public void testGetDumpFolderNotExist() {
- File dumpFolder = standardDumpPathLocator.getDumpFolder("Im not a folder");
- assertNull(dumpFolder);
- }
-
- @Test
- public void testGetDumpFolderNull() {
- File dumpFolder = standardDumpPathLocator.getDumpFolder(null);
- assertNull(dumpFolder);
- }
-
- @Test
- public void testGetDumpEntryFileContent() {
- File dumpEntryFile = standardDumpPathLocator.getDumpEntryFile(TEST_DUMP_CONTENT, TEST_DUMP_CONTENT_ITEM);
- assertNotNull(dumpEntryFile);
- }
-
- @Test
- public void testGetDumpEntryFileNoContent() {
- File dumpEntryFile = standardDumpPathLocator.getDumpEntryFile(TEST_DUMP_NO_CONTENT, TEST_DUMP_CONTENT_STATE);
- assertNull(dumpEntryFile);
- }
-
- @Test
- public void testGetDumpEntryFileNullFolder() {
- File dumpEntryFile = standardDumpPathLocator.getDumpEntryFile(null, TEST_DUMP_CONTENT);
- assertNull(dumpEntryFile);
- }
-
- @Test
- public void testGetDumpEntryFile() {
- File dumpEntryFile = standardDumpPathLocator.getDumpEntryFile(TEST_DUMPS_FOLDER, null);
- assertNull(dumpEntryFile);
- }
-
- public static class MedicMXBean implements MedicMXBeanAPI {
- public Map<String, String> getProperties(){
- HashMap<String, String> hashMap = new HashMap<String, String>();
- hashMap.put(CONFIG_PROPERTY, TEST_DUMPS_FOLDER);
- return hashMap;
- }
- }
-
- @MXBean
- public static interface MedicMXBeanAPI {
- public Map<String, String> getProperties();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatterTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatterTests.java
deleted file mode 100644
index db15840..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/ObjectFormatterTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.state.ObjectFormatter;
-import org.junit.Test;
-
-
-/**
- */
-public class ObjectFormatterTests {
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.ObjectFormatter#formatObject(java.lang.Object)}.
- */
- @Test
- public void testFormatObject() {
- Object[] fooArray = new Object[3];
- fooArray[0] = "a";
- fooArray[1] = "b";
- fooArray[2] = "c";
- String formatObject = ObjectFormatter.formatObject(fooArray);
- assertTrue(formatObject.contains("a"));
- assertTrue(formatObject.contains("b"));
- assertTrue(formatObject.contains("c"));
- assertTrue(formatObject.contains(", "));
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.ObjectFormatter#formatMapValues(java.util.Map)}.
- */
- @Test
- public void testFormatMapValues() {
- Map<String, Object> properties= new HashMap<String, Object>();
-
- properties.put("a", 56);
-
- Object[] fooArray = new Object[3];
- fooArray[0] = "a";
- fooArray[1] = "b";
- fooArray[2] = "c";
- properties.put("b", fooArray);
-
- Map<String, String> formatMapValues = ObjectFormatter.formatMapValues(properties);
-
- assertEquals(2, formatMapValues.size());
- assertEquals("56", formatMapValues.get("a"));
-
- assertTrue(formatMapValues.get("b").contains("a"));
- assertTrue(formatMapValues.get("b").contains("b"));
- assertTrue(formatMapValues.get("b").contains("c"));
- assertTrue(formatMapValues.get("b").contains(", "));
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolderTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolderTests.java
deleted file mode 100644
index 1fba864..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardFailedResolutionHolderTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.assertEquals;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.state.StandardFailedResolutionHolder;
-import org.eclipse.virgo.apps.admin.core.stubs.StubModuleContextAccessor;
-import org.eclipse.virgo.apps.admin.core.stubs.StubQuasiResolutionFaliure;
-import org.eclipse.virgo.apps.admin.core.stubs.StubStateService;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- */
-public class StandardFailedResolutionHolderTests {
-
- private StandardFailedResolutionHolder standardFailedResolutionHolder;
-
- @Before
- public void setUp(){
- this.standardFailedResolutionHolder = new StandardFailedResolutionHolder(new StubQuasiResolutionFaliure("test", 5), new StubModuleContextAccessor(), new StubStateService());
- }
-
- @Test
- public void testGetDescription() {
- String result = this.standardFailedResolutionHolder.getDescription();
- assertEquals("test", result);
- }
-
- @Test
- public void testGetUnresolvedBundle() {
- BundleHolder unresolvedBundle = this.standardFailedResolutionHolder.getUnresolvedBundle();
- assertEquals(new Long(5), unresolvedBundle.getBundleId());
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollectionTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollectionTests.java
deleted file mode 100644
index 61f063e..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardPackagesCollectionTests.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.state.StandardPackagesCollection;
-import org.eclipse.virgo.apps.admin.core.stubs.StubExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.stubs.StubImportedPackageHolder;
-import org.junit.Before;
-import org.junit.Test;
-
-
-
-/**
- */
-public class StandardPackagesCollectionTests {
-
- private static final String TEST_PACKAGE = "testPackage";
- private StandardPackagesCollection standardPackagesCollection;
-
- @Before
- public void setUp() {
- List<ImportedPackageHolder> imported = new ArrayList<ImportedPackageHolder>();
- imported.add(new StubImportedPackageHolder(TEST_PACKAGE));
- List<ExportedPackageHolder> exported = new ArrayList<ExportedPackageHolder>();
- exported.add(new StubExportedPackageHolder(TEST_PACKAGE));
- this.standardPackagesCollection = new StandardPackagesCollection(TEST_PACKAGE, imported, exported);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardPackagesCollection#getPackageName()}.
- */
- @Test
- public void testGetPackageName() {
- assertEquals(TEST_PACKAGE, this.standardPackagesCollection.getPackageName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardPackagesCollection#getPackageName()}.
- */
- @Test(expected=IllegalArgumentException.class)
- public void testGetPackageNameNullName() {
- this.standardPackagesCollection = new StandardPackagesCollection(null, new ArrayList<ImportedPackageHolder>(), new ArrayList<ExportedPackageHolder>());
- }
-
- @Test
- public void testNullLists() {
- this.standardPackagesCollection = new StandardPackagesCollection(TEST_PACKAGE, null, null);
- List<ImportedPackageHolder> imported = this.standardPackagesCollection.getImported();
- assertNotNull(imported);
- assertEquals(0, imported.size());
- List<ExportedPackageHolder> exported = this.standardPackagesCollection.getExported();
- assertNotNull(exported);
- assertEquals(0, exported.size());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardPackagesCollection#getImported()}.
- */
- @Test
- public void testGetImported() {
- List<ImportedPackageHolder> imported = this.standardPackagesCollection.getImported();
- assertNotNull(imported);
- assertEquals(1, imported.size());
- assertEquals(TEST_PACKAGE, imported.get(0).getPackageName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardPackagesCollection#getExported()}.
- */
- @Test
- public void testGetExported() {
- List<ExportedPackageHolder> exported = this.standardPackagesCollection.getExported();
- assertNotNull(exported);
- assertEquals(1, exported.size());
- assertEquals(TEST_PACKAGE, exported.get(0).getPackageName());
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolderTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolderTests.java
deleted file mode 100644
index 9a42ac2..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardRequiredBundleHolderTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.*;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder;
-import org.eclipse.virgo.apps.admin.core.stubs.StubModuleContextAccessor;
-import org.eclipse.virgo.apps.admin.core.stubs.StubQuasiRequiredBundle;
-import org.eclipse.virgo.apps.admin.core.stubs.StubStateService;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- */
-public class StandardRequiredBundleHolderTests {
-
- StandardRequiredBundleHolder standardRequiredBundleHolder;
-
- @Before
- public void setup(){
- this.standardRequiredBundleHolder = new StandardRequiredBundleHolder(new StubQuasiRequiredBundle("testBundle", 5, 6), new StubModuleContextAccessor(), new StubStateService());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder#getProvider()}.
- */
- @Test
- public void testGetProvider() {
- BundleHolder provider = this.standardRequiredBundleHolder.getProvider();
- assertEquals(new Long(5), provider.getBundleId());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder#getRequiredBundleName()}.
- */
- @Test
- public void testGetRequiredBundleName() {
- String requiredBundleName = this.standardRequiredBundleHolder.getRequiredBundleName();
- assertEquals("testBundle", requiredBundleName);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder#getRequiringBundle()}.
- */
- @Test
- public void testGetRequiringBundle() {
- BundleHolder requiringBundle = this.standardRequiredBundleHolder.getRequiringBundle();
- assertEquals(new Long(6), requiringBundle.getBundleId());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder#getVersionConstraint()}.
- */
- @Test
- public void testGetVersionConstraint() {
- String versionConstraint = this.standardRequiredBundleHolder.getVersionConstraint();
- assertEquals("[0.0.0, ∞)", versionConstraint);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardRequiredBundleHolder#isResolved()}.
- */
- @Test
- public void testIsResolved() {
- boolean resolved = this.standardRequiredBundleHolder.isResolved();
- assertFalse(resolved);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolderTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolderTests.java
deleted file mode 100644
index fb0a755..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StandardStateHolderTests.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.FailedResolutionHolder;
-import org.eclipse.virgo.apps.admin.core.PackagesCollection;
-import org.eclipse.virgo.apps.admin.core.ServiceHolder;
-import org.eclipse.virgo.apps.admin.core.state.StandardStateHolder;
-import org.eclipse.virgo.apps.admin.core.stubs.StubDumpExtractor;
-import org.eclipse.virgo.apps.admin.core.stubs.StubModuleContextAccessor;
-import org.eclipse.virgo.apps.admin.core.stubs.StubQuasiFrameworkFactory;
-import org.eclipse.virgo.apps.admin.core.stubs.StubQuasiLiveBundle;
-import org.eclipse.virgo.apps.admin.core.stubs.StubStateService;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- */
-public class StandardStateHolderTests {
-
- private static final String TEST_DUMP_NAME = "1234";
-
- private static final long NOT_EXISTING_ID = 5;
-
- private static final long EXISTING_ID = 4;
-
- private StandardStateHolder standardStateHolder;
-
- private StubDumpExtractor stubDumpExtractor;
-
- private StubStateService stubStateService;
-
- @Before
- public void setUp() {
- this.stubStateService = new StubStateService();
- this.stubDumpExtractor = new StubDumpExtractor();
- this.standardStateHolder = new StandardStateHolder(this.stubStateService, this.stubDumpExtractor, new StubModuleContextAccessor(), new StubQuasiFrameworkFactory());
- }
-
- //ALL BUNDLES
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getAllBundles(String)}.
- */
- @Test
- public void testGetAllBundles() {
- this.stubStateService.setNotNullExpectations();
- List<BundleHolder> result = this.standardStateHolder.getAllBundles(TEST_DUMP_NAME);
- assertNotNull(result);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getAllBundles(String)}.
- */
- @Test
- public void testGetAllBundlesNull() {
- this.stubStateService.setNullExpectations();
- List<BundleHolder> result = this.standardStateHolder.getAllBundles(null);
- assertNotNull(result);
- }
-
- //BUNDLE
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleExist() {
- this.stubStateService.setNotNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(TEST_DUMP_NAME, EXISTING_ID);
- assertNotNull(result);
- assertEquals("fake.test.bundle", result.getSymbolicName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleNotExist() {
- this.stubStateService.setNotNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(TEST_DUMP_NAME, NOT_EXISTING_ID);
- assertNull(result);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleNullDumpExists() {
- this.stubStateService.setNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(null, EXISTING_ID);
- assertNotNull(result);
- assertEquals("fake.test.bundle", result.getSymbolicName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleNullDumpNotExists() {
- this.stubStateService.setNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(null, NOT_EXISTING_ID);
- assertNull(result);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleByNameExist() {
- this.stubStateService.setNotNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(TEST_DUMP_NAME, StubQuasiLiveBundle.TEST_NAME, StubQuasiLiveBundle.TEST_VERSION.toString(), StubStateService.TEST_REGION_NAME);
- assertNotNull(result);
- assertEquals("fake.test.bundle", result.getSymbolicName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleByNameNotExist() {
- this.stubStateService.setNotNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(TEST_DUMP_NAME, "nope", "nope", "nope");
- assertNull(result);
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleByNameNullDumpExists() {
- this.stubStateService.setNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(null, StubQuasiLiveBundle.TEST_NAME, StubQuasiLiveBundle.TEST_VERSION.toString(), StubStateService.TEST_REGION_NAME);
- assertNotNull(result);
- assertEquals(StubQuasiLiveBundle.TEST_NAME, result.getSymbolicName());
- }
-
- /**
- * Test method for {@link org.eclipse.virgo.apps.admin.core.state.StandardStateHolder#getBundle(java.lang.String, long)}.
- */
- @Test
- public void testGetBundleByNameNullDumpNotExists() {
- this.stubStateService.setNullExpectations();
- BundleHolder result = this.standardStateHolder.getBundle(null, "nope", "nope", StubStateService.TEST_REGION_NAME);
- assertNull(result);
- }
-
- //SERVICES
-
- @Test
- public void testGetAllServices(){
- this.stubStateService.setNotNullExpectations();
- List<ServiceHolder> allServices = this.standardStateHolder.getAllServices(TEST_DUMP_NAME);
- assertNotNull(allServices);
- }
-
- @Test
- public void testGetAllServicesNull(){
- this.stubStateService.setNullExpectations();
- List<ServiceHolder> allServices = this.standardStateHolder.getAllServices(null);
- assertNotNull(allServices);
- }
-
- @Test
- public void testGetServiceExists(){
- this.stubStateService.setNotNullExpectations();
- ServiceHolder service = this.standardStateHolder.getService(TEST_DUMP_NAME, EXISTING_ID);
- assertNotNull(service);
- }
-
- @Test
- public void testGetServiceNotExists(){
- this.stubStateService.setNotNullExpectations();
- ServiceHolder service = this.standardStateHolder.getService(TEST_DUMP_NAME, NOT_EXISTING_ID);
- assertNull(service);
- }
-
- @Test
- public void testGetServiceNullExists(){
- this.stubStateService.setNullExpectations();
- ServiceHolder service = this.standardStateHolder.getService(null, EXISTING_ID);
- assertNotNull(service);
- }
-
- @Test
- public void testGetServiceNullNotExists(){
- this.stubStateService.setNullExpectations();
- ServiceHolder service = this.standardStateHolder.getService(null, NOT_EXISTING_ID);
- assertNull(service);
- }
-
- //PACKAGES
-
- @Test
- public void testGetPackages(){
- this.stubStateService.setNotNullExpectations();
- PackagesCollection packages = this.standardStateHolder.getPackages(TEST_DUMP_NAME, StubStateService.TEST_PACKAGE_SEARCH);
- assertNotNull(packages);
- assertEquals(StubStateService.TEST_PACKAGE_SEARCH, packages.getPackageName());
- }
-
- @Test
- public void testGetPackagesNotExists(){
- this.stubStateService.setNotNullExpectations();
- PackagesCollection packages = this.standardStateHolder.getPackages(TEST_DUMP_NAME, "notExist");
- assertNotNull(packages);
- assertEquals(0, packages.getExported().size());
- assertEquals(0, packages.getImported().size());
- assertEquals("notExist", packages.getPackageName());
- }
-
- @Test
- public void testGetPackagesNull(){
- this.stubStateService.setNullExpectations();
- PackagesCollection packages = this.standardStateHolder.getPackages(null, StubStateService.TEST_PACKAGE_SEARCH);
- assertNotNull(packages);
- assertEquals(StubStateService.TEST_PACKAGE_SEARCH, packages.getPackageName());
- }
-
- @Test
- public void testGetPackagesNullNotExists(){
- this.stubStateService.setNullExpectations();
- PackagesCollection packages = this.standardStateHolder.getPackages(null, "notExist");
- assertNotNull(packages);
- assertEquals(0, packages.getExported().size());
- assertEquals(0, packages.getImported().size());
- assertEquals("notExist", packages.getPackageName());
- }
-
- //RESOLVER
-
- @Test
- public void testGetResolverReport(){
- this.stubStateService.setNotNullExpectations();
- List<FailedResolutionHolder> resolverReport = this.standardStateHolder.getResolverReport(TEST_DUMP_NAME, EXISTING_ID);
- assertNotNull(resolverReport);
- }
-
- @Test
- public void testGetResolverReportNotExists(){
- this.stubStateService.setNotNullExpectations();
- List<FailedResolutionHolder> resolverReport = this.standardStateHolder.getResolverReport(TEST_DUMP_NAME, NOT_EXISTING_ID);
- assertNotNull(resolverReport);
- }
-
- @Test
- public void testGetResolverReportNull(){
- this.stubStateService.setNullExpectations();
- List<FailedResolutionHolder> resolverReport = this.standardStateHolder.getResolverReport(null, EXISTING_ID);
- assertNotNull(resolverReport);
- }
-
- @Test
- public void testGetResolverReportNullNotExists(){
- this.stubStateService.setNullExpectations();
- List<FailedResolutionHolder> resolverReport = this.standardStateHolder.getResolverReport(null, NOT_EXISTING_ID);
- assertNotNull(resolverReport);
- }
-
- //SEARCH
-
- @Test
- public void testSearch(){
- this.stubStateService.setNotNullExpectations();
- assertNotNull(this.standardStateHolder.search(TEST_DUMP_NAME, "term"));
- }
-
- @Test
- public void testSearchNullTerm(){
- this.stubStateService.setNotNullExpectations();
- assertNotNull(this.standardStateHolder.search(TEST_DUMP_NAME, null));
- }
-
- @Test
- public void testSearchNull(){
- this.stubStateService.setNullExpectations();
- assertNotNull(this.standardStateHolder.search(null, "term"));
- }
-
- @Test
- public void testSearchNullNullTerm(){
- this.stubStateService.setNullExpectations();
- assertNotNull(this.standardStateHolder.search(null, null));
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StateDumpExtractorTests.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StateDumpExtractorTests.java
deleted file mode 100644
index ccd06ed..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/state/StateDumpExtractorTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.state;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.zip.ZipException;
-
-import org.eclipse.virgo.apps.admin.core.stubs.StubDumpPathLocator;
-import org.junit.Before;
-import org.junit.Test;
-
-public class StateDumpExtractorTests {
-
- private final String DUMP_FOLDER_CONTENT = "testDumpWithContent";
-
- private final String DUMP_FOLDER_NOT_EXIST = "notHere";
-
- private StandardDumpLocator stateDumpExtractor;
-
- @Before
- public void setUp() {
- StubDumpPathLocator stubDumpPathLocator = new StubDumpPathLocator();
- this.stateDumpExtractor = new StandardDumpLocator(stubDumpPathLocator);
- }
-
- @Test
- public void getStateDump() throws ZipException, IOException {
- File result = this.stateDumpExtractor.getDumpDir(DUMP_FOLDER_CONTENT);
- assertNotNull(result);
- assertEquals(DUMP_FOLDER_CONTENT, result.getName());
- }
-
- @Test(expected=IOException.class)
- public void getStateDumpNotExists() throws ZipException, IOException {
- this.stateDumpExtractor.getDumpDir(DUMP_FOLDER_NOT_EXIST);
- }
-
- @Test(expected=IllegalArgumentException.class)
- public void getStateDumpNull() throws ZipException, IOException {
- this.stateDumpExtractor.getDumpDir(null);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpExtractor.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpExtractor.java
deleted file mode 100644
index f5907f8..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpExtractor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipException;
-
-import org.eclipse.virgo.apps.admin.core.DumpLocator;
-
-
-/**
- */
-final public class StubDumpExtractor implements DumpLocator {
-
- public List<File> getListOfPossibleDumps() {
- return new ArrayList<File>();
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpDir(String dump) throws ZipException, IOException {
- return new File(dump);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpManagerService.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpManagerService.java
deleted file mode 100644
index 200a8ad..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpManagerService.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.apps.admin.core.DumpInspectorService;
-
-
-/**
- */
-public class StubDumpManagerService implements DumpInspectorService{
-
- /**
- * {@inheritDoc}
- */
- public List<File> findAvaliableDumps() {
- List<File> dumps = new ArrayList<File>();
- dumps.add(new File("foo"));
- return dumps;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<String> getDumpEntries(String dumpID) {
- List<String> entries = new ArrayList<String>();
- entries.add("bar");
- return entries;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getDumpEntry(String dumpID, String entryName) {
- return "baz";
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpPathLocator.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpPathLocator.java
deleted file mode 100644
index a42727c..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubDumpPathLocator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.io.File;
-
-import org.eclipse.virgo.apps.admin.core.dump.DumpPathLocator;
-
-
-
-/**
- */
-final public class StubDumpPathLocator implements DumpPathLocator{
-
- private final static String FILE_SEPARATOR = System.getProperty("file.separator");
-
- /**
- * {@inheritDoc}
- */
- public File getDumpDirectory(){
- String path = this.getDumpConfigValue();
- if(path != null){
- File dumpDir = new File(path);
- if(dumpDir.exists() && dumpDir.isDirectory()){
- return dumpDir;
- }
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpFolder(String folderName){
- String path = String.format("%s%s%s", this.getDumpConfigValue(), FILE_SEPARATOR, folderName);
- File dumpDir = new File(path);
- if(dumpDir.exists() && dumpDir.isDirectory()){
- return dumpDir;
- }else{
- return null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public File getDumpEntryFile(String folderName, String fileName){
- String path = String.format("%s%s%s%s%s", this.getDumpConfigValue(), FILE_SEPARATOR, folderName, FILE_SEPARATOR, fileName);
- File dumpEntry = new File(path);
- if(dumpEntry.exists() && dumpEntry.isFile()){
- return dumpEntry;
- }else{
- return null;
- }
- }
-
- private String getDumpConfigValue(){
- return String.format("serviceability%sdumps", FILE_SEPARATOR);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubExportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubExportedPackageHolder.java
deleted file mode 100644
index 96eaa9e..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubExportedPackageHolder.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-
-
-/**
- */
-public final class StubExportedPackageHolder implements ExportedPackageHolder {
-
- private final String packageName;
-
- public StubExportedPackageHolder(String packageName) {
- this.packageName = packageName;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.packageName;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersion() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getExportingBundle() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<ImportedPackageHolder> getConsumers() {
- return new ArrayList<ImportedPackageHolder>();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAttributes() {
- return new HashMap<String, String>();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getDirectives() {
- return new HashMap<String, String>();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubImportedPackageHolder.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubImportedPackageHolder.java
deleted file mode 100644
index 2aa65e9..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubImportedPackageHolder.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.ExportedPackageHolder;
-import org.eclipse.virgo.apps.admin.core.ImportedPackageHolder;
-
-
-
-/**
- */
-public final class StubImportedPackageHolder implements ImportedPackageHolder {
-
- private final String packageName;
-
- public StubImportedPackageHolder(String packageName) {
- this.packageName = packageName;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.packageName;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getVersionConstraint() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolved() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public ExportedPackageHolder getProvider() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public BundleHolder getImportingBundle() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAttributes() {
- return new HashMap<String, String>();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getDirectives() {
- return new HashMap<String, String>();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubModuleContextAccessor.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubModuleContextAccessor.java
deleted file mode 100644
index a79c1b9..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubModuleContextAccessor.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import org.osgi.framework.Bundle;
-
-import org.eclipse.virgo.kernel.module.Component;
-import org.eclipse.virgo.kernel.module.ModuleContext;
-import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
-import org.eclipse.virgo.kernel.module.NoSuchComponentException;
-
-
-/**
- */
-public class StubModuleContextAccessor implements ModuleContextAccessor {
-
- /**
- * {@inheritDoc}
- */
- public ModuleContext getModuleContext(Bundle arg0) {
- return new ModuleContext() {
-
- public String getDisplayName() {
- return "testDisplayName";
- }
-
- public String[] getComponentNames() {
- return new String[0];
- }
-
- public Component getComponent(String arg0) throws NoSuchComponentException {
- throw new NoSuchComponentException("fail");
- }
-
- public Object getApplicationContext() {
- return new Object();
- }
- };
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFramework.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFramework.java
deleted file mode 100644
index 67a9039..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFramework.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Version;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiFramework;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-import org.eclipse.virgo.util.osgi.manifest.BundleManifest;
-
-/**
- */
-final class StubQuasiFramework implements QuasiFramework {
-
- public static final String TEST_PACKAGE_SEARCH = "com.foo.bar";
-
- public static final String TEST_INSTALL_LOCATION = "src/test/resources";
-
- public static final long EXISTING_ID = 4;
-
- public static final String EXISTING_NAME = "bundleName";
-
- public static final Version EXISTING_VERSION = new Version("2.0");
-
- /**
- * {@inheritDoc}
- */
- public void commit() throws BundleException {
- }
-
- /**
- * {@inheritDoc}
- */
- public List<QuasiResolutionFailure> diagnose(long bundleId) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle getBundle(long bundleId) {
- if(bundleId == EXISTING_ID){
- return new StubQuasiLiveBundle(EXISTING_ID, null);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle getBundle(String name, Version version) {
- if(EXISTING_NAME.equals(name) && EXISTING_VERSION.equals(version)) {
- return new StubQuasiLiveBundle(EXISTING_ID, null);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<QuasiBundle> getBundles() {
- ArrayList<QuasiBundle> arrayList = new ArrayList<QuasiBundle>();
- arrayList.add(new StubQuasiLiveBundle(EXISTING_ID, null));
- return arrayList;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle install(URI location, BundleManifest bundleManifest) throws BundleException {
- if(TEST_INSTALL_LOCATION.equals(location)) {
- return new StubQuasiLiveBundle(EXISTING_ID, null);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<QuasiResolutionFailure> resolve() {
- return new ArrayList<QuasiResolutionFailure>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void destroy() {
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFrameworkFactory.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFrameworkFactory.java
deleted file mode 100644
index faf6929..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiFrameworkFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.io.File;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiFramework;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory;
-
-
-/**
- */
-public final class StubQuasiFrameworkFactory implements QuasiFrameworkFactory {
-
- /**
- * {@inheritDoc}
- */
- public QuasiFramework create() {
- return new StubQuasiFramework();
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiFramework create(File stateDump) {
- return new StubQuasiFramework();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveBundle.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveBundle.java
deleted file mode 100644
index c26ce12..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveBundle.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.kernel.artifact.plan.PlanDescriptor.Provisioning;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiRequiredBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
-
-public class StubQuasiLiveBundle implements QuasiLiveBundle {
-
- public static final String TEST_NAME = "fake.test.bundle";
-
- public static final Version TEST_VERSION = new Version("1.2.3.test");
-
- private final Bundle bundle;
-
- private final long id;
-
- private volatile Provisioning provisioning = Provisioning.AUTO;
-
- public StubQuasiLiveBundle(long id, Bundle bundle) {
- this.bundle = bundle;
- this.id = id;
- }
-
- public Bundle getBundle() {
- return this.bundle;
- }
-
- public long getBundleId() {
- return this.id;
- }
-
- public List<QuasiBundle> getDependents() {
- return new ArrayList<QuasiBundle>();
- }
-
- public List<QuasiExportPackage> getExportPackages() {
- return new ArrayList<QuasiExportPackage>();
- }
-
- public List<QuasiBundle> getFragments() {
- return new ArrayList<QuasiBundle>();
- }
-
- public List<QuasiBundle> getHosts() {
- return new ArrayList<QuasiBundle>();
- }
-
- public List<QuasiImportPackage> getImportPackages() {
- return new ArrayList<QuasiImportPackage>();
- }
-
- public List<QuasiRequiredBundle> getRequiredBundles() {
- return new ArrayList<QuasiRequiredBundle>();
- }
-
- public String getSymbolicName() {
- return TEST_NAME;
- }
-
- public Version getVersion() {
- return TEST_VERSION;
- }
-
- public boolean isResolved() {
- return false;
- }
-
- public void uninstall() {
- }
-
- public List<QuasiLiveService> getExportedServices() {
- return new ArrayList<QuasiLiveService>();
- }
-
- public List<QuasiLiveService> getImportedServices() {
- return new ArrayList<QuasiLiveService>();
- }
-
- public String getState() {
- return "Not A State";
- }
-
- public File getBundleFile() {
- return null;
- }
-
- @Override
- public void setProvisioning(Provisioning provisioning) {
- this.provisioning = provisioning;
- }
-
- @Override
- public Provisioning getProvisioning() {
- return this.provisioning;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveService.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveService.java
deleted file mode 100644
index 6498b5c..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiLiveService.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveBundle;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-
-/**
- */
-final public class StubQuasiLiveService implements QuasiLiveService {
-
- private long serviceId;
-
- private QuasiLiveBundle provider;
-
- public StubQuasiLiveService(long serviceId, QuasiLiveBundle provider) {
- this.serviceId = serviceId;
- this.provider = provider;
- }
-
- public List<QuasiLiveBundle> getConsumers() {
- return new ArrayList<QuasiLiveBundle>();
- }
-
- public Map<String, String> getPropertyMap() {
- return new HashMap<String, String>();
- }
-
- public QuasiLiveBundle getProvider() {
- return provider;
- }
-
- public long getServiceId() {
- return this.serviceId;
- }
-
- public int compareTo(QuasiLiveService o) {
- return 0;
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, Object> getProperties() {
- return new HashMap<String, Object>();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiPackages.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiPackages.java
deleted file mode 100644
index 53027d9..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiPackages.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiExportPackage;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiImportPackage;
-import org.eclipse.virgo.kernel.shell.state.QuasiPackage;
-
-
-/**
- */
-public class StubQuasiPackages implements QuasiPackage {
-
- private String packageName;
-
- public StubQuasiPackages(String packageName) {
- this.packageName = packageName;
- }
-
- /**
- * {@inheritDoc}
- */
- public List<QuasiExportPackage> getExporters() {
- return new ArrayList<QuasiExportPackage>();
- }
-
- /**
- * {@inheritDoc}
- */
- public List<QuasiImportPackage> getImporters() {
- return new ArrayList<QuasiImportPackage>();
- }
-
- /**
- * {@inheritDoc}
- */
- public String getPackageName() {
- return this.packageName;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiRequiredBundle.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiRequiredBundle.java
deleted file mode 100644
index 0e29e4d..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiRequiredBundle.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiRequiredBundle;
-import org.eclipse.virgo.util.osgi.manifest.VersionRange;
-
-/**
- */
-public class StubQuasiRequiredBundle implements QuasiRequiredBundle {
-
- private final long requirer;
-
- private final long provider;
-
- private final String bundleName;
-
- public StubQuasiRequiredBundle(String bundleName, long provider, long requirer) {
- this.bundleName = bundleName;
- this.provider = provider;
- this.requirer = requirer;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle getProvider() {
- return new StubQuasiLiveBundle(this.provider, null);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getRequiredBundleName() {
- return this.bundleName;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle getRequiringBundle() {
- return new StubQuasiLiveBundle(this.requirer, null);
- }
-
- /**
- * {@inheritDoc}
- */
- public VersionRange getVersionConstraint() {
- return VersionRange.NATURAL_NUMBER_RANGE;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isResolved() {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, Object> getAttributes() {
- return new HashMap<String, Object>();
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, Object> getDirectives() {
- return new HashMap<String, Object>();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiResolutionFaliure.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiResolutionFaliure.java
deleted file mode 100644
index 8f3bb51..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubQuasiResolutionFaliure.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-
-
-/**
- */
-public class StubQuasiResolutionFaliure implements QuasiResolutionFailure {
-
- private final String description;
- private final long id;
-
- public StubQuasiResolutionFaliure(String description, long id) {
- this.description = description;
- this.id = id;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getDescription() {
- return this.description;
- }
-
- /**
- * {@inheritDoc}
- */
- public QuasiBundle getUnresolvedQuasiBundle() {
- return new StubQuasiLiveBundle(this.id, null);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubStateService.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubStateService.java
deleted file mode 100644
index 93dcadf..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubStateService.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiResolutionFailure;
-import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
-import org.eclipse.virgo.kernel.shell.state.QuasiPackage;
-import org.eclipse.virgo.kernel.shell.state.StateService;
-
-/**
- */
-final public class StubStateService implements StateService {
-
- public static final String TEST_PACKAGE_SEARCH = "com.foo.bar";
-
- public static final String TEST_REGION_NAME = "myRegion";
-
- public static final String TEST_INSTALL_LOCATION = "src/test/resources";
-
- private static final long EXISTING_ID = 4;
-
- private boolean expectNull;
-
- public void setNullExpectations(){
- this.expectNull = true;
- }
-
- public void setNotNullExpectations(){
- this.expectNull = false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<QuasiBundle> getAllBundles(File source) {
- this.checkNull(source);
- ArrayList<QuasiBundle> arrayList = new ArrayList<QuasiBundle>();
- arrayList.add(new StubQuasiLiveBundle(EXISTING_ID, null));
- return arrayList;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public QuasiBundle getBundle(File source, long bundleId){
- this.checkNull(source);
- if(bundleId == EXISTING_ID){
- return new StubQuasiLiveBundle(EXISTING_ID, null);
- }
- return null;
- }
-
- @Override
- public String getBundleRegionName(long bundleId) {
- if(bundleId == EXISTING_ID){
- return TEST_REGION_NAME;
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<QuasiLiveService> getAllServices(File source) {
- this.checkNull(source);
- return new ArrayList<QuasiLiveService>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public QuasiPackage getPackages(File source, String packageName) {
- this.checkNull(source);
- if(packageName.equals(TEST_PACKAGE_SEARCH)) {
- return new StubQuasiPackages(TEST_PACKAGE_SEARCH);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public QuasiLiveService getService(File source, long serviceId) {
- this.checkNull(source);
- if(serviceId == EXISTING_ID){
- return new StubQuasiLiveService(serviceId, new StubQuasiLiveBundle(EXISTING_ID, null));
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<QuasiBundle> search(File source, String term) {
- this.checkNull(source);
- return new ArrayList<QuasiBundle>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<QuasiResolutionFailure> getResolverReport(File source, long bundleId) {
- this.checkNull(source);
- return new ArrayList<QuasiResolutionFailure>();
- }
-
- private void checkNull(File source){
- if(this.expectNull){
- assertNull(source);
- } else {
- assertNotNull(source);
- }
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubWorkArea.java b/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubWorkArea.java
deleted file mode 100644
index 97a5940..0000000
--- a/org.eclipse.virgo.apps.admin.core/src/test/java/org/eclipse/virgo/apps/admin/core/stubs/StubWorkArea.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.core.stubs;
-
-import org.osgi.framework.Bundle;
-
-import org.eclipse.virgo.kernel.services.work.WorkArea;
-import org.eclipse.virgo.util.io.PathReference;
-
-
-/**
- */
-public class StubWorkArea implements WorkArea {
-
- /**
- * {@inheritDoc}
- */
- public Bundle getOwner() {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public PathReference getWorkDirectory() {
- return new PathReference("target");
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.core/template.mf b/org.eclipse.virgo.apps.admin.core/template.mf
deleted file mode 100644
index 78ff483..0000000
--- a/org.eclipse.virgo.apps.admin.core/template.mf
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Name: Admin Console Core Bundle
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.virgo.apps.admin.core
-Bundle-Version: ${version}
-Import-Template:
- javax.management.*;version="0",
- org.eclipse.virgo.kernel.*;version="${org.eclipse.virgo.kernel:[=.=, +1)}",
- org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=, +1)}",
- org.springframework.*;version="${org.springframework:[2.5.6, +1)}",
- org.slf4j;version="${org.slf4j:[=.=.=, +1)}",
- org.osgi.framework.*;version="0",
- org.osgi.service.cm.*;version="0"
-Excluded-Exports:
- org.eclipse.virgo.apps.admin.core.artifact.*,
- org.eclipse.virgo.apps.admin.core.dump.*,
- org.eclipse.virgo.apps.admin.core.state.*
diff --git a/org.eclipse.virgo.apps.admin.web/.classpath b/org.eclipse.virgo.apps.admin.web/.classpath
deleted file mode 100644
index 653187f..0000000
--- a/org.eclipse.virgo.apps.admin.web/.classpath
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="*.js" kind="src" output="target/test-classes" path="src/test/js"/>
- <classpathentry kind="src" path="src/main/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/APPS_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.web/3.0.5.RELEASE/org.springframework.web-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.web/3.0.5.RELEASE/org.springframework.web-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.web.servlet/3.0.5.RELEASE/org.springframework.web.servlet-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.web.servlet/3.0.5.RELEASE/org.springframework.web.servlet-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/javax.servlet/javax.servlet/3.0.0.v201103241009/javax.servlet-3.0.0.v201103241009.jar" sourcepath="/APPS_IVY_CACHE/javax.servlet/javax.servlet/3.0.0.v201103241009/javax.servlet-sources-3.0.0.v201103241009.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/javax.servlet/javax.servlet.jsp/2.2.0.v201103241009/javax.servlet.jsp-2.2.0.v201103241009.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.test/3.0.5.RELEASE/org.springframework.test-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.test/3.0.5.RELEASE/org.springframework.test-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/javax.servlet/com.springsource.javax.servlet.jsp.jstl/1.2.0.v20110728/com.springsource.javax.servlet.jsp.jstl-1.2.0.v20110728.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/APPS_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.apache.taglibs/com.springsource.org.apache.taglibs.standard/1.1.2.v20110517/com.springsource.org.apache.taglibs.standard-1.1.2.v20110517.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-3.3.0.v20110513.jar" sourcepath="/APPS_IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.5.0.D-20120403105015/org.eclipse.virgo.teststubs.osgi-3.5.0.D-20120403105015.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.teststubs.osgi/3.5.0.D-20120403105015/org.eclipse.virgo.teststubs.osgi-sources-3.5.0.D-20120403105015.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.5.0.D-20120403105200/org.eclipse.virgo.medic-3.5.0.D-20120403105200.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.1.0.M01/org.eclipse.virgo.medic-sources-3.1.0.M01.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.deployer-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.deployer/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.deployer-sources-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.shell/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.shell-3.5.0.D-20120403111529.jar" sourcepath="/APPS_IVY_CACHE/org.eclipse.virgo.kernel/org.eclipse.virgo.kernel.shell/3.5.0.D-20120403111529/org.eclipse.virgo.kernel.shell-sources-3.5.0.D-20120403111529.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.apps.admin.core"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/org.eclipse.virgo.apps.admin.web/.project b/org.eclipse.virgo.apps.admin.web/.project
deleted file mode 100644
index a76ffcc..0000000
--- a/org.eclipse.virgo.apps.admin.web/.project
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.apps.admin.web</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.springsource.server.ide.bundlor.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.virgo.apps.admin.web/.settings/.jsdtscope b/org.eclipse.virgo.apps.admin.web/.settings/.jsdtscope
deleted file mode 100644
index 5d8de19..0000000
--- a/org.eclipse.virgo.apps.admin.web/.settings/.jsdtscope
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
- <attributes>
- <attribute name="hide" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
- <classpathentry kind="output" path=""/>
-</classpath>
diff --git a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs b/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
deleted file mode 100644
index 4906cbe..0000000
--- a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Jun 10 16:13:51 BST 2009
-org.eclipse.virgo.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
-eclipse.preferences.version=1
diff --git a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.component b/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index ebc4447..0000000
--- a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-modules id="moduleCoreId" project-version="1.5.0">
-<wb-module deploy-name="com.springsource.server.admin.web">
-<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/js"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
-<property name="context-root" value="admin"/>
-<property name="java-output-path" value="/target/classes"/>
-</wb-module>
-</project-modules>
diff --git a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml b/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 45eba1c..0000000
--- a/org.eclipse.virgo.apps.admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <fixed facet="jst.web"/>
- <fixed facet="jst.java"/>
- <installed facet="jst.web" version="2.5"/>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
- <installed facet="jst.java" version="6.0"/>
-</faceted-project>
diff --git a/org.eclipse.virgo.apps.admin.web/.springBeans b/org.eclipse.virgo.apps.admin.web/.springBeans
deleted file mode 100644
index 34b281c..0000000
--- a/org.eclipse.virgo.apps.admin.web/.springBeans
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beansProjectDescription>
- <version>1</version>
- <pluginVersion><![CDATA[2.3.0.200912170948-RELEASE]]></pluginVersion>
- <configSuffixes>
- <configSuffix><![CDATA[xml]]></configSuffix>
- </configSuffixes>
- <enableImports><![CDATA[false]]></enableImports>
- <configs>
- </configs>
- <configSets>
- </configSets>
-</beansProjectDescription>
diff --git a/org.eclipse.virgo.apps.admin.web/build.xml b/org.eclipse.virgo.apps.admin.web/build.xml
deleted file mode 100644
index b13732f..0000000
--- a/org.eclipse.virgo.apps.admin.web/build.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.virgo.apps.admin.web">
-
- <property file="${basedir}/../build.properties"/>
- <property file="${basedir}/../build.versions"/>
- <import file="${basedir}/../virgo-build/wab/default.xml"/>
-
-</project>
diff --git a/org.eclipse.virgo.apps.admin.web/ivy.xml b/org.eclipse.virgo.apps.admin.web/ivy.xml
deleted file mode 100644
index 9212f8b..0000000
--- a/org.eclipse.virgo.apps.admin.web/ivy.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
-<ivy-module
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
- version="1.3">
-
- <info organisation="org.eclipse.virgo.apps" module="${ant.project.name}"/>
-
- <configurations>
- <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
- </configurations>
-
- <publications>
- <artifact name="${ant.project.name}" type="wab" ext="jar"/>
- <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
- </publications>
-
- <dependencies>
- <!-- === PROVIDED-COMPILE============================================ -->
- <dependency org="org.eclipse.virgo.nano" name="org.eclipse.virgo.deployer.api" rev="${org.eclipse.virgo.nano}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.shell" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.model" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer" rev="${org.eclipse.virgo.kernel}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.web" name="org.eclipse.virgo.web.dm" rev="${org.eclipse.virgo.web}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util}" conf="provided->compile"/>
- <dependency org="org.eclipse.virgo.apps" name="org.eclipse.virgo.apps.admin.core" rev="latest.integration" conf="provided->compile"/>
- <!-- === RUNTIME-DEFAULT =========================================== -->
- <!-- === PROVIDED-RUNTIME =========================================== -->
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="provided->runtime"/>
- <dependency org="javax.servlet" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="${javax.servlet.jsp.jstl}" conf="provided->runtime"/>
- <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
- <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.fileupload" rev="${org.apache.commons.fileupload}" conf="provided->runtime"/>
- <dependency org="org.apache.commons" name="com.springsource.org.apache.commons.io" rev="${org.apache.commons.io}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.web" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework" name="org.springframework.web.servlet" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.eclipse.gemini" name="org.eclipse.gemini.blueprint.core" rev="${org.eclipse.gemini.blueprint}" conf="provided->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="provided->runtime"/>
- <!-- === TEST ====================================================== -->
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
- <dependency org="org.springframework" name="org.springframework.test" rev="${org.springframework}" conf="test->runtime"/>
- <dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
-
- <override org="org.springframework" rev="${org.springframework}"/>
- </dependencies>
-
-</ivy-module>
diff --git a/org.eclipse.virgo.apps.admin.web/lib/.version b/org.eclipse.virgo.apps.admin.web/lib/.version
deleted file mode 100644
index 6396fc4..0000000
--- a/org.eclipse.virgo.apps.admin.web/lib/.version
+++ /dev/null
@@ -1,2 +0,0 @@
-virgo.kernel.version=test.version.kernel
-virgo.server.version=test.version
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/AppController.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/AppController.java
deleted file mode 100644
index a141b82..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/AppController.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.virgo.apps.admin.web.internal.AdminConsoleUtil;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-
-/**
- * <p>
- * AppController deals with requests for the console landing page, general information view and links.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * AppController is threadsafe
- *
- */
-@Controller
-public final class AppController {
-
- private AdminConsoleUtil adminConsoleUtil = new AdminConsoleUtil();
-
- /**
- * Custom handler for displaying a list of properties.
- * @return ModelAndView to render
- */
- @RequestMapping("/info/overview.htm")
- public ModelAndView overview() {
- return new ModelAndView("info-overview").addObject("properties", this.getServerProperties());
- }
-
- private Map<String, String> getServerProperties() {
- Map<String, String> props = new TreeMap<String, String>();
- props.put("Virgo Server Version", this.adminConsoleUtil.getServerVersion());
- props.put("Operating System", this.adminConsoleUtil.getOperatingSystem());
- props.put("Java VM Description", this.adminConsoleUtil.getVMDesc());
- props.put("Java Version", this.adminConsoleUtil.getJavaDesc());
- props.put("Server Time Zone", this.adminConsoleUtil.getUserTimeZone());
- return props;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ArtifactController.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ArtifactController.java
deleted file mode 100644
index 9eb79f0..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ArtifactController.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.ServletRequestBindingException;
-import org.springframework.web.bind.ServletRequestUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.servlet.ModelAndView;
-
-import org.eclipse.virgo.apps.admin.web.internal.DojoTreeFormatter;
-import org.eclipse.virgo.kernel.shell.model.helper.ArtifactAccessor;
-import org.eclipse.virgo.kernel.shell.model.helper.RamAccessorHelper;
-import org.eclipse.virgo.apps.admin.core.ArtifactService;
-
-/**
- * <p>
- * ArtifactController handles all requests that need the RAM to be rendered for the artifact page/view.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * ArtifactController is threadsafe, under the assumption that {@link ArtifactService} is also thread safe.
- *
- */
-@Controller
-public final class ArtifactController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ArtifactController.class);
-
- private static final String AJAX_JSON_CONTENT_TYPE = "application/json";
-
- private static final String TYPE = "type";
-
- private static final String NAME = "name";
-
- private static final String VERSION = "version";
-
- private static final String REGION = "region";
-
- private static final String PARENT = "parent";
-
- private final ArtifactService artifactService;
-
- private final DojoTreeFormatter dojoTreeJsonFormatter;
-
- private final RamAccessorHelper ramAccessorHelper;
-
- /**
- * Simple constructor taking an {@link ArtifactService} instance to provide any data required to render requests
- *
- * @param artifactService data to render requests
- * @param dojoTreeJsonFormatter formatter
- * @param moduleContextAccessor context
- * @param stateInspectorService state
- * @param ramAccessorHelper assistance
- */
- @Autowired
- public ArtifactController(ArtifactService artifactService, DojoTreeFormatter dojoTreeJsonFormatter, RamAccessorHelper ramAccessorHelper) {
- this.artifactService = artifactService;
- this.dojoTreeJsonFormatter = dojoTreeJsonFormatter;
- this.ramAccessorHelper = ramAccessorHelper;
-
- }
-
- /**
- * Custom handler for displaying a list of all installed applications.
- * @param request controlling response
- * @return ModelAndView to render
- */
- @RequestMapping("/artifact/overview.htm")
- public ModelAndView overview(HttpServletRequest request) {
- String msg = request.getParameter("message");
- if (msg == null || "".equals(msg)) {
- return new ModelAndView("artifact-overview");
- }
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- /**
- * Custom handler for deploying an application.
- * @param request controlling response
- * @return ModelAndView to render
- */
- @RequestMapping("/artifact/deploy.htm")
- public ModelAndView deploy(HttpServletRequest request) {
- MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
- MultipartFile multipartFile = multipartRequest.getFile("application");
- String msg;
- if (multipartFile == null || multipartFile.isEmpty()) {
- msg = "Error: Please select the artifact you would like to upload.";
- } else {
- msg = this.deployFile(multipartFile);
- }
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- private String deployFile(MultipartFile multipartFile) {
- File dest = new File(this.artifactService.getStagingDirectory().getAbsolutePath(), multipartFile.getOriginalFilename());
- try {
- multipartFile.transferTo(dest);
- return this.artifactService.deploy(dest);
- } catch (IOException e) {
- String msg = "An error occurred while transferring an uploaded file to [" + dest.getAbsolutePath()
- + "]. Consult the serviceability output for further details.";
- LOGGER.warn(msg, e);
- return msg;
- }
- }
-
- /**
- * Custom handler for performing an action upon an artifact.
- * @param request controlling response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException for missing or unparsable parameters
- */
- @RequestMapping("/artifact/do/start")
- public ModelAndView actionStart(HttpServletRequest request) throws ServletRequestBindingException {
- String type = ServletRequestUtils.getRequiredStringParameter(request, TYPE);
- String name = ServletRequestUtils.getRequiredStringParameter(request, NAME);
- String version = ServletRequestUtils.getRequiredStringParameter(request, VERSION);
- String region = ServletRequestUtils.getRequiredStringParameter(request, REGION);
-
- String msg = this.ramAccessorHelper.start(type, name, version, region);
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- /**
- * Custom handler for performing an action upon an artifact.
- * @param request controlling response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException for missing or unparsable parameters
- */
- @RequestMapping("/artifact/do/stop")
- public ModelAndView actionStop(HttpServletRequest request) throws ServletRequestBindingException {
- String type = ServletRequestUtils.getRequiredStringParameter(request, TYPE);
- String name = ServletRequestUtils.getRequiredStringParameter(request, NAME);
- String version = ServletRequestUtils.getRequiredStringParameter(request, VERSION);
- String region = ServletRequestUtils.getRequiredStringParameter(request, REGION);
-
- String msg = this.ramAccessorHelper.stop(type, name, version, region);
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- /**
- * Custom handler for performing an action upon an artifact.
- * @param request controlling response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException for missing or unparsable parameters
- */
- @RequestMapping("/artifact/do/uninstall")
- public ModelAndView actionUninstall(HttpServletRequest request) throws ServletRequestBindingException {
- String type = ServletRequestUtils.getRequiredStringParameter(request, TYPE);
- String name = ServletRequestUtils.getRequiredStringParameter(request, NAME);
- String version = ServletRequestUtils.getRequiredStringParameter(request, VERSION);
- String region = ServletRequestUtils.getRequiredStringParameter(request, REGION);
-
- String msg = this.ramAccessorHelper.uninstall(type, name, version, region);
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- /**
- * Custom handler for performing an action upon an artifact.
- * @param request controlling response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException for missing or unparsable parameters
- */
- @RequestMapping("/artifact/do/refresh")
- public ModelAndView actionRefresh(HttpServletRequest request) throws ServletRequestBindingException {
- String type = ServletRequestUtils.getRequiredStringParameter(request, TYPE);
- String name = ServletRequestUtils.getRequiredStringParameter(request, NAME);
- String version = ServletRequestUtils.getRequiredStringParameter(request, VERSION);
- String region = ServletRequestUtils.getRequiredStringParameter(request, REGION);
-
- String msg = this.ramAccessorHelper.refresh(type, name, version, region);
- return new ModelAndView("artifact-overview").addObject("result", msg);
- }
-
- /**
- * Write a representation of the RAM.
- * @param request controlling response
- * @param response formatted descriptions
- * @throws IOException writing response
- * @throws ServletRequestBindingException for missing or unparsable parameters
- */
- @RequestMapping("/artifact/data")
- public void data(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletRequestBindingException {
- String type = ServletRequestUtils.getStringParameter(request, TYPE);
- String name = ServletRequestUtils.getStringParameter(request, NAME);
- String version = ServletRequestUtils.getStringParameter(request, VERSION);
- String region = ServletRequestUtils.getStringParameter(request, REGION);
- String parent = ServletRequestUtils.getStringParameter(request, PARENT);
-
- String responseString;
- if (type == null) {
- responseString = this.dojoTreeJsonFormatter.formatTypes(this.ramAccessorHelper.getTypes());//Top level request
- } else if (type != null && name == null) {
- responseString = this.dojoTreeJsonFormatter.formatArtifactsOfType(parent, this.ramAccessorHelper.getArtifactsOfType(type));//Second level request
- } else if (type != null && name != null && version != null) {
- ArtifactAccessor artifact = this.ramAccessorHelper.getArtifact(type, name, version, region);
- responseString = this.dojoTreeJsonFormatter.formatArtifactDetails(parent, artifact);//All other requests
- } else {
- throw new IllegalArgumentException(String.format("Cannot service request with parameters: %s", request.getQueryString()));
- }
-
- StringBuilder sb = new StringBuilder();
- sb.append("{");
- sb.append("identifier: 'id',");
- sb.append("label: 'label',");
- sb.append("items: [ ");
- if(responseString != null) {
- sb.append(responseString);
- }
- sb.append("]}");
-
- response.setContentType(AJAX_JSON_CONTENT_TYPE);
- PrintWriter writer = response.getWriter();
- writer.write(sb.toString());
- writer.flush();
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ConfigAdminController.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ConfigAdminController.java
deleted file mode 100644
index f2584b9..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/ConfigAdminController.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.ServletRequestBindingException;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-/**
- * <p>
- * ConfigAdminController deals with requests for configuration information from config admin.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * ConfigAdminController is threadsafe
- *
- */
-@Controller
-public final class ConfigAdminController {
-
- private final ConfigurationAdmin configurationAdmin;
-
- /**
- * Simple constructor taking an {@link ConfigurationAdmin} instance to provide any data required to render requests
- * @param configurationAdmin data for request rendering
- */
- @Autowired
- public ConfigAdminController(ConfigurationAdmin configurationAdmin) {
- this.configurationAdmin = configurationAdmin;
- }
-
- /**
- * Custom handler for displaying all the present configuration
- *
- * @return ModelAndView to render
- */
- @SuppressWarnings("unchecked")
- @RequestMapping("/config/overview.htm")
- public ModelAndView overview() {
- Configuration[] configurations = new Configuration[0];
- try {
- configurations = this.configurationAdmin.listConfigurations(null);
- } catch (Exception e) {
- // no-op
- }
- Map<String, Map<String, String>> configs = new HashMap<String, Map<String,String>>();
- if(configurations != null){
- Map<String, String> tempProps;
- for(Configuration c : configurations){
- tempProps = new HashMap<String, String>();
- Enumeration<Object> keys = c.getProperties().keys();
- while(keys.hasMoreElements()){
- Object nextElement = keys.nextElement();
- tempProps.put(nextElement.toString(), c.getProperties().get(nextElement).toString());
- }
- configs.put(c.getPid(), tempProps);
- }
- }
- Map<String, Object> model = new HashMap<String, Object>();
- model.put("configurations", configs);
- return createStateModelAndView("config-overview", model);
- }
-
- /**
- * Add any common model items and return a {@link ModelAndView}
- * @throws ServletRequestBindingException
- */
- private ModelAndView createStateModelAndView(String viewName, Map<String, Object> model) {
- return new ModelAndView(viewName, model);
- }
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/DumpController.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/DumpController.java
deleted file mode 100644
index 2adcc07..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/DumpController.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.eclipse.virgo.apps.admin.web.internal.DumpListFormatterUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.ServletRequestBindingException;
-import org.springframework.web.bind.ServletRequestUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-import org.eclipse.virgo.apps.admin.core.DumpInspectorService;
-
-/**
- * <p>
- * DumpController handles all requests from the dump inspector page of the admin console
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * DumpController is thread safe
- *
- */
-@Controller
-public final class DumpController {
-
- private final DumpInspectorService dumpInspectorService;
-
- private final DumpListFormatterUtil dumpListFormatterUtil;
-
- private static final int DUMP_TYPE = 1;
-
- private static final int ENTRY_TYPE = 2;
-
- /**
- * Simple constructor taking an {@link DumpInspectorService} instance to provide any data required to render requests
- * @param dumpManagerService for request rendering
- * @param dumpListFormatterUtil for general list formatting
- */
- @Autowired
- public DumpController(DumpInspectorService dumpManagerService, DumpListFormatterUtil dumpListFormatterUtil) {
- this.dumpInspectorService = dumpManagerService;
- this.dumpListFormatterUtil = dumpListFormatterUtil;
- }
-
- /**
- * Custom handler for displaying the list of available dumps
- * @return ModelAndView to render
- */
- @RequestMapping("/dump/inspector.htm")
- public ModelAndView dump() {
- Map<String, String> dumps = this.dumpListFormatterUtil.getAvaliableDumps();
- List<String> dumpEntries = Collections.emptyList();
- String inspection = "";
- return createContextDumpModelAndView(dumps, null, dumpEntries, null, inspection);
- }
-
- /**
- * Custom handler for displaying the list of available dumps and dump entries
- * @param request to limit response
- * @return ModleAndView to render
- */
- @RequestMapping("/dump/entry.htm")
- public ModelAndView dumpEntry(HttpServletRequest request) {
- String dumpID = ServletRequestUtils.getStringParameter(request, "dumpID", null);
- int requestType = getRequestType(request);
- Map<String, String> dumps = this.dumpListFormatterUtil.getAvaliableDumps();
-
- String dumpEntryName = null;
- List<String> dumpEntries = null;
- String inspection = null;
-
- if(requestType == ENTRY_TYPE || dumpID == null){
- dumpEntryName = ServletRequestUtils.getStringParameter(request, "dumpEntryName", null);
- dumpEntries = this.dumpInspectorService.getDumpEntries(dumpID);
- inspection = this.dumpInspectorService.getDumpEntry(dumpID, dumpEntryName);
- }
- return createContextDumpModelAndView(dumps, dumpID, dumpEntries, dumpEntryName, inspection);
- }
-
- private ModelAndView createContextDumpModelAndView(Map<String, String> dumps, String selectedDump, List<String> entries, String selectedEntry, String inspection) {
- String formattedSelectedDump = null;
- if(selectedDump != null) {
- formattedSelectedDump = dumps.get(selectedDump);
- }
- return new ModelAndView("dump-overview").addObject("dumps", dumps)
- .addObject("selectedDump", selectedDump)
- .addObject("formattedSelectedDump", formattedSelectedDump)
- .addObject("entries", entries)
- .addObject("selectedEntry", selectedEntry)
- .addObject("inspection", inspection);
- }
-
- private int getRequestType(HttpServletRequest request) {
- String buttonName;
- try {
- buttonName = ServletRequestUtils.getStringParameter(request, "Operation");
- if ("Select Dump".equals(buttonName)) {
- return DUMP_TYPE;
- } else {
- return ENTRY_TYPE;
- }
- } catch (ServletRequestBindingException e) {
- return DUMP_TYPE;
- }
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/StateController.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/StateController.java
deleted file mode 100644
index 9585399..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/StateController.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.eclipse.virgo.apps.admin.web.internal.DumpListFormatterUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.ServletRequestBindingException;
-import org.springframework.web.bind.ServletRequestUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-import org.eclipse.virgo.apps.admin.core.BundleHolder;
-import org.eclipse.virgo.apps.admin.core.DumpInspectorService;
-import org.eclipse.virgo.apps.admin.core.FailedResolutionHolder;
-import org.eclipse.virgo.apps.admin.core.PackagesCollection;
-import org.eclipse.virgo.apps.admin.core.ServiceHolder;
-import org.eclipse.virgo.apps.admin.core.StateHolder;
-
-/**
- * <p>
- * Requests made with either a 'null' or 'Live' value in the state field will get the
- * live view. Otherwise the requested state dump will be searched for.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * StateManagerController is thread safe
- *
- */
-@Controller
-public final class StateController {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(StateController.class);
-
- private static final String BUNDLE_ID_NAME = "id";
-
- private static final String STATE_NAME = "state";
-
- private static final String FORMATTED_STATE_NAME = "fState";
-
- private static final String LIVE_STATE_NAME = "Live";
-
- private static final String BUNDLE_NAME = "name";
-
- private static final String VERSION_NAME = "version";
-
- private static final String REGION_NAME = "region";
-
- private final StateHolder stateHolder;
-
- private final DumpListFormatterUtil dumpListFormatterUtil;
-
-
- /**
- * Simple constructor taking an {@link DumpInspectorService} instance to provide any data required to render requests
- * @param stateHolder for data to render requests
- * @param dumpListFormatterUtil for general list formatting
- */
- @Autowired
- public StateController(StateHolder stateHolder, DumpListFormatterUtil dumpListFormatterUtil) {
- this.stateHolder = stateHolder;
- this.dumpListFormatterUtil = dumpListFormatterUtil;
- }
-
- /**
- * Custom handler for displaying the list of available bundles
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/bundles.htm")
- public ModelAndView bundles(HttpServletRequest request) throws ServletRequestBindingException {
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- List<BundleHolder> bundleHolders = this.stateHolder.getAllBundles(newState);
- Collections.sort(bundleHolders);
- Map<String, Object> model = new HashMap<String, Object>();
- model.put("bundles", bundleHolders);
- return createStateModelAndView("state-bundles", request, model);
- }
-
- /**
- * Custom handler for displaying the list of available services
- *
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/services.htm")
- public ModelAndView services(HttpServletRequest request) throws ServletRequestBindingException {
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- List<ServiceHolder> serviceHolders = this.stateHolder.getAllServices(newState);
- Collections.sort(serviceHolders);
- Map<String, Object> model = new HashMap<String, Object>();
- model.put("services", serviceHolders);
- return createStateModelAndView("state-services", request, model);
- }
-
- /**
- * Custom handler for displaying detailed information on a bundle
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/bundle.htm")
- public ModelAndView bundle(HttpServletRequest request) throws ServletRequestBindingException {
- Long bundleId = ServletRequestUtils.getLongParameter(request, BUNDLE_ID_NAME);
- String name = ServletRequestUtils.getStringParameter(request, BUNDLE_NAME);
- String version = ServletRequestUtils.getStringParameter(request, VERSION_NAME);
- String region = ServletRequestUtils.getStringParameter(request, REGION_NAME);
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- Map<String, Object> model = new HashMap<String, Object>();
-
- BundleHolder bundleHolder = null;
- try {
- if(bundleId != null){
- bundleHolder = this.stateHolder.getBundle(newState, bundleId.longValue());
- } else if(name != null && version != null && region != null) {
- bundleHolder = this.stateHolder.getBundle(newState, name, version, region);
- }
- } catch(Exception e) {
- LOGGER.warn(String.format("Error while retrieving bundle '%d%s'", bundleId, name), e);
- }
-
- if(bundleHolder != null) {
- model.put("title", String.format("Viewing bundle '%s: %s'", bundleHolder.getSymbolicName(), bundleHolder.getVersion()));
- model.put("bundle", bundleHolder);
- } else {
- model.put("title", "No bundle has been requested");
- }
-
- return createStateModelAndView("state-bundle", request, model);
- }
-
- /**
- * Custom handler for displaying the list of available dumps
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/packages.htm")
- public ModelAndView packages(HttpServletRequest request) throws ServletRequestBindingException {
- String packageName = ServletRequestUtils.getStringParameter(request, "name");
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- Map<String, Object> model = new HashMap<String, Object>();
- if(packageName != null){
- PackagesCollection packages = this.stateHolder.getPackages(newState, packageName);
- model.put("importers", packages.getImported());
- model.put("exporters", packages.getExported());
- model.put("title", String.format("Viewing package '%s'", packages.getPackageName()));
- } else {
- model.put("title", "No package name has been provided");
- }
- return createStateModelAndView("state-packages", request, model);
- }
-
- /**
- * Custom handler for displaying the possible resolution issues with the requested bundle
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/resolve.htm")
- public ModelAndView resolve(HttpServletRequest request) throws ServletRequestBindingException {
- Long bundleId = ServletRequestUtils.getLongParameter(request, BUNDLE_ID_NAME);
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- Map<String, Object> model = new HashMap<String, Object>();
- if(bundleId != null){
- List<FailedResolutionHolder> failedResolutions = this.stateHolder.getResolverReport(newState, bundleId);
- if(failedResolutions.size() == 0){
- model.put("title", String.format("No resolution faliures found for bundle '%s'", bundleId));
- } else {
- FailedResolutionHolder quasiResolutionFailure = failedResolutions.get(0);
- model.put("title", String.format("State resolver report for '%s - %s'", quasiResolutionFailure.getUnresolvedBundle().getSymbolicName(), quasiResolutionFailure.getUnresolvedBundle().getVersion()));
- model.put("failure", failedResolutions);
- }
- } else {
- model.put("title", "No bundle has been requested");
- }
- return createStateModelAndView("state-resolve", request, model);
- }
-
- /**
- * Custom handler for displaying the search results of the given search term
- * @param request to limit response
- * @return ModelAndView to render
- * @throws ServletRequestBindingException getting parameters
- */
- @RequestMapping("/state/search.htm")
- public ModelAndView search(HttpServletRequest request) throws ServletRequestBindingException {
- String term = ServletRequestUtils.getStringParameter(request, "term");
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME);
- Map<String, Object> model = new HashMap<String, Object>();
- if(term != null){
- List<BundleHolder> matchingBundles = this.stateHolder.search(newState, term);
- model.put("title", String.format("Search results for '%s'", term));
- model.put("bundles", matchingBundles);
- } else {
- model.put("title", "No search term given");
- }
- return createStateModelAndView("state-search", request, model);
- }
-
-
- /**
- * Add any common model items and return a {@link ModelAndView}
- *
- * @throws ServletRequestBindingException
- */
- private ModelAndView createStateModelAndView(String viewName, HttpServletRequest request, Map<String, Object> model) throws ServletRequestBindingException {
- Map<String, String> dumps = this.dumpListFormatterUtil.getAvaliableDumps();
- model.put("stateSources", dumps);
- String newState = ServletRequestUtils.getStringParameter(request, STATE_NAME); // Don't want to unformat it so that it reads correct on the next call
- if(newState == null || LIVE_STATE_NAME.equals(newState)){
- model.put(STATE_NAME, LIVE_STATE_NAME);
- model.put(FORMATTED_STATE_NAME, LIVE_STATE_NAME);
- } else {
- model.put(STATE_NAME, newState);
- model.put(FORMATTED_STATE_NAME, dumps.get(newState));
- }
- return new ModelAndView(viewName, model);
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/AdminConsoleUtil.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/AdminConsoleUtil.java
deleted file mode 100644
index cf6eb95..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/AdminConsoleUtil.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web.internal;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.management.ManagementFactory;
-import java.lang.management.OperatingSystemMXBean;
-import java.lang.management.RuntimeMXBean;
-import java.util.Properties;
-
-/**
- * <p>
- * AdminConsoleUtil is a simple class that provides access to various server properties
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * AdminConsoleUtil is threadsafe and immutable.
- *
- */
-public final class AdminConsoleUtil {
-
- private final String version;
-
- public AdminConsoleUtil() {
- this.version = this.readServerVersion("lib/.version");
- }
-
- public String getServerVersion() {
- return this.version;
- }
-
- public String getOperatingSystem() {
- OperatingSystemMXBean os = ManagementFactory.getOperatingSystemMXBean();
- return String.format("%s(%s) - %s", os.getName(), os.getArch(), os.getVersion());
- }
-
- public String getVMDesc() {
- RuntimeMXBean rt = ManagementFactory.getRuntimeMXBean();
- return String.format("%s(%s) - %s", rt.getVmVendor(), rt.getVmName(), rt.getVmVersion());
- }
-
- public String getJavaDesc() {
- String vendor = System.getProperty("java.vendor");
- String version = System.getProperty("java.version");
- return String.format("%s - %s", vendor, version);
- }
-
- public String getUserTimeZone() {
- String timeZone = System.getProperty("user.timezone");
- if (timeZone == null || "".equals(timeZone)) {
- timeZone = "Unavaliable";
- }
- return timeZone;
- }
-
- private final String readServerVersion(String path) {
- String readVersion;
- File versionFile = new File(path);
- Properties versions = new Properties();
- InputStream stream = null;
- try {
- stream = new FileInputStream(versionFile);
- versions.load(stream);
- readVersion = versions.getProperty("virgo.server.version");
- stream.close();
- } catch (IOException e) {
- readVersion = "";
- try {
- if (stream != null) {
- stream.close();
- }
- } catch (IOException e1) {
- // no-op
- }
- }
- return readVersion;
- }
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeFormatter.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeFormatter.java
deleted file mode 100644
index 4c9cc8b..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeFormatter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web.internal;
-
-import java.util.List;
-
-import org.eclipse.virgo.kernel.shell.model.helper.ArtifactAccessor;
-import org.eclipse.virgo.kernel.shell.model.helper.ArtifactAccessorPointer;
-
-/**
- * <p>
- * DojoTreeFormatter knows how to format data from the RAM in to a friendly dojo format.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * DojoTreeFormatter is thread safe
- *
- */
-public interface DojoTreeFormatter {
-
- /**
- * Return a description of all the artifact types in the system that are user installed
- * @param types list of type names to describe
- * @return description
- */
- public String formatTypes(final List<String> types);
-
- /**
- * Return a description of all the artifacts supplied the system that are user installed and of the given type
- * @param parent name of parent
- * @param artifacts to describe
- * @return description
- */
- public String formatArtifactsOfType(final String parent, final List<ArtifactAccessorPointer> artifacts);
-
- /**
- * Return detailed information on the given artifact
- * @param parent name of parent
- * @param artifact to describe
- * @return description
- */
- public String formatArtifactDetails(final String parent, final ArtifactAccessor artifact);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeJsonFormatter.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeJsonFormatter.java
deleted file mode 100644
index 6bba4d8..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DojoTreeJsonFormatter.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web.internal;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import org.springframework.stereotype.Component;
-
-import org.eclipse.virgo.kernel.shell.model.helper.ArtifactAccessor;
-import org.eclipse.virgo.kernel.shell.model.helper.ArtifactAccessorPointer;
-
-/**
- * <p>
- * DojoTreeJsonFormatter takes in rich objects and formats them in to json for use by the artifacts dojo tree
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * DojoTreeJsonFormatter is thread safe
- *
- */
-@Component
-final class DojoTreeJsonFormatter implements DojoTreeFormatter {
-
- private static final String SCOPED = "scoped";
-
- private static final String ATOMIC = "atomic";
-
- private static final String STATE = "State";
-
- private static final String SPRING = "Spring";
-
- private static final String USER_INSTALLED = "user.installed";
-
- private static final String SCOPED_ATOMIC = "scoped-atomic";
-
- private static final String BUNDLE_TYPE = "bundle";
-
- private static final String CONFIG_TYPE = "configuration";
-
- private static final String BUNDLE_LINK = "/admin/web/state/bundle.htm?name=%s&version=%s®ion=%s";
-
- private static final String CONFIG_LINK = "/admin/web/config/overview.htm#%s";
-
- /**
- * {@inheritDoc}
- */
- public String formatTypes(final List<String> types) {
- StringBuilder sb = new StringBuilder();
- if(types != null) {
- Collections.sort(types);
- if (types.size() > 0) {
- for (String type : types) {
- sb.append("{");
- sb.append("id: '").append(type).append("',");
- sb.append("label: '").append(type).append("s',");
- sb.append("type: '").append(type).append("',");
- sb.append("tooltip: 'all user installed ").append(type).append("s',");
- sb.append("children: []");
- sb.append("},");
- }
- sb.deleteCharAt(sb.length() - 1);
- }
- }
- return sb.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- public String formatArtifactsOfType(final String parent, final List<ArtifactAccessorPointer> artifacts) {
- StringBuilder sb = new StringBuilder();
- if(parent != null && artifacts != null) {
- Collections.sort(artifacts);
-
- if (artifacts.size() > 0) {
- for (ArtifactAccessorPointer artifact : artifacts) {
- FormattingData fd = new FormattingData(sb, parent, artifact.getType(), artifact.getName(), artifact.getVersion(), artifact.getRegion());
- renderComplexChild(fd, artifact.getState());
- }
- sb.deleteCharAt(sb.length() - 1);
- }
- }
- return sb.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- public String formatArtifactDetails(final String parent, final ArtifactAccessor artifact) {
- StringBuilder sb = new StringBuilder();
- if(parent != null && artifact != null) {
- FormattingData fd = new FormattingData(sb, parent, artifact.getType(), artifact.getName(), artifact.getVersion(), artifact.getAttributes().get("Region").toString());
-
- if(BUNDLE_TYPE.equals(fd.type)) {
- renderLinkChild(fd, String.format("View this %s artifact", fd.type), String.format(BUNDLE_LINK, fd.name, fd.version, fd.region));
- } else if(CONFIG_TYPE.equals(fd.type)) {
- renderLinkChild(fd, String.format("View this %s artifact", fd.type), String.format(CONFIG_LINK, fd.name));
- }
-
- //Attributes
- Map<String, Object> attributes = artifact.getAttributes();
- processScopedAtomicAttributes(attributes);
- String key, value;
- Set<Entry<String, Object>> attributesEntrySet = attributes.entrySet();
- if(attributesEntrySet.size() > 0) {
- for (Entry<String, Object> attribute : attributesEntrySet) {
- key = attribute.getKey();
- value = attribute.getValue().toString();
- if(!"false".equals(value)) {
- if(SCOPED.equalsIgnoreCase(key) || ATOMIC.equalsIgnoreCase(key) || SCOPED_ATOMIC.equalsIgnoreCase(key)) {
- renderCustomIconChild(fd, key, key);
- } else if("true".equalsIgnoreCase(value)) {
- renderSimpleChild(fd, key);
- } else if (STATE.equalsIgnoreCase(key)) {
- renderCustomIconChild(fd, value, value);
- } else {
- renderSimpleChild(fd, String.format("%s: %s", key, value));
- }
- }
-
- }
- sb.deleteCharAt(sb.length() - 1);
- }
- //Properties
- Set<Entry<String, String>> propertiesEntrySet = artifact.getProperties().entrySet();
- if(propertiesEntrySet.size() > 0) {
- sb.append(",");
- for (Entry<String, String> attribute : propertiesEntrySet) {
- key = attribute.getKey();
- value = attribute.getValue();
- if(!"false".equals(value)) {
- if ("org.eclipse.virgo.web.contextPath".equalsIgnoreCase(key)) {
- renderLinkChild(fd, String.format("%s: %s", key, value), value);
- } else if(SPRING.equalsIgnoreCase(key)){
- renderCustomIconChild(fd, key, key);
- } else if(USER_INSTALLED.equalsIgnoreCase(key)){
- renderSimpleChild(fd, "User installed");
- } else if("true".equalsIgnoreCase(value)) {
- renderSimpleChild(fd, key);
- } else {
- renderSimpleChild(fd, String.format("%s: %s", key, value));
- }
- }
- }
- sb.deleteCharAt(sb.length() - 1);
- }
-
- //Dependents
- Set<ArtifactAccessorPointer> dependents = artifact.getDependents();
- if(dependents.size() > 0) {
- sb.append(",");
- for (ArtifactAccessorPointer dependent : dependents) {
- fd = new FormattingData(sb, parent, dependent.getType(), dependent.getName(), dependent.getVersion(), dependent.getRegion());
- renderComplexChild(fd, dependent.getState());
- }
- sb.deleteCharAt(sb.length() - 1);
- }
- }
- return sb.toString();
- }
-
- private void processScopedAtomicAttributes(Map<String, Object> attributes) {
- boolean containsAtomic = attributes.containsKey(ATOMIC);
- boolean containsScoped = attributes.containsKey(SCOPED);
-
- if(containsScoped && containsAtomic) {
- Object scopedObject = attributes.get(SCOPED);
- boolean scoped = Boolean.parseBoolean(scopedObject.toString());
-
- Object atomicObject = attributes.get(ATOMIC);
- boolean atomic = Boolean.parseBoolean(atomicObject.toString());
-
- if(scoped && atomic) {
- attributes.remove(SCOPED);
- attributes.remove(ATOMIC);
- attributes.put(SCOPED_ATOMIC, "true");
- }
- }
- }
-
- private void renderComplexChild(FormattingData fd, String state) {
- StringBuilder sb = fd.stringBuilder;
- sb.append("{");
- sb.append("id: '").append(fd.parentKey).append(fd.type).append(fd.name).append(fd.version).append(fd.region).append("',");
- sb.append("label: '").append(fd.name).append("-").append(fd.version).append("',");
- sb.append("type: '").append(fd.type).append("',");
- sb.append("name: '").append(fd.name).append("',");
- sb.append("version: '").append(fd.version).append("',");
- sb.append("region: '").append(fd.region).append("',");
- sb.append("state: '").append(state).append("',");
- sb.append("tooltip: '").append(fd.type).append(" artifact',");
- sb.append("children: []");
- sb.append("},");
- }
-
- private void renderSimpleChild(FormattingData fd, String label) {
- StringBuilder sb = fd.stringBuilder;
- sb.append("{");
- sb.append("id: '").append(fd.parentKey).append(fd.type).append(fd.name).append(fd.version).append(fd.region).append(label).append("',");
- sb.append("label: '").append(label).append("'");
- sb.append("},");
- }
-
- private void renderCustomIconChild(FormattingData fd, String label, String iconClass) {
- StringBuilder sb = fd.stringBuilder;
- sb.append("{");
- sb.append("id: '").append(fd.parentKey).append(fd.type).append(fd.name).append(fd.version).append(fd.region).append(label).append("',");
- sb.append("label: '").append(label).append("',");
- sb.append("icon: '").append(iconClass).append("'");
- sb.append("},");
- }
-
- private void renderLinkChild(FormattingData fd, String linkText, String link) {
- StringBuilder sb = fd.stringBuilder;
- sb.append("{");
- sb.append("id: '").append(fd.parentKey).append(fd.type).append(fd.name).append(fd.version).append(fd.region).append(linkText).append("',");
- sb.append("label: '").append(linkText).append("',");
- sb.append("link: '").append(link).append("'");
- sb.append("},");
- }
-
- /**
- *
- * <p>
- * FormattingData is a simple internal data holder as the same set of types are used all over the place
- * </p>
- *
- * FormattingData is thread safe
- *
- */
- private static class FormattingData {
-
- final StringBuilder stringBuilder;
- final String parentKey;
- final String type;
- final String name;
- final String version;
- final String region;
-
- public FormattingData(StringBuilder stringBuilder, String parentKey, String type, String name, String version, String region) {
- this.stringBuilder = stringBuilder;
- this.parentKey = parentKey;
- this.type = type;
- this.name = name;
- this.version = version;
- this.region = region;
- }
-
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DumpListFormatterUtil.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DumpListFormatterUtil.java
deleted file mode 100644
index e529914..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/DumpListFormatterUtil.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web.internal;
-
-import java.util.Map;
-
-/**
- * <p>
- * DumpListFormatterUtil will get a list of the available dump folders and produce a map
- * of folder names to formatted display values.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementation of DumpListFormatterUtil should be thread safe
- *
- */
-public interface DumpListFormatterUtil {
-
- /**
- * If it is not possible to format the name of the dump folder, maybe because it has
- * been renamed, the name of the folder should be used as the display name.
- *
- * @return Map of <Key, Display name>
- */
- public Map<String, String> getAvaliableDumps();
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/StandardDumpListFormatterUtil.java b/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/StandardDumpListFormatterUtil.java
deleted file mode 100644
index 0fe08a6..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/java/org/eclipse/virgo/apps/admin/web/internal/StandardDumpListFormatterUtil.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.apps.admin.web.internal;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import org.eclipse.virgo.apps.admin.core.DumpInspectorService;
-
-
-/**
- * <p>
- * DumpListFormatterUtil will get a list of the available dump folders and produce a map
- * of folder names to formatted display values.
- * </p>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * DumpListFormatterUtil is thread-safe
- *
- */
-@Component
-public final class StandardDumpListFormatterUtil implements DumpListFormatterUtil {
-
- private final DumpInspectorService dumpInspectorService;
-
- @Autowired
- public StandardDumpListFormatterUtil(DumpInspectorService dumpInspectorService) {
- this.dumpInspectorService = dumpInspectorService;
- }
-
- /**
- * {@inheritDoc}
- */
- public Map<String, String> getAvaliableDumps(){
- List<File> avaliableDumps = this.dumpInspectorService.findAvaliableDumps();
- Map<String, String> formattedDumps = new TreeMap<String, String>();
- for(File dumpDirectory : avaliableDumps){
- formattedDumps.put(dumpDirectory.getName(), dumpDirectory.getName());
- }
- return formattedDumps;
- }
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/resources/.gitignore b/org.eclipse.virgo.apps.admin.web/src/main/resources/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/resources/.gitignore
+++ /dev/null
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/admin-servlet.xml b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/admin-servlet.xml
deleted file mode 100644
index 041e03f..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/admin-servlet.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />
-
- <bean id="ramAccessorHelper" class="org.eclipse.virgo.kernel.shell.model.helper.StandardRamAccessorHelper" />
-
- <context:component-scan base-package="org.eclipse.virgo.apps.admin.web" />
-
- <!-- VIEW CONFIG -->
-
- <bean id="topViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/jsp/" />
- <property name="suffix" value=".jsp" />
- </bean>
-
- <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
- <property name="exceptionMappings">
- <props>
- <prop key="java.lang.Exception">error</prop>
- </props>
- </property>
- <property name="warnLogCategory" value="org.eclipse.virgo.apps.admin.web" />
- </bean>
-
-</beans>
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/applicationContext.xml b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/applicationContext.xml
deleted file mode 100644
index f518d69..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/applicationContext.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:osgi="http://www.springframework.org/schema/osgi"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <osgi:reference id="artifactService" interface="org.eclipse.virgo.apps.admin.core.ArtifactService" />
-
- <osgi:reference id="dumpInspectorService" interface="org.eclipse.virgo.apps.admin.core.DumpInspectorService"/>
-
- <osgi:reference id="stateHolder" interface="org.eclipse.virgo.apps.admin.core.StateHolder"/>
-
- <osgi:reference id="configAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" />
-
-</beans>
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/artifact-overview.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/artifact-overview.jsp
deleted file mode 100644
index 6842e2a..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/artifact-overview.jsp
+++ /dev/null
@@ -1,250 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%--
---%><jsp:include page="top.jsp" />
-
-<h1>Artifact Console</h1>
-
-<c:if test="${!(empty result)}">
- <p>The result of the last operation is: <c:out value="${result}" /></p>
-</c:if>
-
-<script language="JavaScript" type="text/javascript">
-/* <![CDATA[ */
- function validateUploadForm() {
- if (document.uploadForm.application.value == null || document.uploadForm.application.value == '') {
- alert("Please select the artifact you would like to upload.");
- document.uploadForm.application.focus();
- return false;
- } else {
- return true;
- }
- }
-/* ]]> */
-</script>
-
-
-<form name="uploadForm" action="<c:url value="deploy.htm" />" method="post" enctype="multipart/form-data">
- <table id="deploy_application" class="bordered-table">
- <tr>
- <th colspan="2">Select an artifact to upload and deploy to Virgo Web Server</th>
- </tr>
- <tr>
- <td id="deploy_application_file" ><input id="deploy_application_file_field" type="file" name="application" size="80"/></td>
- <td id="deploy_application_submit" ><input id="deploy_application_submit_button" type="submit" value="Upload" onclick="validateUploadForm"/></td>
- </tr>
- </table>
-</form>
-<br/>
-
-<script type="text/javascript" language="Javascript">
-/* <![CDATA[ */
- dojo.require("dijit.tree.ForestStoreModel");
- dojo.require("dijit.Tree");
- dojo.require("dojox.data.QueryReadStore");
- dojo.require("dijit.form.Button");
-
-//Data Model
-
- var treeStore = new dojox.data.QueryReadStore({url: "data"});
-
-//Tree Model
-
- function loadChildren(parentItem, complete_cb, error_cb) {
- if(this.store.hasAttribute(parentItem, "name")) {
- requestType = this.store.getValue(parentItem, "type");
- requestName = this.store.getValue(parentItem, "name");
- requestVersion = this.store.getValue(parentItem, "version");
- requestRegion = this.store.getValue(parentItem, "region");
- requestParentId = this.store.getValue(parentItem, "id");
- this.store.fetch({ query: {parent: requestParentId, type: requestType, name: requestName, version: requestVersion, region: requestRegion}, onComplete: complete_cb, onError: error_cb});
- } else if (this.store.hasAttribute(parentItem, "type")) {
- requestType = this.store.getValue(parentItem, "type");
- requestParentId = this.store.getValue(parentItem, "id");
- this.store.fetch({ query: {parent: requestParentId, type: requestType}, onComplete: complete_cb, onError: error_cb});
- }
- return this.inherited(arguments);
- }
-
- dojo.declare("console.ForestStoreModel", dijit.tree.ForestStoreModel, { getChildren: loadChildren });
-
-//Tree Node
-
- function getNewImageNode(iconClass){
- var newNode = dojo.doc.createElement('img'); // dojo.doc is the current document.
- dojo.attr(newNode, "class", "dijitTreeIcon treeAtribute-" + iconClass.toLowerCase());
- dojo.attr(newNode, "wairole", "dijitTreeIcon");
- dojo.attr(newNode, "dojoattachpoint", "iconNode");
- dojo.attr(newNode, "alt", "");
- dojo.attr(newNode, "title", iconClass);
- dojo.attr(newNode, "src", "../../js/dojo/resources/blank.gif");
- dojo.attr(newNode, "role", "presentation");
- return newNode;
- }
-
- function nodePostCreate() {
- if(!this.item.root){
- dojo.attr(this.domNode, "id", this.item.i.id); //Set the id of any node other than the root
-
- if(treeStore.hasAttribute(this.item, "children")) { //Add any extra icons
-
- var firstRenderedNode = this.domNode.firstElementChild;
- if(firstRenderedNode != null){
-
- var nextNode = firstRenderedNode.lastElementChild;
- if(nextNode != null){
-
- var goal = this.domNode.firstElementChild.lastElementChild.firstElementChild;
- if(goal != null){
- if(treeStore.hasAttribute(this.item, "tooltip")) {
- dojo.attr(goal, "title", treeStore.getValue(this.item, "tooltip"));
- }
- if(treeStore.hasAttribute(this.item, "state")) {
- var newNode = getNewImageNode(treeStore.getValue(this.item, "state"));
- dojo.place(newNode, goal, "after");
- }
- }
- var labelNode = this.domNode.firstElementChild.lastElementChild.lastElementChild;
- if(labelNode != null){
- if(treeStore.hasAttribute(this.item, "label") && treeStore.hasAttribute(this.item, "name") && treeStore.hasAttribute(this.item, "version")) {
- labelNode.innerHTML = treeStore.getValue(this.item, "name") + ": <em>" + treeStore.getValue(this.item, "version") + "</em>";
- }
- }
-
- }
-
- }
-
- }
-
- }
- this.inherited(arguments);
- }
-
- dojo.declare("console.TreeNode", dijit._TreeNode, { postCreate: nodePostCreate });
-
-//Tree
-
- function getTreeIconClass(item, opened){
- var nodeClass = "dijitLeaf";
- if(treeStore.hasAttribute(item, "type")) {
- nodeClass = "treeArtifact-" + treeStore.getValue(item, "type").toLowerCase();
- } else if (treeStore.hasAttribute(item, "icon")){
- nodeClass = "dijitLeaf treeAtribute-" + treeStore.getValue(item, "icon").toLowerCase();
- }
- return nodeClass;
- }
-
- function getTreeLabelClass(item, opened){
- var labelClass = "dijitTreeLabel";
- if(treeStore.hasAttribute(item, "link")) {
- labelClass = "dijitTreeLabel treeLink";
- }
- return labelClass;
- }
-
- function newChild(args) {
- return new console.TreeNode(args);
- }
-
- dojo.declare("console.Tree", dijit.Tree, {
- _createTreeNode: newChild,
- getIconClass: getTreeIconClass,
- getLabelClass: getTreeLabelClass }
- );
-
-//General page functions
-
- function setButtonsDisabled(disabled) {
- startButton.setDisabled(disabled);
- stopButton.setDisabled(disabled);
- refreshButton.setDisabled(disabled);
- uninstallButton.setDisabled(disabled);
- };
-
- function artifactOperation(operation) {
- setButtonsDisabled(true);
- dojo.xhrGet({
- url: "do/" + operation,
- content: {
- type: treeStore.getValue(lastItem, "type"),
- name: treeStore.getValue(lastItem, "name"),
- version: treeStore.getValue(lastItem, "version"),
- region: treeStore.getValue(lastItem, "region")
- },
- handle: function () {
- location = "/admin/web/artifact/overview.htm";
- }
- });
- }
-
- function itemClicked(item) {
- if (treeStore.hasAttribute(item, "link")) {
- location = treeStore.getValue(item, "link");
- } else {
- if (treeStore.hasAttribute(item, "type") && treeStore.hasAttribute(item, "name")) {
- setButtonsDisabled(false);
- lastItem = item;
- } else {
- setButtonsDisabled(true);
- }
- }
- }
-
-/* ]]> */
-</script>
-
-<div dojoType="console.ForestStoreModel" store="treeStore" childrenAttrs="children" jsId="treeModel"> </div>
-
-<div class="consoleContentPane">
-
- <div jsId="startButton" dojoType="dijit.form.Button" disabled="true">
- Start
- <script type="dojo/connect" event="onClick">
- artifactOperation("start");
- </script>
- </div>
-
- <div jsId="stopButton" dojoType="dijit.form.Button" disabled="true">
- Stop
- <script type="dojo/connect" event="onClick">
- artifactOperation("stop");
- </script>
- </div>
-
- <div jsId="refreshButton" dojoType="dijit.form.Button" disabled="true">
- Refresh
- <script type="dojo/connect" event="onClick">
- artifactOperation("refresh");
- </script>
- </div>
-
- <div jsId="uninstallButton" dojoType="dijit.form.Button" disabled="true">
- Uninstall
- <script type="dojo/connect" event="onClick">
- artifactOperation("uninstall");
- </script>
- </div>
- <div class="consoleFootnote">
- Select an Artifact in the tree to perform an action upon it.
- </div>
- <div id="preloader" class="consoleLoading">
- Loading the Artifact Tree...
- </div>
- <p>
- <div dojoType="console.Tree" model="treeModel" jsId="itemTree" persist="false" showRoot="false">
- <script type="dojo/connect" event="onClick" args="item">
- itemClicked(item);
- </script>
- <script type="dojo/connect" event="onClose" args="item">
- itemClicked(item);
- </script>
- <script type="dojo/connect" event="onOpen" args="item">
- dojo.style("preloader", "display", "none");
- itemClicked(item);
- </script>
- </div>
- </p>
-</div>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/bottom.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/bottom.jsp
deleted file mode 100644
index 2e4d64b..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/bottom.jsp
+++ /dev/null
@@ -1,15 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
-
- </div> <!-- /content -->
-
- </div> <!-- /container -->
-
- <div id="footer-wrapper">
- <div id="footer-left">© Copyright 2008, 2011 VMware Inc. Licensed under the Eclipse Public License v1.0.</div>
- <div id="footer-right"></div>
- </div>
-
- </div> <!-- /page-->
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/config-overview.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/config-overview.jsp
deleted file mode 100644
index c50fa17..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/config-overview.jsp
+++ /dev/null
@@ -1,55 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%><jsp:include page="top.jsp" />
-
-<script type="text/javascript">
- dojo.require("dijit.TitlePane");
-</script>
-
-<h1>Configuration Admin - Overview</h1>
-
-<p>
- Configuration sets present in the system.
- <div class="consoleFootnote">Note: A Configuration artifact must be in the 'Active' state to be visible in config admin.</div>
-</p>
-
-<div class="consoleContentPaneMinimal">
- <c:forEach var="config" items="${configurations}">
-
- <div dojoType="dijit.TitlePane" id="${config.key}" title="${config.key}" open="false">
- <div class="consoleContentPaneSpace">
- <table id="config-${config.key}">
- <tr class="sublevel1-odd">
- <th>Property</th>
- <th>Value</th>
- </tr>
- <c:forEach var="prop" items="${config.value}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td id="key">${prop.key}</td>
- <td id="value">${prop.value}</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
-
- </c:forEach>
-</div>
-
-<script type="text/javascript" >
- if(location.hash){
- var paneId = location.hash.replace("#", "");
- pane = dojo.byId(paneId);
- if(pane){
- dojo.attr(pane, "open", "true");
- }
- }
-</script>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/dump-overview.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/dump-overview.jsp
deleted file mode 100644
index 2c46483..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/dump-overview.jsp
+++ /dev/null
@@ -1,74 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%>
-
-<jsp:include page="top.jsp" />
-
-<c:choose>
- <c:when test="${empty formattedSelectedDump}">
- <h1>Dump Inspector</h1>
- </c:when>
- <c:otherwise>
- <h1>Dump Inspector: '${formattedSelectedDump}'</h1>
- </c:otherwise>
-</c:choose>
-
-<c:if test="${empty dumps}">
- There are no dumps available in the system for viewing.
-</c:if>
-
-<c:if test="${!empty dumps}">
-
- <table>
- <tr>
- <form name="dumpForm" action="<c:url value="entry.htm" />" method="get">
- <td>
- Dumps available for inspection:<br/>
- <select class="dumpSelector" name="dumpID">
- <c:forEach var="dump" items="${dumps}">
- <c:choose>
- <c:when test="${selectedDump eq dump.key}">
- <option selected value="${dump.key}">${dump.value}</option>
- </c:when>
- <c:otherwise>
- <option value="${dump.key}">${dump.value}</option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- <br/>
- <input id="dump_selector_submit" type="submit" value="Select Dump"/>
- </td>
- <td>
- Dump entries available for inspection:<br/>
- <select class="dumpSelector" name="dumpEntryName">
- <c:forEach var="entry" items="${entries}">
- <c:choose>
- <c:when test="${selectedEntry eq entry}">
- <option selected value="${entry}">${entry}</option>
- </c:when>
- <c:otherwise>
- <option value="${entry}">${entry}</option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- <br/>
- <input id="dump_selector_submit" type="submit" value="Select Entry"/>
- </td>
- </form>
- </tr>
-
- </table>
-
- <c:if test="${!empty inspection}">
- <h2>Dump Entry Viewer</h2>
- <c:if test="${!empty selectedEntry}">
- <p>Viewing Entry '${selectedEntry}'.</p>
- </c:if>
- <div class="inspection-box">${inspection}</div>
- </c:if>
-
-</c:if>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/error.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/error.jsp
deleted file mode 100644
index 9ad2685..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/error.jsp
+++ /dev/null
@@ -1,17 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--
---%><jsp:include page="top.jsp" />
-
-<h1 class="title">Virgo Web Server</h1>
-<p>
- An unexpected error occurred while performing your requested operation.
- Please <a href="<c:url value="/web/info/overview.htm" />">return to the main page</a> and
- try again.
-</p>
-<p>
- For further details consult the log and event files in the
- '<em>serviceability</em>' directory of the installed server.
-</p>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/info-overview.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/info-overview.jsp
deleted file mode 100644
index 50f006b..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/info-overview.jsp
+++ /dev/null
@@ -1,47 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--
---%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%--
---%><jsp:include page="top.jsp" />
-
-<h1>Admin Console - Information</h1>
-
-<p>Congratulations on installing the Virgo Web Server. This is the Web console provided with the server to allow management of a single instance.</p>
-
-<h2>Documentation</h2>
-<p>Documentation is available on-line for the Virgo Web Server.</p>
-<ul>
- <li><a href="http://www.eclipse.org/virgo/documentation" target="_blank" title="Virgo Server - Documentation">Virgo Server - Documentation</a>, includes links to the User, Programmer and Application Development Guides</li>
- <li><a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/index.html" target="_blank" title="Spring Framework">Spring Framework Documentation</a>.</li>
- <li><a href="http://static.springframework.org/osgi/docs/current/reference/html/" target="_blank" title="Spring Dynamic Modules">Spring Dynamic Modules Documentation</a>.</li>
-</ul>
-
-<h2>Server Properties</h2>
-<table id="properties" class="bordered-table">
- <tr class="sublevel1-even">
- <th>Name</th>
- <th>Value</th>
- </tr>
- <c:choose>
- <c:when test="${empty properties}">
- <tr class="name-sublevel1-odd">
- <td id="property_null" colspan="2">No properties have been registered.</td>
- </tr>
- </c:when>
- <c:otherwise>
- <c:forEach var="property" items="${properties}" varStatus="loopStatus">
- <c:set var="rowStyle" value="even" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="odd" scope="page" />
- </c:if>
- <tr class="sublevel1-${rowStyle}">
- <td id="property_key">${property.key}</td>
- <td id="property_value">${property.value}</td>
- </tr>
- <c:remove var="rowStyle" />
- </c:forEach>
- </c:otherwise>
- </c:choose>
-</table>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundle.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundle.jsp
deleted file mode 100644
index 2201c82..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundle.jsp
+++ /dev/null
@@ -1,325 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%--
---%><jsp:include page="top.jsp" />
-
-<script type="text/javascript">
- dojo.require("dijit.TitlePane");
-</script>
-
-<jsp:include page="state-header.jsp" />
-
-<h1>${title}</h1>
-
-<c:set var="hostsFragmentsMessage" value="NA" />
-<c:set var="hostsFragments" value="" />
-<c:choose>
- <c:when test="${!empty bundle.hosts}">
- <c:set var="hostsFragmentsMessage" value="Host: " />
- <c:set var="hostsFragments" value="${bundle.hosts}" />
- </c:when>
- <c:when test="${!empty bundle.fragments}">
- <c:set var="hostsFragmentsMessage" value="Fragments: " />
- <c:set var="hostsFragments" value="${bundle.fragments}" />
- </c:when>
-</c:choose>
-
-<table id="bundles-overview" class="bordered-table">
- <tr class="sublevel1-odd">
- <td>Bundle Symbolic name</td>
- <td>${bundle.symbolicName}</td>
- </tr>
- <tr class="sublevel1-even">
- <td>Bundle Version</td>
- <td>${bundle.version}</td>
- </tr>
- <tr class="sublevel1-odd">
- <td>Bundle ID</td>
- <td>${bundle.bundleId}</td>
- </tr>
- <tr class="sublevel1-even">
- <td>Region</td>
- <td>${bundle.region}</td>
- </tr>
- <tr class="sublevel1-odd">
- <td>Hosts/Fragments</td>
- <td>
- ${hostsFragmentsMessage}
- <c:forEach var="hfBundle" items="${hostsFragments}">
- <a href="<c:url value="bundle.htm?id=${hfBundle.bundleId}&state=${state}" />">${hfBundle.bundleId} (${hfBundle.symbolicName}-${hfBundle.version})</a>
- </c:forEach>
- </td>
- </tr>
- <c:choose>
- <c:when test="${state eq 'Live'}">
- <tr class="sublevel1-even">
- <td>Spring powered</td>
- <c:choose>
- <c:when test="${empty bundle.springName}">
- <td>No</td>
- </c:when>
- <c:otherwise>
- <td>Yes</td>
- </c:otherwise>
- </c:choose>
-
- </tr>
- <tr class="sublevel1-odd">
- <td>State</td>
- <td><c:choose><c:when test="${bundle.resolved}">${bundle.state}</c:when><c:otherwise><a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.state}</a></c:otherwise></c:choose></td>
- </tr>
- </c:when>
- <c:otherwise>
- <tr class="sublevel1-even">
- <td>Spring powered</td>
- <td>NA</td>
- </tr>
- <tr class="sublevel1-odd">
- <td>State</td>
- <td><c:choose><c:when test="${bundle.resolved}">Resolved</c:when><c:otherwise><a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">Unresolved</a></c:otherwise></c:choose></td>
- </tr>
- </c:otherwise>
- </c:choose>
- <tr class="sublevel1-even">
- <td>Bundle Location</td>
- <td>${bundle.bundleLocation}</td>
- </tr>
-</table>
-
- <c:set var="imports" value="${bundle.importPackages}" />
- <div dojoType="dijit.TitlePane" title="Imported Packages (${fn:length(imports)})" open="false">
- <div class="consoleContentPaneSpace">
- <table id="imports-detail" >
- <tr class="sublevel1-odd">
- <th>Package Name</th>
- <th>Version Constraint</th>
- <th>Provider</th>
- <th>Import Directives</th>
- <th>Import Attributes</th>
- </tr>
- <c:forEach var="_import" items="${imports}" varStatus="loopStatus">
- <!-- CREATE THE PROVIDER STRING -->
- <c:choose>
- <c:when test="${_import.provider eq null}">
- <c:set var="provider" value=""/>
- </c:when>
- <c:otherwise>
- <c:set var="provider" value="${_import.provider.exportingBundle.bundleId} (${_import.provider.exportingBundle.symbolicName} - ${_import.provider.exportingBundle.version})"/>
- </c:otherwise>
- </c:choose>
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td><a href="<c:url value="packages.htm?name=${_import.packageName}&state=${state}" />">${_import.packageName}</a></td>
- <td>${_import.versionConstraint}</td>
- <td><a href="<c:url value="bundle.htm?id=${_import.provider.exportingBundle.bundleId}&state=${state}" />">${provider}</a></td>
- <td>
- <c:forEach var="directive" items="${_import.directives}">
- ${directive.key}:=${directive.value}<br/>
- </c:forEach>
- </td>
- <td>
- <c:forEach var="attribute" items="${_import.attributes}">
- ${attribute.key}=${attribute.value}<br/>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
-
- <c:set var="exports" value="${bundle.exportPackages}" />
- <div dojoType="dijit.TitlePane" title="Exported Packages (${fn:length(exports)})" open="false">
- <div class="consoleContentPaneSpace">
- <table id="exports-detail" >
- <tr class="sublevel1-odd">
- <th>Package Name</th>
- <th>Export Version</th>
- <th>Consumers</th>
- <th>Export Directives</th>
- <th>Export Attributes</th>
- </tr>
- <c:forEach var="export" items="${exports}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td><a href="<c:url value="packages.htm?name=${export.packageName}&state=${state}" />">${export.packageName}</a></td>
- <td>${export.version}</td>
- <td>${fn:length(export.consumers)}</td>
- <td>
- <c:forEach var="directive" items="${export.directives}">
- ${directive.key}:=${directive.value}<br/>
- </c:forEach>
- </td>
- <td>
- <c:forEach var="attribute" items="${export.attributes}">
- ${attribute.key}=${attribute.value}<br/>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
-
- <c:set var="requires" value="${bundle.requiredBundles}" />
- <div dojoType="dijit.TitlePane" title="Required Bundles (${fn:length(requires)})" open="false">
- <div class="consoleContentPaneSpace">
- <table id="requires-detail" >
- <tr class="sublevel1-odd">
- <th>Bundle Name</th>
- <th>Version</th>
- <th>Provider</th>
- <th>Directives</th>
- <th>Attributes</th>
- </tr>
- <c:forEach var="require" items="${requires}" varStatus="loopStatus">
- <!-- CREATE THE PROVIDER STRING -->
- <c:choose>
- <c:when test="${require eq null}">
- <c:set var="provider" value=""/>
- </c:when>
- <c:otherwise>
- <c:set var="provider" value="${require.provider.bundleId} (${require.provider.symbolicName} - ${require.provider.version})"/>
- </c:otherwise>
- </c:choose>
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td><a href="<c:url value="bundle.htm?id=${require.provider.bundleId}&state=${state}" />">${require.requiredBundleName}</a></td>
- <td>${require.versionConstraint}</td>
- <td>
- <c:if test="${require ne null}">
- <a href="<c:url value="bundle.htm?id=${require.provider.bundleId}&state=${state}" />">${require.provider.bundleId} (${require.provider.symbolicName} - ${require.provider.version})</a>
- </c:if>
- </td>
- <td>
- <c:forEach var="directive" items="${require.directives}">
- ${directive.key}:=${directive.value}<br/>
- </c:forEach>
- </td>
- <td>
- <c:forEach var="attribute" items="${require.attributes}">
- ${attribute.key}=${attribute.value}<br/>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
-
- <c:if test="${state eq 'Live'}">
- <c:if test="${!empty bundle.springName && !empty bundle.beans }">
- <div dojoType="dijit.TitlePane" title="Spring Context (${fn:length(bundle.beans)} beans)" open="false">
- <div class="consoleContentPaneSpace">
- <p>${bundle.springName}</p>
- <table id="spring-detail">
- <tr class="sublevel1-odd">
- <th>Bean Name</th>
- <th>Class</th>
- <th>Singleton</th>
- <th>Prototype</th>
- </tr>
- <c:forEach var="bean" items="${bundle.beans}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td>${bean.name}</td>
- <td>${bean.type}</td>
- <td>${bean.prototype}</td>
- <td>${bean.singleton}</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
- </c:if>
-
- <c:set var="consumedServices" value="${bundle.importedServices}" />
- <div dojoType="dijit.TitlePane" title="Consumed Services (${fn:length(consumedServices)})" open="false">
- <div class="consoleContentPaneMinimal">
-
- <c:forEach var="service" items="${consumedServices}">
- <c:set var="titleString" value="Service ${service.serviceId} provided by bundle ${service.provider.bundleId} - ObjectClass ${service.formattedObjectClass}" />
- <div dojoType="dijit.TitlePane" title="${titleString}" open="false">
- <div class="consoleContentPaneSpace">
- <p>Provider <a href="<c:url value="bundle.htm?id=${service.provider.bundleId}&state=${state}" />">${service.provider.bundleId}</a> ${service.provider.symbolicName}-${service.provider.version}</p>
- <table id="service-properties">
- <tr class="sublevel1-odd">
- <th>Property</th>
- <th>Value</th>
- </tr>
- <c:forEach var="prop" items="${service.properties}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td id="key">${prop.key}</td>
- <td id="value">${prop.value}</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
- </c:forEach>
-
- </div>
-
- </div>
-
- <c:set var="providedServices" value="${bundle.exportedServices}" />
- <div dojoType="dijit.TitlePane" title="Published Services (${fn:length(providedServices)})" open="false">
- <div class="consoleContentPaneMinimal">
-
- <c:forEach var="service" items="${providedServices}">
- <c:set var="titleString" value="Service ${service.serviceId} - ObjectClass ${service.formattedObjectClass}" />
- <div dojoType="dijit.TitlePane" title="${titleString}" open="false">
- <div class="consoleContentPaneSpace">
- <table id="service-properties">
- <tr class="sublevel1-odd">
- <th>Property</th>
- <th>Value</th>
- </tr>
- <c:forEach var="prop" items="${service.properties}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td id="key">${prop.key}</td>
- <td id="value">${prop.value}</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
-
- </c:forEach>
- </div>
- </div>
- </c:if>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundles.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundles.jsp
deleted file mode 100644
index b23f1de..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-bundles.jsp
+++ /dev/null
@@ -1,111 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%>
-<jsp:include page="top.jsp" />
-
-<jsp:include page="state-header.jsp" />
-
-<h1>State Overview - Bundles</h1>
-
-<table id="bundles-overview" class="bordered-table">
- <tr>
- <th>Bundle Id</th>
- <th></th>
- <th>Bundle Symbolic Name</th>
- <th>Bundle Version</th>
- <th>Hosts/Fragments</th>
- <th>State</th>
- </tr>
- <c:choose>
- <c:when test="${empty bundles}">
- <tr class="name-sublevel1-even">
- <td id="deploy_application_null" colspan="6">No state information available.</td>
- </tr>
- </c:when>
- <c:otherwise>
-
- <c:forEach var="bundle" items="${bundles}" varStatus="loopStatus">
-<!-- CREATE THE HOSTS FRAGMENTS STRING -->
- <c:set var="hostsFragmentsMessage" value="" />
- <c:set var="hostsFragments" value="" />
- <c:choose>
- <c:when test="${!empty bundle.hosts}">
- <c:set var="hostsFragmentsMessage" value="Host: " />
- <c:set var="hostsFragments" value="${bundle.hosts}" />
- </c:when>
- <c:when test="${!empty bundle.fragments}">
- <c:set var="hostsFragmentsMessage" value="Fragments: " />
- <c:set var="hostsFragments" value="${bundle.fragments}" />
- </c:when>
- </c:choose>
-<!-- CREATE THE RESOLVE STRING -->
- <c:choose>
- <c:when test="${bundle.resolved}">
- <c:set var="resolveMessage" value="Resolved" />
- </c:when>
- <c:otherwise>
- <c:set var="resolveMessage" value="Unresolved" />
- </c:otherwise>
- </c:choose>
-<!-- DO THE ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
-<!-- PRINT OUT A LIVE OR STATIC TABLE ROW -->
- <c:choose>
- <c:when test="${state eq 'Live'}">
- <tr class="sublevel1-${rowStyle}">
- <td id="bundle-id"><a href="<c:url value="bundle.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.bundleId}</a></td>
- <td class="table-icon" id="bundle-spring"><c:if test="${!empty bundle.springName}"><img src="<c:url value="/images/spring.png"/>" height="16" width ="16" alt="S" /></c:if></td>
- <td id="bundle-name">${bundle.symbolicName}</td>
- <td id="bundle-version">${bundle.version}</td>
- <td id="bundle-hf">${hostsFragmentsMessage}
- <c:forEach var="hfBundle" items="${hostsFragments}">
- <a href="<c:url value="bundle.htm?id=${hfBundle.bundleId}&state=${state}" />">${hfBundle.bundleId}</a>
- </c:forEach>
- </td>
- <td id="bundle-resolved">
- <c:choose>
- <c:when test="${bundle.resolved}">
- ${bundle.state}
- </c:when>
- <c:otherwise>
- <a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.state}</a>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:when>
- <c:otherwise>
- <tr class="sublevel1-${rowStyle}">
- <td id="bundle-id"><a href="<c:url value="bundle.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.bundleId}</a></td>
- <td id="bundle-spring" class="table-icon"></td>
- <td id="bundle-name">${bundle.symbolicName}</td>
- <td id="bundle-version">${bundle.version}</td>
- <td id="bundle-hf">${hostsFragmentsMessage}
- <c:forEach var="hfBundle" items="${hostsFragments}">
- <a href="<c:url value="bundle.htm?id=${hfBundle.bundleId}&state=${state}" />">${hfBundle.bundleId}</a>
- </c:forEach>
- </td>
- <td id="bundle-resolved">
- <c:choose>
- <c:when test="${bundle.resolved}">
- ${resolveMessage}
- </c:when>
- <c:otherwise>
- <a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">${resolveMessage}</a>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:otherwise>
- </c:choose>
- <c:remove var="rowStyle" />
- </c:forEach>
-
- </c:otherwise>
- </c:choose>
-</table>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-header.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-header.jsp
deleted file mode 100644
index f242517..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-header.jsp
+++ /dev/null
@@ -1,42 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%>
-<!--
-
--->
-<div class="stateHeader">
-
- <div class="stateNavigation">
- <a href="<c:url value="bundles.htm?state=${state}" />">Bundles Overview</a>
- <c:if test="${state eq 'Live'}">
- <a href="<c:url value="services.htm" />">Services Overview</a>
- </c:if>
- </div>
- <form class="dumpStateSelector" name="dumpForm" action="<c:url value="bundles.htm" />" method="get">
- <fieldset>
- Viewing state '${fState}':
- <select name="state">
- <option value="Live">Live</option>
- <c:forEach var="source" items="${stateSources}">
- <c:choose>
- <c:when test="${source.key eq state}">
- <option selected value="${source.key}">${source.value}</option>
- </c:when>
- <c:otherwise>
- <option value="${source.key}">${source.value}</option>
- </c:otherwise>
- </c:choose>
- </c:forEach>
- </select>
- <input id="state_selector_submit" type="submit" value="Go"/>
- </fieldset>
- </form>
- <form class="search" name="searchForm" action="<c:url value="search.htm" />" method="get">
- <fieldset>
- Search:
- <input type="hidden" name="state" value="${state}" />
- <input type="text" name="term" />
- <input type="submit" name="submit" value="Go" />
- </fieldset>
- </form>
-</div>
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-packages.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-packages.jsp
deleted file mode 100644
index 2f458c8..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-packages.jsp
+++ /dev/null
@@ -1,92 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%>
-<jsp:include page="top.jsp" />
-
-<script type="text/javascript">
- dojo.require("dijit.TitlePane");
-</script>
-
-<jsp:include page="state-header.jsp" />
-
-<h1>${title}</h1>
-
-<div dojoType="dijit.TitlePane" title="Exporters" open="true">
- <div class="consoleContentPaneSpace">
- <table id="exports-detail" >
- <tr class="sublevel1-odd">
- <th>Bundle Id</th>
- <th>Bundle Symbolic Name</th>
- <th>Bundle Version</th>
- <th>Export Version</th>
- <th>Export Directives</th>
- <th>Export Attributes</th>
- </tr>
- <c:forEach var="export" items="${exporters}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td><a href="<c:url value="bundle.htm?id=${export.exportingBundle.bundleId}&state=${state}" />">${export.exportingBundle.bundleId}</a></td>
- <td>${export.exportingBundle.symbolicName}</td>
- <td>${export.exportingBundle.version}</td>
- <td>${export.version}</td>
- <td>
- <c:forEach var="directive" items="${export.directives}">
- ${directive.key}:=${directive.value}<br/>
- </c:forEach>
- </td>
- <td>
- <c:forEach var="attribute" items="${export.attributes}">
- ${attribute.key}=${attribute.value}<br/>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- </div>
-</div>
-
-<div dojoType="dijit.TitlePane" title="Importers" open="false">
- <div class="consoleContentPaneSpace">
- <table id="imports-detail" >
- <tr class="sublevel1-odd">
- <th>Bundle Id</th>
- <th>Bundle Symbolic Name</th>
- <th>Bundle Version</th>
- <th>Import Version Constraint</th>
- <th>Import Directives</th>
- <th>Import Attributes</th>
- </tr>
- <c:forEach var="_import" items="${importers}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td><a href="<c:url value="bundle.htm?id=${_import.importingBundle.bundleId}&state=${state}" />">${_import.importingBundle.bundleId}</a></td>
- <td>${_import.importingBundle.symbolicName}</td>
- <td>${_import.importingBundle.version}</td>
- <td>${_import.versionConstraint}</td>
- <td>
- <c:forEach var="directive" items="${_import.directives}">
- ${directive.key}:=${directive.value}<br/>
- </c:forEach>
- </td>
- <td>
- <c:forEach var="attribute" items="${_import.attributes}">
- ${attribute.key}=${attribute.value}<br/>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- </div>
-</div>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-resolve.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-resolve.jsp
deleted file mode 100644
index d0b2ca9..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-resolve.jsp
+++ /dev/null
@@ -1,80 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%>
-<jsp:include page="top.jsp" />
-
-<jsp:include page="state-header.jsp" />
-
-<h1>${title}</h1>
-
-<c:forEach var="fail" items="${failure}" >
-
- <c:set var="bundle" value="${fail.unresolvedBundle}" />
- <c:set var="hostsFragmentsMessage" value="NA" />
- <c:set var="hostsFragments" value="" />
- <c:choose>
- <c:when test="${!empty bundle.hosts}">
- <c:set var="hostsFragmentsMessage" value="Host: " />
- <c:set var="hostsFragments" value="${bundle.hosts}" />
- </c:when>
- <c:when test="${!empty bundle.fragments}">
- <c:set var="hostsFragmentsMessage" value="Fragments: " />
- <c:set var="hostsFragments" value="${bundle.fragments}" />
- </c:when>
- </c:choose>
-
- <div class="consoleContentPane">
- <table id="resolve-overview-${bundle.symbolicName}-${bundle.version}">
- <tr class="name-sublevel1-even">
- <td>Bundle Symbolic Name</td>
- <td>${bundle.symbolicName}</td>
- </tr>
- <tr class="name-sublevel1-odd">
- <td>Bundle Version</td>
- <td>${bundle.version}</td>
- </tr>
- <tr class="name-sublevel1-even">
- <td>Bundle ID</td>
- <td>${bundle.bundleId}</td>
- </tr>
- <tr class="name-sublevel1-odd">
- <td>Hosts/Fragments</td>
- <td>
- ${hostsFragmentsMessage}
- <c:forEach var="hfBundle" items="${hostsFragments}">
- <a href="<c:url value="bundle.htm?id=${hfBundle.bundleId}&state=${state}" />">${hfBundle.bundleId} (${hfBundle.symbolicName}-${hfBundle.version})</a>
- </c:forEach>
- </td>
- </tr>
- <c:choose>
- <c:when test="${state eq 'Live'}">
- <tr class="name-sublevel1-even">
- <td>Spring powered</td>
- <c:choose>
- <c:when test="${empty bundle.springName}">
- <td>No</td>
- </c:when>
- <c:otherwise>
- <td>Yes</td>
- </c:otherwise>
- </c:choose>
- </tr>
- <tr class="name-sublevel1-odd">
- <td>State</td>
- <td>${bundle.state}</td>
- </tr>
- </c:when>
- <c:otherwise>
- <tr class="name-sublevel1-even">
- <td>State</td>
- <td><c:choose><c:when test="${bundle.resolved}">Resolved</c:when><c:otherwise>Unresolved</c:otherwise></c:choose></td>
- </tr>
- </c:otherwise>
- </c:choose>
- </table>
- <p><pre>${fail.description}</pre></p>
- </div>
- <br/>
-</c:forEach>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-search.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-search.jsp
deleted file mode 100644
index 7923366..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-search.jsp
+++ /dev/null
@@ -1,90 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><%--
---%><jsp:include page="top.jsp" />
-
-<jsp:include page="state-header.jsp" />
-
-<h1>${title}</h1>
-
-<h2>Matching Bundles</h2>
-<div id="matching-bundles-section">
- <table id="matching-bundles" class="bordered-table">
- <tr class="sublevel1-odd">
- <th>Bundle Id</th>
- <th></th>
- <th>Bundle Symbolic Name</th>
- <th>Bundle Version</th>
- <th>State</th>
- </tr>
- <c:choose>
- <c:when test="${empty bundles}">
- <tr class="name-sublevel1-even">
- <td id="deploy_application_null" colspan="5">No search results available.</td>
- </tr>
- </c:when>
- <c:otherwise>
-
- <c:forEach var="bundle" items="${bundles}" varStatus="loopStatus">
- <!-- CREATE THE RESOLVE STRING -->
- <c:choose>
- <c:when test="${bundle.resolved}">
- <c:set var="resolveMessage" value="Resolved" />
- </c:when>
- <c:otherwise>
- <c:set var="resolveMessage" value="Unresolved" />
- </c:otherwise>
- </c:choose>
- <!-- DO THE ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- PRINT OUT A LIVE OR STATIC TABLE ROW -->
- <c:choose>
- <c:when test="${state eq 'Live'}">
- <tr class="sublevel1-${rowStyle}">
- <td id="bundle-id"><a href="<c:url value="bundle.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.bundleId}</a></td>
- <td id="bundle-spring" class="table-icon"><c:if test="${!empty bundle.springName}"><img src="<c:url value="/images/spring.png"/>" height="16" width ="16" alt="S" /></c:if></td>
- <td id="bundle-name">${bundle.symbolicName}</td>
- <td id="bundle-version">${bundle.version}</td>
- <td id="bundle-resolved">
- <c:choose>
- <c:when test="${bundle.resolved}">
- ${bundle.state}
- </c:when>
- <c:otherwise>
- <a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.state}</a>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:when>
- <c:otherwise>
- <tr class="sublevel1-${rowStyle}">
- <td id="bundle-id"><a href="<c:url value="bundle.htm?id=${bundle.bundleId}&state=${state}" />">${bundle.bundleId}</a></td>
- <td id="bundle-spring" class="table-icon"></td>
- <td id="bundle-name">${bundle.symbolicName}</td>
- <td id="bundle-version">${bundle.version}</td>
- <td id="bundle-resolved">
- <c:choose>
- <c:when test="${bundle.resolved}">
- ${resolveMessage}
- </c:when>
- <c:otherwise>
- <a href="<c:url value="resolve.htm?id=${bundle.bundleId}&state=${state}" />">${resolveMessage}</a>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:otherwise>
- </c:choose>
- <c:remove var="rowStyle" />
- </c:forEach>
-
- </c:otherwise>
- </c:choose>
- </table>
-</div>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-services.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-services.jsp
deleted file mode 100644
index c2ed78e..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/state-services.jsp
+++ /dev/null
@@ -1,45 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><%--
---%>
-<jsp:include page="top.jsp" />
-
-<script type="text/javascript">
- dojo.require("dijit.TitlePane");
-</script>
-
-<jsp:include page="state-header.jsp" />
-
-<h1>State Overview - Services</h1>
-
-<div class="consoleContentPaneMinimal">
-
- <c:forEach var="service" items="${services}">
- <c:set var="titleString" value="Service ${service.serviceId} provided by bundle ${service.provider.bundleId} - ObjectClass ${service.formattedObjectClass}" />
- <div dojoType="dijit.TitlePane" title="${titleString}" open="false">
- <div class="consoleContentPaneSpace">
- <p>Provided by <a href="<c:url value="bundle.htm?id=${service.provider.bundleId}&state=${state}" />">${service.provider.bundleId}</a> ${service.provider.symbolicName}-${service.provider.version}</p>
- <table id="service-properties">
- <tr class="sublevel1-odd">
- <th>Property</th>
- <th>Value</th>
- </tr>
- <c:forEach var="prop" items="${service.properties}" varStatus="loopStatus">
- <!-- ROW COLOURING -->
- <c:set var="rowStyle" value="odd" scope="page" />
- <c:if test="${(loopStatus.index % 2) eq 0}">
- <c:set var="rowStyle" value="even" scope="page" />
- </c:if>
- <!-- DISPLAY THE NEXT ROW -->
- <tr class="sublevel1-${rowStyle}">
- <td id="key">${prop.key}</td>
- <td id="value">${prop.value}</td>
- </tr>
- </c:forEach>
- </table>
- </div>
- </div>
- </c:forEach>
-
-</div>
-
-<jsp:include page="bottom.jsp" />
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/top.jsp b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/top.jsp
deleted file mode 100644
index d9ac574..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/jsp/top.jsp
+++ /dev/null
@@ -1,52 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %><%--
---%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
---%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
- <title>Virgo Admin Console</title>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <link rel="shortcut icon" href="<c:url value="/images/favicon.ico" />" />
- <link rel="stylesheet" href="<c:url value="/js/dijit/themes/tundra/tundra.css" />" type="text/css" />
- <link rel="stylesheet" href="<c:url value="/styles/main.css" />" type="text/css" />
- <link rel="stylesheet" href="<c:url value="/styles/local.css" />" type="text/css" />
- <link rel="stylesheet" href="<c:url value="/styles/print.css" />" type="text/css" media="print" />
- <script type="text/javascript" src="<c:url value="/js/dojo/dojo.js" />" djConfig="parseOnLoad: true, baseUrl: '../../js/dojo/'"></script>
- <script type="text/javascript" src="<c:url value="/js/dojo/virgo-dojo.js" />" djConfig="parseOnLoad: true, baseUrl: '../../js/dojo/'"></script>
-
-</head>
-
-<body class="main tundra">
- <div id="page">
- <div id="header">
- <div id="name-and-company">
- <div id='site-name'>
- <a href="<c:url value="/" />" title="Virgo Admin Console" rel="home"> </a>
- </div>
- <div id='company-name'>
- <a href="http://wiki.eclipse.org/Virgo" title="Virgo from EclipseRT" target="_blank"> </a>
- </div>
- </div> <!-- /name-and-company -->
- </div> <!-- /header -->
-
- <div id="primary-navigation">
- <div id="primary-left">
- <ul>
- <li><a href="<c:url value="/web/artifact/overview.htm" />" title="Artifacts">Artifacts</a></li>
- <li><a href="<c:url value="/web/config/overview.htm" />" title="Configuration">Configuration</a></li>
- <li><a href="<c:url value="/web/dump/inspector.htm" />" title="Dump Inspector">Dump Inspector</a></li>
- <li><a href="<c:url value="/web/state/bundles.htm" />" title="OSGi State">OSGi State</a></li>
- </ul>
- </div>
- <div id="left-cap"></div>
- <div id="primary-right">
- <ul>
- <li><a href="<c:url value="/web/info/overview.htm" />" title="Information">Information</a></li>
- </ul>
- </div>
- <div id="right-cap"></div>
- </div><!-- /primary-navigation -->
-
- <div id="container">
- <div id="content-no-nav">
-
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/web.xml b/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index f807c16..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
-
- <display-name>Admin Console</display-name>
-
- <description>Virgo - Administration Console</description>
-
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
- <!-- CONFIGURE A PARENT APPLICATION CONTEXT -->
-
- <context-param>
- <param-name>contextClass</param-name>
- <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
- <!-- DISPATCHER SERVLET CONFIG -->
- <servlet>
- <servlet-name>admin</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>admin</servlet-name>
- <url-pattern>/web/*</url-pattern>
- </servlet-mapping>
-
- <!-- SECURITY CONFIG -->
-
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>Virgo Server Admin Console</web-resource-name>
- <url-pattern>/web/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>admin</role-name>
- </auth-constraint>
- </security-constraint>
-
- <login-config>
- <auth-method>BASIC</auth-method>
- <realm-name>Virgo Server Admin Console</realm-name>
- </login-config>
-
- <security-role>
- <role-name>admin</role-name>
- </security-role>
-
-</web-app>
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/favicon.ico b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/favicon.ico
deleted file mode 100755
index 9244a9c..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-left.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-left.png
deleted file mode 100644
index 8bfe3b1..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-left.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-right.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-right.png
deleted file mode 100644
index 51527ad..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-right.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-stretch.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-stretch.png
deleted file mode 100644
index c58f721..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/footer-stretch.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-large.gif b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-large.gif
deleted file mode 100644
index aa4ec5a..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-large.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-small.gif b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-small.gif
deleted file mode 100644
index 75ad2b3..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/loader-white-small.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-left.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-left.png
deleted file mode 100644
index c48a2e0..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-left.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-right.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-right.png
deleted file mode 100644
index 1f3b100..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-curve-right.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-stretch.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-stretch.png
deleted file mode 100644
index 0ca66f7..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/menu-stretch.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/spring.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/spring.png
deleted file mode 100644
index 05a1940..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/spring.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/table-header-background.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/table-header-background.png
deleted file mode 100644
index 8f2ba1b..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/table-header-background.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-atomic.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-atomic.png
deleted file mode 100644
index b8c9c58..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-atomic.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped-atomic.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped-atomic.png
deleted file mode 100644
index 1b35a3c..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped-atomic.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped.png
deleted file mode 100644
index f0f0e1c..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/attribute-scoped.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-active.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-active.png
deleted file mode 100644
index 4dce2da..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-active.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-installed.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-installed.png
deleted file mode 100644
index 380af4a..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-installed.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-resolved.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-resolved.png
deleted file mode 100644
index 1791fb0..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-resolved.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-starting.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-starting.png
deleted file mode 100644
index 4123fe2..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-starting.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-stopping.png b/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-stopping.png
deleted file mode 100644
index a6204d4..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/images/tree-icons/state-stopping.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/index.html b/org.eclipse.virgo.apps.admin.web/src/main/webapp/index.html
deleted file mode 100644
index ee93ff8..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <title>Virgo Console</title>
- <meta http-equiv="REFRESH" content="0;url=web/info/overview.htm">
-</head>
-<body>
- <br/>
- <br/>
- <center>
- <p>
- <em>Virgo Admin Console Loading...</em>
- </p>
- <img alt="" src="images/loader-white-large.gif">
- </center>
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Calendar.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Calendar.js
deleted file mode 100644
index 01e1a94..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Calendar.js
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Calendar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Calendar"] = true;
-dojo.provide("dijit.Calendar");
-
-dojo.require("dojo.cldr.supplemental");
-dojo.require("dojo.date");
-dojo.require("dojo.date.locale");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.Calendar",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // A simple GUI for choosing a date in the context of a monthly calendar.
- //
- // description:
- // A simple GUI for choosing a date in the context of a monthly calendar.
- // This widget can't be used in a form because it doesn't serialize the date to an
- // `<input>` field. For a form element, use dijit.form.DateTextBox instead.
- //
- // Note that the parser takes all dates attributes passed in the
- // [RFC 3339 format](http://www.faqs.org/rfcs/rfc3339.html), e.g. `2005-06-30T08:05:00-07:00`
- // so that they are serializable and locale-independent.
- //
- // example:
- // | var calendar = new dijit.Calendar({}, dojo.byId("calendarNode"));
- //
- // example:
- // | <div dojoType="dijit.Calendar"></div>
-
- templateString: dojo.cache("dijit", "templates/Calendar.html", "<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div class=\"dijitVisible\">\n\t\t\t\t\t<div class=\"dijitPopup dijitMenu dijitMenuPassive dijitHidden\" dojoAttachPoint=\"monthDropDown\" dojoAttachEvent=\"onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover\">\n\t\t\t\t\t\t<div class=\"dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel dijitInline dijitVisible\" dojoAttachEvent=\"onmousedown: _onMonthToggle\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"),
-
- // value: Date
- // The currently selected Date
- value: new Date(),
-
- // datePackage: String
- // JavaScript namespace to find Calendar routines. Uses Gregorian Calendar routines
- // at dojo.date by default.
- datePackage: "dojo.date",
-
- // dayWidth: String
- // How to represent the days of the week in the calendar header. See dojo.date.locale
- dayWidth: "narrow",
-
- // tabIndex: Integer
- // Order fields are traversed when user hits the tab key
- tabIndex: "0",
-
- attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
- tabIndex: "domNode"
- }),
-
- setValue: function(/*Date*/ value){
- // summary:
- // Deprecated. Used attr('value', ...) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0");
- this.attr('value', value);
- },
-
- _getValueAttr: function(){
- // summary:
- // Support getter attr('value')
- var value = new this.dateClassObj(this.value);
- value.setHours(0, 0, 0, 0); // return midnight, local time for back-compat
-
- // If daylight savings pushes midnight to the previous date, fix the Date
- // object to point at 1am so it will represent the correct day. See #9366
- if(value.getDate() < this.value.getDate()){
- value = this.dateFuncObj.add(value, "hour", 1);
- }
- return value;
- },
-
- _setValueAttr: function(/*Date*/ value){
- // summary:
- // Support setter attr("value", ...)
- // description:
- // Set the current date and update the UI. If the date is disabled, the value will
- // not change, but the display will change to the corresponding month.
- // tags:
- // protected
- if(!this.value || this.dateFuncObj.compare(value, this.value)){
- value = new this.dateClassObj(value);
- value.setHours(1); // to avoid issues when DST shift occurs at midnight, see #8521, #9366
- this.displayMonth = new this.dateClassObj(value);
- if(!this.isDisabledDate(value, this.lang)){
- this.value = value;
- this.onChange(this.attr('value'));
- }
- dojo.attr(this.domNode, "aria-label",
- this.dateLocaleModule.format(value,
- {selector:"date", formatLength:"full"}));
- this._populateGrid();
- }
- },
-
- _setText: function(node, text){
- // summary:
- // This just sets the content of node to the specified text.
- // Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434.
- // tags:
- // private
- while(node.firstChild){
- node.removeChild(node.firstChild);
- }
- node.appendChild(dojo.doc.createTextNode(text));
- },
-
- _populateGrid: function(){
- // summary:
- // Fills in the calendar grid with each day (1-31)
- // tags:
- // private
- var month = this.displayMonth;
- month.setDate(1);
- var firstDay = month.getDay(),
- daysInMonth = this.dateFuncObj.getDaysInMonth(month),
- daysInPreviousMonth = this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(month, "month", -1)),
- today = new this.dateClassObj(),
- dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
- if(dayOffset > firstDay){ dayOffset -= 7; }
-
- // Iterate through dates in the calendar and fill in date numbers and style info
- dojo.query(".dijitCalendarDateTemplate", this.domNode).forEach(function(template, i){
- i += dayOffset;
- var date = new this.dateClassObj(month),
- number, clazz = "dijitCalendar", adj = 0;
-
- if(i < firstDay){
- number = daysInPreviousMonth - firstDay + i + 1;
- adj = -1;
- clazz += "Previous";
- }else if(i >= (firstDay + daysInMonth)){
- number = i - firstDay - daysInMonth + 1;
- adj = 1;
- clazz += "Next";
- }else{
- number = i - firstDay + 1;
- clazz += "Current";
- }
-
- if(adj){
- date = this.dateFuncObj.add(date, "month", adj);
- }
- date.setDate(number);
-
- if(!this.dateFuncObj.compare(date, today, "date")){
- clazz = "dijitCalendarCurrentDate " + clazz;
- }
-
- if(this._isSelectedDate(date, this.lang)){
- clazz = "dijitCalendarSelectedDate " + clazz;
- }
-
- if(this.isDisabledDate(date, this.lang)){
- clazz = "dijitCalendarDisabledDate " + clazz;
- }
-
- var clazz2 = this.getClassForDate(date, this.lang);
- if(clazz2){
- clazz = clazz2 + " " + clazz;
- }
-
- template.className = clazz + "Month dijitCalendarDateTemplate";
- template.dijitDateValue = date.valueOf();
- var label = dojo.query(".dijitCalendarDateLabel", template)[0],
- text = date.getDateLocalized ? date.getDateLocalized(this.lang) : date.getDate();
- this._setText(label, text);
- }, this);
-
- // Fill in localized month name
- var monthNames = this.dateLocaleModule.getNames('months', 'wide', 'standAlone', this.lang);
- this._setText(this.monthLabelNode, monthNames[month.getMonth()]);
-
- // Fill in localized prev/current/next years
- var y = month.getFullYear() - 1;
- var d = new this.dateClassObj();
- dojo.forEach(["previous", "current", "next"], function(name){
- d.setFullYear(y++);
- this._setText(this[name+"YearLabelNode"],
- this.dateLocaleModule.format(d, {selector:'year', locale:this.lang}));
- }, this);
-
- // Set up repeating mouse behavior
- var _this = this;
- var typematic = function(nodeProp, dateProp, adj){
-//FIXME: leaks (collects) listeners if populateGrid is called multiple times. Do this once?
- _this._connects.push(
- dijit.typematic.addMouseListener(_this[nodeProp], _this, function(count){
- if(count >= 0){ _this._adjustDisplay(dateProp, adj); }
- }, 0.8, 500)
- );
- };
- typematic("incrementMonth", "month", 1);
- typematic("decrementMonth", "month", -1);
- typematic("nextYearLabelNode", "year", 1);
- typematic("previousYearLabelNode", "year", -1);
- },
-
- goToToday: function(){
- // summary:
- // Sets calendar's value to today's date
- this.attr('value', this.dateClassObj());
- },
-
- constructor: function(/*Object*/args){
- var dateClass = (args.datePackage && (args.datePackage != "dojo.date"))? args.datePackage + ".Date" : "Date";
- this.dateClassObj = dojo.getObject(dateClass, false);
- this.datePackage = args.datePackage || this.datePackage;
- this.dateFuncObj = dojo.getObject(this.datePackage, false);
- this.dateLocaleModule = dojo.getObject(this.datePackage + ".locale", false);
- },
-
- postMixInProperties: function(){
- // parser.instantiate sometimes passes in NaN for IE. Use default value in prototype instead.
- if(isNaN(this.value)){ delete this.value; }
- this.inherited(arguments);
- },
-
- postCreate: function(){
- this.inherited(arguments);
- dojo.setSelectable(this.domNode, false);
-
- var cloneClass = dojo.hitch(this, function(clazz, n){
- var template = dojo.query(clazz, this.domNode)[0];
- for(var i=0; i<n; i++){
- template.parentNode.appendChild(template.cloneNode(true));
- }
- });
-
- // clone the day label and calendar day templates 6 times to make 7 columns
- cloneClass(".dijitCalendarDayLabelTemplate", 6);
- cloneClass(".dijitCalendarDateTemplate", 6);
-
- // now make 6 week rows
- cloneClass(".dijitCalendarWeekTemplate", 5);
-
- // insert localized day names in the header
- var dayNames = this.dateLocaleModule.getNames('days', this.dayWidth, 'standAlone', this.lang);
- var dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
- dojo.query(".dijitCalendarDayLabel", this.domNode).forEach(function(label, i){
- this._setText(label, dayNames[(i + dayOffset) % 7]);
- }, this);
-
- // Fill in spacer/month dropdown element with all the month names (invisible) so that the maximum width will affect layout
- var monthNames = this.dateLocaleModule.getNames('months', 'wide', 'standAlone', this.lang);
- cloneClass(".dijitCalendarMonthLabelTemplate", monthNames.length-1);
- dojo.query(".dijitCalendarMonthLabelTemplate", this.domNode).forEach(function(node, i){
- dojo.attr(node, "month", i);
- this._setText(node, monthNames[i]);
- dojo.place(node.cloneNode(true), this.monthLabelSpacer);
- }, this);
-
- var value = this.value;
- this.value = null;
- this.attr('value', new this.dateClassObj(value));
- },
-
- _onMenuHover: function(e){
- dojo.stopEvent(e);
- dojo.toggleClass(e.target, "dijitMenuItemHover");
- },
-
- _adjustDisplay: function(/*String*/ part, /*int*/ amount){
- // summary:
- // Moves calendar forwards or backwards by months or years
- // part:
- // "month" or "year"
- // amount:
- // Number of months or years
- // tags:
- // private
- this.displayMonth = this.dateFuncObj.add(this.displayMonth, part, amount);
- this._populateGrid();
- },
-
- _onMonthToggle: function(/*Event*/ evt){
- // summary:
- // Handler for when user triggers or dismisses the month list
- // tags:
- // protected
- dojo.stopEvent(evt);
-
- if(evt.type == "mousedown"){
- var coords = dojo.position(this.monthLabelNode);
-// coords.y -= dojo.position(this.domNode, true).y;
- // Size the dropdown's width to match the label in the widget
- // so that they are horizontally aligned
- var dim = {
- width: coords.w + "px",
- top: -this.displayMonth.getMonth() * coords.h + "px"
- };
- if((dojo.isIE && dojo.isQuirks) || dojo.isIE < 7){
- dim.left = -coords.w/2 + "px";
- }
- dojo.style(this.monthDropDown, dim);
- this._popupHandler = this.connect(document, "onmouseup", "_onMonthToggle");
- }else{
- this.disconnect(this._popupHandler);
- delete this._popupHandler;
- }
-
- dojo.toggleClass(this.monthDropDown, "dijitHidden");
- dojo.toggleClass(this.monthLabelNode, "dijitVisible");
- },
-
- _onMonthSelect: function(/*Event*/ evt){
- // summary:
- // Handler for when user selects a month from a list
- // tags:
- // protected
- this._onMonthToggle(evt);
- this.displayMonth.setMonth(dojo.attr(evt.target, "month"));
- this._populateGrid();
- },
-
- _onDayClick: function(/*Event*/ evt){
- // summary:
- // Handler for day clicks, selects the date if appropriate
- // tags:
- // protected
- dojo.stopEvent(evt);
- for(var node = evt.target; node && !node.dijitDateValue; node = node.parentNode);
- if(node && !dojo.hasClass(node, "dijitCalendarDisabledDate")){
- this.attr('value', node.dijitDateValue);
- this.onValueSelected(this.attr('value'));
- }
- },
-
- _onDayMouseOver: function(/*Event*/ evt){
- // summary:
- // Handler for mouse over events on days, sets up hovered style
- // tags:
- // protected
- var node = evt.target;
- if(node && (node.dijitDateValue || node == this.previousYearLabelNode || node == this.nextYearLabelNode) ){
- dojo.addClass(node, "dijitCalendarHoveredDate");
- this._currentNode = node;
- }
- },
-
- _onDayMouseOut: function(/*Event*/ evt){
- // summary:
- // Handler for mouse out events on days, clears hovered style
- // tags:
- // protected
- if(!this._currentNode){ return; }
- for(var node = evt.relatedTarget; node;){
- if(node == this._currentNode){ return; }
- try{
- node = node.parentNode;
- }catch(x){
- node = null;
- }
- }
- dojo.removeClass(this._currentNode, "dijitCalendarHoveredDate");
- this._currentNode = null;
- },
-
-//TODO: use typematic
-//TODO: skip disabled dates without ending up in a loop
-//TODO: could optimize by avoiding populate grid when month does not change
- _onKeyPress: function(/*Event*/evt){
- // summary:
- // Provides keyboard navigation of calendar
- // tags:
- // protected
- var dk = dojo.keys,
- increment = -1,
- interval,
- newValue = this.value;
- switch(evt.keyCode){
- case dk.RIGHT_ARROW:
- increment = 1;
- //fallthrough...
- case dk.LEFT_ARROW:
- interval = "day";
- if(!this.isLeftToRight()){ increment *= -1; }
- break;
- case dk.DOWN_ARROW:
- increment = 1;
- //fallthrough...
- case dk.UP_ARROW:
- interval = "week";
- break;
- case dk.PAGE_DOWN:
- increment = 1;
- //fallthrough...
- case dk.PAGE_UP:
- interval = evt.ctrlKey ? "year" : "month";
- break;
- case dk.END:
- // go to the next month
- newValue = this.dateFuncObj.add(newValue, "month", 1);
- // subtract a day from the result when we're done
- interval = "day";
- //fallthrough...
- case dk.HOME:
- newValue = new Date(newValue).setDate(1);
- break;
- case dk.ENTER:
- this.onValueSelected(this.attr('value'));
- break;
- case dk.ESCAPE:
- //TODO
- default:
- return;
- }
- dojo.stopEvent(evt);
-
- if(interval){
- newValue = this.dateFuncObj.add(newValue, interval, increment);
- }
-
- this.attr("value", newValue);
- },
-
- onValueSelected: function(/*Date*/ date){
- // summary:
- // Notification that a date cell was selected. It may be the same as the previous value.
- // description:
- // Used by `dijit.form._DateTimeTextBox` (and thus `dijit.form.DateTextBox`)
- // to get notification when the user has clicked a date.
- // tags:
- // protected
- },
-
- onChange: function(/*Date*/ date){
- // summary:
- // Called only when the selected date has changed
- },
-
- _isSelectedDate: function(/*Date*/ dateObject, /*String?*/ locale){
- // summary:
- // Extension point so developers can subclass Calendar to
- // support multiple (concurrently) selected dates
- // tags:
- // protected extension
- return !this.dateFuncObj.compare(dateObject, this.value, "date")
- },
-
- isDisabledDate: function(/*Date*/ dateObject, /*String?*/ locale){
- // summary:
- // May be overridden to disable certain dates in the calendar e.g. `isDisabledDate=dojo.date.locale.isWeekend`
- // tags:
- // extension
-/*=====
- return false; // Boolean
-=====*/
- },
-
- getClassForDate: function(/*Date*/ dateObject, /*String?*/ locale){
- // summary:
- // May be overridden to return CSS classes to associate with the date entry for the given dateObject,
- // for example to indicate a holiday in specified locale.
- // tags:
- // extension
-
-/*=====
- return ""; // String
-=====*/
- }
- }
-);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/CheckedMenuItem.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/CheckedMenuItem.js
deleted file mode 100644
index e0e9082..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/CheckedMenuItem.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.CheckedMenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.CheckedMenuItem"] = true;
-dojo.provide("dijit.CheckedMenuItem");
-
-dojo.require("dijit.MenuItem");
-
-dojo.declare("dijit.CheckedMenuItem",
- dijit.MenuItem,
- {
- // summary:
- // A checkbox-like menu item for toggling on and off
-
- templateString: dojo.cache("dijit", "templates/CheckedMenuItem.html", "<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">✓</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t</td>\n</tr>\n"),
-
- // checked: Boolean
- // Our checked state
- checked: false,
- _setCheckedAttr: function(/*Boolean*/ checked){
- // summary:
- // Hook so attr('checked', bool) works.
- // Sets the class and state for the check box.
- dojo.toggleClass(this.domNode, "dijitCheckedMenuItemChecked", checked);
- dijit.setWaiState(this.domNode, "checked", checked);
- this.checked = checked;
- },
-
- onChange: function(/*Boolean*/ checked){
- // summary:
- // User defined function to handle check/uncheck events
- // tags:
- // callback
- },
-
- _onClick: function(/*Event*/ e){
- // summary:
- // Clicking this item just toggles its state
- // tags:
- // private
- if(!this.disabled){
- this.attr("checked", !this.checked);
- this.onChange(this.checked);
- }
- this.inherited(arguments);
- }
- });
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ColorPalette.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ColorPalette.js
deleted file mode 100644
index 82eb2cf..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ColorPalette.js
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.ColorPalette"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.ColorPalette"] = true;
-dojo.provide("dijit.ColorPalette");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-dojo.require("dojo.colors");
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo", "colors", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
-
-dojo.declare("dijit.ColorPalette",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // A keyboard accessible color-picking widget
- // description:
- // Grid showing various colors, so the user can pick a certain color.
- // Can be used standalone, or as a popup.
- //
- // example:
- // | <div dojoType="dijit.ColorPalette"></div>
- //
- // example:
- // | var picker = new dijit.ColorPalette({ },srcNode);
- // | picker.startup();
-
- // defaultTimeout: Number
- // Number of milliseconds before a held key or button becomes typematic
- defaultTimeout: 500,
-
- // timeoutChangeRate: Number
- // Fraction of time used to change the typematic timer between events
- // 1.0 means that each typematic event fires at defaultTimeout intervals
- // < 1.0 means that each typematic event fires at an increasing faster rate
- timeoutChangeRate: 0.90,
-
- // palette: String
- // Size of grid, either "7x10" or "3x4".
- palette: "7x10",
-
- // value: String
- // The value of the selected color.
- value: null,
-
- // _currentFocus: [private] DomNode
- // The currently focused or hovered color.
- // Different from value, which represents the selected (i.e. clicked) color.
- _currentFocus: 0,
-
- // _xDim: [protected] Integer
- // This is the number of colors horizontally across.
- _xDim: null,
-
- // _yDim: [protected] Integer
- /// This is the number of colors vertically down.
- _yDim: null,
-
- // _palettes: [protected] Map
- // This represents the value of the colors.
- // The first level is a hashmap of the different arrays available
- // The next two dimensions represent the columns and rows of colors.
- _palettes: {
- "7x10": [["white", "seashell", "cornsilk", "lemonchiffon","lightyellow", "palegreen", "paleturquoise", "lightcyan", "lavender", "plum"],
- ["lightgray", "pink", "bisque", "moccasin", "khaki", "lightgreen", "lightseagreen", "lightskyblue", "cornflowerblue", "violet"],
- ["silver", "lightcoral", "sandybrown", "orange", "palegoldenrod", "chartreuse", "mediumturquoise", "skyblue", "mediumslateblue","orchid"],
- ["gray", "red", "orangered", "darkorange", "yellow", "limegreen", "darkseagreen", "royalblue", "slateblue", "mediumorchid"],
- ["dimgray", "crimson", "chocolate", "coral", "gold", "forestgreen", "seagreen", "blue", "blueviolet", "darkorchid"],
- ["darkslategray","firebrick","saddlebrown", "sienna", "olive", "green", "darkcyan", "mediumblue","darkslateblue", "darkmagenta" ],
- ["black", "darkred", "maroon", "brown", "darkolivegreen", "darkgreen", "midnightblue", "navy", "indigo", "purple"]],
-
- "3x4": [["white", "lime", "green", "blue"],
- ["silver", "yellow", "fuchsia", "navy"],
- ["gray", "red", "purple", "black"]]
- },
-
- // _imagePaths: [protected] Map
- // This is stores the path to the palette images
- _imagePaths: {
- "7x10": dojo.moduleUrl("dijit.themes", "a11y/colors7x10.png"),
- "3x4": dojo.moduleUrl("dijit.themes", "a11y/colors3x4.png")
- },
-
- // _paletteCoords: [protected] Map
- // This is a map that is used to calculate the coordinates of the
- // images that make up the palette.
- _paletteCoords: {
- "leftOffset": 3, "topOffset": 3,
- "cWidth": 20, "cHeight": 20
- },
-
- // templateString: String
- // The template of this widget.
- templateString: dojo.cache("dijit", "templates/ColorPalette.html", "<div class=\"dijitInline dijitColorPalette\">\n\t<div class=\"dijitColorPaletteInner\" dojoAttachPoint=\"divNode\" waiRole=\"grid\"\">\n\t\t<img class=\"dijitColorPaletteUnder\" dojoAttachPoint=\"imageNode\" waiRole=\"presentation\" alt=\"\">\n\t</div>\n</div>\n"),
-
- // _paletteDims: [protected] Object
- // Size of the supported palettes for alignment purposes.
- _paletteDims: {
- "7x10": {"width": "206px", "height": "145px"},
- "3x4": {"width": "86px", "height": "64px"}
- },
-
- // tabIndex: String
- // Widget tab index.
- tabIndex: "0",
-
- buildRendering: function(){
- // Instantiate the template, which makes a skeleton into which we'll insert a bunch of
- // <img> nodes
- this.inherited(arguments);
-
- // A name has to be given to the colorMap, this needs to be unique per Palette.
- dojo.mixin(this.divNode.style, this._paletteDims[this.palette]);
- this.imageNode.setAttribute("src", this._imagePaths[this.palette].toString());
- var choices = this._palettes[this.palette];
- this.domNode.style.position = "relative";
- this._cellNodes = [];
- this.colorNames = dojo.i18n.getLocalization("dojo", "colors", this.lang);
- var url = this._blankGif,
- colorObject = new dojo.Color(),
- coords = this._paletteCoords;
- for(var row=0; row < choices.length; row++){
- var rowNode = dojo.create("div", {
- role: "row"
- }, this.divNode);
- for(var col=0; col < choices[row].length; col++){
-
- var color = choices[row][col],
- colorValue = colorObject.setColor(dojo.Color.named[color]);
-
- var cellNode = dojo.create("span", {
- "class": "dijitPaletteCell",
- tabIndex: "-1",
- title: this.colorNames[color],
- style: {
- top: coords.topOffset + (row * coords.cHeight) + "px",
- left: coords.leftOffset + (col * coords.cWidth) + "px"
- }
- });
-
- var imgNode = dojo.create("img",{
- src: url,
- "class":"dijitPaletteImg",
- alt: this.colorNames[color]
- }, cellNode);
-
- // FIXME: color is an attribute of img?
- imgNode.color = colorValue.toHex();
- var imgStyle = imgNode.style;
- imgStyle.color = imgStyle.backgroundColor = imgNode.color;
-
- dojo.forEach(["Dijitclick", "MouseEnter", "MouseLeave", "Focus"], function(handler){
- this.connect(cellNode, "on" + handler.toLowerCase(), "_onCell" + handler);
- }, this);
-
- dojo.place(cellNode, rowNode);
-
- dijit.setWaiRole(cellNode, "gridcell");
- cellNode.index = this._cellNodes.length;
- this._cellNodes.push(cellNode);
- }
- }
- this._xDim = choices[0].length;
- this._yDim = choices.length;
-
- // Now set all events
- // The palette itself is navigated to with the tab key on the keyboard
- // Keyboard navigation within the Palette is with the arrow keys
- // Spacebar selects the color.
- // For the up key the index is changed by negative the x dimension.
-
- var keyIncrementMap = {
- UP_ARROW: -this._xDim,
- // The down key the index is increase by the x dimension.
- DOWN_ARROW: this._xDim,
- // Right and left move the index by 1.
- RIGHT_ARROW: 1,
- LEFT_ARROW: -1
- };
- for(var key in keyIncrementMap){
- this._connects.push(dijit.typematic.addKeyListener(this.domNode,
- {charOrCode:dojo.keys[key], ctrlKey:false, altKey:false, shiftKey:false},
- this,
- function(){
- var increment = keyIncrementMap[key];
- return function(count){ this._navigateByKey(increment, count); };
- }(),
- this.timeoutChangeRate, this.defaultTimeout));
- }
- },
-
- postCreate: function(){
- this.inherited(arguments);
-
- // Set initial navigable node. At any point in time there's exactly one
- // cell with tabIndex != -1. If focus is inside the ColorPalette then
- // focus is on that cell.
- // TODO: if we set aria info (for the current value) on the ColorPalette itself then can we avoid
- // having to focus each individual cell?
- this._currentFocus = this._cellNodes[0];
- dojo.attr(this._currentFocus, "tabIndex", this.tabIndex);
- },
-
- focus: function(){
- // summary:
- // Focus this ColorPalette. Puts focus on the most recently focused cell.
-
- // The cell already has tabIndex set, just need to set CSS and focus it
- dojo.addClass(this._currentFocus, "dijitPaletteCellHighlight");
- dijit.focus(this._currentFocus);
- },
-
- onChange: function(color){
- // summary:
- // Callback when a color is selected.
- // color: String
- // Hex value corresponding to color.
-// console.debug("Color selected is: "+color);
- },
-
- _onFocus: function(){
- // summary:
- // Handler for when the ColorPalette gets focus (because a cell inside
- // the ColorPalette got focus)
- // tags:
- // protected
-
- dojo.addClass(this._currentFocus, "dijitPaletteCellHighlight");
- this.inherited(arguments);
- },
-
- _onBlur: function(){
- // summary:
- // Handler for when the ColorPalette loses focus
- // tags:
- // protected
-
- // Just to be the same as 1.3, when I am focused again go to first (0,0) cell rather than
- // currently focused node.
- dojo.attr(this._currentFocus, "tabIndex", "-1");
- dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
- this._currentFocus = this._cellNodes[0];
- dojo.attr(this._currentFocus, "tabIndex", this.tabIndex);
-
- this.inherited(arguments);
- },
-
- _onCellDijitclick: function(/*Event*/ evt){
- // summary:
- // Handler for click, enter key & space key. Selects the color.
- // evt:
- // The event.
- // tags:
- // private
-
- var target = evt.currentTarget;
- this._selectColor(target);
- dojo.stopEvent(evt);
- },
-
- _onCellMouseEnter: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseEnter event on a cell. Put highlight on the color under the mouse.
- // evt:
- // The mouse event.
- // tags:
- // private
-
- var target = evt.currentTarget;
- this._setCurrent(target);
- },
-
- _onCellMouseLeave: function(/*Event*/ evt){
- // summary:
- // Handler for onMouseLeave event on a cell. Remove highlight on the color under the mouse.
- // evt:
- // The mouse event.
- // tags:
- // private
-
- dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
- },
-
- _onCellFocus: function(/*Event*/ evt){
- // summary:
- // Handler for onFocus of a cell.
- // description:
- // Removes highlight of the color that just lost focus, and highlights
- // the new color. Also moves the tabIndex setting to the new cell.
- //
- // evt:
- // The focus event.
- // tags:
- // private
-
- this._setCurrent(evt.currentTarget);
- },
-
- _setCurrent: function(/*Node*/ node){
- // summary:
- // Called when a color is hovered or focused.
- // description:
- // Removes highlight of the old color, and highlights
- // the new color. Also moves the tabIndex setting to the new cell.
- // tags:
- // protected
- if("_currentFocus" in this){
- // Remove highlight and tabIndex on old cell
- dojo.attr(this._currentFocus, "tabIndex", "-1");
- dojo.removeClass(this._currentFocus, "dijitPaletteCellHighlight");
- }
-
- // Set highlight and tabIndex of new cell
- this._currentFocus = node;
- if(node){
- dojo.attr(node, "tabIndex", this.tabIndex);
- dojo.addClass(node, "dijitPaletteCellHighlight");
- }
- },
-
- _selectColor: function(selectNode){
- // summary:
- // This selects a color. It triggers the onChange event
- // area:
- // The area node that covers the color being selected.
- // tags:
- // private
- var img = selectNode.getElementsByTagName("img")[0];
- this.onChange(this.value = img.color);
- },
-
- _navigateByKey: function(increment, typeCount){
- // summary:
- // This is the callback for typematic.
- // It changes the focus and the highlighed color.
- // increment:
- // How much the key is navigated.
- // typeCount:
- // How many times typematic has fired.
- // tags:
- // private
-
- // typecount == -1 means the key is released.
- if(typeCount == -1){ return; }
-
- var newFocusIndex = this._currentFocus.index + increment;
- if(newFocusIndex < this._cellNodes.length && newFocusIndex > -1)
- {
- var focusNode = this._cellNodes[newFocusIndex];
- this._setCurrent(focusNode);
-
- // Actually focus the node, for the benefit of screen readers.
- // Use setTimeout because IE doesn't like changing focus inside of an event handler
- setTimeout(dojo.hitch(dijit, "focus", focusNode), 0);
- }
- }
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Declaration.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Declaration.js
deleted file mode 100644
index 9403517..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Declaration.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Declaration"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Declaration"] = true;
-dojo.provide("dijit.Declaration");
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.Declaration",
- dijit._Widget,
- {
- // summary:
- // The Declaration widget allows a developer to declare new widget
- // classes directly from a snippet of markup.
-
- // _noScript: [private] Boolean
- // Flag to parser to leave alone the script tags contained inside of me
- _noScript: true,
-
- // widgetClass: String
- // Name of class being declared, ex: "acme.myWidget"
- widgetClass: "",
-
- // propList: Object
- // Set of attributes for this widget along with default values, ex:
- // {delay: 100, title: "hello world"}
- defaults: null,
-
- // mixins: String[]
- // List containing the prototype for this widget, and also any mixins,
- // ex: ["dijit._Widget", "dijit._Container"]
- mixins: [],
-
- buildRendering: function(){
- var src = this.srcNodeRef.parentNode.removeChild(this.srcNodeRef),
- methods = dojo.query("> script[type^='dojo/method'][event]", src).orphan(),
- postscriptConnects = dojo.query("> script[type^='dojo/method']", src).orphan(),
- regularConnects = dojo.query("> script[type^='dojo/connect']", src).orphan(),
- srcType = src.nodeName;
-
- var propList = this.defaults || {};
-
- // For all methods defined like <script type="dojo/method" event="foo">,
- // add that method to prototype
- dojo.forEach(methods, function(s){
- var evt = s.getAttribute("event"),
- func = dojo.parser._functionFromScript(s);
- propList[evt] = func;
- });
-
- // map array of strings like [ "dijit.form.Button" ] to array of mixin objects
- // (note that dojo.map(this.mixins, dojo.getObject) doesn't work because it passes
- // a bogus third argument to getObject(), confusing it)
- this.mixins = this.mixins.length ?
- dojo.map(this.mixins, function(name){ return dojo.getObject(name); } ) :
- [ dijit._Widget, dijit._Templated ];
-
- propList.widgetsInTemplate = true;
- propList._skipNodeCache = true;
- propList.templateString = "<"+srcType+" class='"+src.className+"' dojoAttachPoint='"+(src.getAttribute("dojoAttachPoint") || '')+"' dojoAttachEvent='"+(src.getAttribute("dojoAttachEvent") || '')+"' >"+src.innerHTML.replace(/\%7B/g,"{").replace(/\%7D/g,"}")+"</"+srcType+">";
-
- // strip things so we don't create stuff under us in the initial setup phase
- dojo.query("[dojoType]", src).forEach(function(node){
- node.removeAttribute("dojoType");
- });
-
- // create the new widget class
- var wc = dojo.declare(
- this.widgetClass,
- this.mixins,
- propList
- );
-
- // Handle <script> blocks of form:
- // <script type="dojo/connect" event="foo">
- // and
- // <script type="dojo/method">
- // (Note that the second one is just shorthand for a dojo/connect to postscript)
- // Since this is a connect in the declaration, we are actually connection to the method
- // in the _prototype_.
- var connects = regularConnects.concat(postscriptConnects);
- dojo.forEach(connects, function(s){
- var evt = s.getAttribute("event") || "postscript",
- func = dojo.parser._functionFromScript(s);
- dojo.connect(wc.prototype, evt, func);
- });
- }
- }
-);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Dialog.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Dialog.js
deleted file mode 100644
index d7e7c06..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Dialog.js
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Dialog"] = true;
-dojo.provide("dijit.Dialog");
-
-dojo.require("dojo.dnd.move");
-dojo.require("dojo.dnd.TimedMoveable");
-dojo.require("dojo.fx");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-dojo.require("dijit.form._FormMixin");
-dojo.require("dijit._DialogMixin");
-dojo.require("dijit.DialogUnderlay");
-dojo.require("dijit.layout.ContentPane");
-dojo.requireLocalization("dijit", "common", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
-
-/*=====
-dijit._underlay = function(kwArgs){
- // summary:
- // A shared instance of a `dijit.DialogUnderlay`
- //
- // description:
- // A shared instance of a `dijit.DialogUnderlay` created and
- // used by `dijit.Dialog`, though never created until some Dialog
- // or subclass thereof is shown.
-};
-=====*/
-
-dojo.declare(
- "dijit._DialogBase",
- [dijit._Templated, dijit.form._FormMixin, dijit._DialogMixin],
- {
- // summary:
- // A modal dialog Widget
- //
- // description:
- // Pops up a modal dialog window, blocking access to the screen
- // and also graying out the screen Dialog is extended from
- // ContentPane so it supports all the same parameters (href, etc.)
- //
- // example:
- // | <div dojoType="dijit.Dialog" href="test.html"></div>
- //
- // example:
- // | var foo = new dijit.Dialog({ title: "test dialog", content: "test content" };
- // | dojo.body().appendChild(foo.domNode);
- // | foo.startup();
-
- templateString: dojo.cache("dijit", "templates/Dialog.html", "<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave\" title=\"${buttonCancel}\">\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n</div>\n"),
-
- attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
- title: [
- { node: "titleNode", type: "innerHTML" },
- { node: "titleBar", type: "attribute" }
- ],
- "aria-describedby":""
- }),
-
- // open: Boolean
- // True if Dialog is currently displayed on screen.
- open: false,
-
- // duration: Integer
- // The time in milliseconds it takes the dialog to fade in and out
- duration: dijit.defaultDuration,
-
- // refocus: Boolean
- // A Toggle to modify the default focus behavior of a Dialog, which
- // is to re-focus the element which had focus before being opened.
- // False will disable refocusing. Default: true
- refocus: true,
-
- // autofocus: Boolean
- // A Toggle to modify the default focus behavior of a Dialog, which
- // is to focus on the first dialog element after opening the dialog.
- // False will disable autofocusing. Default: true
- autofocus: true,
-
- // _firstFocusItem: [private] [readonly] DomNode
- // The pointer to the first focusable node in the dialog.
- // Set by `dijit._DialogMixin._getFocusItems`.
- _firstFocusItem: null,
-
- // _lastFocusItem: [private] [readonly] DomNode
- // The pointer to which node has focus prior to our dialog.
- // Set by `dijit._DialogMixin._getFocusItems`.
- _lastFocusItem: null,
-
- // doLayout: [protected] Boolean
- // Don't change this parameter from the default value.
- // This ContentPane parameter doesn't make sense for Dialog, since Dialog
- // is never a child of a layout container, nor can you specify the size of
- // Dialog in order to control the size of an inner widget.
- doLayout: false,
-
- // draggable: Boolean
- // Toggles the moveable aspect of the Dialog. If true, Dialog
- // can be dragged by it's title. If false it will remain centered
- // in the viewport.
- draggable: true,
-
- //aria-describedby: String
- // Allows the user to add an aria-describedby attribute onto the dialog. The value should
- // be the id of the container element of text that describes the dialog purpose (usually
- // the first text in the dialog).
- // <div dojoType="dijit.Dialog" aria-describedby="intro" .....>
- // <div id="intro">Introductory text</div>
- // <div>rest of dialog contents</div>
- // </div>
- "aria-describedby":"",
-
- postMixInProperties: function(){
- var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
- dojo.mixin(this, _nlsResources);
- this.inherited(arguments);
- },
-
- postCreate: function(){
- dojo.style(this.domNode, {
- display: "none",
- position:"absolute"
- });
- dojo.body().appendChild(this.domNode);
-
- this.inherited(arguments);
-
- this.connect(this, "onExecute", "hide");
- this.connect(this, "onCancel", "hide");
- this._modalconnects = [];
- },
-
- onLoad: function(){
- // summary:
- // Called when data has been loaded from an href.
- // Unlike most other callbacks, this function can be connected to (via `dojo.connect`)
- // but should *not* be overriden.
- // tags:
- // callback
-
- // when href is specified we need to reposition the dialog after the data is loaded
- this._position();
- this.inherited(arguments);
- },
-
- _endDrag: function(e){
- // summary:
- // Called after dragging the Dialog. Saves the position of the dialog in the viewport.
- // tags:
- // private
- if(e && e.node && e.node === this.domNode){
- this._relativePosition = dojo.position(e.node);
- }
- },
-
- _setup: function(){
- // summary:
- // Stuff we need to do before showing the Dialog for the first
- // time (but we defer it until right beforehand, for
- // performance reasons).
- // tags:
- // private
-
- var node = this.domNode;
-
- if(this.titleBar && this.draggable){
- this._moveable = (dojo.isIE == 6) ?
- new dojo.dnd.TimedMoveable(node, { handle: this.titleBar }) : // prevent overload, see #5285
- new dojo.dnd.Moveable(node, { handle: this.titleBar, timeout: 0 });
- dojo.subscribe("/dnd/move/stop",this,"_endDrag");
- }else{
- dojo.addClass(node,"dijitDialogFixed");
- }
-
- this.underlayAttrs = {
- dialogId: this.id,
- "class": dojo.map(this["class"].split(/\s/), function(s){ return s+"_underlay"; }).join(" ")
- };
-
- this._fadeIn = dojo.fadeIn({
- node: node,
- duration: this.duration,
- beforeBegin: dojo.hitch(this, function(){
- var underlay = dijit._underlay;
- if(!underlay){
- underlay = dijit._underlay = new dijit.DialogUnderlay(this.underlayAttrs);
- }else{
- underlay.attr(this.underlayAttrs);
- }
-
- var zIndex = 948 + dijit._dialogStack.length*2;
- dojo.style(dijit._underlay.domNode, 'zIndex', zIndex);
- dojo.style(this.domNode, 'zIndex', zIndex + 1);
- underlay.show();
- }),
- onEnd: dojo.hitch(this, function(){
- if(this.autofocus){
- // find focusable Items each time dialog is shown since if dialog contains a widget the
- // first focusable items can change
- this._getFocusItems(this.domNode);
- dijit.focus(this._firstFocusItem);
- }
- })
- });
-
- this._fadeOut = dojo.fadeOut({
- node: node,
- duration: this.duration,
- onEnd: dojo.hitch(this, function(){
- node.style.display = "none";
-
- // Restore the previous dialog in the stack, or if this is the only dialog
- // then restore to original page
- var ds = dijit._dialogStack;
- if(ds.length == 0){
- dijit._underlay.hide();
- }else{
- dojo.style(dijit._underlay.domNode, 'zIndex', 948 + ds.length*2);
- dijit._underlay.attr(ds[ds.length-1].underlayAttrs);
- }
-
- // Restore focus to wherever it was before this dialog was displayed
- if(this.refocus){
- var focus = this._savedFocus;
-
- // If we are returning control to a previous dialog but for some reason
- // that dialog didn't have a focused field, set focus to first focusable item.
- // This situation could happen if two dialogs appeared at nearly the same time,
- // since a dialog doesn't set it's focus until the fade-in is finished.
- if(ds.length > 0){
- var pd = ds[ds.length-1];
- if(!dojo.isDescendant(focus.node, pd.domNode)){
- pd._getFocusItems(pd.domNode);
- focus = pd._firstFocusItem;
- }
- }
-
- dijit.focus(focus);
- }
- })
- });
- },
-
- uninitialize: function(){
- var wasPlaying = false;
- if(this._fadeIn && this._fadeIn.status() == "playing"){
- wasPlaying = true;
- this._fadeIn.stop();
- }
- if(this._fadeOut && this._fadeOut.status() == "playing"){
- wasPlaying = true;
- this._fadeOut.stop();
- }
-
- // Hide the underlay, unless the underlay widget has already been destroyed
- // because we are being called during page unload (when all widgets are destroyed)
- if((this.open || wasPlaying) && !dijit._underlay._destroyed){
- dijit._underlay.hide();
- }
- if(this._moveable){
- this._moveable.destroy();
- }
- this.inherited(arguments);
- },
-
- _size: function(){
- // summary:
- // If necessary, shrink dialog contents so dialog fits in viewport
- // tags:
- // private
-
- this._checkIfSingleChild();
-
- // If we resized the dialog contents earlier, reset them back to original size, so
- // that if the user later increases the viewport size, the dialog can display w/out a scrollbar.
- // Need to do this before the dojo.marginBox(this.domNode) call below.
- if(this._singleChild){
- if(this._singleChildOriginalStyle){
- this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle;
- }
- delete this._singleChildOriginalStyle;
- }else{
- dojo.style(this.containerNode, {
- width:"auto",
- height:"auto"
- });
- }
-
- var mb = dojo.marginBox(this.domNode);
- var viewport = dijit.getViewport();
- if(mb.w >= viewport.w || mb.h >= viewport.h){
- // Reduce size of dialog contents so that dialog fits in viewport
-
- var w = Math.min(mb.w, Math.floor(viewport.w * 0.75)),
- h = Math.min(mb.h, Math.floor(viewport.h * 0.75));
-
- if(this._singleChild && this._singleChild.resize){
- this._singleChildOriginalStyle = this._singleChild.domNode.style.cssText;
- this._singleChild.resize({w: w, h: h});
- }else{
- dojo.style(this.containerNode, {
- width: w + "px",
- height: h + "px",
- overflow: "auto",
- position: "relative" // workaround IE bug moving scrollbar or dragging dialog
- });
- }
- }else{
- if(this._singleChild && this._singleChild.resize){
- this._singleChild.resize();
- }
- }
- },
-
- _position: function(){
- // summary:
- // Position modal dialog in the viewport. If no relative offset
- // in the viewport has been determined (by dragging, for instance),
- // center the node. Otherwise, use the Dialog's stored relative offset,
- // and position the node to top: left: values based on the viewport.
- // tags:
- // private
- if(!dojo.hasClass(dojo.body(),"dojoMove")){
- var node = this.domNode,
- viewport = dijit.getViewport(),
- p = this._relativePosition,
- bb = p ? null : dojo._getBorderBox(node),
- l = Math.floor(viewport.l + (p ? p.x : (viewport.w - bb.w) / 2)),
- t = Math.floor(viewport.t + (p ? p.y : (viewport.h - bb.h) / 2))
- ;
- dojo.style(node,{
- left: l + "px",
- top: t + "px"
- });
- }
- },
-
- _onKey: function(/*Event*/ evt){
- // summary:
- // Handles the keyboard events for accessibility reasons
- // tags:
- // private
-
- var ds = dijit._dialogStack;
- if(ds[ds.length-1] != this){
- // console.debug(this.id + ': skipping because', this, 'is not the active dialog');
- return;
- }
-
- if(evt.charOrCode){
- var dk = dojo.keys;
- var node = evt.target;
- if(evt.charOrCode === dk.TAB){
- this._getFocusItems(this.domNode);
- }
- var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
- // see if we are shift-tabbing from first focusable item on dialog
- if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
- if(!singleFocusItem){
- dijit.focus(this._lastFocusItem); // send focus to last item in dialog
- }
- dojo.stopEvent(evt);
- }else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
- if(!singleFocusItem){
- dijit.focus(this._firstFocusItem); // send focus to first item in dialog
- }
- dojo.stopEvent(evt);
- }else{
- // see if the key is for the dialog
- while(node){
- if(node == this.domNode || dojo.hasClass(node, "dijitPopup")){
- if(evt.charOrCode == dk.ESCAPE){
- this.onCancel();
- }else{
- return; // just let it go
- }
- }
- node = node.parentNode;
- }
- // this key is for the disabled document window
- if(evt.charOrCode !== dk.TAB){ // allow tabbing into the dialog for a11y
- dojo.stopEvent(evt);
- // opera won't tab to a div
- }else if(!dojo.isOpera){
- try{
- this._firstFocusItem.focus();
- }catch(e){ /*squelch*/ }
- }
- }
- }
- },
-
- show: function(){
- // summary:
- // Display the dialog
- if(this.open){ return; }
-
- // first time we show the dialog, there's some initialization stuff to do
- if(!this._alreadyInitialized){
- this._setup();
- this._alreadyInitialized=true;
- }
-
- if(this._fadeOut.status() == "playing"){
- this._fadeOut.stop();
- }
-
- this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout"));
- this._modalconnects.push(dojo.connect(window, "onresize", this, function(){
- // IE gives spurious resize events and can actually get stuck
- // in an infinite loop if we don't ignore them
- var viewport = dijit.getViewport();
- if(!this._oldViewport ||
- viewport.h != this._oldViewport.h ||
- viewport.w != this._oldViewport.w){
- this.layout();
- this._oldViewport = viewport;
- }
- }));
- this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey"));
-
- dojo.style(this.domNode, {
- opacity:0,
- display:""
- });
-
- this.open = true;
- this._onShow(); // lazy load trigger
-
- this._size();
- this._position();
- dijit._dialogStack.push(this);
- this._fadeIn.play();
-
- this._savedFocus = dijit.getFocus(this);
- },
-
- hide: function(){
- // summary:
- // Hide the dialog
-
- // if we haven't been initialized yet then we aren't showing and we can just return
- // or if we aren't the active dialog, don't allow us to close yet
- var ds = dijit._dialogStack;
- if(!this._alreadyInitialized || this != ds[ds.length-1]){
- return;
- }
-
- if(this._fadeIn.status() == "playing"){
- this._fadeIn.stop();
- }
-
- // throw away current active dialog from stack -- making the previous dialog or the node on the original page active
- ds.pop();
-
- this._fadeOut.play();
-
- if(this._scrollConnected){
- this._scrollConnected = false;
- }
- dojo.forEach(this._modalconnects, dojo.disconnect);
- this._modalconnects = [];
-
- if(this._relativePosition){
- delete this._relativePosition;
- }
- this.open = false;
-
- this.onHide();
- },
-
- layout: function(){
- // summary:
- // Position the Dialog and the underlay
- // tags:
- // private
- if(this.domNode.style.display != "none"){
- if(dijit._underlay){ // avoid race condition during show()
- dijit._underlay.layout();
- }
- this._position();
- }
- },
-
- destroy: function(){
- dojo.forEach(this._modalconnects, dojo.disconnect);
- if(this.refocus && this.open){
- setTimeout(dojo.hitch(dijit,"focus",this._savedFocus), 25);
- }
- this.inherited(arguments);
- },
-
- _onCloseEnter: function(){
- // summary:
- // Called when user hovers over close icon
- // tags:
- // private
- dojo.addClass(this.closeButtonNode, "dijitDialogCloseIcon-hover");
- },
-
- _onCloseLeave: function(){
- // summary:
- // Called when user stops hovering over close icon
- // tags:
- // private
- dojo.removeClass(this.closeButtonNode, "dijitDialogCloseIcon-hover");
- }
- }
-);
-
-dojo.declare(
- "dijit.Dialog",
- [dijit.layout.ContentPane, dijit._DialogBase],
- {}
-);
-
-// Stack of currenctly displayed dialogs, layered on top of each other
-dijit._dialogStack = [];
-
-// For back-compat. TODO: remove in 2.0
-dojo.require("dijit.TooltipDialog");
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/DialogUnderlay.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/DialogUnderlay.js
deleted file mode 100644
index d6e6090..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/DialogUnderlay.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.DialogUnderlay"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.DialogUnderlay"] = true;
-dojo.provide("dijit.DialogUnderlay");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit.DialogUnderlay",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // The component that blocks the screen behind a `dijit.Dialog`
- //
- // description:
- // A component used to block input behind a `dijit.Dialog`. Only a single
- // instance of this widget is created by `dijit.Dialog`, and saved as
- // a reference to be shared between all Dialogs as `dijit._underlay`
- //
- // The underlay itself can be styled based on and id:
- // | #myDialog_underlay { background-color:red; }
- //
- // In the case of `dijit.Dialog`, this id is based on the id of the Dialog,
- // suffixed with _underlay.
-
- // Template has two divs; outer div is used for fade-in/fade-out, and also to hold background iframe.
- // Inner div has opacity specified in CSS file.
- templateString: "<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",
-
- // Parameters on creation or updatable later
-
- // dialogId: String
- // Id of the dialog.... DialogUnderlay's id is based on this id
- dialogId: "",
-
- // class: String
- // This class name is used on the DialogUnderlay node, in addition to dijitDialogUnderlay
- "class": "",
-
- attributeMap: { id: "domNode" },
-
- _setDialogIdAttr: function(id){
- dojo.attr(this.node, "id", id + "_underlay");
- },
-
- _setClassAttr: function(clazz){
- this.node.className = "dijitDialogUnderlay " + clazz;
- },
-
- postCreate: function(){
- // summary:
- // Append the underlay to the body
- dojo.body().appendChild(this.domNode);
- },
-
- layout: function(){
- // summary:
- // Sets the background to the size of the viewport
- //
- // description:
- // Sets the background to the size of the viewport (rather than the size
- // of the document) since we need to cover the whole browser window, even
- // if the document is only a few lines long.
- // tags:
- // private
-
- var is = this.node.style,
- os = this.domNode.style;
-
- // hide the background temporarily, so that the background itself isn't
- // causing scrollbars to appear (might happen when user shrinks browser
- // window and then we are called to resize)
- os.display = "none";
-
- // then resize and show
- var viewport = dijit.getViewport();
- os.top = viewport.t + "px";
- os.left = viewport.l + "px";
- is.width = viewport.w + "px";
- is.height = viewport.h + "px";
- os.display = "block";
- },
-
- show: function(){
- // summary:
- // Show the dialog underlay
- this.domNode.style.display = "block";
- this.layout();
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
- },
-
- hide: function(){
- // summary:
- // Hides the dialog underlay
- this.bgIframe.destroy();
- this.domNode.style.display = "none";
- },
-
- uninitialize: function(){
- if(this.bgIframe){
- this.bgIframe.destroy();
- }
- this.inherited(arguments);
- }
- }
-);
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Editor.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Editor.js
deleted file mode 100644
index fc37881..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Editor.js
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Editor"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Editor"] = true;
-dojo.provide("dijit.Editor");
-dojo.require("dijit._editor.RichText");
-dojo.require("dijit.Toolbar");
-dojo.require("dijit.ToolbarSeparator");
-dojo.require("dijit._editor._Plugin");
-dojo.require("dijit._editor.plugins.EnterKeyHandling");
-dojo.require("dijit._editor.range");
-dojo.require("dijit._Container");
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dijit._editor", "commands", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
-
-dojo.declare(
- "dijit.Editor",
- dijit._editor.RichText,
- {
- // summary:
- // A rich text Editing widget
- //
- // description:
- // This widget provides basic WYSIWYG editing features, based on the browser's
- // underlying rich text editing capability, accompanied by a toolbar (`dijit.Toolbar`).
- // A plugin model is available to extend the editor's capabilities as well as the
- // the options available in the toolbar. Content generation may vary across
- // browsers, and clipboard operations may have different results, to name
- // a few limitations. Note: this widget should not be used with the HTML
- // <TEXTAREA> tag -- see dijit._editor.RichText for details.
-
- // plugins: Object[]
- // A list of plugin names (as strings) or instances (as objects)
- // for this widget.
- //
- // When declared in markup, it might look like:
- // | plugins="['bold',{name:'dijit._editor.plugins.FontChoice', command:'fontName', generic:true}]"
- plugins: null,
-
- // extraPlugins: Object[]
- // A list of extra plugin names which will be appended to plugins array
- extraPlugins: null,
-
- constructor: function(){
- // summary:
- // Runs on widget initialization to setup arrays etc.
- // tags:
- // private
-
- if(!dojo.isArray(this.plugins)){
- this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|",
- "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",
- "dijit._editor.plugins.EnterKeyHandling" /*, "createLink"*/];
- }
-
- this._plugins=[];
- this._editInterval = this.editActionInterval * 1000;
-
- //IE will always lose focus when other element gets focus, while for FF and safari,
- //when no iframe is used, focus will be lost whenever another element gets focus.
- //For IE, we can connect to onBeforeDeactivate, which will be called right before
- //the focus is lost, so we can obtain the selected range. For other browsers,
- //no equivelent of onBeforeDeactivate, so we need to do two things to make sure
- //selection is properly saved before focus is lost: 1) when user clicks another
- //element in the page, in which case we listen to mousedown on the entire page and
- //see whether user clicks out of a focus editor, if so, save selection (focus will
- //only lost after onmousedown event is fired, so we can obtain correct caret pos.)
- //2) when user tabs away from the editor, which is handled in onKeyDown below.
- if(dojo.isIE){
- this.events.push("onBeforeDeactivate");
- this.events.push("onBeforeActivate");
- }
- },
-
- postCreate: function(){
- //for custom undo/redo
- if(this.customUndo){
- dojo['require']("dijit._editor.range");
- this._steps=this._steps.slice(0);
- this._undoedSteps=this._undoedSteps.slice(0);
-// this.addKeyHandler('z',this.KEY_CTRL,this.undo);
-// this.addKeyHandler('y',this.KEY_CTRL,this.redo);
- }
- if(dojo.isArray(this.extraPlugins)){
- this.plugins=this.plugins.concat(this.extraPlugins);
- }
-
-// try{
- this.inherited(arguments);
-// dijit.Editor.superclass.postCreate.apply(this, arguments);
-
- this.commands = dojo.i18n.getLocalization("dijit._editor", "commands", this.lang);
-
- if(!this.toolbar){
- // if we haven't been assigned a toolbar, create one
- this.toolbar = new dijit.Toolbar({});
- dojo.place(this.toolbar.domNode, this.editingArea, "before");
- }
-
- dojo.forEach(this.plugins, this.addPlugin, this);
- this.onNormalizedDisplayChanged(); //update toolbar button status
-// }catch(e){ console.debug(e); }
-
- this.toolbar.startup();
- },
- destroy: function(){
- dojo.forEach(this._plugins, function(p){
- if(p && p.destroy){
- p.destroy();
- }
- });
- this._plugins=[];
- this.toolbar.destroyRecursive();
- delete this.toolbar;
- this.inherited(arguments);
- },
- addPlugin: function(/*String||Object*/plugin, /*Integer?*/index){
- // summary:
- // takes a plugin name as a string or a plugin instance and
- // adds it to the toolbar and associates it with this editor
- // instance. The resulting plugin is added to the Editor's
- // plugins array. If index is passed, it's placed in the plugins
- // array at that index. No big magic, but a nice helper for
- // passing in plugin names via markup.
- //
- // plugin: String, args object or plugin instance
- //
- // args:
- // This object will be passed to the plugin constructor
- //
- // index: Integer
- // Used when creating an instance from
- // something already in this.plugins. Ensures that the new
- // instance is assigned to this.plugins at that index.
- var args=dojo.isString(plugin)?{name:plugin}:plugin;
- if(!args.setEditor){
- var o={"args":args,"plugin":null,"editor":this};
- dojo.publish(dijit._scopeName + ".Editor.getPlugin",[o]);
- if(!o.plugin){
- var pc = dojo.getObject(args.name);
- if(pc){
- o.plugin=new pc(args);
- }
- }
- if(!o.plugin){
- console.warn('Cannot find plugin',plugin);
- return;
- }
- plugin=o.plugin;
- }
- if(arguments.length > 1){
- this._plugins[index] = plugin;
- }else{
- this._plugins.push(plugin);
- }
- plugin.setEditor(this);
- if(dojo.isFunction(plugin.setToolbar)){
- plugin.setToolbar(this.toolbar);
- }
- },
- //the following 3 functions are required to make the editor play nice under a layout widget, see #4070
- startup: function(){
- // summary:
- // Exists to make Editor work as a child of a layout widget.
- // Developers don't need to call this method.
- // tags:
- // protected
- //console.log('startup',arguments);
- },
- resize: function(size){
- // summary:
- // Resize the editor to the specified size, see `dijit.layout._LayoutWidget.resize`
- if(size){
- // we've been given a height/width for the entire editor (toolbar + contents), calls layout()
- // to split the allocated size between the toolbar and the contents
- dijit.layout._LayoutWidget.prototype.resize.apply(this, arguments);
- }
- /*
- else{
- // do nothing, the editor is already laid out correctly. The user has probably specified
- // the height parameter, which was used to set a size on the iframe
- }
- */
- },
- layout: function(){
- // summary:
- // Called from `dijit.layout._LayoutWidget.resize`. This shouldn't be called directly
- // tags:
- // protected
-
- // Converts the iframe (or rather the <div> surrounding it) to take all the available space
- // except what's needed for the toolbar
- this.editingArea.style.height = (this._contentBox.h - dojo.marginBox(this.toolbar.domNode).h)+"px";
- if(this.iframe){
- this.iframe.style.height="100%";
- }
- this._layoutMode = true;
- },
- _onIEMouseDown: function(/*Event*/ e){
- // summary:
- // IE only to prevent 2 clicks to focus
- // tags:
- // private
-
- var outsideClientArea = this.document.body.componentFromPoint(e.x, e.y);
- if(!outsideClientArea){
- delete this._savedSelection; // new mouse position overrides old selection
- if(e.target.tagName == "BODY"){
- setTimeout(dojo.hitch(this, "placeCursorAtEnd"), 0);
- }
- this.inherited(arguments);
- }
- },
- onBeforeActivate: function(e){
- this._restoreSelection();
- },
- onBeforeDeactivate: function(e){
- // summary:
- // Called on IE right before focus is lost. Saves the selected range.
- // tags:
- // private
- if(this.customUndo){
- this.endEditing(true);
- }
- //in IE, the selection will be lost when other elements get focus,
- //let's save focus before the editor is deactivated
- if(e.target.tagName != "BODY"){
- this._saveSelection();
- }
- //console.log('onBeforeDeactivate',this);
- },
-
- /* beginning of custom undo/redo support */
-
- // customUndo: Boolean
- // Whether we shall use custom undo/redo support instead of the native
- // browser support. By default, we only enable customUndo for IE, as it
- // has broken native undo/redo support. Note: the implementation does
- // support other browsers which have W3C DOM2 Range API implemented.
- customUndo: dojo.isIE,
-
- // editActionInterval: Integer
- // When using customUndo, not every keystroke will be saved as a step.
- // Instead typing (including delete) will be grouped together: after
- // a user stops typing for editActionInterval seconds, a step will be
- // saved; if a user resume typing within editActionInterval seconds,
- // the timeout will be restarted. By default, editActionInterval is 3
- // seconds.
- editActionInterval: 3,
-
- beginEditing: function(cmd){
- // summary:
- // Called to note that the user has started typing alphanumeric characters, if it's not already noted.
- // Deals with saving undo; see editActionInterval parameter.
- // tags:
- // private
- if(!this._inEditing){
- this._inEditing=true;
- this._beginEditing(cmd);
- }
- if(this.editActionInterval>0){
- if(this._editTimer){
- clearTimeout(this._editTimer);
- }
- this._editTimer = setTimeout(dojo.hitch(this, this.endEditing), this._editInterval);
- }
- },
- _steps:[],
- _undoedSteps:[],
- execCommand: function(cmd){
- // summary:
- // Main handler for executing any commands to the editor, like paste, bold, etc.
- // Called by plugins, but not meant to be called by end users.
- // tags:
- // protected
- if(this.customUndo && (cmd == 'undo' || cmd == 'redo')){
- return this[cmd]();
- }else{
- if(this.customUndo){
- this.endEditing();
- this._beginEditing();
- }
- var r;
- try{
- r = this.inherited('execCommand', arguments);
- if(dojo.isWebKit && cmd == 'paste' && !r){ //see #4598: safari does not support invoking paste from js
- throw { code: 1011 }; // throw an object like Mozilla's error
- }
- }catch(e){
- //TODO: when else might we get an exception? Do we need the Mozilla test below?
- if(e.code == 1011 /* Mozilla: service denied */ && /copy|cut|paste/.test(cmd)){
- // Warn user of platform limitation. Cannot programmatically access clipboard. See ticket #4136
- var sub = dojo.string.substitute,
- accel = {cut:'X', copy:'C', paste:'V'};
- alert(sub(this.commands.systemShortcut,
- [this.commands[cmd], sub(this.commands[dojo.isMac ? 'appleKey' : 'ctrlKey'], [accel[cmd]])]));
- }
- r = false;
- }
- if(this.customUndo){
- this._endEditing();
- }
- return r;
- }
- },
- queryCommandEnabled: function(cmd){
- // summary:
- // Returns true if specified editor command is enabled.
- // Used by the plugins to know when to highlight/not highlight buttons.
- // tags:
- // protected
- if(this.customUndo && (cmd == 'undo' || cmd == 'redo')){
- return cmd == 'undo' ? (this._steps.length > 1) : (this._undoedSteps.length > 0);
- }else{
- return this.inherited('queryCommandEnabled',arguments);
- }
- },
-
- _moveToBookmark: function(b){
- // summary:
- // Selects the text specified in bookmark b
- // tags:
- // private
- var bookmark = b.mark;
- var mark = b.mark;
- var col = b.isCollapsed;
- if(dojo.isIE){
- if(dojo.isArray(mark)){//IE CONTROL
- bookmark = [];
- dojo.forEach(mark,function(n){
- bookmark.push(dijit.range.getNode(n,this.editNode));
- },this);
- }
- }else{//w3c range
- var r=dijit.range.create(this.window);
- r.setStart(dijit.range.getNode(b.startContainer,this.editNode),b.startOffset);
- r.setEnd(dijit.range.getNode(b.endContainer,this.editNode),b.endOffset);
- bookmark=r;
- }
- dojo.withGlobal(this.window,'moveToBookmark',dijit,[{mark: bookmark, isCollapsed: col}]);
- },
-
- _changeToStep: function(from, to){
- // summary:
- // Reverts editor to "to" setting, from the undo stack.
- // tags:
- // private
- this.setValue(to.text);
- var b=to.bookmark;
- if(!b){ return; }
- this._moveToBookmark(b);
- },
- undo: function(){
- // summary:
- // Handler for editor undo (ex: ctrl-z) operation
- // tags:
- // private
-// console.log('undo');
- this.endEditing(true);
- var s=this._steps.pop();
- if(this._steps.length>0){
- this.focus();
- this._changeToStep(s,this._steps[this._steps.length-1]);
- this._undoedSteps.push(s);
- this.onDisplayChanged();
- return true;
- }
- return false;
- },
- redo: function(){
- // summary:
- // Handler for editor redo (ex: ctrl-y) operation
- // tags:
- // private
-
-// console.log('redo');
- this.endEditing(true);
- var s=this._undoedSteps.pop();
- if(s && this._steps.length>0){
- this.focus();
- this._changeToStep(this._steps[this._steps.length-1],s);
- this._steps.push(s);
- this.onDisplayChanged();
- return true;
- }
- return false;
- },
- endEditing: function(ignore_caret){
- // summary:
- // Called to note that the user has stopped typing alphanumeric characters, if it's not already noted.
- // Deals with saving undo; see editActionInterval parameter.
- // tags:
- // private
- if(this._editTimer){
- clearTimeout(this._editTimer);
- }
- if(this._inEditing){
- this._endEditing(ignore_caret);
- this._inEditing=false;
- }
- },
- _getBookmark: function(){
- // summary:
- // Get the currently selected text
- // tags:
- // protected
- var b=dojo.withGlobal(this.window,dijit.getBookmark);
- var tmp=[];
- if(b.mark){
- var mark = b.mark;
- if(dojo.isIE){
- if(dojo.isArray(mark)){//CONTROL
- dojo.forEach(mark,function(n){
- tmp.push(dijit.range.getIndex(n,this.editNode).o);
- },this);
- b.mark = tmp;
- }
- }else{//w3c range
- tmp=dijit.range.getIndex(mark.startContainer,this.editNode).o;
- b.mark ={startContainer:tmp,
- startOffset:mark.startOffset,
- endContainer:mark.endContainer === mark.startContainer?tmp:dijit.range.getIndex(mark.endContainer,this.editNode).o,
- endOffset:mark.endOffset};
- }
- }
- return b;
- },
- _beginEditing: function(cmd){
- // summary:
- // Called when the user starts typing alphanumeric characters.
- // Deals with saving undo; see editActionInterval parameter.
- // tags:
- // private
- if(this._steps.length === 0){
- this._steps.push({'text':this.savedContent,'bookmark':this._getBookmark()});
- }
- },
- _endEditing: function(ignore_caret){
- // summary:
- // Called when the user stops typing alphanumeric characters.
- // Deals with saving undo; see editActionInterval parameter.
- // tags:
- // private
- var v=this.getValue(true);
-
- this._undoedSteps=[];//clear undoed steps
- this._steps.push({text: v, bookmark: this._getBookmark()});
- },
- onKeyDown: function(e){
- // summary:
- // Handler for onkeydown event.
- // tags:
- // private
-
- //We need to save selection if the user TAB away from this editor
- //no need to call _saveSelection for IE, as that will be taken care of in onBeforeDeactivate
- if(!dojo.isIE && !this.iframe && e.keyCode == dojo.keys.TAB && !this.tabIndent){
- this._saveSelection();
- }
- if(!this.customUndo){
- this.inherited(arguments);
- return;
- }
- var k = e.keyCode, ks = dojo.keys;
- if(e.ctrlKey && !e.altKey){//undo and redo only if the special right Alt + z/y are not pressed #5892
- if(k == 90 || k == 122){ //z
- dojo.stopEvent(e);
- this.undo();
- return;
- }else if(k == 89 || k == 121){ //y
- dojo.stopEvent(e);
- this.redo();
- return;
- }
- }
- this.inherited(arguments);
-
- switch(k){
- case ks.ENTER:
- case ks.BACKSPACE:
- case ks.DELETE:
- this.beginEditing();
- break;
- case 88: //x
- case 86: //v
- if(e.ctrlKey && !e.altKey && !e.metaKey){
- this.endEditing();//end current typing step if any
- if(e.keyCode == 88){
- this.beginEditing('cut');
- //use timeout to trigger after the cut is complete
- setTimeout(dojo.hitch(this, this.endEditing), 1);
- }else{
- this.beginEditing('paste');
- //use timeout to trigger after the paste is complete
- setTimeout(dojo.hitch(this, this.endEditing), 1);
- }
- break;
- }
- //pass through
- default:
- if(!e.ctrlKey && !e.altKey && !e.metaKey && (e.keyCode<dojo.keys.F1 || e.keyCode>dojo.keys.F15)){
- this.beginEditing();
- break;
- }
- //pass through
- case ks.ALT:
- this.endEditing();
- break;
- case ks.UP_ARROW:
- case ks.DOWN_ARROW:
- case ks.LEFT_ARROW:
- case ks.RIGHT_ARROW:
- case ks.HOME:
- case ks.END:
- case ks.PAGE_UP:
- case ks.PAGE_DOWN:
- this.endEditing(true);
- break;
- //maybe ctrl+backspace/delete, so don't endEditing when ctrl is pressed
- case ks.CTRL:
- case ks.SHIFT:
- case ks.TAB:
- break;
- }
- },
- _onBlur: function(){
- // summary:
- // Called from focus manager when focus has moved away from this editor
- // tags:
- // protected
-
- //this._saveSelection();
- this.inherited('_onBlur',arguments);
- this.endEditing(true);
- },
- _saveSelection: function(){
- // summary:
- // Save the currently selected text in _savedSelection attribute
- // tags:
- // private
- this._savedSelection=this._getBookmark();
- //console.log('save selection',this._savedSelection,this);
- },
- _restoreSelection: function(){
- // summary:
- // Re-select the text specified in _savedSelection attribute;
- // see _saveSelection().
- // tags:
- // private
- if(this._savedSelection){
- // only restore the selection if the current range is collapsed
- // if not collapsed, then it means the editor does not lose
- // selection and there is no need to restore it
- if(dojo.withGlobal(this.window,'isCollapsed',dijit)){
- this._moveToBookmark(this._savedSelection);
- }
- delete this._savedSelection;
- }
- },
-
- onClick: function(){
- // summary:
- // Handler for when editor is clicked
- // tags:
- // protected
- this.endEditing(true);
- this.inherited(arguments);
- }
- /* end of custom undo/redo support */
- }
-);
-
-// Register the "default plugins", ie, the built-in editor commands
-dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
- if(o.plugin){ return; }
- var args = o.args, p;
- var _p = dijit._editor._Plugin;
- var name = args.name;
- switch(name){
- case "undo": case "redo": case "cut": case "copy": case "paste": case "insertOrderedList":
- case "insertUnorderedList": case "indent": case "outdent": case "justifyCenter":
- case "justifyFull": case "justifyLeft": case "justifyRight": case "delete":
- case "selectAll": case "removeFormat": case "unlink":
- case "insertHorizontalRule":
- p = new _p({ command: name });
- break;
-
- case "bold": case "italic": case "underline": case "strikethrough":
- case "subscript": case "superscript":
- p = new _p({ buttonClass: dijit.form.ToggleButton, command: name });
- break;
- case "|":
- p = new _p({ button: new dijit.ToolbarSeparator() });
- }
-// console.log('name',name,p);
- o.plugin=p;
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/InlineEditBox.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/InlineEditBox.js
deleted file mode 100644
index f4b8188..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/InlineEditBox.js
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.InlineEditBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.InlineEditBox"] = true;
-dojo.provide("dijit.InlineEditBox");
-
-dojo.require("dojo.i18n");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Container");
-dojo.require("dijit.form.Button");
-dojo.require("dijit.form.TextBox");
-
-dojo.requireLocalization("dijit", "common", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,ko,nb,nl,pl,pt,pt-pt,ru,sk,sl,sv,th,tr,zh,zh-tw");
-
-dojo.declare("dijit.InlineEditBox",
- dijit._Widget,
- {
- // summary:
- // An element with in-line edit capabilitites
- //
- // description:
- // Behavior for an existing node (`<p>`, `<div>`, `<span>`, etc.) so that
- // when you click it, an editor shows up in place of the original
- // text. Optionally, Save and Cancel button are displayed below the edit widget.
- // When Save is clicked, the text is pulled from the edit
- // widget and redisplayed and the edit widget is again hidden.
- // By default a plain Textarea widget is used as the editor (or for
- // inline values a TextBox), but you can specify an editor such as
- // dijit.Editor (for editing HTML) or a Slider (for adjusting a number).
- // An edit widget must support the following API to be used:
- // - displayedValue or value as initialization parameter,
- // and available through attr('displayedValue') / attr('value')
- // - void focus()
- // - DOM-node focusNode = node containing editable text
-
- // editing: [readonly] Boolean
- // Is the node currently in edit mode?
- editing: false,
-
- // autoSave: Boolean
- // Changing the value automatically saves it; don't have to push save button
- // (and save button isn't even displayed)
- autoSave: true,
-
- // buttonSave: String
- // Save button label
- buttonSave: "",
-
- // buttonCancel: String
- // Cancel button label
- buttonCancel: "",
-
- // renderAsHtml: Boolean
- // Set this to true if the specified Editor's value should be interpreted as HTML
- // rather than plain text (ex: `dijit.Editor`)
- renderAsHtml: false,
-
- // editor: String
- // Class name for Editor widget
- editor: "dijit.form.TextBox",
-
- // editorWrapper: String
- // Class name for widget that wraps the editor widget, displaying save/cancel
- // buttons.
- editorWrapper: "dijit._InlineEditor",
-
- // editorParams: Object
- // Set of parameters for editor, like {required: true}
- editorParams: {},
-
- onChange: function(value){
- // summary:
- // Set this handler to be notified of changes to value.
- // tags:
- // callback
- },
-
- onCancel: function(){
- // summary:
- // Set this handler to be notified when editing is cancelled.
- // tags:
- // callback
- },
-
- // width: String
- // Width of editor. By default it's width=100% (ie, block mode).
- width: "100%",
-
- // value: String
- // The display value of the widget in read-only mode
- value: "",
-
- // noValueIndicator: [const] String
- // The text that gets displayed when there is no value (so that the user has a place to click to edit)
- noValueIndicator: "<span style='font-family: wingdings; text-decoration: underline;'> ✍ </span>",
-
- constructor: function(){
- // summary:
- // Sets up private arrays etc.
- // tags:
- // private
- this.editorParams = {};
- },
-
- postMixInProperties: function(){
- this.inherited(arguments);
-
- // save pointer to original source node, since Widget nulls-out srcNodeRef
- this.displayNode = this.srcNodeRef;
-
- // connect handlers to the display node
- var events = {
- ondijitclick: "_onClick",
- onmouseover: "_onMouseOver",
- onmouseout: "_onMouseOut",
- onfocus: "_onMouseOver",
- onblur: "_onMouseOut"
- };
- for(var name in events){
- this.connect(this.displayNode, name, events[name]);
- }
- dijit.setWaiRole(this.displayNode, "button");
- if(!this.displayNode.getAttribute("tabIndex")){
- this.displayNode.setAttribute("tabIndex", 0);
- }
-
- this.attr('value', this.value || this.displayNode.innerHTML);
- },
-
- setDisabled: function(/*Boolean*/ disabled){
- // summary:
- // Deprecated. Use attr('disable', ...) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.InlineEditBox.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0");
- this.attr('disabled', disabled);
- },
-
- _setDisabledAttr: function(/*Boolean*/ disabled){
- // summary:
- // Hook to make attr("disabled", ...) work.
- // Set disabled state of widget.
- this.disabled = disabled;
- dijit.setWaiState(this.domNode, "disabled", disabled);
- if(disabled){
- this.displayNode.removeAttribute("tabIndex");
- }else{
- this.displayNode.setAttribute("tabIndex", 0);
- }
- },
-
- _onMouseOver: function(){
- // summary:
- // Handler for onmouseover event.
- // tags:
- // private
- dojo.addClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
- },
-
- _onMouseOut: function(){
- // summary:
- // Handler for onmouseout event.
- // tags:
- // private
- dojo.removeClass(this.displayNode, this.disabled ? "dijitDisabledClickableRegion" : "dijitClickableRegion");
- },
-
- _onClick: function(/*Event*/ e){
- // summary:
- // Handler for onclick event.
- // tags:
- // private
- if(this.disabled){ return; }
- if(e){ dojo.stopEvent(e); }
- this._onMouseOut();
-
- // Since FF gets upset if you move a node while in an event handler for that node...
- setTimeout(dojo.hitch(this, "edit"), 0);
- },
-
- edit: function(){
- // summary:
- // Display the editor widget in place of the original (read only) markup.
- // tags:
- // private
-
- if(this.disabled || this.editing){ return; }
- this.editing = true;
-
- // save some display node values that can be restored later
- this._savedPosition = dojo.style(this.displayNode, "position") || "static";
- this._savedOpacity = dojo.style(this.displayNode, "opacity") || "1";
- this._savedTabIndex = dojo.attr(this.displayNode, "tabIndex") || "0";
-
- if(this.wrapperWidget){
- this.wrapperWidget.editWidget.attr("displayedValue" in this.editorParams ? "displayedValue" : "value", this.value);
- }else{
- // Placeholder for edit widget
- // Put place holder (and eventually editWidget) before the display node so that it's positioned correctly
- // when Calendar dropdown appears, which happens automatically on focus.
- var placeholder = dojo.create("span", null, this.domNode, "before");
-
- // Create the editor wrapper (the thing that holds the editor widget and the save/cancel buttons)
- var ewc = dojo.getObject(this.editorWrapper);
- this.wrapperWidget = new ewc({
- value: this.value,
- buttonSave: this.buttonSave,
- buttonCancel: this.buttonCancel,
- tabIndex: this._savedTabIndex,
- editor: this.editor,
- inlineEditBox: this,
- sourceStyle: dojo.getComputedStyle(this.displayNode),
- save: dojo.hitch(this, "save"),
- cancel: dojo.hitch(this, "cancel")
- }, placeholder);
- }
- var ww = this.wrapperWidget;
-
- if(dojo.isIE){
- dijit.focus(dijit.getFocus()); // IE (at least 8) needs help with tab order changes
- }
- // to avoid screen jitter, we first create the editor with position:absolute, visibility:hidden,
- // and then when it's finished rendering, we switch from display mode to editor
- // position:absolute releases screen space allocated to the display node
- // opacity:0 is the same as visibility:hidden but is still focusable
- // visiblity:hidden removes focus outline
-
- dojo.style(this.displayNode, { position: "absolute", opacity: "0", display: "none" }); // makes display node invisible, display style used for focus-ability
- dojo.style(ww.domNode, { position: this._savedPosition, visibility: "visible", opacity: "1" });
- dojo.attr(this.displayNode, "tabIndex", "-1"); // needed by WebKit for TAB from editor to skip displayNode
-
- // Replace the display widget with edit widget, leaving them both displayed for a brief time so that
- // focus can be shifted without incident. (browser may needs some time to render the editor.)
- setTimeout(dojo.hitch(this, function(){
- ww.focus(); // both nodes are showing, so we can switch focus safely
- ww._resetValue = ww.getValue();
- }), 0);
- },
-
- _onBlur: function(){
- // summary:
- // Called when focus moves outside the InlineEditBox.
- // Performs garbage collection.
- // tags:
- // private
-
- this.inherited(arguments);
- if(!this.editing){
- setTimeout(dojo.hitch(this, function(){
- if(this.wrapperWidget){
- this.wrapperWidget.destroy();
- delete this.wrapperWidget;
- }
- }), 0);
- }
- },
-
- _showText: function(/*Boolean*/ focus){
- // summary:
- // Revert to display mode, and optionally focus on display node
- // tags:
- // private
-
- var ww = this.wrapperWidget;
- dojo.style(ww.domNode, { position: "absolute", visibility: "hidden", opacity: "0" }); // hide the editor from mouse/keyboard events
- dojo.style(this.displayNode, { position: this._savedPosition, opacity: this._savedOpacity, display: "" }); // make the original text visible
- dojo.attr(this.displayNode, "tabIndex", this._savedTabIndex);
- if(focus){
- dijit.focus(this.displayNode);
- }
- },
-
- save: function(/*Boolean*/ focus){
- // summary:
- // Save the contents of the editor and revert to display mode.
- // focus: Boolean
- // Focus on the display mode text
- // tags:
- // private
-
- if(this.disabled || !this.editing){ return; }
- this.editing = false;
-
- var ww = this.wrapperWidget;
- var value = ww.getValue();
- this.attr('value', value); // display changed, formatted value
-
- // tell the world that we have changed
- setTimeout(dojo.hitch(this, "onChange", value), 0); // setTimeout prevents browser freeze for long-running event handlers
-
- this._showText(focus); // set focus as needed
- },
-
- setValue: function(/*String*/ val){
- // summary:
- // Deprecated. Use attr('value', ...) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.InlineEditBox.setValue() is deprecated. Use attr('value', ...) instead.", "", "2.0");
- return this.attr("value", val);
- },
-
- _setValueAttr: function(/*String*/ val){
- // summary:
- // Hook to make attr("value", ...) work.
- // Inserts specified HTML value into this node, or an "input needed" character if node is blank.
-
- this.value = val = dojo.trim(val);
- if(!this.renderAsHtml){
- val = val.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, """).replace(/\n/g, "<br>");
- }
- this.displayNode.innerHTML = val || this.noValueIndicator;
- },
-
- getValue: function(){
- // summary:
- // Deprecated. Use attr('value') instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.InlineEditBox.getValue() is deprecated. Use attr('value') instead.", "", "2.0");
- return this.attr("value");
- },
-
- cancel: function(/*Boolean*/ focus){
- // summary:
- // Revert to display mode, discarding any changes made in the editor
- // tags:
- // private
-
- if(this.disabled || !this.editing){ return; }
- this.editing = false;
-
- // tell the world that we have no changes
- setTimeout(dojo.hitch(this, "onCancel"), 0); // setTimeout prevents browser freeze for long-running event handlers
-
- this._showText(focus);
- }
-});
-
-dojo.declare(
- "dijit._InlineEditor",
- [dijit._Widget, dijit._Templated],
-{
- // summary:
- // Internal widget used by InlineEditBox, displayed when in editing mode
- // to display the editor and maybe save/cancel buttons. Calling code should
- // connect to save/cancel methods to detect when editing is finished
- //
- // Has mainly the same parameters as InlineEditBox, plus these values:
- //
- // style: Object
- // Set of CSS attributes of display node, to replicate in editor
- //
- // value: String
- // Value as an HTML string or plain text string, depending on renderAsHTML flag
-
- templateString: dojo.cache("dijit", "templates/InlineEditBox.html", "<span dojoAttachPoint=\"editNode\" waiRole=\"presentation\" style=\"position: absolute; visibility:hidden\" class=\"dijitReset dijitInline\"\n\tdojoAttachEvent=\"onkeypress: _onKeyPress\"\n\t><span dojoAttachPoint=\"editorPlaceholder\"></span\n\t><span dojoAttachPoint=\"buttonContainer\"\n\t\t><button class='saveButton' dojoAttachPoint=\"saveButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:save\" label=\"${buttonSave}\"></button\n\t\t><button class='cancelButton' dojoAttachPoint=\"cancelButton\" dojoType=\"dijit.form.Button\" dojoAttachEvent=\"onClick:cancel\" label=\"${buttonCancel}\"></button\n\t></span\n></span>\n"),
- widgetsInTemplate: true,
-
- postMixInProperties: function(){
- this.inherited(arguments);
- this.messages = dojo.i18n.getLocalization("dijit", "common", this.lang);
- dojo.forEach(["buttonSave", "buttonCancel"], function(prop){
- if(!this[prop]){ this[prop] = this.messages[prop]; }
- }, this);
- },
-
- postCreate: function(){
- // Create edit widget in place in the template
- var cls = dojo.getObject(this.editor);
-
- // Copy the style from the source
- // Don't copy ALL properties though, just the necessary/applicable ones
- var srcStyle = this.sourceStyle;
- var editStyle = "line-height:" + srcStyle.lineHeight + ";";
- dojo.forEach(["Weight","Family","Size","Style"], function(prop){
- editStyle += "font-"+prop+":"+srcStyle["font"+prop]+";";
- }, this);
- dojo.forEach(["marginTop","marginBottom","marginLeft", "marginRight"], function(prop){
- this.domNode.style[prop] = srcStyle[prop];
- }, this);
- var width = this.inlineEditBox.width;
- if(width == "100%"){
- // block mode
- editStyle += "width:100%;";
- this.domNode.style.display = "block";
- }else{
- // inline-block mode
- editStyle += "width:" + (width + (Number(width) == width ? "px" : "")) + ";";
- }
- var editorParams = this.inlineEditBox.editorParams;
- editorParams.style = editStyle;
- editorParams[ "displayedValue" in cls.prototype ? "displayedValue" : "value"] = this.value;
- var ew = this.editWidget = new cls(editorParams, this.editorPlaceholder);
-
- if(this.inlineEditBox.autoSave){
- // Hide the save/cancel buttons since saving is done by simply tabbing away or
- // selecting a value from the drop down list
- this.buttonContainer.style.display="none";
-
- // Selecting a value from a drop down list causes an onChange event and then we save
- this.connect(ew, "onChange", "_onChange");
-
- // ESC and TAB should cancel and save. Note that edit widgets do a stopEvent() on ESC key (to
- // prevent Dialog from closing when the user just wants to revert the value in the edit widget),
- // so this is the only way we can see the key press event.
- this.connect(ew, "onKeyPress", "_onKeyPress");
- }else{
- // If possible, enable/disable save button based on whether the user has changed the value
- if("intermediateChanges" in cls.prototype){
- ew.attr("intermediateChanges", true);
- this.connect(ew, "onChange", "_onIntermediateChange");
- this.saveButton.attr("disabled", true);
- }
- }
- },
-
- _onIntermediateChange: function(val){
- // summary:
- // Called for editor widgets that support the intermediateChanges=true flag as a way
- // to detect when to enable/disabled the save button
- this.saveButton.attr("disabled", (this.getValue() == this._resetValue) || !this.enableSave());
- },
-
- destroy: function(){
- this.editWidget.destroy(true); // let the parent wrapper widget clean up the DOM
- this.inherited(arguments);
- },
-
- getValue: function(){
- // summary:
- // Return the [display] value of the edit widget
- var ew = this.editWidget;
- return String(ew.attr("displayedValue" in ew ? "displayedValue" : "value"));
- },
-
- _onKeyPress: function(e){
- // summary:
- // Handler for keypress in the edit box in autoSave mode.
- // description:
- // For autoSave widgets, if Esc/Enter, call cancel/save.
- // tags:
- // private
-
- if(this.inlineEditBox.autoSave && this.inlineEditBox.editing){
- if(e.altKey || e.ctrlKey){ return; }
- // If Enter/Esc pressed, treat as save/cancel.
- if(e.charOrCode == dojo.keys.ESCAPE){
- dojo.stopEvent(e);
- this.cancel(true); // sets editing=false which short-circuits _onBlur processing
- }else if(e.charOrCode == dojo.keys.ENTER && e.target.tagName == "INPUT"){
- dojo.stopEvent(e);
- this._onChange(); // fire _onBlur and then save
- }
-
- // _onBlur will handle TAB automatically by allowing
- // the TAB to change focus before we mess with the DOM: #6227
- // Expounding by request:
- // The current focus is on the edit widget input field.
- // save() will hide and destroy this widget.
- // We want the focus to jump from the currently hidden
- // displayNode, but since it's hidden, it's impossible to
- // unhide it, focus it, and then have the browser focus
- // away from it to the next focusable element since each
- // of these events is asynchronous and the focus-to-next-element
- // is already queued.
- // So we allow the browser time to unqueue the move-focus event
- // before we do all the hide/show stuff.
- }
- },
-
- _onBlur: function(){
- // summary:
- // Called when focus moves outside the editor
- // tags:
- // private
-
- this.inherited(arguments);
- if(this.inlineEditBox.autoSave && this.inlineEditBox.editing){
- if(this.getValue() == this._resetValue){
- this.cancel(false);
- }else if(this.enableSave()){
- this.save(false);
- }
- }
- },
-
- _onChange: function(){
- // summary:
- // Called when the underlying widget fires an onChange event,
- // such as when the user selects a value from the drop down list of a ComboBox,
- // which means that the user has finished entering the value and we should save.
- // tags:
- // private
-
- if(this.inlineEditBox.autoSave && this.inlineEditBox.editing && this.enableSave()){
- dojo.style(this.inlineEditBox.displayNode, { display: "" });
- dijit.focus(this.inlineEditBox.displayNode); // fires _onBlur which will save the formatted value
- }
- },
-
- enableSave: function(){
- // summary:
- // User overridable function returning a Boolean to indicate
- // if the Save button should be enabled or not - usually due to invalid conditions
- // tags:
- // extension
- return (
- this.editWidget.isValid
- ? this.editWidget.isValid()
- : true
- );
- },
-
- focus: function(){
- // summary:
- // Focus the edit widget.
- // tags:
- // protected
-
- this.editWidget.focus();
- setTimeout(dojo.hitch(this, function(){
- if(this.editWidget.focusNode.tagName == "INPUT"){
- dijit.selectInputText(this.editWidget.focusNode);
- }
- }), 0);
- }
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/LICENSE b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/LICENSE
deleted file mode 100644
index ad1676a..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/LICENSE
+++ /dev/null
@@ -1,195 +0,0 @@
-Dojo is available under *either* the terms of the modified BSD license *or* the
-Academic Free License version 2.1. As a recipient of Dojo, you may choose which
-license to receive this code under (except as noted in per-module LICENSE
-files). Some modules may not be the copyright of the Dojo Foundation. These
-modules contain explicit declarations of copyright in both the LICENSE files in
-the directories in which they reside and in the code itself. No external
-contributions are allowed under licenses which are fundamentally incompatible
-with the AFL or BSD licenses that Dojo is distributed under.
-
-The text of the AFL and BSD licenses is reproduced below.
-
--------------------------------------------------------------------------------
-The "New" BSD License:
-**********************
-
-Copyright (c) 2005-2009, The Dojo Foundation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * Neither the name of the Dojo Foundation nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------------------------------------------------------------------
-The Academic Free License, v. 2.1:
-**********************************
-
-This Academic Free License (the "License") applies to any original work of
-authorship (the "Original Work") whose owner (the "Licensor") has placed the
-following notice immediately following the copyright notice for the Original
-Work:
-
-Licensed under the Academic Free License version 2.1
-
-1) Grant of Copyright License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license to do the
-following:
-
-a) to reproduce the Original Work in copies;
-
-b) to prepare derivative works ("Derivative Works") based upon the Original
-Work;
-
-c) to distribute copies of the Original Work and Derivative Works to the
-public;
-
-d) to perform the Original Work publicly; and
-
-e) to display the Original Work publicly.
-
-2) Grant of Patent License. Licensor hereby grants You a world-wide,
-royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
-claims owned or controlled by the Licensor that are embodied in the Original
-Work as furnished by the Licensor, to make, use, sell and offer for sale the
-Original Work and Derivative Works.
-
-3) Grant of Source Code License. The term "Source Code" means the preferred
-form of the Original Work for making modifications to it and all available
-documentation describing how to modify the Original Work. Licensor hereby
-agrees to provide a machine-readable copy of the Source Code of the Original
-Work along with each copy of the Original Work that Licensor distributes.
-Licensor reserves the right to satisfy this obligation by placing a
-machine-readable copy of the Source Code in an information repository
-reasonably calculated to permit inexpensive and convenient access by You for as
-long as Licensor continues to distribute the Original Work, and by publishing
-the address of that information repository in a notice immediately following
-the copyright notice that applies to the Original Work.
-
-4) Exclusions From License Grant. Neither the names of Licensor, nor the names
-of any contributors to the Original Work, nor any of their trademarks or
-service marks, may be used to endorse or promote products derived from this
-Original Work without express prior written permission of the Licensor. Nothing
-in this License shall be deemed to grant any rights to trademarks, copyrights,
-patents, trade secrets or any other intellectual property of Licensor except as
-expressly stated herein. No patent license is granted to make, use, sell or
-offer to sell embodiments of any patent claims other than the licensed claims
-defined in Section 2. No right is granted to the trademarks of Licensor even if
-such marks are included in the Original Work. Nothing in this License shall be
-interpreted to prohibit Licensor from licensing under different terms from this
-License any Original Work that Licensor otherwise would have a right to
-license.
-
-5) This section intentionally omitted.
-
-6) Attribution Rights. You must retain, in the Source Code of any Derivative
-Works that You create, all copyright, patent or trademark notices from the
-Source Code of the Original Work, as well as any notices of licensing and any
-descriptive text identified therein as an "Attribution Notice." You must cause
-the Source Code for any Derivative Works that You create to carry a prominent
-Attribution Notice reasonably calculated to inform recipients that You have
-modified the Original Work.
-
-7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
-the copyright in and to the Original Work and the patent rights granted herein
-by Licensor are owned by the Licensor or are sublicensed to You under the terms
-of this License with the permission of the contributor(s) of those copyrights
-and patent rights. Except as expressly stated in the immediately proceeding
-sentence, the Original Work is provided under this License on an "AS IS" BASIS
-and WITHOUT WARRANTY, either express or implied, including, without limitation,
-the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
-This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
-license to Original Work is granted hereunder except under this disclaimer.
-
-8) Limitation of Liability. Under no circumstances and under no legal theory,
-whether in tort (including negligence), contract, or otherwise, shall the
-Licensor be liable to any person for any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License
-or the use of the Original Work including, without limitation, damages for loss
-of goodwill, work stoppage, computer failure or malfunction, or any and all
-other commercial damages or losses. This limitation of liability shall not
-apply to liability for death or personal injury resulting from Licensor's
-negligence to the extent applicable law prohibits such limitation. Some
-jurisdictions do not allow the exclusion or limitation of incidental or
-consequential damages, so this exclusion and limitation may not apply to You.
-
-9) Acceptance and Termination. If You distribute copies of the Original Work or
-a Derivative Work, You must make a reasonable effort under the circumstances to
-obtain the express assent of recipients to the terms of this License. Nothing
-else but this License (or another written agreement between Licensor and You)
-grants You permission to create Derivative Works based upon the Original Work
-or to exercise any of the rights granted in Section 1 herein, and any attempt
-to do so except under the terms of this License (or another written agreement
-between Licensor and You) is expressly prohibited by U.S. copyright law, the
-equivalent laws of other countries, and by international treaty. Therefore, by
-exercising any of the rights granted to You in Section 1 herein, You indicate
-Your acceptance of this License and all of its terms and conditions.
-
-10) Termination for Patent Action. This License shall terminate automatically
-and You may no longer exercise any of the rights granted to You by this License
-as of the date You commence an action, including a cross-claim or counterclaim,
-against Licensor or any licensee alleging that the Original Work infringes a
-patent. This termination provision shall not apply for an action alleging
-patent infringement by combinations of the Original Work with other software or
-hardware.
-
-11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
-License may be brought only in the courts of a jurisdiction wherein the
-Licensor resides or in which Licensor conducts its primary business, and under
-the laws of that jurisdiction excluding its conflict-of-law provisions. The
-application of the United Nations Convention on Contracts for the International
-Sale of Goods is expressly excluded. Any use of the Original Work outside the
-scope of this License or after its termination shall be subject to the
-requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
-seq., the equivalent laws of other countries, and international treaty. This
-section shall survive the termination of this License.
-
-12) Attorneys Fees. In any action to enforce the terms of this License or
-seeking damages relating thereto, the prevailing party shall be entitled to
-recover its costs and expenses, including, without limitation, reasonable
-attorneys' fees and costs incurred in connection with such action, including
-any appeal of such action. This section shall survive the termination of this
-License.
-
-13) Miscellaneous. This License represents the complete agreement concerning
-the subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent necessary to
-make it enforceable.
-
-14) Definition of "You" in This License. "You" throughout this License, whether
-in upper or lower case, means an individual or a legal entity exercising rights
-under, and complying with all of the terms of, this License. For legal
-entities, "You" includes any entity that controls, is controlled by, or is
-under common control with you. For purposes of this definition, "control" means
-(i) the power, direct or indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (ii) ownership of fifty percent
-(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
-entity.
-
-15) Right to Use. You may use the Original Work in all ways not otherwise
-restricted or conditioned by this License or by law, and Licensor promises not
-to interfere with or be responsible for such uses by You.
-
-This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
-Permission is hereby granted to copy and distribute this license without
-modification. This license may not be modified without the express written
-permission of its copyright owner.
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Menu.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Menu.js
deleted file mode 100644
index 4db6119..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Menu.js
+++ /dev/null
@@ -1,712 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Menu"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Menu"] = true;
-dojo.provide("dijit.Menu");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._KeyNavContainer");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit._MenuBase",
- [dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
-{
- // summary:
- // Base class for Menu and MenuBar
-
- // parentMenu: [readonly] Widget
- // pointer to menu that displayed me
- parentMenu: null,
-
- // popupDelay: Integer
- // number of milliseconds before hovering (without clicking) causes the popup to automatically open.
- popupDelay: 500,
-
- startup: function(){
- if(this._started){ return; }
-
- dojo.forEach(this.getChildren(), function(child){ child.startup(); });
- this.startupKeyNavChildren();
-
- this.inherited(arguments);
- },
-
- onExecute: function(){
- // summary:
- // Attach point for notification about when a menu item has been executed.
- // This is an internal mechanism used for Menus to signal to their parent to
- // close them, because they are about to execute the onClick handler. In
- // general developers should not attach to or override this method.
- // tags:
- // protected
- },
-
- onCancel: function(/*Boolean*/ closeAll){
- // summary:
- // Attach point for notification about when the user cancels the current menu
- // This is an internal mechanism used for Menus to signal to their parent to
- // close them. In general developers should not attach to or override this method.
- // tags:
- // protected
- },
-
- _moveToPopup: function(/*Event*/ evt){
- // summary:
- // This handles the right arrow key (left arrow key on RTL systems),
- // which will either open a submenu, or move to the next item in the
- // ancestor MenuBar
- // tags:
- // private
-
- if(this.focusedChild && this.focusedChild.popup && !this.focusedChild.disabled){
- this.focusedChild._onClick(evt);
- }else{
- var topMenu = this._getTopMenu();
- if(topMenu && topMenu._isMenuBar){
- topMenu.focusNext();
- }
- }
- },
-
- _onPopupHover: function(/*Event*/ evt){
- // summary:
- // This handler is called when the mouse moves over the popup.
- // tags:
- // private
-
- // if the mouse hovers over a menu popup that is in pending-close state,
- // then stop the close operation.
- // This can't be done in onItemHover since some popup targets don't have MenuItems (e.g. ColorPicker)
- if(this.currentPopup && this.currentPopup._pendingClose_timer){
- var parentMenu = this.currentPopup.parentMenu;
- // highlight the parent menu item pointing to this popup
- if(parentMenu.focusedChild){
- parentMenu.focusedChild._setSelected(false);
- }
- parentMenu.focusedChild = this.currentPopup.from_item;
- parentMenu.focusedChild._setSelected(true);
- // cancel the pending close
- this._stopPendingCloseTimer(this.currentPopup);
- }
- },
-
- onItemHover: function(/*MenuItem*/ item){
- // summary:
- // Called when cursor is over a MenuItem.
- // tags:
- // protected
-
- // Don't do anything unless user has "activated" the menu by:
- // 1) clicking it
- // 2) opening it from a parent menu (which automatically focuses it)
- if(this.isActive){
- this.focusChild(item);
- if(this.focusedChild.popup && !this.focusedChild.disabled && !this.hover_timer){
- this.hover_timer = setTimeout(dojo.hitch(this, "_openPopup"), this.popupDelay);
- }
- }
- // if the user is mixing mouse and keyboard navigation,
- // then the menu may not be active but a menu item has focus,
- // but it's not the item that the mouse just hovered over.
- // To avoid both keyboard and mouse selections, use the latest.
- if(this.focusedChild){
- this.focusChild(item);
- }
- this._hoveredChild = item;
- },
-
- _onChildBlur: function(item){
- // summary:
- // Called when a child MenuItem becomes inactive because focus
- // has been removed from the MenuItem *and* it's descendant menus.
- // tags:
- // private
- this._stopPopupTimer();
- item._setSelected(false);
- // Close all popups that are open and descendants of this menu
- var itemPopup = item.popup;
- if(itemPopup){
- this._stopPendingCloseTimer(itemPopup);
- itemPopup._pendingClose_timer = setTimeout(function(){
- itemPopup._pendingClose_timer = null;
- if(itemPopup.parentMenu){
- itemPopup.parentMenu.currentPopup = null;
- }
- dijit.popup.close(itemPopup); // this calls onClose
- }, this.popupDelay);
- }
- },
-
- onItemUnhover: function(/*MenuItem*/ item){
- // summary:
- // Callback fires when mouse exits a MenuItem
- // tags:
- // protected
-
- if(this.isActive){
- this._stopPopupTimer();
- }
- if(this._hoveredChild == item){ this._hoveredChild = null; }
- },
-
- _stopPopupTimer: function(){
- // summary:
- // Cancels the popup timer because the user has stop hovering
- // on the MenuItem, etc.
- // tags:
- // private
- if(this.hover_timer){
- clearTimeout(this.hover_timer);
- this.hover_timer = null;
- }
- },
-
- _stopPendingCloseTimer: function(/*dijit._Widget*/ popup){
- // summary:
- // Cancels the pending-close timer because the close has been preempted
- // tags:
- // private
- if(popup._pendingClose_timer){
- clearTimeout(popup._pendingClose_timer);
- popup._pendingClose_timer = null;
- }
- },
-
- _stopFocusTimer: function(){
- // summary:
- // Cancels the pending-focus timer because the menu was closed before focus occured
- // tags:
- // private
- if(this._focus_timer){
- clearTimeout(this._focus_timer);
- this._focus_timer = null;
- }
- },
-
- _getTopMenu: function(){
- // summary:
- // Returns the top menu in this chain of Menus
- // tags:
- // private
- for(var top=this; top.parentMenu; top=top.parentMenu);
- return top;
- },
-
- onItemClick: function(/*dijit._Widget*/ item, /*Event*/ evt){
- // summary:
- // Handle clicks on an item.
- // tags:
- // private
- if(item.disabled){ return false; }
-
- // this can't be done in _onFocus since the _onFocus events occurs asynchronously
- if(typeof this.isShowingNow == 'undefined'){ // non-popup menu
- this._markActive();
- }
-
- this.focusChild(item);
-
- if(item.popup){
- this._openPopup();
- }else{
- // before calling user defined handler, close hierarchy of menus
- // and restore focus to place it was when menu was opened
- this.onExecute();
-
- // user defined handler for click
- item.onClick(evt);
- }
- },
-
- _openPopup: function(){
- // summary:
- // Open the popup to the side of/underneath the current menu item
- // tags:
- // protected
-
- this._stopPopupTimer();
- var from_item = this.focusedChild;
- if(!from_item){ return; } // the focused child lost focus since the timer was started
- var popup = from_item.popup;
- if(popup.isShowingNow){ return; }
- if(this.currentPopup){
- this._stopPendingCloseTimer(this.currentPopup);
- dijit.popup.close(this.currentPopup);
- }
- popup.parentMenu = this;
- popup.from_item = from_item; // helps finding the parent item that should be focused for this popup
- var self = this;
- dijit.popup.open({
- parent: this,
- popup: popup,
- around: from_item.domNode,
- orient: this._orient || (this.isLeftToRight() ?
- {'TR': 'TL', 'TL': 'TR', 'BR': 'BL', 'BL': 'BR'} :
- {'TL': 'TR', 'TR': 'TL', 'BL': 'BR', 'BR': 'BL'}),
- onCancel: function(){ // called when the child menu is canceled
- // set isActive=false (_closeChild vs _cleanUp) so that subsequent hovering will NOT open child menus
- // which seems aligned with the UX of most applications (e.g. notepad, wordpad, paint shop pro)
- self.focusChild(from_item); // put focus back on my node
- self._cleanUp(); // close the submenu (be sure this is done _after_ focus is moved)
- from_item._setSelected(true); // oops, _cleanUp() deselected the item
- self.focusedChild = from_item; // and unset focusedChild
- },
- onExecute: dojo.hitch(this, "_cleanUp")
- });
-
- this.currentPopup = popup;
- // detect mouseovers to handle lazy mouse movements that temporarily focus other menu items
- popup.connect(popup.domNode, "onmouseenter", dojo.hitch(self, "_onPopupHover")); // cleaned up when the popped-up widget is destroyed on close
-
- if(popup.focus){
- // If user is opening the popup via keyboard (right arrow, or down arrow for MenuBar),
- // if the cursor happens to collide with the popup, it will generate an onmouseover event
- // even though the mouse wasn't moved. Use a setTimeout() to call popup.focus so that
- // our focus() call overrides the onmouseover event, rather than vice-versa. (#8742)
- popup._focus_timer = setTimeout(dojo.hitch(popup, function(){
- this._focus_timer = null;
- this.focus();
- }), 0);
- }
- },
-
- _markActive: function(){
- // summary:
- // Mark this menu's state as active.
- // Called when this Menu gets focus from:
- // 1) clicking it (mouse or via space/arrow key)
- // 2) being opened by a parent menu.
- // This is not called just from mouse hover.
- // Focusing a menu via TAB does NOT automatically set isActive
- // since TAB is a navigation operation and not a selection one.
- // For Windows apps, pressing the ALT key focuses the menubar
- // menus (similar to TAB navigation) but the menu is not active
- // (ie no dropdown) until an item is clicked.
- this.isActive = true;
- dojo.addClass(this.domNode, "dijitMenuActive");
- dojo.removeClass(this.domNode, "dijitMenuPassive");
- },
-
- onOpen: function(/*Event*/ e){
- // summary:
- // Callback when this menu is opened.
- // This is called by the popup manager as notification that the menu
- // was opened.
- // tags:
- // private
-
- this.isShowingNow = true;
- this._markActive();
- },
-
- _markInactive: function(){
- // summary:
- // Mark this menu's state as inactive.
- this.isActive = false; // don't do this in _onBlur since the state is pending-close until we get here
- dojo.removeClass(this.domNode, "dijitMenuActive");
- dojo.addClass(this.domNode, "dijitMenuPassive");
- },
-
- onClose: function(){
- // summary:
- // Callback when this menu is closed.
- // This is called by the popup manager as notification that the menu
- // was closed.
- // tags:
- // private
-
- this._stopFocusTimer();
- this._markInactive();
- this.isShowingNow = false;
- this.parentMenu = null;
- },
-
- _closeChild: function(){
- // summary:
- // Called when submenu is clicked or focus is lost. Close hierarchy of menus.
- // tags:
- // private
- this._stopPopupTimer();
- if(this.focusedChild){ // unhighlight the focused item
- this.focusedChild._setSelected(false);
- this.focusedChild._onUnhover();
- this.focusedChild = null;
- }
- if(this.currentPopup){
- // Close all popups that are open and descendants of this menu
- dijit.popup.close(this.currentPopup);
- this.currentPopup = null;
- }
- },
-
- _onItemFocus: function(/*MenuItem*/ item){
- // summary:
- // Called when child of this Menu gets focus from:
- // 1) clicking it
- // 2) tabbing into it
- // 3) being opened by a parent menu.
- // This is not called just from mouse hover.
- if(this._hoveredChild && this._hoveredChild != item){
- this._hoveredChild._onUnhover(); // any previous mouse movement is trumped by focus selection
- }
- },
-
- _onBlur: function(){
- // summary:
- // Called when focus is moved away from this Menu and it's submenus.
- // tags:
- // protected
- this._cleanUp();
- this.inherited(arguments);
- },
-
- _cleanUp: function(){
- // summary:
- // Called when the user is done with this menu. Closes hierarchy of menus.
- // tags:
- // private
-
- this._closeChild(); // don't call this.onClose since that's incorrect for MenuBar's that never close
- if(typeof this.isShowingNow == 'undefined'){ // non-popup menu doesn't call onClose
- this._markInactive();
- }
- }
-});
-
-dojo.declare("dijit.Menu",
- dijit._MenuBase,
- {
- // summary
- // A context menu you can assign to multiple elements
-
- // TODO: most of the code in here is just for context menu (right-click menu)
- // support. In retrospect that should have been a separate class (dijit.ContextMenu).
- // Split them for 2.0
-
- constructor: function(){
- this._bindings = [];
- },
-
- templateString: dojo.cache("dijit", "templates/Menu.html", "<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" waiRole=\"menu\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress:_onKeyPress\">\n\t<tbody class=\"dijitReset\" dojoAttachPoint=\"containerNode\"></tbody>\n</table>\n"),
-
- // targetNodeIds: [const] String[]
- // Array of dom node ids of nodes to attach to.
- // Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
- targetNodeIds: [],
-
- // contextMenuForWindow: [const] Boolean
- // If true, right clicking anywhere on the window will cause this context menu to open.
- // If false, must specify targetNodeIds.
- contextMenuForWindow: false,
-
- // leftClickToOpen: [const] Boolean
- // If true, menu will open on left click instead of right click, similiar to a file menu.
- leftClickToOpen: false,
-
- // refocus: Boolean
- // When this menu closes, re-focus the element which had focus before it was opened.
- refocus: true,
-
- // _contextMenuWithMouse: [private] Boolean
- // Used to record mouse and keyboard events to determine if a context
- // menu is being opened with the keyboard or the mouse.
- _contextMenuWithMouse: false,
-
- postCreate: function(){
- if(this.contextMenuForWindow){
- this.bindDomNode(dojo.body());
- }else{
- // TODO: should have _setTargetNodeIds() method to handle initialization and a possible
- // later attr('targetNodeIds', ...) call. There's also a problem that targetNodeIds[]
- // gets stale after calls to bindDomNode()/unBindDomNode() as it still is just the original list (see #9610)
- dojo.forEach(this.targetNodeIds, this.bindDomNode, this);
- }
- var k = dojo.keys, l = this.isLeftToRight();
- this._openSubMenuKey = l ? k.RIGHT_ARROW : k.LEFT_ARROW;
- this._closeSubMenuKey = l ? k.LEFT_ARROW : k.RIGHT_ARROW;
- this.connectKeyNavHandlers([k.UP_ARROW], [k.DOWN_ARROW]);
- },
-
- _onKeyPress: function(/*Event*/ evt){
- // summary:
- // Handle keyboard based menu navigation.
- // tags:
- // protected
-
- if(evt.ctrlKey || evt.altKey){ return; }
-
- switch(evt.charOrCode){
- case this._openSubMenuKey:
- this._moveToPopup(evt);
- dojo.stopEvent(evt);
- break;
- case this._closeSubMenuKey:
- if(this.parentMenu){
- if(this.parentMenu._isMenuBar){
- this.parentMenu.focusPrev();
- }else{
- this.onCancel(false);
- }
- }else{
- dojo.stopEvent(evt);
- }
- break;
- }
- },
-
- // thanks burstlib!
- _iframeContentWindow: function(/* HTMLIFrameElement */iframe_el){
- // summary:
- // Returns the window reference of the passed iframe
- // tags:
- // private
- var win = dijit.getDocumentWindow(this._iframeContentDocument(iframe_el)) ||
- // Moz. TODO: is this available when defaultView isn't?
- this._iframeContentDocument(iframe_el)['__parent__'] ||
- (iframe_el.name && dojo.doc.frames[iframe_el.name]) || null;
- return win; // Window
- },
-
- _iframeContentDocument: function(/* HTMLIFrameElement */iframe_el){
- // summary:
- // Returns a reference to the document object inside iframe_el
- // tags:
- // protected
- var doc = iframe_el.contentDocument // W3
- || (iframe_el.contentWindow && iframe_el.contentWindow.document) // IE
- || (iframe_el.name && dojo.doc.frames[iframe_el.name] && dojo.doc.frames[iframe_el.name].document)
- || null;
- return doc; // HTMLDocument
- },
-
- bindDomNode: function(/*String|DomNode*/ node){
- // summary:
- // Attach menu to given node
- node = dojo.byId(node);
-
- var cn; // Connect node
-
- // Support context menus on iframes. Rather than binding to the iframe itself we need
- // to bind to the <body> node inside the iframe.
- if(node.tagName.toLowerCase() == "iframe"){
- var iframe = node,
- win = this._iframeContentWindow(iframe);
- cn = dojo.withGlobal(win, dojo.body);
- }else{
-
- // To capture these events at the top level, attach to <html>, not <body>.
- // Otherwise right-click context menu just doesn't work.
- cn = (node == dojo.body() ? dojo.doc.documentElement : node);
- }
-
-
- // "binding" is the object to track our connection to the node (ie, the parameter to bindDomNode())
- var binding = {
- node: node,
- iframe: iframe
- };
-
- // Save info about binding in _bindings[], and make node itself record index(+1) into
- // _bindings[] array. Prefix w/_dijitMenu to avoid setting an attribute that may
- // start with a number, which fails on FF/safari.
- dojo.attr(node, "_dijitMenu" + this.id, this._bindings.push(binding));
-
- // Setup the connections to monitor click etc., unless we are connecting to an iframe which hasn't finished
- // loading yet, in which case we need to wait for the onload event first, and then connect
- var doConnects = dojo.hitch(this, function(cn){
- return [
- dojo.connect(cn, (this.leftClickToOpen)?"onclick":"oncontextmenu", this, function(evt){
- this._openMyself(evt, cn, iframe);
- }),
- dojo.connect(cn, "onkeydown", this, "_contextKey"),
- dojo.connect(cn, "onmousedown", this, "_contextMouse")
- ];
- });
- binding.connects = cn ? doConnects(cn) : [];
-
- if(iframe){
- // Setup handler to [re]bind to the iframe when the contents are initially loaded,
- // and every time the contents change.
- // Need to do this b/c we are actually binding to the iframe's <body> node.
- // Note: can't use dojo.connect(), see #9609.
-
- binding.onloadHandler = dojo.hitch(this, function(){
- // want to remove old connections, but IE throws exceptions when trying to
- // access the <body> node because it's already gone, or at least in a state of limbo
-
- var win = this._iframeContentWindow(iframe);
- cn = dojo.withGlobal(win, dojo.body);
- binding.connects = doConnects(cn);
- });
- if(iframe.addEventListener){
- iframe.addEventListener("load", binding.onloadHandler, false);
- }else{
- iframe.attachEvent("onload", binding.onloadHandler);
- }
- }
- },
-
- unBindDomNode: function(/*String|DomNode*/ nodeName){
- // summary:
- // Detach menu from given node
-
- var node;
- try{
- node = dojo.byId(nodeName);
- }catch(e){
- // On IE the dojo.byId() call will get an exception if the attach point was
- // the <body> node of an <iframe> that has since been reloaded (and thus the
- // <body> node is in a limbo state of destruction.
- return;
- }
-
- // node["_dijitMenu" + this.id] contains index(+1) into my _bindings[] array
- var attrName = "_dijitMenu" + this.id;
- if(node && dojo.hasAttr(node, attrName)){
- var bid = dojo.attr(node, attrName)-1, b = this._bindings[bid];
- dojo.forEach(b.connects, dojo.disconnect);
-
- // Remove listener for iframe onload events
- var iframe = b.iframe;
- if(iframe){
- if(iframe.removeEventListener){
- iframe.removeEventListener("load", b.onloadHandler, false);
- }else{
- iframe.detachEvent("onload", b.onloadHandler);
- }
- }
-
- dojo.removeAttr(node, attrName);
- delete this._bindings[bid];
- }
- },
-
- _contextKey: function(e){
- // summary:
- // Code to handle popping up editor using F10 key rather than mouse
- // tags:
- // private
- this._contextMenuWithMouse = false;
- if(e.keyCode == dojo.keys.F10){
- dojo.stopEvent(e);
- if(e.shiftKey && e.type == "keydown"){
- // FF: copying the wrong property from e will cause the system
- // context menu to appear in spite of stopEvent. Don't know
- // exactly which properties cause this effect.
- var _e = { target: e.target, pageX: e.pageX, pageY: e.pageY };
- _e.preventDefault = _e.stopPropagation = function(){};
- // IE: without the delay, focus work in "open" causes the system
- // context menu to appear in spite of stopEvent.
- window.setTimeout(dojo.hitch(this, function(){ this._openMyself(_e); }), 1);
- }
- }
- },
-
- _contextMouse: function(e){
- // summary:
- // Helper to remember when we opened the context menu with the mouse instead
- // of with the keyboard
- // tags:
- // private
- this._contextMenuWithMouse = true;
- },
-
- _openMyself: function(/*Event*/ e, /*DomNode?*/ node, /*DomNode?*/ iframe){
- // summary:
- // Internal function for opening myself when the user
- // does a right-click or something similar.
- // node:
- // The node that is being clicked
- // iframe:
- // If an <iframe> is being clicked, iframe points to that iframe and node
- // points to the iframe's body.
- // tags:
- // private
-
- if(this.leftClickToOpen && e.button>0){
- return;
- }
- dojo.stopEvent(e);
-
- // Get coordinates.
- // If we are opening the menu with the mouse or on safari open
- // the menu at the mouse cursor
- // (Safari does not have a keyboard command to open the context menu
- // and we don't currently have a reliable way to determine
- // _contextMenuWithMouse on Safari)
- var x,y;
- if(dojo.isSafari || this._contextMenuWithMouse){
- x=e.pageX;
- y=e.pageY;
-
- if(iframe){
- // Event is on <body> node of an <iframe>, convert coordinates to match main document
- var od = e.target.ownerDocument,
- ifc = dojo.position(iframe, true),
- win = this._iframeContentWindow(iframe),
- scroll = dojo.withGlobal(win, "_docScroll", dojo);
-
- var cs = dojo.getComputedStyle(iframe),
- tp = dojo._toPixelValue,
- left = (dojo.isIE && dojo.isQuirks ? 0 : tp(iframe, cs.paddingLeft)) + (dojo.isIE && dojo.isQuirks ? tp(iframe, cs.borderLeftWidth) : 0),
- top = (dojo.isIE && dojo.isQuirks ? 0 : tp(iframe, cs.paddingTop)) + (dojo.isIE && dojo.isQuirks ? tp(iframe, cs.borderTopWidth) : 0);
-
- x += ifc.x + left - scroll.x;
- y += ifc.y + top - scroll.y;
- }
- }else{
- // otherwise open near e.target
- var coords = dojo.position(e.target, true);
- x = coords.x + 10;
- y = coords.y + 10;
- }
-
- var self=this;
- var savedFocus = dijit.getFocus(this);
- function closeAndRestoreFocus(){
- // user has clicked on a menu or popup
- if(self.refocus){
- dijit.focus(savedFocus);
- }
- dijit.popup.close(self);
- }
- dijit.popup.open({
- popup: this,
- x: x,
- y: y,
- onExecute: closeAndRestoreFocus,
- onCancel: closeAndRestoreFocus,
- orient: this.isLeftToRight() ? 'L' : 'R'
- });
- this.focus();
-
- this._onBlur = function(){
- this.inherited('_onBlur', arguments);
- // Usually the parent closes the child widget but if this is a context
- // menu then there is no parent
- dijit.popup.close(this);
- // don't try to restore focus; user has clicked another part of the screen
- // and set focus there
- };
- },
-
- uninitialize: function(){
- dojo.forEach(this._bindings, function(b){ if(b){ this.unBindDomNode(b.node); } }, this);
- this.inherited(arguments);
- }
-}
-);
-
-// Back-compat (TODO: remove in 2.0)
-dojo.require("dijit.MenuItem");
-dojo.require("dijit.PopupMenuItem");
-dojo.require("dijit.CheckedMenuItem");
-dojo.require("dijit.MenuSeparator");
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBar.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBar.js
deleted file mode 100644
index dbf1eb3..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBar.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.MenuBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.MenuBar"] = true;
-dojo.provide("dijit.MenuBar");
-
-dojo.require("dijit.Menu");
-
-dojo.declare("dijit.MenuBar", dijit._MenuBase, {
- // summary:
- // A menu bar, listing menu choices horizontally, like the "File" menu in most desktop applications
-
- templateString: dojo.cache("dijit", "templates/MenuBar.html", "<div class=\"dijitMenuBar dijitMenuPassive\" dojoAttachPoint=\"containerNode\" waiRole=\"menubar\" tabIndex=\"${tabIndex}\" dojoAttachEvent=\"onkeypress: _onKeyPress\"></div>\n"),
-
- // _isMenuBar: [protected] Boolean
- // This is a MenuBar widget, not a (vertical) Menu widget.
- _isMenuBar: true,
-
- constructor: function(){
- // summary:
- // Sets up local variables etc.
- // tags:
- // private
-
- // parameter to dijit.popup.open() about where to put popup (relative to this.domNode)
- this._orient = this.isLeftToRight() ? {BL: 'TL'} : {BR: 'TR'};
- },
-
- postCreate: function(){
- var k = dojo.keys, l = this.isLeftToRight();
- this.connectKeyNavHandlers(
- l ? [k.LEFT_ARROW] : [k.RIGHT_ARROW],
- l ? [k.RIGHT_ARROW] : [k.LEFT_ARROW]
- );
- },
-
- focusChild: function(item){
- // overload focusChild so that whenever the focus is moved to a new item,
- // check the previous focused whether it has its popup open, if so, after
- // focusing the new item, open its submenu immediately
- var prev_item = this.focusedChild,
- showpopup = prev_item && prev_item.popup && prev_item.popup.isShowingNow;
- this.inherited(arguments);
- if(showpopup && item.popup && !item.disabled){
- this._openPopup(); // TODO: on down arrow, _openPopup() is called here and in onItemClick()
- }
- },
-
- _onKeyPress: function(/*Event*/ evt){
- // summary:
- // Handle keyboard based menu navigation.
- // tags:
- // protected
-
- if(evt.ctrlKey || evt.altKey){ return; }
-
- switch(evt.charOrCode){
- case dojo.keys.DOWN_ARROW:
- this._moveToPopup(evt);
- dojo.stopEvent(evt);
- }
- },
-
- onItemClick: function(/*dijit._Widget*/ item, /*Event*/ evt){
- // summary:
- // Handle clicks on an item. Cancels a dropdown if already open.
- // tags:
- // private
- if(item.popup && item.popup.isShowingNow){
- item.popup.onCancel();
- }else{
- this.inherited(arguments);
- }
- }
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBarItem.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBarItem.js
deleted file mode 100644
index a191c2c..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuBarItem.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.MenuBarItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.MenuBarItem"] = true;
-dojo.provide("dijit.MenuBarItem");
-
-dojo.require("dijit.MenuItem");
-
-dojo.declare("dijit._MenuBarItemMixin", null, {
- templateString: dojo.cache("dijit", "templates/MenuBarItem.html", "<div class=\"dijitReset dijitInline dijitMenuItem dijitMenuItemLabel\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"'\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<span dojoAttachPoint=\"containerNode\"></span>\n</div>\n"),
-
- // overriding attributeMap because we don't have icon
- attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
- label: { node: "containerNode", type: "innerHTML" }
- })
-});
-
-dojo.declare("dijit.MenuBarItem", [dijit.MenuItem, dijit._MenuBarItemMixin], {
- // summary:
- // Item in a MenuBar that's clickable, and doesn't spawn a submenu when pressed (or hovered)
-
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuItem.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuItem.js
deleted file mode 100644
index 59597c2..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuItem.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.MenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.MenuItem"] = true;
-dojo.provide("dijit.MenuItem");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-dojo.require("dijit._Contained");
-
-dojo.declare("dijit.MenuItem",
- [dijit._Widget, dijit._Templated, dijit._Contained],
- {
- // summary:
- // A line item in a Menu Widget
-
- // Make 3 columns
- // icon, label, and expand arrow (BiDi-dependent) indicating sub-menu
- templateString: dojo.cache("dijit", "templates/MenuItem.html", "<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitem\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon\" dojoAttachPoint=\"iconNode\">\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">\n\t\t<div dojoAttachPoint=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\">\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"),
-
- attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
- label: { node: "containerNode", type: "innerHTML" },
- iconClass: { node: "iconNode", type: "class" }
- }),
-
- // label: String
- // Menu text
- label: '',
-
- // iconClass: String
- // Class to apply to DOMNode to make it display an icon.
- iconClass: "",
-
- // accelKey: String
- // Text for the accelerator (shortcut) key combination.
- // Note that although Menu can display accelerator keys there
- // is no infrastructure to actually catch and execute these
- // accelerators.
- accelKey: "",
-
- // disabled: Boolean
- // If true, the menu item is disabled.
- // If false, the menu item is enabled.
- disabled: false,
-
- _fillContent: function(/*DomNode*/ source){
- // If button label is specified as srcNodeRef.innerHTML rather than
- // this.params.label, handle it here.
- if(source && !("label" in this.params)){
- this.attr('label', source.innerHTML);
- }
- },
-
- postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- var label = this.id+"_text";
- dojo.attr(this.containerNode, "id", label);
- if(this.accelKeyNode){
- dojo.attr(this.accelKeyNode, "id", this.id + "_accel");
- label += " " + this.id + "_accel";
- }
- dijit.setWaiState(this.domNode, "labelledby", label);
- },
-
- _onHover: function(){
- // summary:
- // Handler when mouse is moved onto menu item
- // tags:
- // protected
- dojo.addClass(this.domNode, 'dijitMenuItemHover');
- this.getParent().onItemHover(this);
- },
-
- _onUnhover: function(){
- // summary:
- // Handler when mouse is moved off of menu item,
- // possibly to a child menu, or maybe to a sibling
- // menuitem or somewhere else entirely.
- // tags:
- // protected
-
- // if we are unhovering the currently selected item
- // then unselect it
- dojo.removeClass(this.domNode, 'dijitMenuItemHover');
- this.getParent().onItemUnhover(this);
- },
-
- _onClick: function(evt){
- // summary:
- // Internal handler for click events on MenuItem.
- // tags:
- // private
- this.getParent().onItemClick(this, evt);
- dojo.stopEvent(evt);
- },
-
- onClick: function(/*Event*/ evt){
- // summary:
- // User defined function to handle clicks
- // tags:
- // callback
- },
-
- focus: function(){
- // summary:
- // Focus on this MenuItem
- try{
- if(dojo.isIE == 8){
- // needed for IE8 which won't scroll TR tags into view on focus yet calling scrollIntoView creates flicker (#10275)
- this.containerNode.focus();
- }
- dijit.focus(this.focusNode);
- }catch(e){
- // this throws on IE (at least) in some scenarios
- }
- },
-
- _onFocus: function(){
- // summary:
- // This is called by the focus manager when focus
- // goes to this MenuItem or a child menu.
- // tags:
- // protected
- this._setSelected(true);
- this.getParent()._onItemFocus(this);
-
- this.inherited(arguments);
- },
-
- _setSelected: function(selected){
- // summary:
- // Indicate that this node is the currently selected one
- // tags:
- // private
-
- /***
- * TODO: remove this method and calls to it, when _onBlur() is working for MenuItem.
- * Currently _onBlur() gets called when focus is moved from the MenuItem to a child menu.
- * That's not supposed to happen, but the problem is:
- * In order to allow dijit.popup's getTopPopup() to work,a sub menu's popupParent
- * points to the parent Menu, bypassing the parent MenuItem... thus the
- * MenuItem is not in the chain of active widgets and gets a premature call to
- * _onBlur()
- */
-
- dojo.toggleClass(this.domNode, "dijitMenuItemSelected", selected);
- },
-
- setLabel: function(/*String*/ content){
- // summary:
- // Deprecated. Use attr('label', ...) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.MenuItem.setLabel() is deprecated. Use attr('label', ...) instead.", "", "2.0");
- this.attr("label", content);
- },
-
- setDisabled: function(/*Boolean*/ disabled){
- // summary:
- // Deprecated. Use attr('disabled', bool) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.Menu.setDisabled() is deprecated. Use attr('disabled', bool) instead.", "", "2.0");
- this.attr('disabled', disabled);
- },
- _setDisabledAttr: function(/*Boolean*/ value){
- // summary:
- // Hook for attr('disabled', ...) to work.
- // Enable or disable this menu item.
- this.disabled = value;
- dojo[value ? "addClass" : "removeClass"](this.domNode, 'dijitMenuItemDisabled');
- dijit.setWaiState(this.focusNode, 'disabled', value ? 'true' : 'false');
- },
- _setAccelKeyAttr: function(/*String*/ value){
- // summary:
- // Hook for attr('accelKey', ...) to work.
- // Set accelKey on this menu item.
- this.accelKey=value;
-
- this.accelKeyNode.style.display=value?"":"none";
- this.accelKeyNode.innerHTML=value;
- //have to use colSpan to make it work in IE
- dojo.attr(this.containerNode,'colSpan',value?"1":"2");
- }
- });
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuSeparator.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuSeparator.js
deleted file mode 100644
index 60e38fa..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/MenuSeparator.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.MenuSeparator"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.MenuSeparator"] = true;
-dojo.provide("dijit.MenuSeparator");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-dojo.require("dijit._Contained");
-
-dojo.declare("dijit.MenuSeparator",
- [dijit._Widget, dijit._Templated, dijit._Contained],
- {
- // summary:
- // A line between two menu items
-
- templateString: dojo.cache("dijit", "templates/MenuSeparator.html", "<tr class=\"dijitMenuSeparator\">\n\t<td colspan=\"4\">\n\t\t<div class=\"dijitMenuSeparatorTop\"></div>\n\t\t<div class=\"dijitMenuSeparatorBottom\"></div>\n\t</td>\n</tr>\n"),
-
- postCreate: function(){
- dojo.setSelectable(this.domNode, false);
- },
-
- isFocusable: function(){
- // summary:
- // Override to always return false
- // tags:
- // protected
-
- return false; // Boolean
- }
- });
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuBarItem.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuBarItem.js
deleted file mode 100644
index 31e9942..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuBarItem.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.PopupMenuBarItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.PopupMenuBarItem"] = true;
-dojo.provide("dijit.PopupMenuBarItem");
-
-dojo.require("dijit.PopupMenuItem");
-dojo.require("dijit.MenuBarItem");
-
-dojo.declare("dijit.PopupMenuBarItem", [dijit.PopupMenuItem, dijit._MenuBarItemMixin], {
- // summary:
- // Item in a MenuBar like "File" or "Edit", that spawns a submenu when pressed (or hovered)
-});
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuItem.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuItem.js
deleted file mode 100644
index 4632774..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/PopupMenuItem.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.PopupMenuItem"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.PopupMenuItem"] = true;
-dojo.provide("dijit.PopupMenuItem");
-
-dojo.require("dijit.MenuItem");
-
-dojo.declare("dijit.PopupMenuItem",
- dijit.MenuItem,
- {
- _fillContent: function(){
- // summary:
- // When Menu is declared in markup, this code gets the menu label and
- // the popup widget from the srcNodeRef.
- // description:
- // srcNodeRefinnerHTML contains both the menu item text and a popup widget
- // The first part holds the menu item text and the second part is the popup
- // example:
- // | <div dojoType="dijit.PopupMenuItem">
- // | <span>pick me</span>
- // | <popup> ... </popup>
- // | </div>
- // tags:
- // protected
-
- if(this.srcNodeRef){
- var nodes = dojo.query("*", this.srcNodeRef);
- dijit.PopupMenuItem.superclass._fillContent.call(this, nodes[0]);
-
- // save pointer to srcNode so we can grab the drop down widget after it's instantiated
- this.dropDownContainer = this.srcNodeRef;
- }
- },
-
- startup: function(){
- if(this._started){ return; }
- this.inherited(arguments);
-
- // we didn't copy the dropdown widget from the this.srcNodeRef, so it's in no-man's
- // land now. move it to dojo.doc.body.
- if(!this.popup){
- var node = dojo.query("[widgetId]", this.dropDownContainer)[0];
- this.popup = dijit.byNode(node);
- }
- dojo.body().appendChild(this.popup.domNode);
-
- this.popup.domNode.style.display="none";
- if(this.arrowWrapper){
- dojo.style(this.arrowWrapper, "visibility", "");
- }
- dijit.setWaiState(this.focusNode, "haspopup", "true");
- },
-
- destroyDescendants: function(){
- if(this.popup){
- // Destroy the popup, unless it's already been destroyed. This can happen because
- // the popup is a direct child of <body> even though it's logically my child.
- if(!this.popup._destroyed){
- this.popup.destroyRecursive();
- }
- delete this.popup;
- }
- this.inherited(arguments);
- }
- });
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ProgressBar.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ProgressBar.js
deleted file mode 100644
index d8c6758..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ProgressBar.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.ProgressBar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.ProgressBar"] = true;
-dojo.provide("dijit.ProgressBar");
-
-dojo.require("dojo.fx");
-dojo.require("dojo.number");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit.ProgressBar", [dijit._Widget, dijit._Templated], {
- // summary:
- // A progress indication widget, showing the amount completed
- // (often the percentage completed) of a task.
- //
- // example:
- // | <div dojoType="ProgressBar"
- // | places="0"
- // | progress="..." maximum="...">
- // | </div>
- //
- // description:
- // Note that the progress bar is updated via (a non-standard)
- // update() method, rather than via attr() like other widgets.
-
- // progress: [const] String (Percentage or Number)
- // Number or percentage indicating amount of task completed.
- // With "%": percentage value, 0% <= progress <= 100%, or
- // without "%": absolute value, 0 <= progress <= maximum
- // TODO: rename to value for 2.0
- progress: "0",
-
- // maximum: [const] Float
- // Max sample number
- maximum: 100,
-
- // places: [const] Number
- // Number of places to show in values; 0 by default
- places: 0,
-
- // indeterminate: [const] Boolean
- // If false: show progress value (number or percentage).
- // If true: show that a process is underway but that the amount completed is unknown.
- indeterminate: false,
-
- // name: String
- // this is the field name (for a form) if set. This needs to be set if you want to use
- // this widget in a dijit.form.Form widget (such as dijit.Dialog)
- name: '',
-
- templateString: dojo.cache("dijit", "templates/ProgressBar.html", "<div class=\"dijitProgressBar dijitProgressBarEmpty\"\n\t><div waiRole=\"progressbar\" dojoAttachPoint=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\"></div\n\t\t><span style=\"visibility:hidden\"> </span\n\t></div\n\t><div dojoAttachPoint=\"label\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"> </div\n\t><img dojoAttachPoint=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n\t></img\n></div>\n"),
-
- // _indeterminateHighContrastImagePath: [private] dojo._URL
- // URL to image to use for indeterminate progress bar when display is in high contrast mode
- _indeterminateHighContrastImagePath:
- dojo.moduleUrl("dijit", "themes/a11y/indeterminate_progress.gif"),
-
- // public functions
- postCreate: function(){
- this.inherited(arguments);
- this.indeterminateHighContrastImage.setAttribute("src",
- this._indeterminateHighContrastImagePath.toString());
- this.update();
- },
-
- update: function(/*Object?*/attributes){
- // summary:
- // Change attributes of ProgressBar, similar to attr(hash).
- //
- // attributes:
- // May provide progress and/or maximum properties on this parameter;
- // see attribute specs for details.
- //
- // example:
- // | myProgressBar.update({'indeterminate': true});
- // | myProgressBar.update({'progress': 80});
-
- // TODO: deprecate this method and use attr() instead
-
- dojo.mixin(this, attributes || {});
- var tip = this.internalProgress;
- var percent = 1, classFunc;
- if(this.indeterminate){
- classFunc = "addClass";
- dijit.removeWaiState(tip, "valuenow");
- dijit.removeWaiState(tip, "valuemin");
- dijit.removeWaiState(tip, "valuemax");
- }else{
- classFunc = "removeClass";
- if(String(this.progress).indexOf("%") != -1){
- percent = Math.min(parseFloat(this.progress)/100, 1);
- this.progress = percent * this.maximum;
- }else{
- this.progress = Math.min(this.progress, this.maximum);
- percent = this.progress / this.maximum;
- }
- var text = this.report(percent);
- this.label.firstChild.nodeValue = text;
- dijit.setWaiState(tip, "describedby", this.label.id);
- dijit.setWaiState(tip, "valuenow", this.progress);
- dijit.setWaiState(tip, "valuemin", 0);
- dijit.setWaiState(tip, "valuemax", this.maximum);
- }
- dojo[classFunc](this.domNode, "dijitProgressBarIndeterminate");
- tip.style.width = (percent * 100) + "%";
- this.onChange();
- },
-
- _setValueAttr: function(v){
- if(v == Infinity){
- this.update({indeterminate:true});
- }else{
- this.update({indeterminate:false, progress:v});
- }
- },
-
- _getValueAttr: function(){
- return this.progress;
- },
-
- report: function(/*float*/percent){
- // summary:
- // Generates message to show inside progress bar (normally indicating amount of task completed).
- // May be overridden.
- // tags:
- // extension
-
- return dojo.number.format(percent, { type: "percent", places: this.places, locale: this.lang });
- },
-
- onChange: function(){
- // summary:
- // Callback fired when progress updates.
- // tags:
- // progress
- }
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TitlePane.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TitlePane.js
deleted file mode 100644
index e4d65f8..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TitlePane.js
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.TitlePane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.TitlePane"] = true;
-dojo.provide("dijit.TitlePane");
-
-dojo.require("dojo.fx");
-
-dojo.require("dijit._Templated");
-dojo.require("dijit.layout.ContentPane");
-
-dojo.declare(
- "dijit.TitlePane",
- [dijit.layout.ContentPane, dijit._Templated],
-{
- // summary:
- // A pane with a title on top, that can be expanded or collapsed.
- //
- // description:
- // An accessible container with a title Heading, and a content
- // section that slides open and closed. TitlePane is an extension to
- // `dijit.layout.ContentPane`, providing all the useful content-control aspects from it.
- //
- // example:
- // | // load a TitlePane from remote file:
- // | var foo = new dijit.TitlePane({ href: "foobar.html", title:"Title" });
- // | foo.startup();
- //
- // example:
- // | <!-- markup href example: -->
- // | <div dojoType="dijit.TitlePane" href="foobar.html" title="Title"></div>
- //
- // example:
- // | <!-- markup with inline data -->
- // | <div dojoType="dijit.TitlePane" title="Title">
- // | <p>I am content</p>
- // | </div>
-
- // title: String
- // Title of the pane
- title: "",
-
- // open: Boolean
- // Whether pane is opened or closed.
- open: true,
-
- // toggleable: Boolean
- // Whether pane can be opened or closed by clicking the title bar.
- toggleable: true,
-
- // tabIndex: String
- // Tabindex setting for the title (so users can tab to the title then
- // use space/enter to open/close the title pane)
- tabIndex: "0",
-
- // duration: Integer
- // Time in milliseconds to fade in/fade out
- duration: dijit.defaultDuration,
-
- // baseClass: [protected] String
- // The root className to be placed on this widget's domNode.
- baseClass: "dijitTitlePane",
-
- templateString: dojo.cache("dijit", "templates/TitlePane.html", "<div class=\"${baseClass}\">\n\t<div dojoAttachEvent=\"onclick:_onTitleClick, onkeypress:_onTitleKey, onfocus:_handleFocus, onblur:_handleFocus, onmouseenter:_onTitleEnter, onmouseleave:_onTitleLeave\"\n\t\t\tclass=\"dijitTitlePaneTitle\" dojoAttachPoint=\"titleBarNode,focusNode\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"arrowNode\" class=\"dijitArrowNode\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"arrowNodeInner\" class=\"dijitArrowNodeInner\"></span\n\t\t><span dojoAttachPoint=\"titleNode\" class=\"dijitTitlePaneTextNode\"></span>\n\t</div>\n\t<div class=\"dijitTitlePaneContentOuter\" dojoAttachPoint=\"hideNode\" waiRole=\"presentation\">\n\t\t<div class=\"dijitReset\" dojoAttachPoint=\"wipeNode\" waiRole=\"presentation\">\n\t\t\t<div class=\"dijitTitlePaneContentInner\" dojoAttachPoint=\"containerNode\" waiRole=\"region\" tabindex=\"-1\" id=\"${id}_pane\">\n\t\t\t\t<!-- nested divs because wipeIn()/wipeOut() doesn't work right on node w/padding etc. Put padding on inner div. -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"),
-
- attributeMap: dojo.delegate(dijit.layout.ContentPane.prototype.attributeMap, {
- title: { node: "titleNode", type: "innerHTML" },
- tooltip: {node: "focusNode", type: "attribute", attribute: "title"}, // focusNode spans the entire width, titleNode doesn't
- id:""
- }),
-
- postCreate: function(){
- if(!this.open){
- this.hideNode.style.display = this.wipeNode.style.display = "none";
- }
- this._setCss();
- dojo.setSelectable(this.titleNode, false);
- dijit.setWaiState(this.containerNode,"hidden", this.open ? "false" : "true");
- dijit.setWaiState(this.focusNode, "pressed", this.open ? "true" : "false");
-
- // setup open/close animations
- var hideNode = this.hideNode, wipeNode = this.wipeNode;
- this._wipeIn = dojo.fx.wipeIn({
- node: this.wipeNode,
- duration: this.duration,
- beforeBegin: function(){
- hideNode.style.display="";
- }
- });
- this._wipeOut = dojo.fx.wipeOut({
- node: this.wipeNode,
- duration: this.duration,
- onEnd: function(){
- hideNode.style.display="none";
- }
- });
- this.inherited(arguments);
- },
-
- _setOpenAttr: function(/* Boolean */ open){
- // summary:
- // Hook to make attr("open", boolean) control the open/closed state of the pane.
- // open: Boolean
- // True if you want to open the pane, false if you want to close it.
- if(this.open !== open){ this.toggle(); }
- },
-
- _setToggleableAttr: function(/* Boolean */ canToggle){
- // summary:
- // Hook to make attr("canToggle", boolean) work.
- // canToggle: Boolean
- // True to allow user to open/close pane by clicking title bar.
- this.toggleable = canToggle;
- dijit.setWaiRole(this.focusNode, canToggle ? "button" : "heading");
- dojo.attr(this.focusNode, "tabIndex", canToggle ? this.tabIndex : "-1");
- if(canToggle){
- // TODO: if canToggle is switched from true false shouldn't we remove this setting?
- dijit.setWaiState(this.focusNode, "controls", this.id+"_pane");
- }
- this._setCss();
- },
-
- _setContentAttr: function(content){
- // summary:
- // Hook to make attr("content", ...) work.
- // Typically called when an href is loaded. Our job is to make the animation smooth.
-
- if(!this.open || !this._wipeOut || this._wipeOut.status() == "playing"){
- // we are currently *closing* the pane (or the pane is closed), so just let that continue
- this.inherited(arguments);
- }else{
- if(this._wipeIn && this._wipeIn.status() == "playing"){
- this._wipeIn.stop();
- }
-
- // freeze container at current height so that adding new content doesn't make it jump
- dojo.marginBox(this.wipeNode, { h: dojo.marginBox(this.wipeNode).h });
-
- // add the new content (erasing the old content, if any)
- this.inherited(arguments);
-
- // call _wipeIn.play() to animate from current height to new height
- if(this._wipeIn){
- this._wipeIn.play();
- }else{
- this.hideNode.style.display = "";
- }
- }
- },
-
- toggle: function(){
- // summary:
- // Switches between opened and closed state
- // tags:
- // private
-
- dojo.forEach([this._wipeIn, this._wipeOut], function(animation){
- if(animation && animation.status() == "playing"){
- animation.stop();
- }
- });
-
- var anim = this[this.open ? "_wipeOut" : "_wipeIn"]
- if(anim){
- anim.play();
- }else{
- this.hideNode.style.display = this.open ? "" : "none";
- }
- this.open =! this.open;
- dijit.setWaiState(this.containerNode, "hidden", this.open ? "false" : "true");
- dijit.setWaiState(this.focusNode, "pressed", this.open ? "true" : "false");
-
- // load content (if this is the first time we are opening the TitlePane
- // and content is specified as an href, or href was set when hidden)
- if(this.open){
- this._onShow();
- }else{
- this.onHide();
- }
-
- this._setCss();
- },
-
- _setCss: function(){
- // summary:
- // Set the open/close css state for the TitlePane
- // tags:
- // private
-
- var node = this.titleBarNode || this.focusNode;
-
- if(this._titleBarClass){
- dojo.removeClass(node, this._titleBarClass);
- }
- this._titleBarClass = "dijit" + (this.toggleable ? "" : "Fixed") + (this.open ? "Open" : "Closed");
- dojo.addClass(node, this._titleBarClass);
- this.arrowNodeInner.innerHTML = this.open ? "-" : "+";
- },
-
- _onTitleKey: function(/*Event*/ e){
- // summary:
- // Handler for when user hits a key
- // tags:
- // private
-
- if(e.charOrCode == dojo.keys.ENTER || e.charOrCode == ' '){
- if(this.toggleable){
- this.toggle();
- }
- dojo.stopEvent(e);
- }else if(e.charOrCode == dojo.keys.DOWN_ARROW && this.open){
- this.containerNode.focus();
- e.preventDefault();
- }
- },
-
- _onTitleEnter: function(){
- // summary:
- // Handler for when someone hovers over my title
- // tags:
- // private
- if(this.toggleable){
- dojo.addClass(this.focusNode, "dijitTitlePaneTitle-hover");
- }
- },
-
- _onTitleLeave: function(){
- // summary:
- // Handler when someone stops hovering over my title
- // tags:
- // private
- if(this.toggleable){
- dojo.removeClass(this.focusNode, "dijitTitlePaneTitle-hover");
- }
- },
-
- _onTitleClick: function(){
- // summary:
- // Handler when user clicks the title bar
- // tags:
- // private
- if(this.toggleable){
- this.toggle();
- }
- },
-
- _handleFocus: function(/*Event*/ e){
- // summary:
- // Handle blur and focus events on title bar
- // tags:
- // private
-
- dojo.toggleClass(this.focusNode, this.baseClass + "Focused", e.type == "focus");
- },
-
- setTitle: function(/*String*/ title){
- // summary:
- // Deprecated. Use attr('title', ...) instead.
- // tags:
- // deprecated
- dojo.deprecated("dijit.TitlePane.setTitle() is deprecated. Use attr('title', ...) instead.", "", "2.0");
- this.attr("title", title);
- }
-});
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Toolbar.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Toolbar.js
deleted file mode 100644
index 45ebe1b..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Toolbar.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Toolbar"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Toolbar"] = true;
-dojo.provide("dijit.Toolbar");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._KeyNavContainer");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit.Toolbar",
- [dijit._Widget, dijit._Templated, dijit._KeyNavContainer],
- {
- // summary:
- // A Toolbar widget, used to hold things like `dijit.Editor` buttons
-
- templateString:
- '<div class="dijit dijitToolbar" waiRole="toolbar" tabIndex="${tabIndex}" dojoAttachPoint="containerNode">' +
- // '<table style="table-layout: fixed" class="dijitReset dijitToolbarTable">' + // factor out style
- // '<tr class="dijitReset" dojoAttachPoint="containerNode"></tr>'+
- // '</table>' +
- '</div>',
-
- postCreate: function(){
- this.connectKeyNavHandlers(
- this.isLeftToRight() ? [dojo.keys.LEFT_ARROW] : [dojo.keys.RIGHT_ARROW],
- this.isLeftToRight() ? [dojo.keys.RIGHT_ARROW] : [dojo.keys.LEFT_ARROW]
- );
- },
-
- startup: function(){
- if(this._started){ return; }
-
- this.startupKeyNavChildren();
-
- this.inherited(arguments);
- }
-}
-);
-
-// For back-compat, remove for 2.0
-dojo.require("dijit.ToolbarSeparator");
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ToolbarSeparator.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ToolbarSeparator.js
deleted file mode 100644
index 29b6853..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/ToolbarSeparator.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.ToolbarSeparator"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.ToolbarSeparator"] = true;
-dojo.provide("dijit.ToolbarSeparator");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare("dijit.ToolbarSeparator",
- [ dijit._Widget, dijit._Templated ],
- {
- // summary:
- // A spacer between two `dijit.Toolbar` items
- templateString: '<div class="dijitToolbarSeparator dijitInline"></div>',
- postCreate: function(){ dojo.setSelectable(this.domNode, false); },
- isFocusable: function(){
- // summary:
- // This widget isn't focusable, so pass along that fact.
- // tags:
- // protected
- return false;
- }
-
- });
-
-
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tooltip.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tooltip.js
deleted file mode 100644
index fa71cae..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tooltip.js
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Tooltip"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Tooltip"] = true;
-dojo.provide("dijit.Tooltip");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-
-dojo.declare(
- "dijit._MasterTooltip",
- [dijit._Widget, dijit._Templated],
- {
- // summary:
- // Internal widget that holds the actual tooltip markup,
- // which occurs once per page.
- // Called by Tooltip widgets which are just containers to hold
- // the markup
- // tags:
- // protected
-
- // duration: Integer
- // Milliseconds to fade in/fade out
- duration: dijit.defaultDuration,
-
- templateString: dojo.cache("dijit", "templates/Tooltip.html", "<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\">\n\t<div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" waiRole='alert'></div>\n\t<div class=\"dijitTooltipConnector\"></div>\n</div>\n"),
-
- postCreate: function(){
- dojo.body().appendChild(this.domNode);
-
- this.bgIframe = new dijit.BackgroundIframe(this.domNode);
-
- // Setup fade-in and fade-out functions.
- this.fadeIn = dojo.fadeIn({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onShow") });
- this.fadeOut = dojo.fadeOut({ node: this.domNode, duration: this.duration, onEnd: dojo.hitch(this, "_onHide") });
-
- },
-
- show: function(/*String*/ innerHTML, /*DomNode*/ aroundNode, /*String[]?*/ position){
- // summary:
- // Display tooltip w/specified contents to right of specified node
- // (To left if there's no space on the right, or if LTR==right)
-
- if(this.aroundNode && this.aroundNode === aroundNode){
- return;
- }
-
- if(this.fadeOut.status() == "playing"){
- // previous tooltip is being hidden; wait until the hide completes then show new one
- this._onDeck=arguments;
- return;
- }
- this.containerNode.innerHTML=innerHTML;
-
- // Firefox bug. when innerHTML changes to be shorter than previous
- // one, the node size will not be updated until it moves.
- this.domNode.style.top = (this.domNode.offsetTop + 1) + "px";
-
- var pos = dijit.placeOnScreenAroundElement(this.domNode, aroundNode, dijit.getPopupAroundAlignment((position && position.length) ? position : dijit.Tooltip.defaultPosition, this.isLeftToRight()), dojo.hitch(this, "orient"));
-
- // show it
- dojo.style(this.domNode, "opacity", 0);
- this.fadeIn.play();
- this.isShowingNow = true;
- this.aroundNode = aroundNode;
- },
-
- orient: function(/* DomNode */ node, /* String */ aroundCorner, /* String */ tooltipCorner){
- // summary:
- // Private function to set CSS for tooltip node based on which position it's in.
- // This is called by the dijit popup code.
- // tags:
- // protected
-
- node.className = "dijitTooltip " +
- {
- "BL-TL": "dijitTooltipBelow dijitTooltipABLeft",
- "TL-BL": "dijitTooltipAbove dijitTooltipABLeft",
- "BR-TR": "dijitTooltipBelow dijitTooltipABRight",
- "TR-BR": "dijitTooltipAbove dijitTooltipABRight",
- "BR-BL": "dijitTooltipRight",
- "BL-BR": "dijitTooltipLeft"
- }[aroundCorner + "-" + tooltipCorner];
- },
-
- _onShow: function(){
- // summary:
- // Called at end of fade-in operation
- // tags:
- // protected
- if(dojo.isIE){
- // the arrow won't show up on a node w/an opacity filter
- this.domNode.style.filter="";
- }
- },
-
- hide: function(aroundNode){
- // summary:
- // Hide the tooltip
- if(this._onDeck && this._onDeck[1] == aroundNode){
- // this hide request is for a show() that hasn't even started yet;
- // just cancel the pending show()
- this._onDeck=null;
- }else if(this.aroundNode === aroundNode){
- // this hide request is for the currently displayed tooltip
- this.fadeIn.stop();
- this.isShowingNow = false;
- this.aroundNode = null;
- this.fadeOut.play();
- }else{
- // just ignore the call, it's for a tooltip that has already been erased
- }
- },
-
- _onHide: function(){
- // summary:
- // Called at end of fade-out operation
- // tags:
- // protected
-
- this.domNode.style.cssText=""; // to position offscreen again
- if(this._onDeck){
- // a show request has been queued up; do it now
- this.show.apply(this, this._onDeck);
- this._onDeck=null;
- }
- }
-
- }
-);
-
-dijit.showTooltip = function(/*String*/ innerHTML, /*DomNode*/ aroundNode, /*String[]?*/ position){
- // summary:
- // Display tooltip w/specified contents in specified position.
- // See description of dijit.Tooltip.defaultPosition for details on position parameter.
- // If position is not specified then dijit.Tooltip.defaultPosition is used.
- if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
- return dijit._masterTT.show(innerHTML, aroundNode, position);
-};
-
-dijit.hideTooltip = function(aroundNode){
- // summary:
- // Hide the tooltip
- if(!dijit._masterTT){ dijit._masterTT = new dijit._MasterTooltip(); }
- return dijit._masterTT.hide(aroundNode);
-};
-
-dojo.declare(
- "dijit.Tooltip",
- dijit._Widget,
- {
- // summary:
- // Pops up a tooltip (a help message) when you hover over a node.
-
- // label: String
- // Text to display in the tooltip.
- // Specified as innerHTML when creating the widget from markup.
- label: "",
-
- // showDelay: Integer
- // Number of milliseconds to wait after hovering over/focusing on the object, before
- // the tooltip is displayed.
- showDelay: 400,
-
- // connectId: [const] String[]
- // Id's of domNodes to attach the tooltip to.
- // When user hovers over any of the specified dom nodes, the tooltip will appear.
- //
- // Note: Currently connectId can only be specified on initialization, it cannot
- // be changed via attr('connectId', ...)
- //
- // Note: in 2.0 this will be renamed to connectIds for less confusion.
- connectId: [],
-
- // position: String[]
- // See description of `dijit.Tooltip.defaultPosition` for details on position parameter.
- position: [],
-
- constructor: function(){
- // Map id's of nodes I'm connected to to a list of the this.connect() handles
- this._nodeConnectionsById = {};
- },
-
- _setConnectIdAttr: function(newIds){
- for(var oldId in this._nodeConnectionsById){
- this.removeTarget(oldId);
- }
- dojo.forEach(dojo.isArrayLike(newIds) ? newIds : [newIds], this.addTarget, this);
- },
-
- _getConnectIdAttr: function(){
- var ary = [];
- for(var id in this._nodeConnectionsById){
- ary.push(id);
- }
- return ary;
- },
-
- addTarget: function(/*DOMNODE || String*/ id){
- // summary:
- // Attach tooltip to specified node, if it's not already connected
- var node = dojo.byId(id);
- if(!node){ return; }
- if(node.id in this._nodeConnectionsById){ return; }//Already connected
-
- this._nodeConnectionsById[node.id] = [
- this.connect(node, "onmouseenter", "_onTargetMouseEnter"),
- this.connect(node, "onmouseleave", "_onTargetMouseLeave"),
- this.connect(node, "onfocus", "_onTargetFocus"),
- this.connect(node, "onblur", "_onTargetBlur")
- ];
- if(dojo.isIE && !node.style.zoom){//preserve zoom
- // BiDi workaround
- node.style.zoom = 1;
- }
- },
-
- removeTarget: function(/*DOMNODE || String*/ node){
- // summary:
- // Detach tooltip from specified node
-
- // map from DOMNode back to plain id string
- var id = node.id || node;
-
- if(id in this._nodeConnectionsById){
- dojo.forEach(this._nodeConnectionsById[id], this.disconnect, this);
- delete this._nodeConnectionsById[id];
- }
- },
-
- postCreate: function(){
- dojo.addClass(this.domNode,"dijitTooltipData");
- },
-
- startup: function(){
- this.inherited(arguments);
-
- // If this tooltip was created in a template, or for some other reason the specified connectId[s]
- // didn't exist during the widget's initialization, then connect now.
- var ids = this.connectId;
- dojo.forEach(dojo.isArrayLike(ids) ? ids : [ids], this.addTarget, this);
- },
-
- _onTargetMouseEnter: function(/*Event*/ e){
- // summary:
- // Handler for mouseenter event on the target node
- // tags:
- // private
- this._onHover(e);
- },
-
- _onTargetMouseLeave: function(/*Event*/ e){
- // summary:
- // Handler for mouseleave event on the target node
- // tags:
- // private
- this._onUnHover(e);
- },
-
- _onTargetFocus: function(/*Event*/ e){
- // summary:
- // Handler for focus event on the target node
- // tags:
- // private
-
- this._focus = true;
- this._onHover(e);
- },
-
- _onTargetBlur: function(/*Event*/ e){
- // summary:
- // Handler for blur event on the target node
- // tags:
- // private
-
- this._focus = false;
- this._onUnHover(e);
- },
-
- _onHover: function(/*Event*/ e){
- // summary:
- // Despite the name of this method, it actually handles both hover and focus
- // events on the target node, setting a timer to show the tooltip.
- // tags:
- // private
- if(!this._showTimer){
- var target = e.target;
- this._showTimer = setTimeout(dojo.hitch(this, function(){this.open(target)}), this.showDelay);
- }
- },
-
- _onUnHover: function(/*Event*/ e){
- // summary:
- // Despite the name of this method, it actually handles both mouseleave and blur
- // events on the target node, hiding the tooltip.
- // tags:
- // private
-
- // keep a tooltip open if the associated element still has focus (even though the
- // mouse moved away)
- if(this._focus){ return; }
-
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- this.close();
- },
-
- open: function(/*DomNode*/ target){
- // summary:
- // Display the tooltip; usually not called directly.
- // tags:
- // private
-
- if(this._showTimer){
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- dijit.showTooltip(this.label || this.domNode.innerHTML, target, this.position);
-
- this._connectNode = target;
- this.onShow(target, this.position);
- },
-
- close: function(){
- // summary:
- // Hide the tooltip or cancel timer for show of tooltip
- // tags:
- // private
-
- if(this._connectNode){
- // if tooltip is currently shown
- dijit.hideTooltip(this._connectNode);
- delete this._connectNode;
- this.onHide();
- }
- if(this._showTimer){
- // if tooltip is scheduled to be shown (after a brief delay)
- clearTimeout(this._showTimer);
- delete this._showTimer;
- }
- },
-
- onShow: function(target, position){
- // summary:
- // Called when the tooltip is shown
- // tags:
- // callback
- },
-
- onHide: function(){
- // summary:
- // Called when the tooltip is hidden
- // tags:
- // callback
- },
-
- uninitialize: function(){
- this.close();
- this.inherited(arguments);
- }
- }
-);
-
-// dijit.Tooltip.defaultPosition: String[]
-// This variable controls the position of tooltips, if the position is not specified to
-// the Tooltip widget or *TextBox widget itself. It's an array of strings with the following values:
-//
-// * before: places tooltip to the left of the target node/widget, or to the right in
-// the case of RTL scripts like Hebrew and Arabic
-// * after: places tooltip to the right of the target node/widget, or to the left in
-// the case of RTL scripts like Hebrew and Arabic
-// * above: tooltip goes above target node
-// * below: tooltip goes below target node
-//
-// The list is positions is tried, in order, until a position is found where the tooltip fits
-// within the viewport.
-//
-// Be careful setting this parameter. A value of "above" may work fine until the user scrolls
-// the screen so that there's no room above the target node. Nodes with drop downs, like
-// DropDownButton or FilteringSelect, are especially problematic, in that you need to be sure
-// that the drop down and tooltip don't overlap, even when the viewport is scrolled so that there
-// is only room below (or above) the target node, but not both.
-dijit.Tooltip.defaultPosition = ["after", "before"];
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TooltipDialog.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TooltipDialog.js
deleted file mode 100644
index 0c32eba..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/TooltipDialog.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.TooltipDialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.TooltipDialog"] = true;
-dojo.provide("dijit.TooltipDialog");
-
-dojo.require("dijit.layout.ContentPane");
-dojo.require("dijit._Templated");
-dojo.require("dijit.form._FormMixin");
-dojo.require("dijit._DialogMixin");
-
-dojo.declare(
- "dijit.TooltipDialog",
- [dijit.layout.ContentPane, dijit._Templated, dijit.form._FormMixin, dijit._DialogMixin],
- {
- // summary:
- // Pops up a dialog that appears like a Tooltip
-
- // title: String
- // Description of tooltip dialog (required for a11y)
- title: "",
-
- // doLayout: [protected] Boolean
- // Don't change this parameter from the default value.
- // This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog
- // is never a child of a layout container, nor can you specify the size of
- // TooltipDialog in order to control the size of an inner widget.
- doLayout: false,
-
- // autofocus: Boolean
- // A Toggle to modify the default focus behavior of a Dialog, which
- // is to focus on the first dialog element after opening the dialog.
- // False will disable autofocusing. Default: true
- autofocus: true,
-
- // baseClass: [protected] String
- // The root className to use for the various states of this widget
- baseClass: "dijitTooltipDialog",
-
- // _firstFocusItem: [private] [readonly] DomNode
- // The pointer to the first focusable node in the dialog.
- // Set by `dijit._DialogMixin._getFocusItems`.
- _firstFocusItem: null,
-
- // _lastFocusItem: [private] [readonly] DomNode
- // The pointer to which node has focus prior to our dialog.
- // Set by `dijit._DialogMixin._getFocusItems`.
- _lastFocusItem: null,
-
- templateString: dojo.cache("dijit", "templates/TooltipDialog.html", "<div waiRole=\"presentation\">\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\n\t</div>\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\n</div>\n"),
-
- postCreate: function(){
- this.inherited(arguments);
- this.connect(this.containerNode, "onkeypress", "_onKey");
- this.containerNode.title = this.title;
- },
-
- orient: function(/*DomNode*/ node, /*String*/ aroundCorner, /*String*/ corner){
- // summary:
- // Configure widget to be displayed in given position relative to the button.
- // This is called from the dijit.popup code, and should not be called
- // directly.
- // tags:
- // protected
- var c = this._currentOrientClass;
- if(c){
- dojo.removeClass(this.domNode, c);
- }
- c = "dijitTooltipAB"+(corner.charAt(1) == 'L'?"Left":"Right")+" dijitTooltip"+(corner.charAt(0) == 'T' ? "Below" : "Above");
- dojo.addClass(this.domNode, c);
- this._currentOrientClass = c;
- },
-
- onOpen: function(/*Object*/ pos){
- // summary:
- // Called when dialog is displayed.
- // This is called from the dijit.popup code, and should not be called directly.
- // tags:
- // protected
-
- this.orient(this.domNode,pos.aroundCorner, pos.corner);
- this._onShow(); // lazy load trigger
-
- if(this.autofocus){
- this._getFocusItems(this.containerNode);
- dijit.focus(this._firstFocusItem);
- }
- },
-
- onClose: function(){
- // summary:
- // Called when dialog is hidden.
- // This is called from the dijit.popup code, and should not be called directly.
- // tags:
- // protected
- this.onHide();
- },
-
- _onKey: function(/*Event*/ evt){
- // summary:
- // Handler for keyboard events
- // description:
- // Keep keyboard focus in dialog; close dialog on escape key
- // tags:
- // private
-
- var node = evt.target;
- var dk = dojo.keys;
- if(evt.charOrCode === dk.TAB){
- this._getFocusItems(this.containerNode);
- }
- var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
- if(evt.charOrCode == dk.ESCAPE){
- // Use setTimeout to avoid crash on IE, see #10396.
- setTimeout(dojo.hitch(this, "onCancel"), 0);
- dojo.stopEvent(evt);
- }else if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
- if(!singleFocusItem){
- dijit.focus(this._lastFocusItem); // send focus to last item in dialog
- }
- dojo.stopEvent(evt);
- }else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
- if(!singleFocusItem){
- dijit.focus(this._firstFocusItem); // send focus to first item in dialog
- }
- dojo.stopEvent(evt);
- }else if(evt.charOrCode === dk.TAB){
- // we want the browser's default tab handling to move focus
- // but we don't want the tab to propagate upwards
- evt.stopPropagation();
- }
- }
- }
- );
-
-}
diff --git a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tree.js b/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tree.js
deleted file mode 100644
index 71ab8ed..0000000
--- a/org.eclipse.virgo.apps.admin.web/src/main/webapp/js/dijit/Tree.js
+++ /dev/null
@@ -1,1559 +0,0 @@
-/*
- Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
- Available via Academic Free License >= 2.1 OR the modified BSD license.
- see: http://dojotoolkit.org/license for details
-*/
-
-
-if(!dojo._hasResource["dijit.Tree"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dijit.Tree"] = true;
-dojo.provide("dijit.Tree");
-
-dojo.require("dojo.fx");
-dojo.require("dojo.DeferredList");
-
-dojo.require("dijit._Widget");
-dojo.require("dijit._Templated");
-dojo.require("dijit._Container");
-dojo.require("dijit._Contained");
-dojo.require("dojo.cookie");
-
-dojo.declare(
- "dijit._TreeNode",
- [dijit._Widget, dijit._Templated, dijit._Container, dijit._Contained],
-{
- // summary:
- // Single node within a tree. This class is used internally
- // by Tree and should not be accessed directly.
- // tags:
- // private
-
- // item: dojo.data.Item
- // the dojo.data entry this tree represents
- item: null,
-
- // isTreeNode: [protected] Boolean
- // Indicates that this is a TreeNode. Used by `dijit.Tree` only,
- // should not be accessed directly.
- isTreeNode: true,
-
- // label: String
- // Text of this tree node
- label: "",
-
- // isExpandable: [private] Boolean
- // This node has children, so show the expando node (+ sign)
- isExpandable: null,
-
- // isExpanded: [readonly] Boolean
- // This node is currently expanded (ie, opened)
- isExpanded: false,
-
- // state: [private] String
- // Dynamic loading-related stuff.
- // When an empty folder node appears, it is "UNCHECKED" first,
- // then after dojo.data query it becomes "LOADING" and, finally "LOADED"
- state: "UNCHECKED",
-
- templateString: dojo.cache("dijit", "templates/TreeNode.html", "<div class=\"dijitTreeNode\" waiRole=\"presentation\"\n\t><div dojoAttachPoint=\"rowNode\" class=\"dijitTreeRow\" waiRole=\"presentation\" dojoAttachEvent=\"onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick\"\n\t\t><img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"expandoNode\" class=\"dijitTreeExpando\" waiRole=\"presentation\"\n\t\t><span dojoAttachPoint=\"expandoNodeText\" class=\"dijitExpandoText\" waiRole=\"presentation\"\n\t\t></span\n\t\t><span dojoAttachPoint=\"contentNode\"\n\t\t\tclass=\"dijitTreeContent\" waiRole=\"presentation\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" dojoAttachPoint=\"iconNode\" class=\"dijitTreeIcon\" waiRole=\"presentation\"\n\t\t\t><span dojoAttachPoint=\"labelNode\" class=\"dijitTreeLabel\" wairole=\"treeitem\" tabindex=\"-1\" waiState=\"selected-false\" dojoAttachEvent=\"onfocus:_onLabelFocus, onblur:_onLabelBlur\"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint=\"containerNode\" class=\"dijitTreeContainer\" waiRole=\"presentation\" style=\"display: none;\"></div>\n</div>\n"),
-
- attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
- label: {node: "labelNode", type: "innerText"},
- tooltip: {node: "rowNode", type: "attribute", attribute: "title"}
- }),
-
- postCreate: function(){
- // set expand icon for leaf
- this._setExpando();
-
- // set icon and label class based on item
- this._updateItemClasses(this.item);
-
- if(this.isExpandable){
- dijit.setWaiState(this.labelNode, "expanded", this.isExpanded);
- }
- },
-
- _setIndentAttr: function(indent){
- // summary:
- // Tell this node how many levels it should be indented
- // description:
- // 0 for top level nodes, 1 for their children, 2 for their
- // grandchildren, etc.
- this.indent = indent;
-
- // Math.max() is to prevent negative padding on hidden root node (when indent == -1)
- var pixels = (Math.max(indent, 0) * this.tree._nodePixelIndent) + "px";
-
- dojo.style(this.domNode, "backgroundPosition", pixels + " 0px");
- dojo.style(this.rowNode, dojo._isBodyLtr() ? "paddingLeft" : "paddingRight", pixels);
-
- dojo.forEach(this.getChildren(), function(child){
- child.attr("indent", indent+1);
- });
- },
-
- markProcessing: function(){
- // summary:
- // Visually denote that tree is loading data, etc.
- // tags:
- // private
- this.state = "LOADING";
- this._setExpando(true);
- },
-
- unmarkProcessing: function(){
- // summary:
- // Clear markup from markProcessing() call
- // tags:
- // private
- this._setExpando(false);
- },
-
- _updateItemClasses: function(item){
- // summary:
- // Set appropriate CSS classes for icon and label dom node
- // (used to allow for item updates to change respective CSS)
- // tags:
- // private
- var tree = this.tree, model = tree.model;
- if(tree._v10Compat && item === model.root){
- // For back-compat with 1.0, need to use null to specify root item (TODO: remove in 2.0)
- item = null;
- }
- this._applyClassAndStyle(item, "icon", "Icon");
- this._applyClassAndStyle(item, "label", "Label");
- this._applyClassAndStyle(item, "row", "Row");
- },
-
- _applyClassAndStyle: function(item, lower, upper){