Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2013-01-08 18:31:43 +0000
committerChristopher Frost2013-01-08 18:31:43 +0000
commit4183c0eb84588bc3fa0d406eec3946469cfe2810 (patch)
treee3a4d52045426770603604995d4cd8d19d2e4b75
parent582ed8494869200b1930ee6a3e3677e3bc501c4b (diff)
downloadorg.eclipse.virgo.samples-4183c0eb84588bc3fa0d406eec3946469cfe2810.tar.gz
org.eclipse.virgo.samples-4183c0eb84588bc3fa0d406eec3946469cfe2810.tar.xz
org.eclipse.virgo.samples-4183c0eb84588bc3fa0d406eec3946469cfe2810.zip
329770 Eclipse is almost entirely clean, more deprecated code to remove though
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.project1
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/com.springsource.server.ide.bundlor.core.prefs3
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/org.eclipse.wst.common.project.facet.core.xml2
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.project1
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.settings/org.eclipse.wst.common.project.facet.core.xml2
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath10
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.project11
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/com.springsource.server.ide.bundlor.core.prefs3
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.component2
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.project.facet.core.xml2
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.domain/.project5
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java21
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Country.java55
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/User.java70
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.service/.project5
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/UserManager.java54
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/internal/StubUserManager.java147
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/.project5
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java47
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java22
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java71
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java44
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.classpath8
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.project5
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.settings/org.eclipse.wst.ws.service.policy.prefs2
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java25
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Country.java59
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/User.java133
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/StubUserManager.java150
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/UserManager.java55
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/CountryValidator.java43
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/UserValidator.java26
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java73
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.classpath6
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.project5
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.settings/org.eclipse.wst.common.project.facet.core.xml1
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Colour.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Colour.java)28
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Country.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Country.java)57
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Preferences.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Preferences.java)2
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/User.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/User.java)133
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/UserManager.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/UserManager.java)61
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/internal/StubUserManager.java (renamed from formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/internal/StubUserManager.java)153
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/MANIFEST.MF20
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/module-context.xml2
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/osgi-context.xml2
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.classpath8
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.project7
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.settings/org.eclipse.wst.common.project.facet.core.xml7
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/build.xml2
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java47
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java26
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/CountryEditor.java4
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java80
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java2
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/META-INF/MANIFEST.MF14
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/WEB-INF/web.xml57
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/.classpath2
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/.project5
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java23
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Country.java57
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/User.java135
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/StubUserManager.java147
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/UserManager.java56
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/CountryValidator.java50
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/UserValidator.java24
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/CountryEditor.java42
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java72
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/ListController.java42
-rw-r--r--greenpages/greenpages.core/src/main/resources/META-INF/MANIFEST.MF1
-rw-r--r--greenpages/greenpages.jpa/src/main/resources/META-INF/MANIFEST.MF13
-rw-r--r--greenpages/greenpages.web/src/test/resources/META-INF/MANIFEST.MF15
-rw-r--r--greenpages/greenpages/pom.xml39
-rw-r--r--no-spring-web/.classpath31
-rw-r--r--no-spring-web/.project48
-rw-r--r--no-spring-web/.settings/.jsdtscope11
-rw-r--r--no-spring-web/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--no-spring-web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs2
-rw-r--r--no-spring-web/.settings/org.eclipse.wst.common.component10
-rw-r--r--no-spring-web/.settings/org.eclipse.wst.common.project.facet.core.xml8
-rw-r--r--no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--no-spring-web/.settings/org.springframework.ide.eclipse.core.prefs63
-rw-r--r--no-spring-web/build.xml17
-rw-r--r--no-spring-web/ivy.xml28
-rw-r--r--no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/ContentServlet.java234
-rw-r--r--no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/GZIPResponseStream.java72
-rw-r--r--no-spring-web/src/main/resources/.gitignore (renamed from configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/src/test/resources/.gitignore)0
-rw-r--r--no-spring-web/src/main/webapp/META-INF/.gitignore (renamed from configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/java/.gitignore)0
-rw-r--r--no-spring-web/src/main/webapp/META-INF/MANIFEST.MF10
-rw-r--r--no-spring-web/src/main/webapp/WEB-INF/splash.html66
-rw-r--r--no-spring-web/src/main/webapp/WEB-INF/web.xml17
-rwxr-xr-xno-spring-web/src/main/webapp/images/favicon.icobin0 -> 1150 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/footer-left.pngbin0 -> 2792 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/footer-right.pngbin0 -> 2792 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/footer-stretch.pngbin0 -> 2726 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/header-left.pngbin0 -> 2887 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/header-right.pngbin0 -> 2918 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/menu-curve-left.pngbin0 -> 1277 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/menu-curve-right.pngbin0 -> 1278 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/menu-stretch.pngbin0 -> 2720 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/mini-header-left.pngbin0 -> 236 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/mini-header-right.pngbin0 -> 955 bytes
-rw-r--r--no-spring-web/src/main/webapp/images/server-splash.pngbin0 -> 50830 bytes
-rw-r--r--no-spring-web/src/main/webapp/index.html12
-rw-r--r--no-spring-web/src/main/webapp/styles/main.css223
-rw-r--r--no-spring-web/src/main/webapp/styles/print.css60
-rw-r--r--no-spring-web/src/test/java/.gitignore (renamed from configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/resources/.gitignore)0
-rw-r--r--no-spring-web/src/test/java/META-INF/TEST.MF3
-rw-r--r--no-spring-web/template.mf12
-rw-r--r--osgi-examples/bundle.x/.settings/org.eclipse.wst.common.project.facet.core.xml1
-rw-r--r--osgi-examples/bundle.y1/.settings/org.eclipse.wst.common.project.facet.core.xml1
-rw-r--r--osgi-examples/bundle.y2/.settings/org.eclipse.wst.common.project.facet.core.xml1
112 files changed, 1204 insertions, 2345 deletions
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.project b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.project
index e1585c0..4d5a701 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.project
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.project
@@ -31,5 +31,6 @@
<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>
+ <nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
</natures>
</projectDescription>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/com.springsource.server.ide.bundlor.core.prefs b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/com.springsource.server.ide.bundlor.core.prefs
deleted file mode 100644
index eb109f7..0000000
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/com.springsource.server.ide.bundlor.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Jun 10 16:12:45 BST 2009
-com.springsource.server.ide.bundlor.core.template.properties.files=
-eclipse.preferences.version=1
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/org.eclipse.wst.common.project.facet.core.xml b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856..92aa290 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
+ <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.project b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.project
index 71ea0fd..83a6ac9 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.project
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.project
@@ -14,5 +14,6 @@
<natures>
<nature>com.springsource.server.ide.facet.core.bundlenature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
</natures>
</projectDescription>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.settings/org.eclipse.wst.common.project.facet.core.xml b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856..92aa290 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.properties/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
+ <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath
index 2f8fab9..cfb457b 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath
@@ -10,16 +10,6 @@
<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="false"/>
- </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="false"/>
- </attributes>
- </classpathentry>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.web/3.1.0.RELEASE/org.springframework.web-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.web/3.0.0.RELEASE/org.springframework.web-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.beans/3.1.0.RELEASE/org.springframework.beans-3.1.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.web.servlet/3.1.0.RELEASE/org.springframework.web.servlet-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.web.servlet/3.0.0.RELEASE/org.springframework.web.servlet-sources-3.0.0.RELEASE.jar"/>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.project b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.project
index a47feea..cb9b91d 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.project
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.project
@@ -25,16 +25,6 @@
<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>
@@ -44,5 +34,6 @@
<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>
+ <nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
</natures>
</projectDescription>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/com.springsource.server.ide.bundlor.core.prefs b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/com.springsource.server.ide.bundlor.core.prefs
deleted file mode 100644
index dea2208..0000000
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/com.springsource.server.ide.bundlor.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Jun 10 16:13:51 BST 2009
-com.springsource.server.ide.bundlor.core.template.properties.files=
-eclipse.preferences.version=1
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.component b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.component
index ebc4447..85ba703 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.component
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.component
@@ -5,8 +5,6 @@
<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>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.project.facet.core.xml b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.project.facet.core.xml
index 66f4e39..31e1d4d 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -3,6 +3,6 @@
<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="5.0"/>
+ <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.domain/.project b/formtags/par/org.eclipse.virgo.samples.formtags.domain/.project
index 6af2ac9..af8ed08 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.domain/.project
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.domain/.project
@@ -15,11 +15,6 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java
index dbc5ad2..f2b2585 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java
@@ -11,44 +11,23 @@
package org.eclipse.virgo.samples.formtags.par.domain;
-
-
import org.springframework.core.enums.ShortCodedLabeledEnum;
-
-
/**
-
* Simple enumeration for common colors.
-
*
-
-
*/
-
public class Colour extends ShortCodedLabeledEnum {
-
-
-
-
public static final Colour RED = new Colour(0, "RED");
public static final Colour GREEN = new Colour(1, "GREEN");
public static final Colour BLUE = new Colour(2, "BLUE");
-
-
-
-
private Colour(int code, String label) {
-
super(code, label);
-
}
-
-
}
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Country.java b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Country.java
index fe1ac22..51b68c0 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Country.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Country.java
@@ -14,89 +14,42 @@ package org.eclipse.virgo.samples.formtags.par.domain;
/**
-
* Models a country.
-
*
-
-
*/
-
-public class Country implements Comparable {
-
-
-
-
+public class Country implements Comparable<Country> {
private String code;
private String name;
-
-
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*/
-
public Country() {
-
}
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*
-
* @param code the country code
-
* @param name the name of the country
-
*/
-
public Country(String code, String name) {
-
this.code = code;
-
this.name = name;
-
}
-
-
-
-
public String getCode() {
-
return code;
-
}
-
-
-
+
public String getName() {
-
return name;
-
}
-
-
-
-
- public int compareTo(Object o) {
-
- return this.code.compareTo(((Country) o).code);
-
+ public int compareTo(Country c) {
+ return this.code.compareTo(c.code);
}
-
-
}
-
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/User.java b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/User.java
index d2a216d..9ee3545 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/User.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/User.java
@@ -11,29 +11,16 @@
package org.eclipse.virgo.samples.formtags.par.domain;
-
-
import java.util.ArrayList;
-
import java.util.List;
-
-
/**
-
* Models a user.
-
*
-
-
*/
public class User implements Cloneable {
-
-
-
-
private Integer id;
private String firstName;
@@ -48,7 +35,7 @@ public class User implements Cloneable {
private Colour favouriteColour = Colour.RED;
- private List skills = new ArrayList();
+ private List<String> skills = new ArrayList<String>();
private char sex;
@@ -58,38 +45,20 @@ public class User implements Cloneable {
private String secretWord;
-
-
-
-
public Integer getId() {
-
return id;
-
}
-
-
public void setId(Integer id) {
-
this.id = id;
-
}
-
-
public String getFirstName() {
-
return firstName;
-
}
-
-
public void setFirstName(String firstName) {
-
this.firstName = firstName;
-
}
@@ -204,65 +173,32 @@ public class User implements Cloneable {
}
-
-
- public List getSkills() {
-
+ public List<String> getSkills() {
return skills;
-
}
-
-
- public void setSkills(List skills) {
-
+ public void setSkills(List<String> skills) {
this.skills = skills;
-
}
-
-
public String getPassword() {
-
return password;
-
}
-
-
public void setPassword(String password) {
-
this.password = password;
-
}
-
-
public String getSecretWord() {
-
return secretWord;
-
}
-
-
public void setSecretWord(String secretWord) {
-
this.secretWord = secretWord;
-
}
-
-
-
-
public Object clone() throws CloneNotSupportedException {
-
return super.clone();
-
}
-
-
}
-
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.service/.project b/formtags/par/org.eclipse.virgo.samples.formtags.service/.project
index 0bb1e15..395aba0 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.service/.project
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.service/.project
@@ -16,11 +16,6 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/UserManager.java b/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/UserManager.java
index ebcc3df..ebbca75 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/UserManager.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/UserManager.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.par.service;
-
-
import org.eclipse.virgo.samples.formtags.par.domain.Country;
import org.eclipse.virgo.samples.formtags.par.domain.User;
@@ -21,92 +18,47 @@ import org.eclipse.virgo.samples.formtags.par.domain.User;
import java.util.Collection;
-
-
/**
-
* Central service interface for the application.
-
*
-
-
*/
-
public interface UserManager {
-
-
/**
-
* Finds all of the {@link User Users} in the system.
-
*
-
* @return a {@link Collection} of all of the {@link User Users} in the system.
-
*/
-
- Collection findAll();
-
-
+ Collection<User> findAll();
/**
-
* Finds the specific {@link User} identified by the supplied <code>id</code>.
-
*
-
* @param id the value uniquely identifying a {@link User}
-
* @return the located {@link User} or <code>null</code> if not found
-
*/
-
User findById(Integer id);
-
-
/**
-
* Saves the supplied {@link User} to persistent storage.
-
*
-
* @param user the {@link User} to be so saved
-
*/
-
void save(User user);
-
-
/**
-
* Finds all of the {@link Country Countries} in the system.
-
*
-
* @return all of the {@link Country Countries} in the system
-
*/
-
- Collection findAllCountries();
-
-
+ Collection<Country> findAllCountries();
/**
-
* Finds the specific {@link Country} identified by the supplied (country) <code>code</code>.
-
*
-
* @param code the country code to be used to locate a specific {@link Country}
-
* @return the specific {@link Country} identified by the supplied (country) <code>code</code>
-
*/
-
Country findCountry(String code);
-
+
}
-
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/internal/StubUserManager.java b/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/internal/StubUserManager.java
index 349c647..71c6d36 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/internal/StubUserManager.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.service/src/main/java/org/eclipse/virgo/samples/formtags/par/service/internal/StubUserManager.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.par.service.internal;
-
-
import org.eclipse.virgo.samples.formtags.par.domain.Country;
import org.eclipse.virgo.samples.formtags.par.domain.User;
@@ -23,246 +20,118 @@ import org.eclipse.virgo.samples.formtags.par.service.UserManager;
import java.util.*;
-
-
/**
-
* Stub {@link UserManager} implementation that maintains simple
-
* in-memory state for users and countries.
-
*
-
-
*/
-
public class StubUserManager implements UserManager {
+ private Map<Integer, User> users = new TreeMap<Integer, User>();
-
-
-
- private Map users = new TreeMap();
-
- private Map countries = new TreeMap();
-
-
-
-
+ private Map<String, Country> countries = new TreeMap<String, Country>();
/**
-
* Creates a new instance of the {@link StubUserManager} class.
-
*/
-
public StubUserManager() {
-
loadCountries();
-
loadUsers();
-
}
-
-
-
-
public void save(User user) {
-
// passed in should be a clone - simply replace
-
putUser(user);
-
}
-
-
- public Collection findAllCountries() {
-
+ public Collection<Country> findAllCountries() {
return this.countries.values();
-
}
-
-
public Country findCountry(String code) {
-
return (Country) this.countries.get(code);
-
}
-
-
public User findById(Integer id) {
-
User user = (User) this.users.get(id);
-
-
-
if (user != null) {
-
return cloneUser(user);
-
}
-
-
-
return null;
-
}
-
-
- public Collection findAll() {
-
- List userList = new ArrayList();
-
- Iterator itr = this.users.values().iterator();
-
+ public Collection<User> findAll() {
+ List<User> userList = new ArrayList<User>();
+ Iterator<User> itr = this.users.values().iterator();
while (itr.hasNext()) {
-
User user = (User) itr.next();
-
userList.add(cloneUser(user));
-
}
-
return userList;
-
}
-
-
-
-
-
+
private void loadCountries() {
-
putCountry(new Country("AT", "Austria"));
-
putCountry(new Country("UK", "United Kingdom"));
-
putCountry(new Country("US", "United States"));
-
}
-
-
private void loadUsers() {
-
User u = new User();
-
u.setId(new Integer(1));
-
u.setFirstName("Harry");
-
u.setLastName("Potter");
-
u.setNotes("Promising Wizard...");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.getPreferences().setReceiveNewsletter(true);
-
u.getPreferences().setInterests(new String[]{"Quidditch"});
-
u.getPreferences().setFavouriteWord("Magic");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(2));
-
u.setFirstName("Ronald");
-
u.setLastName("Weasly");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(3));
-
u.setFirstName("Hermione");
-
u.setLastName("Granger");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('F');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
}
-
-
private void putUser(User user) {
-
this.users.put(user.getId(), user);
-
}
-
-
private void putCountry(Country country) {
-
this.countries.put(country.getCode(), country);
-
}
-
-
private User cloneUser(User user) {
-
try {
-
return (User) user.clone();
-
}
-
catch (CloneNotSupportedException e) {
-
throw new IllegalStateException("Unable to clone user.");
-
}
-
}
-
-
-
+
}
-
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/.project b/formtags/par/org.eclipse.virgo.samples.formtags.web/.project
index 92f1ba4..e0aa0d2 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/.project
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/.project
@@ -23,11 +23,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
index 0e8b72a..63d6f0b 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
@@ -11,8 +11,6 @@
package org.eclipse.virgo.samples.formtags.formtags.validation;
-
-
import org.eclipse.virgo.samples.formtags.par.domain.Country;
import org.springframework.util.StringUtils;
@@ -21,68 +19,29 @@ import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link Country} instances.
-
*
-
-
*/
-
public class CountryValidator implements Validator {
-
-
-
-
public static final String DEFAULT_BAD_PLACEHOLDER_CODE = "-";
-
-
-
-
private String badPlaceholderCode = DEFAULT_BAD_PLACEHOLDER_CODE;
-
-
-
-
public void setBadPlaceholderCode(String badPlaceholderCode) {
-
- this.badPlaceholderCode = StringUtils.hasText(badPlaceholderCode)
-
- ? badPlaceholderCode : DEFAULT_BAD_PLACEHOLDER_CODE;
-
+ this.badPlaceholderCode = StringUtils.hasText(badPlaceholderCode) ? badPlaceholderCode : DEFAULT_BAD_PLACEHOLDER_CODE;
}
-
-
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return Country.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object object, Errors errors) {
-
Country country = (Country) object;
-
if (country.getCode() == this.badPlaceholderCode) {
-
errors.rejectValue("bad.country.selected", "Please select a valid country");
-
}
-
}
-
-
-
+
}
-
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
index 3048cb4..6156a14 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
@@ -11,8 +11,6 @@
package org.eclipse.virgo.samples.formtags.formtags.validation;
-
-
import org.eclipse.virgo.samples.formtags.par.domain.User;
import org.springframework.validation.Errors;
@@ -21,38 +19,20 @@ import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link User} instances.
-
*
-
-
*/
-
public class UserValidator implements Validator {
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return User.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object obj, Errors errors) {
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "required", "Field is required.");
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "required", "Field is required.");
-
}
-
-
}
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
index d2d4550..8c274c3 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
@@ -11,8 +11,6 @@
package org.eclipse.virgo.samples.formtags.formtags.web;
-
-
import org.springframework.core.enums.StaticLabeledEnumResolver;
import org.eclipse.virgo.samples.formtags.par.domain.Colour;
@@ -41,118 +39,57 @@ import java.beans.PropertyEditorSupport;
import java.util.Map;
-
-
/**
-
* The central form controller for this showcase application.
-
*
-
-
*/
-
public class FormController extends SimpleFormController {
-
-
private UserManager userManager;
-
-
-
-
/**
-
* Sets the {@link UserManager} to which this presentation component
-
* delegates in order to perform complex business logic.
-
* @param userManager the {@link UserManager} to which this presentation
-
* component delegatesin order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
-
binder.registerCustomEditor(Country.class, new CountryEditor(this.userManager));
-
binder.registerCustomEditor(Colour.class, new PropertyEditorSupport() {
-
public void setAsText(String string) throws IllegalArgumentException {
-
Short code = new Short(string);
-
StaticLabeledEnumResolver resolver = new StaticLabeledEnumResolver();
-
setValue(resolver.getLabeledEnumByCode(Colour.class, code));
-
}
-
});
-
}
-
-
- protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
-
+ protected Map<?, ?> referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
return new ModelMap(this.userManager.findAllCountries())
-
- .addObject("skills", getSkills())
-
- .addObject(this.userManager.findAll());
-
+ .addAttribute("skills", getSkills())
+ .addAttribute(this.userManager.findAll());
}
-
-
protected Object formBackingObject(HttpServletRequest request) throws Exception {
-
int id = ServletRequestUtils.getRequiredIntParameter(request, "id");
-
return this.userManager.findById(new Integer(id));
-
}
-
-
protected void doSubmitAction(Object managedResource) throws Exception {
-
this.userManager.save((User) managedResource);
-
}
-
-
-
-
-
+
private String[] getSkills() {
-
return new String[]{
-
"Potions",
-
"Herbology",
-
"Quidditch"
-
};
-
}
-
-
}
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
index e964e97..211447a 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.formtags.web;
-
-
import org.eclipse.virgo.samples.formtags.par.service.UserManager;
import org.springframework.web.servlet.ModelAndView;
@@ -25,74 +22,37 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-
/**
-
* Simple {@link org.springframework.web.servlet.mvc.Controller} implementation
-
* that pretty much locates (and thus allows a {@link org.springframework.web.servlet.View}
-
* to render a list) of all of the {@link org.eclipse.virgo.samples.formtags.formtags.domain.User Users}
-
* in the application.
-
*
-
-
*/
-
public class ListController extends AbstractController {
-
-
-
-
private UserManager userManager;
private String viewName;
-
-
public void setViewName(String viewName) {
-
this.viewName = viewName;
-
}
-
-
/**
-
* Sets the {@link UserManager} that to which this presentation component delegates
-
* in order to perform complex business logic.
-
*
-
* @param userManager the {@link UserManager} that to which this presentation component delegates
-
* in order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
-
+
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
-
return new ModelAndView(viewName).addObject(this.userManager.findAll());
-
}
-
-
-
+
}
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.classpath b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.classpath
index 0ec2835..1a2e87e 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.classpath
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.classpath
@@ -2,13 +2,15 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 (MacOS X Default)">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
+ <classpathentry kind="con" path="org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.project b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.project
index 06607d4..6f76b3f 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.project
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.project
@@ -25,11 +25,6 @@
<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>
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.settings/org.eclipse.wst.ws.service.policy.prefs b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.settings/org.eclipse.wst.ws.service.policy.prefs
new file mode 100644
index 0000000..9cfcabe
--- /dev/null
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/.settings/org.eclipse.wst.ws.service.policy.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java
index 5f8b28e..a552062 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java
@@ -8,47 +8,26 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.domain;
-
-
import org.springframework.core.enums.ShortCodedLabeledEnum;
-
-
/**
-
* Simple enumeration for common colors.
-
*
-
-
*/
-
public class Colour extends ShortCodedLabeledEnum {
+ private static final long serialVersionUID = 1L;
-
-
-
- public static final Colour RED = new Colour(0, "RED");
+ public static final Colour RED = new Colour(0, "RED");
public static final Colour GREEN = new Colour(1, "GREEN");
public static final Colour BLUE = new Colour(2, "BLUE");
-
-
-
-
private Colour(int code, String label) {
-
super(code, label);
-
}
-
-
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Country.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Country.java
index 43de881..67cc9e1 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Country.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Country.java
@@ -8,95 +8,46 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.domain;
-
-
/**
-
* Models a country.
-
*
-
-
*/
-
-public class Country implements Comparable {
-
-
-
-
+public class Country implements Comparable<Country> {
private String code;
private String name;
-
-
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*/
-
public Country() {
}
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*
-
* @param code the country code
-
* @param name the name of the country
-
*/
-
public Country(String code, String name) {
-
this.code = code;
-
this.name = name;
-
}
-
-
-
-
public String getCode() {
-
return code;
-
}
-
-
public String getName() {
-
return name;
-
}
-
-
-
-
-
- public int compareTo(Object o) {
-
- return this.code.compareTo(((Country) o).code);
-
+
+ public int compareTo(Country c) {
+ return this.code.compareTo(c.code);
}
-
-
-
+
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/User.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/User.java
index 986f736..d3214bd 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/User.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/User.java
@@ -8,32 +8,17 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.domain;
-
-
import java.util.ArrayList;
-
import java.util.List;
-
-
/**
-
* Models a user.
-
*
-
-
*/
-
public class User implements Cloneable {
-
-
-
-
private Integer id;
private String firstName;
@@ -48,7 +33,7 @@ public class User implements Cloneable {
private Colour favouriteColour = Colour.RED;
- private List skills = new ArrayList();
+ private List<String> skills = new ArrayList<String>();
private char sex;
@@ -58,211 +43,103 @@ public class User implements Cloneable {
private String secretWord;
-
-
-
-
public Integer getId() {
-
return id;
-
}
-
-
public void setId(Integer id) {
-
this.id = id;
-
}
-
-
public String getFirstName() {
-
return firstName;
-
}
-
-
public void setFirstName(String firstName) {
-
this.firstName = firstName;
-
}
-
-
public String getLastName() {
-
return lastName;
-
}
-
-
public void setLastName(String lastName) {
-
this.lastName = lastName;
-
}
-
-
public String getNotes() {
-
return notes;
-
}
-
-
public void setNotes(String notes) {
-
this.notes = notes;
-
}
-
-
public String getHouse() {
-
return house;
-
}
-
-
public void setHouse(String house) {
-
this.house = house;
-
}
-
-
public Country getCountry() {
-
return country;
-
}
-
-
public void setCountry(Country country) {
-
this.country = country;
-
}
-
-
public Colour getFavouriteColour() {
-
return favouriteColour;
-
}
-
-
public void setFavouriteColour(Colour favouriteColour) {
-
this.favouriteColour = favouriteColour;
-
}
-
-
public char getSex() {
-
return sex;
-
}
-
-
public void setSex(char sex) {
-
this.sex = sex;
-
}
-
-
public Preferences getPreferences() {
-
return preferences;
-
}
-
-
public void setPreferences(Preferences preferences) {
-
this.preferences = preferences;
-
}
-
-
- public List getSkills() {
-
+ public List<String> getSkills() {
return skills;
-
}
-
-
- public void setSkills(List skills) {
-
+ public void setSkills(List<String> skills) {
this.skills = skills;
-
}
-
-
public String getPassword() {
-
return password;
-
}
-
-
public void setPassword(String password) {
-
this.password = password;
-
}
-
-
public String getSecretWord() {
-
return secretWord;
-
}
-
-
-
+
public void setSecretWord(String secretWord) {
-
this.secretWord = secretWord;
-
}
-
-
-
-
-
+
public Object clone() throws CloneNotSupportedException {
-
return super.clone();
-
}
-
-
-
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/StubUserManager.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/StubUserManager.java
index 9f8f78d..32d28fb 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/StubUserManager.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/StubUserManager.java
@@ -11,9 +11,6 @@
package org.eclipse.virgo.samples.formtags.sharedlibs.service;
-
-
-
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.Country;
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.User;
@@ -21,246 +18,117 @@ import org.eclipse.virgo.samples.formtags.sharedlibs.domain.User;
import java.util.*;
-
-
/**
-
* Stub {@link UserManager} implementation that maintains simple
-
* in-memory state for users and countries.
-
*
-
-
*/
-
public class StubUserManager implements UserManager {
+ private Map<Integer, User> users = new TreeMap<Integer, User>();
-
-
-
- private Map users = new TreeMap();
-
- private Map countries = new TreeMap();
-
-
-
-
+ private Map<String, Country> countries = new TreeMap<String, Country>();
/**
-
* Creates a new instance of the {@link StubUserManager} class.
-
*/
-
public StubUserManager() {
-
loadCountries();
-
loadUsers();
-
}
-
-
-
-
public void save(User user) {
-
// passed in should be a clone - simply replace
-
putUser(user);
-
}
-
-
- public Collection findAllCountries() {
-
+ public Collection<Country> findAllCountries() {
return this.countries.values();
-
}
-
-
public Country findCountry(String code) {
-
return (Country) this.countries.get(code);
-
}
-
-
public User findById(Integer id) {
-
User user = (User) this.users.get(id);
-
-
-
if (user != null) {
-
return cloneUser(user);
-
}
-
-
-
return null;
-
}
-
-
- public Collection findAll() {
-
- List userList = new ArrayList();
-
- Iterator itr = this.users.values().iterator();
-
+ public Collection<User> findAll() {
+ List<User> userList = new ArrayList<User>();
+ Iterator<User> itr = this.users.values().iterator();
while (itr.hasNext()) {
-
- User user = (User) itr.next();
-
- userList.add(cloneUser(user));
-
+ userList.add(cloneUser(itr.next()));
}
-
return userList;
-
}
-
-
-
-
private void loadCountries() {
-
putCountry(new Country("AT", "Austria"));
-
putCountry(new Country("UK", "United Kingdom"));
-
putCountry(new Country("US", "United States"));
-
}
-
-
private void loadUsers() {
-
User u = new User();
-
u.setId(new Integer(1));
-
u.setFirstName("Harry");
-
u.setLastName("Potter");
-
u.setNotes("Promising Wizard...");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.getPreferences().setReceiveNewsletter(true);
-
u.getPreferences().setInterests(new String[]{"Quidditch"});
-
u.getPreferences().setFavouriteWord("Magic");
-
u.setPassword("password");
-
-
-
+
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(2));
-
u.setFirstName("Ronald");
-
u.setLastName("Weasly");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(3));
-
u.setFirstName("Hermione");
-
u.setLastName("Granger");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('F');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
}
-
-
private void putUser(User user) {
-
this.users.put(user.getId(), user);
-
}
-
-
private void putCountry(Country country) {
-
this.countries.put(country.getCode(), country);
-
}
-
-
private User cloneUser(User user) {
-
try {
-
return (User) user.clone();
-
}
-
catch (CloneNotSupportedException e) {
-
throw new IllegalStateException("Unable to clone user.");
-
}
-
}
-
-
-
+
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/UserManager.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/UserManager.java
index 666d229..9c65760 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/UserManager.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/service/UserManager.java
@@ -11,102 +11,51 @@
package org.eclipse.virgo.samples.formtags.sharedlibs.service;
-
-
-
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.Country;
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.User;
-
-
import java.util.Collection;
-
-
/**
-
* Central service interface for the application.
-
*
-
-
*/
-
public interface UserManager {
-
-
/**
-
* Finds all of the {@link User Users} in the system.
-
*
-
* @return a {@link Collection} of all of the {@link User Users} in the system.
-
*/
-
- Collection findAll();
-
-
+ Collection<User> findAll();
/**
-
* Finds the specific {@link User} identified by the supplied <code>id</code>.
-
*
-
* @param id the value uniquely identifying a {@link User}
-
* @return the located {@link User} or <code>null</code> if not found
-
*/
-
User findById(Integer id);
-
-
/**
-
* Saves the supplied {@link User} to persistent storage.
-
*
-
* @param user the {@link User} to be so saved
-
*/
-
void save(User user);
-
-
/**
-
* Finds all of the {@link Country Countries} in the system.
-
*
-
* @return all of the {@link Country Countries} in the system
-
*/
-
- Collection findAllCountries();
-
-
+ Collection<Country> findAllCountries();
/**
-
* Finds the specific {@link Country} identified by the supplied (country) <code>code</code>.
-
*
-
* @param code the country code to be used to locate a specific {@link Country}
-
* @return the specific {@link Country} identified by the supplied (country) <code>code</code>
-
*/
-
Country findCountry(String code);
-
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/CountryValidator.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/CountryValidator.java
index 180fde1..ead2419 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/CountryValidator.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/CountryValidator.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.validation;
-
-
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.Country;
import org.springframework.util.StringUtils;
@@ -21,68 +18,30 @@ import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link Country} instances.
-
*
-
-
*/
-
public class CountryValidator implements Validator {
-
-
-
-
public static final String DEFAULT_BAD_PLACEHOLDER_CODE = "-";
-
-
-
-
private String badPlaceholderCode = DEFAULT_BAD_PLACEHOLDER_CODE;
-
-
-
-
public void setBadPlaceholderCode(String badPlaceholderCode) {
-
this.badPlaceholderCode = StringUtils.hasText(badPlaceholderCode)
-
? badPlaceholderCode : DEFAULT_BAD_PLACEHOLDER_CODE;
-
}
-
-
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return Country.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object object, Errors errors) {
-
Country country = (Country) object;
-
if (country.getCode() == this.badPlaceholderCode) {
-
errors.rejectValue("bad.country.selected", "Please select a valid country");
-
}
-
}
-
-
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/UserValidator.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/UserValidator.java
index 3bc4792..7cd620a 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/UserValidator.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/validation/UserValidator.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.validation;
-
-
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.User;
import org.springframework.validation.Errors;
@@ -21,38 +18,19 @@ import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link User} instances.
-
*
-
-
*/
-
public class UserValidator implements Validator {
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return User.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object obj, Errors errors) {
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "required", "Field is required.");
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "required", "Field is required.");
-
}
-
-
-
+
}
-
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java
index 0acb4fe..1973db6 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.sharedlibs.web;
-
-
import org.springframework.core.enums.StaticLabeledEnumResolver;
@@ -41,118 +38,56 @@ import java.beans.PropertyEditorSupport;
import java.util.Map;
-
-
/**
-
* The central form controller for this showcase application.
-
*
-
-
*/
-
public class FormController extends SimpleFormController {
-
-
private UserManager userManager;
-
-
-
-
/**
-
* Sets the {@link UserManager} to which this presentation component
-
* delegates in order to perform complex business logic.
-
* @param userManager the {@link UserManager} to which this presentation
-
* component delegatesin order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
-
binder.registerCustomEditor(Country.class, new CountryEditor(this.userManager));
-
binder.registerCustomEditor(Colour.class, new PropertyEditorSupport() {
-
public void setAsText(String string) throws IllegalArgumentException {
-
Short code = new Short(string);
-
StaticLabeledEnumResolver resolver = new StaticLabeledEnumResolver();
-
setValue(resolver.getLabeledEnumByCode(Colour.class, code));
-
}
-
});
-
}
-
-
- protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
-
+ protected Map<?, ?> referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
return new ModelMap(this.userManager.findAllCountries())
-
- .addObject("skills", getSkills())
-
- .addObject(this.userManager.findAll());
-
+ .addAttribute("skills", getSkills())
+ .addAttribute(this.userManager.findAll());
}
-
-
protected Object formBackingObject(HttpServletRequest request) throws Exception {
-
int id = ServletRequestUtils.getRequiredIntParameter(request, "id");
-
return this.userManager.findById(new Integer(id));
-
}
-
-
protected void doSubmitAction(Object managedResource) throws Exception {
-
this.userManager.save((User) managedResource);
-
}
-
-
-
-
private String[] getSkills() {
-
return new String[]{
-
"Potions",
-
"Herbology",
-
"Quidditch"
-
};
-
}
-
-
-
+
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.classpath b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.classpath
index a288885..1a2e87e 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.classpath
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.classpath
@@ -2,11 +2,15 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 (MacOS X Default)">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
+ <classpathentry kind="con" path="org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.project b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.project
index 45528e2..d6f8f0f 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.project
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.project
@@ -15,11 +15,6 @@
<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>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.settings/org.eclipse.wst.common.project.facet.core.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.settings/org.eclipse.wst.common.project.facet.core.xml
index 426c41a..3afd064 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -2,6 +2,5 @@
<faceted-project>
<runtime name="Virgo Runtime"/>
<installed facet="jst.java" version="5.0"/>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
<installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Colour.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Colour.java
index 2ee289a..a0db340 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Colour.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Colour.java
@@ -8,47 +8,25 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
-package org.eclipse.virgo.samples.formtags.sharedservice.domain;
-
-
+package org.eclipse.virgo.samples.formtags.sharedservices.domain;
import org.springframework.core.enums.ShortCodedLabeledEnum;
-
-
/**
-
* Simple enumeration for common colors.
-
*
-
-
*/
-
public class Colour extends ShortCodedLabeledEnum {
+ private static final long serialVersionUID = 1L;
-
-
-
- public static final Colour RED = new Colour(0, "RED");
+ public static final Colour RED = new Colour(0, "RED");
public static final Colour GREEN = new Colour(1, "GREEN");
public static final Colour BLUE = new Colour(2, "BLUE");
-
-
-
-
private Colour(int code, String label) {
-
super(code, label);
-
}
-
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Country.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Country.java
index 419d3cd..f8a6431 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Country.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Country.java
@@ -8,95 +8,46 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
-package org.eclipse.virgo.samples.formtags.sharedservice.domain;
-
-
+package org.eclipse.virgo.samples.formtags.sharedservices.domain;
/**
-
* Models a country.
-
*
-
-
*/
-
-public class Country implements Comparable {
-
-
-
-
+public class Country implements Comparable<Country> {
private String code;
private String name;
-
-
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*/
-
public Country() {
}
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*
-
* @param code the country code
-
* @param name the name of the country
-
*/
-
public Country(String code, String name) {
-
this.code = code;
-
this.name = name;
-
}
-
-
-
-
public String getCode() {
-
return code;
-
}
-
-
public String getName() {
-
return name;
-
}
-
-
-
-
- public int compareTo(Object o) {
-
- return this.code.compareTo(((Country) o).code);
-
+ public int compareTo(Country c) {
+ return this.code.compareTo(c.code);
}
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Preferences.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Preferences.java
index 8b102c7..bcf15bf 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/Preferences.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/Preferences.java
@@ -9,7 +9,7 @@
* VMware Inc. - initial contribution
*******************************************************************************/
-package org.eclipse.virgo.samples.formtags.sharedservice.domain;
+package org.eclipse.virgo.samples.formtags.sharedservices.domain;
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/User.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/User.java
index 1c22527..1b2aa7f 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/domain/User.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/domain/User.java
@@ -8,32 +8,18 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
-package org.eclipse.virgo.samples.formtags.sharedservice.domain;
-
-
+package org.eclipse.virgo.samples.formtags.sharedservices.domain;
import java.util.ArrayList;
import java.util.List;
-
-
/**
-
* Models a user.
-
*
-
-
*/
-
public class User implements Cloneable {
-
-
-
-
private Integer id;
private String firstName;
@@ -48,7 +34,7 @@ public class User implements Cloneable {
private Colour favouriteColour = Colour.RED;
- private List skills = new ArrayList();
+ private List<String> skills = new ArrayList<String>();
private char sex;
@@ -58,211 +44,104 @@ public class User implements Cloneable {
private String secretWord;
-
-
-
-
public Integer getId() {
-
return id;
-
}
-
-
public void setId(Integer id) {
-
this.id = id;
-
}
-
-
public String getFirstName() {
-
return firstName;
-
}
-
-
public void setFirstName(String firstName) {
-
this.firstName = firstName;
-
}
-
-
public String getLastName() {
-
return lastName;
-
}
-
-
-
+
public void setLastName(String lastName) {
-
this.lastName = lastName;
-
}
-
-
-
+
public String getNotes() {
-
return notes;
-
}
-
-
public void setNotes(String notes) {
-
this.notes = notes;
-
}
-
-
public String getHouse() {
-
return house;
-
}
-
-
public void setHouse(String house) {
-
this.house = house;
-
}
-
-
public Country getCountry() {
-
return country;
-
}
-
-
public void setCountry(Country country) {
-
this.country = country;
-
}
-
-
public Colour getFavouriteColour() {
-
return favouriteColour;
-
}
-
-
public void setFavouriteColour(Colour favouriteColour) {
-
this.favouriteColour = favouriteColour;
-
}
-
-
public char getSex() {
-
return sex;
-
}
-
-
public void setSex(char sex) {
-
this.sex = sex;
-
}
-
-
public Preferences getPreferences() {
-
return preferences;
-
}
-
-
public void setPreferences(Preferences preferences) {
-
this.preferences = preferences;
-
}
-
-
- public List getSkills() {
-
+ public List<String> getSkills() {
return skills;
-
}
-
-
- public void setSkills(List skills) {
-
+ public void setSkills(List<String> skills) {
this.skills = skills;
-
}
-
-
public String getPassword() {
-
return password;
-
}
-
-
public void setPassword(String password) {
-
this.password = password;
-
}
-
-
public String getSecretWord() {
-
return secretWord;
-
}
-
-
public void setSecretWord(String secretWord) {
-
this.secretWord = secretWord;
-
}
-
-
-
-
public Object clone() throws CloneNotSupportedException {
-
return super.clone();
-
}
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/UserManager.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/UserManager.java
index ffe2092..df18783 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/UserManager.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/UserManager.java
@@ -8,105 +8,56 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
+package org.eclipse.virgo.samples.formtags.sharedservices.service;
-package org.eclipse.virgo.samples.formtags.sharedservice.service;
-
-
-
-
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Country;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.User;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Country;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.User;
import java.util.Collection;
-
-
/**
-
* Central service interface for the application.
-
*
-
-
*/
-
public interface UserManager {
-
-
/**
-
* Finds all of the {@link User Users} in the system.
-
*
-
* @return a {@link Collection} of all of the {@link User Users} in the system.
-
*/
-
- Collection findAll();
-
-
+ Collection<User> findAll();
/**
-
* Finds the specific {@link User} identified by the supplied <code>id</code>.
-
*
-
* @param id the value uniquely identifying a {@link User}
-
* @return the located {@link User} or <code>null</code> if not found
-
*/
-
User findById(Integer id);
-
-
/**
-
* Saves the supplied {@link User} to persistent storage.
-
*
-
* @param user the {@link User} to be so saved
-
*/
-
void save(User user);
-
-
/**
-
* Finds all of the {@link Country Countries} in the system.
-
*
-
* @return all of the {@link Country Countries} in the system
-
*/
-
- Collection findAllCountries();
-
-
+ Collection<Country> findAllCountries();
/**
-
* Finds the specific {@link Country} identified by the supplied (country) <code>code</code>.
-
*
-
* @param code the country code to be used to locate a specific {@link Country}
-
* @return the specific {@link Country} identified by the supplied (country) <code>code</code>
-
*/
-
Country findCountry(String code);
-
+
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/internal/StubUserManager.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/internal/StubUserManager.java
index 82bc1e1..ac66f08 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservice/service/internal/StubUserManager.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/service/internal/StubUserManager.java
@@ -8,261 +8,128 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
+package org.eclipse.virgo.samples.formtags.sharedservices.service.internal;
-package org.eclipse.virgo.samples.formtags.sharedservice.service.internal;
-
-
-
-
-
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Country;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.User;
-import org.eclipse.virgo.samples.formtags.sharedservice.service.UserManager;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Country;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.User;
+import org.eclipse.virgo.samples.formtags.sharedservices.service.UserManager;
import java.util.*;
-
-
/**
-
* Stub {@link UserManager} implementation that maintains simple
-
* in-memory state for users and countries.
-
*
-
-
*/
-
public class StubUserManager implements UserManager {
+ private Map<Integer, User> users = new TreeMap<Integer, User>();
-
-
-
- private Map users = new TreeMap();
-
- private Map countries = new TreeMap();
-
-
-
-
+ private Map<String, Country> countries = new TreeMap<String, Country>();
/**
-
* Creates a new instance of the {@link StubUserManager} class.
-
*/
-
public StubUserManager() {
-
loadCountries();
-
loadUsers();
-
}
-
-
-
-
public void save(User user) {
-
// passed in should be a clone - simply replace
-
putUser(user);
-
}
-
-
- public Collection findAllCountries() {
-
+ public Collection<Country> findAllCountries() {
return this.countries.values();
-
}
-
-
public Country findCountry(String code) {
-
return (Country) this.countries.get(code);
-
}
-
-
public User findById(Integer id) {
-
User user = (User) this.users.get(id);
-
-
-
if (user != null) {
-
return cloneUser(user);
-
}
-
-
-
return null;
-
}
-
-
- public Collection findAll() {
-
- List userList = new ArrayList();
-
- Iterator itr = this.users.values().iterator();
-
+ public Collection<User> findAll() {
+ List<User> userList = new ArrayList<User>();
+ Iterator<User> itr = this.users.values().iterator();
while (itr.hasNext()) {
-
User user = (User) itr.next();
-
userList.add(cloneUser(user));
-
}
-
return userList;
-
}
-
-
-
-
private void loadCountries() {
-
putCountry(new Country("AT", "Austria"));
-
putCountry(new Country("UK", "United Kingdom"));
-
putCountry(new Country("US", "United States"));
-
}
-
-
private void loadUsers() {
-
User u = new User();
-
u.setId(new Integer(1));
-
u.setFirstName("Harry");
-
u.setLastName("Potter");
-
u.setNotes("Promising Wizard...");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.getPreferences().setReceiveNewsletter(true);
-
u.getPreferences().setInterests(new String[]{"Quidditch"});
-
u.getPreferences().setFavouriteWord("Magic");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(2));
-
u.setFirstName("Ronald");
-
u.setLastName("Weasly");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(3));
-
u.setFirstName("Hermione");
-
u.setLastName("Granger");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('F');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
}
-
-
private void putUser(User user) {
-
this.users.put(user.getId(), user);
-
}
-
-
private void putCountry(Country country) {
-
this.countries.put(country.getCode(), country);
-
}
-
-
private User cloneUser(User user) {
-
try {
-
return (User) user.clone();
-
}
-
catch (CloneNotSupportedException e) {
-
throw new IllegalStateException("Unable to clone user.");
-
}
-
}
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/MANIFEST.MF b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/MANIFEST.MF
index cb8656a..be88176 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/MANIFEST.MF
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/MANIFEST.MF
@@ -1,9 +1,11 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: FormTags Service (and implementation)
-Bundle-SymbolicName: org.eclipse.virgo.samples.formtags.formtags.service_shared_services
-Bundle-Version: 3.0.0
-Import-Library: org.springframework.spring;version="[2.5.6.A,4.0.0)"
-Export-Package: org.eclipse.virgo.samples.formtags.formtags.domain,
- org.eclipse.virgo.samples.formtags.formtags.service
-
+Manifest-Version: 1.0
+Export-Package: org.eclipse.virgo.samples.formtags.sharedservices.domain,
+ org.eclipse.virgo.samples.formtags.sharedservices.service,
+ org.eclipse.virgo.samples.formtags.sharedservices.service.internal
+Bundle-Version: 3.0.0
+Tool: Bundlor 1.1.0.RELEASE
+Bundle-Name: FormTags Service (and implementation)
+Bundle-ManifestVersion: 2
+Import-Package: org.springframework.core.enums
+Bundle-SymbolicName: org.eclipse.virgo.samples.formtags.shared-services.service
+
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/module-context.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/module-context.xml
index 4a94074..4323dcf 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/module-context.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/module-context.xml
@@ -10,6 +10,6 @@
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
- <bean id="userManager" class="org.eclipse.virgo.samples.formtags.formtags.service.internal.StubUserManager"/>
+ <bean id="userManager" class="org.eclipse.virgo.samples.formtags.sharedservices.service.internal.StubUserManager"/>
</beans>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/osgi-context.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/osgi-context.xml
index bfc2735..157fc71 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/osgi-context.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/resources/META-INF/spring/osgi-context.xml
@@ -8,6 +8,6 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
- <service ref="userManager" interface="org.eclipse.virgo.samples.formtags.formtags.service.UserManager" />
+ <service ref="userManager" interface="org.eclipse.virgo.samples.formtags.sharedservices.service.UserManager" />
</beans:beans> \ No newline at end of file
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.classpath b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.classpath
index 02f3e87..f407418 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.classpath
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.classpath
@@ -2,14 +2,16 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.samples.formtags.shared-services.service"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 (MacOS X Default)">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
+ <classpathentry kind="con" path="org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.project b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.project
index b1afc3f..802b514 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.project
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.virgo.samples.formtags.shared-services.war</name>
+ <name>org.eclipse.virgo.samples.formtags.shared-services.web</name>
<comment></comment>
<projects>
<project>formtags-shared-services-service</project>
@@ -26,11 +26,6 @@
<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>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.settings/org.eclipse.wst.common.project.facet.core.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.settings/org.eclipse.wst.common.project.facet.core.xml
index f53416a..2a4afa6 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Virgo Runtime"/>
- <fixed facet="jst.java"/>
<fixed facet="jst.web"/>
- <installed facet="jst.java" version="5.0"/>
- <installed facet="jst.web" version="2.4"/>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.web" version="2.5"/>
<installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
+ <installed facet="jst.java" version="5.0"/>
</faceted-project>
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/build.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/build.xml
index 93a5005..562df8f 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/build.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.virgo.samples.formtags.shared-services.war">
+<project name="org.eclipse.virgo.samples.formtags.shared-services.web">
<property file="${basedir}/../../../build.properties" />
<property file="${basedir}/../../../build.versions" />
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
index 7f81e7d..82d9070 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/CountryValidator.java
@@ -8,12 +8,9 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.formtags.validation;
-
-
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Country;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Country;
import org.springframework.util.StringUtils;
@@ -21,68 +18,30 @@ import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link Country} instances.
-
*
-
-
*/
-
public class CountryValidator implements Validator {
-
-
-
-
- public static final String DEFAULT_BAD_PLACEHOLDER_CODE = "-";
-
-
-
-
+ public static final String DEFAULT_BAD_PLACEHOLDER_CODE = "-";
private String badPlaceholderCode = DEFAULT_BAD_PLACEHOLDER_CODE;
-
-
-
-
public void setBadPlaceholderCode(String badPlaceholderCode) {
-
this.badPlaceholderCode = StringUtils.hasText(badPlaceholderCode)
-
? badPlaceholderCode : DEFAULT_BAD_PLACEHOLDER_CODE;
-
}
-
-
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return Country.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object object, Errors errors) {
-
Country country = (Country) object;
-
if (country.getCode() == this.badPlaceholderCode) {
-
errors.rejectValue("bad.country.selected", "Please select a valid country");
-
}
-
}
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
index 1dbda5d..3a89848 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/validation/UserValidator.java
@@ -8,12 +8,9 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.formtags.validation;
-
-
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.User;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.User;
import org.springframework.validation.Errors;
@@ -21,38 +18,19 @@ import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link User} instances.
-
*
-
-
*/
-
public class UserValidator implements Validator {
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return User.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object obj, Errors errors) {
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "required", "Field is required.");
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "required", "Field is required.");
-
}
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/CountryEditor.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/CountryEditor.java
index 7ff947a..b32085d 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/CountryEditor.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/CountryEditor.java
@@ -13,9 +13,9 @@ package org.eclipse.virgo.samples.formtags.formtags.web;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Country;
-import org.eclipse.virgo.samples.formtags.sharedservice.service.UserManager;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Country;
+import org.eclipse.virgo.samples.formtags.sharedservices.service.UserManager;
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
index 59bbee0..f4c7586 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java
@@ -8,20 +8,17 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.formtags.web;
-
-
import org.springframework.core.enums.StaticLabeledEnumResolver;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Colour;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.Country;
-import org.eclipse.virgo.samples.formtags.sharedservice.domain.User;
-import org.eclipse.virgo.samples.formtags.sharedservice.service.UserManager;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Colour;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.Country;
+import org.eclipse.virgo.samples.formtags.sharedservices.domain.User;
+import org.eclipse.virgo.samples.formtags.sharedservices.service.UserManager;
import org.springframework.ui.ModelMap;
@@ -41,118 +38,55 @@ import java.beans.PropertyEditorSupport;
import java.util.Map;
-
-
/**
-
* The central form controller for this showcase application.
-
*
-
-
*/
-
public class FormController extends SimpleFormController {
-
-
private UserManager userManager;
-
-
-
-
/**
-
* Sets the {@link UserManager} to which this presentation component
-
* delegates in order to perform complex business logic.
-
* @param userManager the {@link UserManager} to which this presentation
-
* component delegatesin order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
-
binder.registerCustomEditor(Country.class, new CountryEditor(this.userManager));
-
binder.registerCustomEditor(Colour.class, new PropertyEditorSupport() {
-
public void setAsText(String string) throws IllegalArgumentException {
-
Short code = new Short(string);
-
StaticLabeledEnumResolver resolver = new StaticLabeledEnumResolver();
-
setValue(resolver.getLabeledEnumByCode(Colour.class, code));
-
}
-
});
-
}
-
-
- protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
-
+ protected Map<?, ?> referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
return new ModelMap(this.userManager.findAllCountries())
-
- .addObject("skills", getSkills())
-
- .addObject(this.userManager.findAll());
-
+ .addAttribute("skills", getSkills())
+ .addAttribute(this.userManager.findAll());
}
-
-
protected Object formBackingObject(HttpServletRequest request) throws Exception {
-
int id = ServletRequestUtils.getRequiredIntParameter(request, "id");
-
return this.userManager.findById(new Integer(id));
-
}
-
-
protected void doSubmitAction(Object managedResource) throws Exception {
-
this.userManager.save((User) managedResource);
-
}
-
-
-
-
private String[] getSkills() {
-
return new String[]{
-
"Potions",
-
"Herbology",
-
"Quidditch"
-
};
-
}
-
-
-
}
-
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
index 57b79d8..647a65a 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/ListController.java
@@ -13,7 +13,7 @@ package org.eclipse.virgo.samples.formtags.formtags.web;
-import org.eclipse.virgo.samples.formtags.sharedservice.service.UserManager;
+import org.eclipse.virgo.samples.formtags.sharedservices.service.UserManager;
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/META-INF/MANIFEST.MF b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/META-INF/MANIFEST.MF
index eeded7a..3fb682b 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/META-INF/MANIFEST.MF
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/META-INF/MANIFEST.MF
@@ -1,13 +1,13 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: FormTags Shared Services WAR
-Bundle-SymbolicName: org.eclipse.virgo.samples.formtags.formtags.web_shared_services
+Bundle-SymbolicName: org.eclipse.virgo.samples.formtags.sharedservices.war
Bundle-Version: 3.0.0
-Import-Package: javax.servlet.http,
- org.eclipse.virgo.samples.formtags.formtags.domain,
- org.eclipse.virgo.samples.formtags.formtags.service,
- org.eclipse.virgo.web.dm;version="[1.0,2.2)",
- javax.servlet.jsp.jstl.core;version="[1.1.2,1.2.0)"
+Import-Package: org.eclipse.virgo.samples.formtags.sharedservices.domain,
+ org.eclipse.virgo.samples.formtags.sharedservices.service,
+ org.eclipse.virgo.web.dm;version="[3.0,5.0)",
+ javax.servlet.jsp.jstl.core;version="[1.1.2,1.2.1)",
+ javax.servlet.http
Import-Library: org.springframework.spring;version="[2.5.6.A,4.0.0)"
-Import-Bundle: com.springsource.org.apache.taglibs.standard;version="1.1.2"
+Import-Bundle: com.springsource.org.apache.taglibs.standard;version="1.1.2.v20110517"
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/WEB-INF/web.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/WEB-INF/web.xml
index 8f5f497..adf7ed1 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/WEB-INF/web.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/src/main/webapp/WEB-INF/web.xml
@@ -1,29 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <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>
-
- <servlet>
- <servlet-name>formtags</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>formtags</servlet-name>
- <url-pattern>*.htm</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <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>
+
+ <servlet>
+ <servlet-name>formtags</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>formtags</servlet-name>
+ <url-pattern>*.htm</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app> \ No newline at end of file
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/.classpath b/formtags/war/org.eclipse.virgo.samples.formtags.war/.classpath
index 3e3dd08..0b3f3ce 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/.classpath
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/.classpath
@@ -4,7 +4,7 @@
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/.project b/formtags/war/org.eclipse.virgo.samples.formtags.war/.project
index c3aa851..e981889 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/.project
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/.project
@@ -25,11 +25,6 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java
index d7e16bd..774430b 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java
@@ -8,47 +8,24 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.domain;
-
-
import org.springframework.core.enums.ShortCodedLabeledEnum;
-
-
/**
-
* Simple enumeration for common colors.
-
*
-
-
*/
-
public class Colour extends ShortCodedLabeledEnum {
-
-
-
-
public static final Colour RED = new Colour(0, "RED");
public static final Colour GREEN = new Colour(1, "GREEN");
public static final Colour BLUE = new Colour(2, "BLUE");
-
-
-
-
private Colour(int code, String label) {
-
super(code, label);
-
}
-
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Country.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Country.java
index 334f819..59f2ba4 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Country.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Country.java
@@ -8,95 +8,46 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.domain;
-
-
/**
-
* Models a country.
-
*
-
-
*/
-
-public class Country implements Comparable {
-
-
-
-
+public class Country implements Comparable<Country> {
private String code;
private String name;
-
-
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*/
-
public Country() {
}
-
-
/**
-
* Creates a new instance of this {@link Country} class.
-
*
-
* @param code the country code
-
* @param name the name of the country
-
*/
-
public Country(String code, String name) {
-
this.code = code;
-
this.name = name;
-
}
-
-
-
-
-
+
public String getCode() {
-
return code;
-
}
-
-
public String getName() {
-
return name;
-
}
-
-
-
-
- public int compareTo(Object o) {
-
- return this.code.compareTo(((Country) o).code);
-
+ public int compareTo(Country c) {
+ return this.code.compareTo(c.code);
}
-
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/User.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/User.java
index 9265558..eb45451 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/User.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/User.java
@@ -8,32 +8,18 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.domain;
-
-
import java.util.ArrayList;
import java.util.List;
-
-
/**
-
* Models a user.
-
*
-
-
*/
-
public class User implements Cloneable {
-
-
-
-
private Integer id;
private String firstName;
@@ -48,221 +34,114 @@ public class User implements Cloneable {
private Colour favouriteColour = Colour.RED;
- private List skills = new ArrayList();
+ private List<String> skills = new ArrayList<String>();
private char sex;
private String password;
private Preferences preferences = new Preferences();
-
+
private String secretWord;
-
-
-
-
public Integer getId() {
-
return id;
-
}
-
-
public void setId(Integer id) {
-
this.id = id;
-
}
-
-
public String getFirstName() {
-
return firstName;
-
}
-
-
public void setFirstName(String firstName) {
-
this.firstName = firstName;
-
}
-
-
public String getLastName() {
-
return lastName;
-
}
-
-
public void setLastName(String lastName) {
-
this.lastName = lastName;
-
}
-
-
public String getNotes() {
-
return notes;
-
}
-
-
public void setNotes(String notes) {
-
this.notes = notes;
-
}
-
-
public String getHouse() {
-
return house;
-
}
-
-
public void setHouse(String house) {
-
this.house = house;
-
}
-
-
public Country getCountry() {
-
return country;
-
}
-
-
public void setCountry(Country country) {
-
this.country = country;
-
}
-
-
public Colour getFavouriteColour() {
-
return favouriteColour;
-
}
-
-
public void setFavouriteColour(Colour favouriteColour) {
-
this.favouriteColour = favouriteColour;
-
}
-
-
-
+
public char getSex() {
-
return sex;
-
}
-
-
public void setSex(char sex) {
-
this.sex = sex;
-
}
-
-
public Preferences getPreferences() {
-
return preferences;
-
}
-
-
public void setPreferences(Preferences preferences) {
-
this.preferences = preferences;
-
}
-
-
- public List getSkills() {
-
+ public List<String> getSkills() {
return skills;
-
}
-
-
-
- public void setSkills(List skills) {
-
+
+ public void setSkills(List<String> skills) {
this.skills = skills;
-
}
-
-
public String getPassword() {
-
return password;
-
}
-
-
-
+
public void setPassword(String password) {
-
this.password = password;
-
}
-
-
public String getSecretWord() {
-
return secretWord;
-
}
-
-
public void setSecretWord(String secretWord) {
-
this.secretWord = secretWord;
-
}
-
-
-
-
public Object clone() throws CloneNotSupportedException {
-
return super.clone();
-
}
-
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/StubUserManager.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/StubUserManager.java
index a0bee88..2e6832a 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/StubUserManager.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/StubUserManager.java
@@ -8,12 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.service;
-
-
-
import org.eclipse.virgo.samples.formtags.war.domain.Country;
import org.eclipse.virgo.samples.formtags.war.domain.User;
@@ -21,246 +17,119 @@ import org.eclipse.virgo.samples.formtags.war.domain.User;
import java.util.*;
-
-
/**
-
* Stub {@link UserManager} implementation that maintains simple
-
* in-memory state for users and countries.
-
*
-
-
*/
-
public class StubUserManager implements UserManager {
+ private Map<Integer, User> users = new TreeMap<Integer, User>();
-
-
-
- private Map users = new TreeMap();
-
- private Map countries = new TreeMap();
-
-
-
-
+ private Map<String, Country> countries = new TreeMap<String, Country>();
/**
-
* Creates a new instance of the {@link StubUserManager} class.
-
*/
-
public StubUserManager() {
-
loadCountries();
-
loadUsers();
-
}
-
-
-
-
public void save(User user) {
-
// passed in should be a clone - simply replace
-
putUser(user);
-
}
-
-
- public Collection findAllCountries() {
-
+ public Collection<Country> findAllCountries() {
return this.countries.values();
-
}
-
-
public Country findCountry(String code) {
-
return (Country) this.countries.get(code);
-
}
-
-
public User findById(Integer id) {
-
User user = (User) this.users.get(id);
-
-
if (user != null) {
-
return cloneUser(user);
-
}
-
-
return null;
-
}
-
-
- public Collection findAll() {
-
- List userList = new ArrayList();
-
- Iterator itr = this.users.values().iterator();
-
+ public Collection<User> findAll() {
+ List<User> userList = new ArrayList<User>();
+ Iterator<User> itr = this.users.values().iterator();
while (itr.hasNext()) {
-
- User user = (User) itr.next();
-
- userList.add(cloneUser(user));
-
+ userList.add(cloneUser(itr.next()));
}
-
return userList;
-
}
-
-
-
-
private void loadCountries() {
-
putCountry(new Country("AT", "Austria"));
-
putCountry(new Country("UK", "United Kingdom"));
-
putCountry(new Country("US", "United States"));
-
}
-
-
private void loadUsers() {
-
User u = new User();
-
u.setId(new Integer(1));
-
u.setFirstName("Harry");
-
u.setLastName("Potter");
-
u.setNotes("Promising Wizard...");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.getPreferences().setReceiveNewsletter(true);
-
u.getPreferences().setInterests(new String[]{"Quidditch"});
-
u.getPreferences().setFavouriteWord("Magic");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(2));
-
u.setFirstName("Ronald");
-
u.setLastName("Weasly");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('M');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
-
u = new User();
-
u.setId(new Integer(3));
-
u.setFirstName("Hermione");
-
u.setLastName("Granger");
-
u.setNotes("Friends with Harry Potter.");
-
u.setCountry(findCountry("UK"));
-
u.setSex('F');
-
u.setHouse("Gryffindor");
-
u.setPassword("password");
-
-
putUser(u);
-
}
-
-
private void putUser(User user) {
-
this.users.put(user.getId(), user);
-
}
-
-
private void putCountry(Country country) {
-
this.countries.put(country.getCode(), country);
-
}
-
-
private User cloneUser(User user) {
-
try {
-
return (User) user.clone();
-
}
-
catch (CloneNotSupportedException e) {
-
throw new IllegalStateException("Unable to clone user.");
-
}
-
}
-
-
-
+
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/UserManager.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/UserManager.java
index 7ce1df0..3cb38c9 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/UserManager.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/service/UserManager.java
@@ -8,105 +8,53 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.service;
-
-
-
import org.eclipse.virgo.samples.formtags.war.domain.Country;
import org.eclipse.virgo.samples.formtags.war.domain.User;
-
-
import java.util.Collection;
-
-
/**
-
* Central service interface for the application.
-
*
-
-
*/
-
public interface UserManager {
-
-
/**
-
* Finds all of the {@link User Users} in the system.
-
*
-
* @return a {@link Collection} of all of the {@link User Users} in the system.
-
*/
-
- Collection findAll();
-
-
+ Collection<User> findAll();
/**
-
* Finds the specific {@link User} identified by the supplied <code>id</code>.
-
*
-
* @param id the value uniquely identifying a {@link User}
-
* @return the located {@link User} or <code>null</code> if not found
-
*/
-
User findById(Integer id);
-
-
/**
-
* Saves the supplied {@link User} to persistent storage.
-
*
-
* @param user the {@link User} to be so saved
-
*/
-
void save(User user);
-
-
/**
-
* Finds all of the {@link Country Countries} in the system.
-
*
-
* @return all of the {@link Country Countries} in the system
-
*/
-
- Collection findAllCountries();
-
-
+ Collection<Country> findAllCountries();
/**
-
* Finds the specific {@link Country} identified by the supplied (country) <code>code</code>.
-
*
-
* @param code the country code to be used to locate a specific {@link Country}
-
* @return the specific {@link Country} identified by the supplied (country) <code>code</code>
-
*/
-
Country findCountry(String code);
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/CountryValidator.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/CountryValidator.java
index 878f1a0..78320b3 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/CountryValidator.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/CountryValidator.java
@@ -8,81 +8,37 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.validation;
-
-
import org.eclipse.virgo.samples.formtags.war.domain.Country;
-
import org.springframework.util.StringUtils;
-
import org.springframework.validation.Errors;
-
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link Country} instances.
-
*
-
-
*/
-
public class CountryValidator implements Validator {
-
-
-
-
public static final String DEFAULT_BAD_PLACEHOLDER_CODE = "-";
-
-
-
-
private String badPlaceholderCode = DEFAULT_BAD_PLACEHOLDER_CODE;
-
-
-
-
public void setBadPlaceholderCode(String badPlaceholderCode) {
-
this.badPlaceholderCode = StringUtils.hasText(badPlaceholderCode)
-
? badPlaceholderCode : DEFAULT_BAD_PLACEHOLDER_CODE;
-
}
-
-
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return Country.class.isAssignableFrom(candidate);
-
}
-
-
-
+
public void validate(Object object, Errors errors) {
-
Country country = (Country) object;
-
if (country.getCode() == this.badPlaceholderCode) {
-
errors.rejectValue("bad.country.selected", "Please select a valid country");
-
}
-
}
-
-
-
+
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/UserValidator.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/UserValidator.java
index 567b956..aef74f8 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/UserValidator.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/validation/UserValidator.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.validation;
-
-
import org.eclipse.virgo.samples.formtags.war.domain.User;
import org.springframework.validation.Errors;
@@ -21,38 +18,19 @@ import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
-
-
/**
-
* Simple {@link Validator} implementation for {@link User} instances.
-
*
-
-
*/
-
public class UserValidator implements Validator {
-
-
- public boolean supports(Class candidate) {
-
+ public boolean supports(Class<?> candidate) {
return User.class.isAssignableFrom(candidate);
-
}
-
-
public void validate(Object obj, Errors errors) {
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "firstName", "required", "Field is required.");
-
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lastName", "required", "Field is required.");
-
}
-
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/CountryEditor.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/CountryEditor.java
index f883d40..ae65cc7 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/CountryEditor.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/CountryEditor.java
@@ -8,12 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.web;
-
-
-
import org.eclipse.virgo.samples.formtags.war.domain.Country;
import org.eclipse.virgo.samples.formtags.war.service.UserManager;
@@ -21,68 +17,32 @@ import org.eclipse.virgo.samples.formtags.war.service.UserManager;
import java.beans.PropertyEditorSupport;
-
-
/**
-
* Simple {@link java.beans.PropertyEditor} for the {@link org.eclipse.virgo.samples.formtags.war.domain.Country} class.
-
*
-
-
*/
-
public class CountryEditor extends PropertyEditorSupport {
-
-
private UserManager userManager;
-
-
-
-
/**
-
* Creates a new instance of the {@link org.eclipse.virgo.samples.formtags.war.web.CountryEditor} class.
-
*
-
* @param userManager the service object that is to be used to resolve country codes
-
*/
-
public CountryEditor(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
public void setAsText(String text) throws IllegalArgumentException {
-
setValue(this.userManager.findCountry(text));
-
}
-
-
public String getAsText() {
-
if (getValue() == null) {
-
return "";
-
}
-
return ((Country) getValue()).getCode();
-
}
-
-
-
+
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java
index e194c05..a618e38 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.web;
-
-
import org.springframework.core.enums.StaticLabeledEnumResolver;
@@ -41,118 +38,55 @@ import java.beans.PropertyEditorSupport;
import java.util.Map;
-
-
/**
-
* The central form controller for this showcase application.
-
*
-
-
*/
-
public class FormController extends SimpleFormController {
-
-
private UserManager userManager;
-
-
-
-
/**
-
* Sets the {@link UserManager} to which this presentation component
-
* delegates in order to perform complex business logic.
-
* @param userManager the {@link UserManager} to which this presentation
-
* component delegatesin order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
-
binder.registerCustomEditor(Country.class, new CountryEditor(this.userManager));
-
binder.registerCustomEditor(Colour.class, new PropertyEditorSupport() {
-
public void setAsText(String string) throws IllegalArgumentException {
-
Short code = new Short(string);
-
StaticLabeledEnumResolver resolver = new StaticLabeledEnumResolver();
-
setValue(resolver.getLabeledEnumByCode(Colour.class, code));
-
}
-
});
-
}
-
-
- protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
-
+ protected Map<?, ?> referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception {
return new ModelMap(this.userManager.findAllCountries())
-
- .addObject("skills", getSkills())
-
- .addObject(this.userManager.findAll());
-
+ .addAttribute("skills", getSkills())
+ .addAttribute(this.userManager.findAll());
}
-
-
protected Object formBackingObject(HttpServletRequest request) throws Exception {
-
int id = ServletRequestUtils.getRequiredIntParameter(request, "id");
-
return this.userManager.findById(new Integer(id));
-
}
-
-
protected void doSubmitAction(Object managedResource) throws Exception {
-
this.userManager.save((User) managedResource);
-
}
-
-
-
-
private String[] getSkills() {
-
return new String[]{
-
"Potions",
-
"Herbology",
-
"Quidditch"
-
};
-
}
-
-
-
}
-
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/ListController.java b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/ListController.java
index da82dab..6d1f283 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/ListController.java
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/ListController.java
@@ -8,11 +8,8 @@
* Contributors:
* VMware Inc. - initial contribution
*******************************************************************************/
-
package org.eclipse.virgo.samples.formtags.war.web;
-
-
import org.eclipse.virgo.samples.formtags.war.service.UserManager;
import org.springframework.web.servlet.ModelAndView;
@@ -25,74 +22,35 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-
/**
-
* Simple {@link org.springframework.web.servlet.mvc.Controller} implementation
-
* that pretty much locates (and thus allows a {@link org.springframework.web.servlet.View}
-
* to render a list) of all of the {@link org.eclipse.virgo.samples.formtags.war.domain.User Users}
-
* in the application.
-
*
-
-
*/
-
public class ListController extends AbstractController {
-
-
-
-
private UserManager userManager;
private String viewName;
-
-
public void setViewName(String viewName) {
-
this.viewName = viewName;
-
}
-
-
/**
-
* Sets the {@link UserManager} that to which this presentation component delegates
-
* in order to perform complex business logic.
-
*
-
* @param userManager the {@link UserManager} that to which this presentation component delegates
-
* in order to perform complex business logic
-
*/
-
public void setUserManager(UserManager userManager) {
-
this.userManager = userManager;
-
}
-
-
-
-
-
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
-
return new ModelAndView(viewName).addObject(this.userManager.findAll());
-
}
-
-
}
-
diff --git a/greenpages/greenpages.core/src/main/resources/META-INF/MANIFEST.MF b/greenpages/greenpages.core/src/main/resources/META-INF/MANIFEST.MF
index 1ccf5e4..f1eaecf 100644
--- a/greenpages/greenpages.core/src/main/resources/META-INF/MANIFEST.MF
+++ b/greenpages/greenpages.core/src/main/resources/META-INF/MANIFEST.MF
@@ -6,4 +6,5 @@ Tool: Bundlor 1.1.0.RELEASE
Bundle-Name: GreenPages Service
Bundle-ManifestVersion: 2
Bundle-SymbolicName: greenpages.core
+Import-Package: org.springframework.stereotype;version="[3.0, 3.5)"
diff --git a/greenpages/greenpages.jpa/src/main/resources/META-INF/MANIFEST.MF b/greenpages/greenpages.jpa/src/main/resources/META-INF/MANIFEST.MF
index 94bab51..db59c6d 100644
--- a/greenpages/greenpages.jpa/src/main/resources/META-INF/MANIFEST.MF
+++ b/greenpages/greenpages.jpa/src/main/resources/META-INF/MANIFEST.MF
@@ -10,9 +10,12 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: greenpages.jpa
Import-Package: greenpages;version="[2.5, 2.6)",javax.persistence;vers
ion="[1, 1]",javax.sql;version="0",org.apache.commons.dbcp;version="[
- 1.2.2.osgi, 1.2.2.osgi]",org.springframework.context.weaving;version=
- "[3.0, 3.5)",org.springframework.dao.annotation;version="[3.0, 3.5)",
- org.springframework.orm.jpa;version="[3.0, 3.5)",org.springframework.
- orm.jpa.vendor;version="[3.0, 3.5)",org.springframework.transaction.a
- spectj;version="[3.0, 3.5)"
+ 1.2.2.osgi, 1.2.2.osgi]",org.springframework.beans.factory.annotation
+ ;version="[3.0, 3.5)",org.springframework.context.weaving;version="[3
+ .0, 3.5)",org.springframework.core.io;version="[3.0, 3.5)",org.spring
+ framework.dao.annotation;version="[3.0, 3.5)",org.springframework.orm
+ .jpa;version="[3.0, 3.5)",org.springframework.orm.jpa.vendor;version=
+ "[3.0, 3.5)",org.springframework.stereotype;version="[3.0, 3.5)",org.
+ springframework.transaction.annotation;version="[3.0, 3.5)",org.sprin
+ gframework.transaction.aspectj;version="[3.0, 3.5)"
diff --git a/greenpages/greenpages.web/src/test/resources/META-INF/MANIFEST.MF b/greenpages/greenpages.web/src/test/resources/META-INF/MANIFEST.MF
index cee7b17..8cd3df4 100644
--- a/greenpages/greenpages.web/src/test/resources/META-INF/MANIFEST.MF
+++ b/greenpages/greenpages.web/src/test/resources/META-INF/MANIFEST.MF
@@ -9,8 +9,15 @@ Import-Library: org.springframework.spring;version="[3.0, 3.5)"
Bundle-ManifestVersion: 2
Bundle-SymbolicName: greenpages.web
Web-ContextPath: greenpages
-Import-Package: freemarker.cache;version="[2.3.18,2.3.18]",javax.servl
- et;version="[3.0.0, 3.1.0)",javax.servlet.jsp.jstl.core;version="[1.2
- .0, 2.0.0)",javax.sql,org.apache.commons.dbcp,org.eclipse.virgo.web.d
- m;version="[3.0.0, 4.0.0)"
+Import-Package: freemarker.cache;version="[2.3.18,2.3.18]",greenpages;
+ version="[2.5, 2.6)",javax.servlet;version="[3.0.0, 3.1.0)",javax.ser
+ vlet.jsp.jstl.core;version="[1.2.0, 2.0.0)",javax.sql,org.apache.comm
+ ons.dbcp,org.eclipse.virgo.web.dm;version="[3.0.0, 4.0.0)",org.spring
+ framework.beans.factory.annotation;version="[3.0, 3.5)",org.springfra
+ mework.core.io;version="[3.0, 3.5)",org.springframework.stereotype;ve
+ rsion="[3.0, 3.5)",org.springframework.web.bind.annotation;version="[
+ 3.0, 3.5)",org.springframework.web.context;version="[3.0, 3.5)",org.s
+ pringframework.web.servlet;version="[3.0, 3.5)",org.springframework.w
+ eb.servlet.mvc.annotation;version="[3.0, 3.5)",org.springframework.we
+ b.servlet.view.freemarker;version="[3.0, 3.5)"
diff --git a/greenpages/greenpages/pom.xml b/greenpages/greenpages/pom.xml
index 5e2cb7a..7392b02 100644
--- a/greenpages/greenpages/pom.xml
+++ b/greenpages/greenpages/pom.xml
@@ -80,6 +80,43 @@
</executions>
</plugin>
</plugins>
- </build>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-dependency-plugin
+ </artifactId>
+ <versionRange>
+ [2.1,)
+ </versionRange>
+ <goals>
+ <goal>
+ copy-dependencies
+ </goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
diff --git a/no-spring-web/.classpath b/no-spring-web/.classpath
new file mode 100644
index 0000000..930e51d
--- /dev/null
+++ b/no-spring-web/.classpath
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java">
+ <attributes>
+ <attribute name="org.eclipse.virgo.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/resources">
+ <attributes>
+ <attribute name="org.eclipse.virgo.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="org.eclipse.virgo.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">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="APPS_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.nondependency" value=""/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="APPS_IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/APPS_IVY_CACHE/javax.servlet/javax.servlet/3.0.0.v201103241009/javax.servlet-sources-3.0.0.v201103241009.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/no-spring-web/.project b/no-spring-web/.project
new file mode 100644
index 0000000..aa0b90e
--- /dev/null
+++ b/no-spring-web/.project
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.samples.no.spring</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>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.virgo.ide.bundlor.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <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>
+ <nature>org.eclipse.virgo.ide.facet.core.bundlenature</nature>
+ </natures>
+</projectDescription>
diff --git a/no-spring-web/.settings/.jsdtscope b/no-spring-web/.settings/.jsdtscope
new file mode 100644
index 0000000..5d8de19
--- /dev/null
+++ b/no-spring-web/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?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/no-spring-web/.settings/org.eclipse.jdt.core.prefs b/no-spring-web/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..c281ea4
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Aug 12 09:58:53 BST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/no-spring-web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs b/no-spring-web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
new file mode 100644
index 0000000..a427da3
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.virgo.ide.bundlor.core.prefs
@@ -0,0 +1,2 @@
+org.eclipse.virgo.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
+eclipse.preferences.version=1 \ No newline at end of file
diff --git a/no-spring-web/.settings/org.eclipse.wst.common.component b/no-spring-web/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..4f3ad83
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="com.springsource.server.splash">
+<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/main/resources"/>
+<property name="context-root" value=""/>
+<property name="java-output-path" value="/target/classes"/>
+</wb-module>
+</project-modules>
diff --git a/no-spring-web/.settings/org.eclipse.wst.common.project.facet.core.xml b/no-spring-web/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..6e25134
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
+<?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="jst.java" version="6.0"/>
+ <installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
+</faceted-project>
diff --git a/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.container b/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.name b/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/no-spring-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/no-spring-web/.settings/org.springframework.ide.eclipse.core.prefs b/no-spring-web/.settings/org.springframework.ide.eclipse.core.prefs
new file mode 100644
index 0000000..785f1a6
--- /dev/null
+++ b/no-spring-web/.settings/org.springframework.ide.eclipse.core.prefs
@@ -0,0 +1,63 @@
+#Wed Jun 22 16:08:40 IST 2011
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true
+org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true
+org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=false
+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.com.springsource.sts.bestpractices.beansvalidator=false
+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.enable.org.springframework.ide.eclipse.webflow.core.validator=true
+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.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false
+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
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
diff --git a/no-spring-web/build.xml b/no-spring-web/build.xml
new file mode 100644
index 0000000..a99f3b7
--- /dev/null
+++ b/no-spring-web/build.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.virgo.samples.no.spring">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/wab/default.xml"/>
+
+ <target name="deploy">
+
+ <copy file="${jar.output.file}" todir="../server-1-kernel/pickup" />
+ <copy file="${jar.output.file}" todir="../server-2-tomcat/pickup" />
+ <copy file="${jar.output.file}" todir="../server-3-tomcat/pickup" />
+ <copy file="${jar.output.file}" todir="../server-4-jetty/pickup" />
+
+ </target>
+
+</project>
diff --git a/no-spring-web/ivy.xml b/no-spring-web/ivy.xml
new file mode 100644
index 0000000..29ec7fd
--- /dev/null
+++ b/no-spring-web/ivy.xml
@@ -0,0 +1,28 @@
+<?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-RUNTIME =========================================== -->
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="org.slf4j.api" rev="${org.slf4j.api}" conf="provided->runtime"/>
+ <!-- === TEST ====================================================== -->
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/ContentServlet.java b/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/ContentServlet.java
new file mode 100644
index 0000000..2da0dbd
--- /dev/null
+++ b/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/ContentServlet.java
@@ -0,0 +1,234 @@
+/*
+ * Copyright 2004-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.eclipse.virgo.apps.splash;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Scanner;
+import java.util.Set;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Special servlet to load static resources and render the admin HTML pages
+ *
+ * @author Jeremy Grelle
+ * @author Scott Andrews
+ * @author Christopher Frost
+ */
+public class ContentServlet extends HttpServlet {
+
+ private static final Logger log = LoggerFactory.getLogger(ContentServlet.class);
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String HTTP_CONTENT_LENGTH_HEADER = "Content-Length";
+
+ private static final String HTTP_LAST_MODIFIED_HEADER = "Last-Modified";
+
+ private static final String HTTP_EXPIRES_HEADER = "Expires";
+
+ private static final String HTTP_CACHE_CONTROL_HEADER = "Cache-Control";
+
+ private static final String PATH_TO_VERSION_FILE = "lib/.version";
+
+ private static final String VERSION_HOLDER = "<!--@<version@-->";
+
+ private String view = "/WEB-INF/splash.html";
+
+ private boolean gzipEnabled = true;
+
+ private final String version;
+
+ private int cacheTimeout = 60; //The number of seconds content should be cached by the client. Zero disables caching, 31556926 is one year.
+
+ private Map<String, String> defaultMimeTypes = new HashMap<String, String>();
+ {
+ defaultMimeTypes.put(".html", "text/html");
+ defaultMimeTypes.put(".htm", "text/html");
+ defaultMimeTypes.put(".xhtml", "text/html");
+ }
+
+ private Set<String> compressedMimeTypes = new HashSet<String>();
+ {
+ compressedMimeTypes.add("text/.*");
+ compressedMimeTypes.add(".*/xhtml.xml");
+ }
+
+ public ContentServlet() {
+ this.version = readServerVersion();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ URL resource = getRequestedContentURL(this.view);
+ prepareContentResponse(response, resource);
+ PrintWriter out = selectOutputStream(request, response);
+ try {
+ URLConnection resourceConn = resource.openConnection();
+ InputStream in = resourceConn.getInputStream();
+ try {
+ this.parse(in, out);
+ } finally {
+ in.close();
+ }
+ } finally {
+ out.close();
+ }
+ }
+
+ private void parse(InputStream in, PrintWriter out) {
+ Scanner scanner = new Scanner(in);
+ String parsedLine;
+ while (scanner.hasNextLine()) {
+ parsedLine = parseLine(scanner.nextLine());
+ if(parsedLine != null && !parsedLine.trim().isEmpty()){
+ out.append(parsedLine);
+ out.append('\n');
+ }
+ }
+ }
+
+ private String parseLine(String line) {
+ if(line.contains(VERSION_HOLDER)){
+ int offset = line.indexOf(VERSION_HOLDER);
+ line = String.format("%s%s%s", line.substring(0, offset), this.version, line.substring(offset + VERSION_HOLDER.length()));
+ }
+ return line;
+ }
+
+ private PrintWriter selectOutputStream(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ String acceptEncoding = request.getHeader("Accept-Encoding");
+ String mimeType = response.getContentType();
+ if (gzipEnabled &&
+ acceptEncoding != null &&
+ acceptEncoding.indexOf("gzip") > -1 &&
+ matchesCompressedMimeTypes(mimeType)) {
+ log.debug("Enabling GZIP compression for the current response.");
+ return new PrintWriter(new GZIPResponseStream(response));
+ } else {
+ return response.getWriter();
+ }
+ }
+
+ private boolean matchesCompressedMimeTypes(String mimeType) {
+ for(String compressedMimeType: compressedMimeTypes){
+ if(mimeType.matches(compressedMimeType)){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void prepareContentResponse(HttpServletResponse response, URL resource) throws IOException {
+ URLConnection resourceConn = resource.openConnection();
+ String mimeType = getServletContext().getMimeType(resource.getPath());
+ if (mimeType == null) {
+ String extension = resource.getPath().substring(resource.getPath().lastIndexOf('.'));
+ mimeType = (String) defaultMimeTypes.get(extension);
+ }
+ response.setContentType(mimeType);
+ response.setHeader(HTTP_CONTENT_LENGTH_HEADER, Long.toString(resourceConn.getContentLength()));
+ response.setDateHeader(HTTP_LAST_MODIFIED_HEADER, resourceConn.getLastModified());
+ if (cacheTimeout > 0) {
+ configureCaching(response, cacheTimeout);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected long getLastModified(HttpServletRequest request) {
+ String rawRequestPath = request.getPathInfo();
+ if (log.isDebugEnabled()) {
+ log.debug("Checking last modified of content: " + rawRequestPath);
+ }
+ URL resource;
+ try {
+ resource = getRequestedContentURL(rawRequestPath);
+ } catch (MalformedURLException e) {
+ return -1;
+ }
+ if (resource == null) {
+ return -1;
+ }
+ try {
+ return resource.openConnection().getLastModified();
+ } catch (IOException e) {
+ return -1;
+ }
+ }
+
+ private URL getRequestedContentURL(String rawRequestPath) throws MalformedURLException {
+ URL resource = getServletContext().getResource(rawRequestPath);
+ if (resource == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Content not found: " + rawRequestPath);
+ }
+ }
+ return resource;
+ }
+
+ /**
+ * Set HTTP headers to allow caching for the given number of seconds.
+ * @param seconds number of seconds into the future that the response should be cacheable for
+ */
+ private void configureCaching(HttpServletResponse response, int seconds) {
+ response.setDateHeader(HTTP_EXPIRES_HEADER, System.currentTimeMillis() + seconds * 1000L); // HTTP 1.0 header
+ response.setHeader(HTTP_CACHE_CONTROL_HEADER, "max-age=" + seconds);// HTTP 1.1 header
+ }
+
+ private String readServerVersion(){
+ String readVersion;
+ File versionFile = new File(PATH_TO_VERSION_FILE);
+ 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/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/GZIPResponseStream.java b/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/GZIPResponseStream.java
new file mode 100644
index 0000000..11ea83b
--- /dev/null
+++ b/no-spring-web/src/main/java/org/eclipse/virgo/apps/splash/GZIPResponseStream.java
@@ -0,0 +1,72 @@
+package org.eclipse.virgo.apps.splash;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+
+public class GZIPResponseStream extends ServletOutputStream {
+
+ private ByteArrayOutputStream byteStream = null;
+
+ private GZIPOutputStream gzipStream = null;
+
+ private boolean closed = false;
+
+ private HttpServletResponse response = null;
+
+ private ServletOutputStream servletStream = null;
+
+ public GZIPResponseStream(HttpServletResponse response) throws IOException {
+ super();
+ closed = false;
+ this.response = response;
+ this.servletStream = response.getOutputStream();
+ byteStream = new ByteArrayOutputStream();
+ gzipStream = new GZIPOutputStream(byteStream);
+ }
+
+ public void close() throws IOException {
+ if (closed) {
+ throw new IOException("This output stream has already been closed");
+ }
+ gzipStream.finish();
+
+ byte[] bytes = byteStream.toByteArray();
+
+ response.setContentLength(bytes.length);
+ response.addHeader("Content-Encoding", "gzip");
+ servletStream.write(bytes);
+ servletStream.flush();
+ servletStream.close();
+ closed = true;
+ }
+
+ public void flush() throws IOException {
+ if (closed) {
+ throw new IOException("Cannot flush a closed output stream");
+ }
+ gzipStream.flush();
+ }
+
+ public void write(int b) throws IOException {
+ if (closed) {
+ throw new IOException("Cannot write to a closed output stream");
+ }
+ gzipStream.write((byte) b);
+ }
+
+ public void write(byte b[]) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ public void write(byte b[], int off, int len) throws IOException {
+ if (closed) {
+ throw new IOException("Cannot write to a closed output stream");
+ }
+ gzipStream.write(b, off, len);
+ }
+
+} \ No newline at end of file
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/src/test/resources/.gitignore b/no-spring-web/src/main/resources/.gitignore
index e69de29..e69de29 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/src/test/resources/.gitignore
+++ b/no-spring-web/src/main/resources/.gitignore
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/java/.gitignore b/no-spring-web/src/main/webapp/META-INF/.gitignore
index e69de29..e69de29 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/java/.gitignore
+++ b/no-spring-web/src/main/webapp/META-INF/.gitignore
diff --git a/no-spring-web/src/main/webapp/META-INF/MANIFEST.MF b/no-spring-web/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8e74ce9
--- /dev/null
+++ b/no-spring-web/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ClassPath: WEB-INF/classes
+Bundle-Version: 3.5.0
+Tool: Bundlor 1.1.0.BUILD-20101220120024
+Bundle-Name: Splash Screen
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.virgo.apps.splash
+Web-ContextPath: /
+Import-Package: org.eclipse.virgo.apps.splash
+
diff --git a/no-spring-web/src/main/webapp/WEB-INF/splash.html b/no-spring-web/src/main/webapp/WEB-INF/splash.html
new file mode 100644
index 0000000..c7f0da3
--- /dev/null
+++ b/no-spring-web/src/main/webapp/WEB-INF/splash.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="en">
+
+ <head>
+ <title>Virgo Splash Screen</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+ <link rel="shortcut icon" href="images/favicon.ico" />
+ <link rel="stylesheet" href="styles/main.css" type="text/css" />
+ <link rel="stylesheet" href="styles/print.css" type="text/css" media="print" />
+ </head>
+
+ <body class="main">
+ <div id="page">
+ <div id="mini-header">
+ <div id="mini-header-left"></div>
+ <div id="mini-header-right"></div>
+ </div> <!-- /mini-header -->
+
+ <div id="primary-navigation">
+ <div id="primary-left">
+
+ </div>
+ <div id="left-cap"></div>
+ <div id="primary-right">
+ <ul>
+ <li><a href="/admin" title="Admin Console">Admin Console</a></li>
+ </ul>
+ </div>
+ <div id="right-cap"></div>
+ </div><!-- /primary-navigation -->
+
+ <div id="container">
+ <div id="content-no-nav">
+
+ <div id="splash-container"><img class="splash" src="images/server-splash.png" alt="EclipseRT Virgo Server" />
+ <div id="version-text"><!--@<version@--></div>
+ </div>
+
+ <h1>Welcome</h1>
+ <p>
+ Congratulations on installing the Virgo Server.
+ From this splash page you can access the web-based <a href="/admin" title="Admin Console">admin console</a>.
+ </p>
+
+ <h1>Documentation</h1>
+ <p>
+ Documentation is available on-line for the server and related products.
+ </p>
+ <ul>
+ <li><a href="http://www.eclipse.org/virgo/documentation" target="_blank" title="Virgo Server - Documentation">Virgo Server - Documentation</a>.</li>
+ <li><a href="http://www.springsource.org/documentation" 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>
+ </div><!-- /content -->
+ </div><!-- /container -->
+
+ <div id="footer-wrapper">
+ <div id="footer-left">&#169; Copyright 2008, 2011 VMware Inc. Licensed under the Eclipse Public License v1.0.</div>
+
+ <div id="footer-right"></div>
+ </div>
+
+ </div> <!-- /page-->
+
+ </body>
+</html>
diff --git a/no-spring-web/src/main/webapp/WEB-INF/web.xml b/no-spring-web/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..c71acd3
--- /dev/null
+++ b/no-spring-web/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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>Virgo Splash Screen</display-name>
+ <description>Virgo Server - Splash Screen</description>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>content</servlet-name>
+ <servlet-class>org.eclipse.virgo.apps.splash.ContentServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>content</servlet-name>
+ <url-pattern>/splash/*</url-pattern>
+ </servlet-mapping>
+</web-app> \ No newline at end of file
diff --git a/no-spring-web/src/main/webapp/images/favicon.ico b/no-spring-web/src/main/webapp/images/favicon.ico
new file mode 100755
index 0000000..e963685
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/favicon.ico
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/footer-left.png b/no-spring-web/src/main/webapp/images/footer-left.png
new file mode 100644
index 0000000..8bfe3b1
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/footer-left.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/footer-right.png b/no-spring-web/src/main/webapp/images/footer-right.png
new file mode 100644
index 0000000..51527ad
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/footer-right.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/footer-stretch.png b/no-spring-web/src/main/webapp/images/footer-stretch.png
new file mode 100644
index 0000000..c58f721
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/footer-stretch.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/header-left.png b/no-spring-web/src/main/webapp/images/header-left.png
new file mode 100644
index 0000000..4920a0a
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/header-left.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/header-right.png b/no-spring-web/src/main/webapp/images/header-right.png
new file mode 100644
index 0000000..09b0a59
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/header-right.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/menu-curve-left.png b/no-spring-web/src/main/webapp/images/menu-curve-left.png
new file mode 100644
index 0000000..c48a2e0
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/menu-curve-left.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/menu-curve-right.png b/no-spring-web/src/main/webapp/images/menu-curve-right.png
new file mode 100644
index 0000000..1f3b100
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/menu-curve-right.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/menu-stretch.png b/no-spring-web/src/main/webapp/images/menu-stretch.png
new file mode 100644
index 0000000..0ca66f7
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/menu-stretch.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/mini-header-left.png b/no-spring-web/src/main/webapp/images/mini-header-left.png
new file mode 100644
index 0000000..72551e7
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/mini-header-left.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/mini-header-right.png b/no-spring-web/src/main/webapp/images/mini-header-right.png
new file mode 100644
index 0000000..8aaf50c
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/mini-header-right.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/images/server-splash.png b/no-spring-web/src/main/webapp/images/server-splash.png
new file mode 100644
index 0000000..f8fe1f9
--- /dev/null
+++ b/no-spring-web/src/main/webapp/images/server-splash.png
Binary files differ
diff --git a/no-spring-web/src/main/webapp/index.html b/no-spring-web/src/main/webapp/index.html
new file mode 100644
index 0000000..3f1e743
--- /dev/null
+++ b/no-spring-web/src/main/webapp/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Virgo Splash Screen</title>
+ <meta http-equiv="REFRESH" content="0;url=/splash">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="shortcut icon" href="images/favicon.ico" />
+ </head>
+ <body>
+ <!-- No loading msg -->
+ </body>
+</html> \ No newline at end of file
diff --git a/no-spring-web/src/main/webapp/styles/main.css b/no-spring-web/src/main/webapp/styles/main.css
new file mode 100644
index 0000000..78e2927
--- /dev/null
+++ b/no-spring-web/src/main/webapp/styles/main.css
@@ -0,0 +1,223 @@
+/*
+ * Local style information for the Virgo Splash Screen
+ *
+ * Contains both style and colour information.
+ *
+ * Christopher Frost - March 2010
+ *
+ */
+
+body {
+ font: 12px Helvetica, Arial, "Bitstream Vera Sans", sans-serif;
+ background-color: #dfdfdf;
+}
+
+#page {
+ margin: auto;
+ width: 800px;
+ color: #333;
+}
+
+/*
+ * TEXT FORMATTING STYLES
+ */
+h1 {
+ font-size: 1.4em;
+ padding: 12px 0 5px 0;
+ line-height: 125%;
+ color: #002E62;
+ border-bottom: 1px solid #BAD9EC;
+}
+
+h2 {
+ font-size: 1.2em;
+ padding: 10px 0 2px 0;
+ color: #002E62;
+}
+
+/*
+ * LINK STYLES
+ */
+
+a:link, a:visited {
+ color: #333;
+ text-decoration: underline;
+}
+
+a:hover, a:focus {
+ color: #0093CF;
+ text-decoration: underline;
+}
+
+a:active, a.active {
+ color: #0093CF;
+}
+
+/*
+ * MENU STYLES
+ */
+#primary-navigation {
+ background: #fff url(../images/menu-stretch.png) repeat-x scroll 0 0;
+ height:29px;
+ margin:0;
+ padding:0;
+ position: relative;
+}
+
+#primary-left {
+ background: #002E62;
+ float: left;
+ height: 26px;
+ line-height: normal;
+ padding: 3px 0 0;
+ position: relative;
+}
+
+#primary-right {
+ background: #002E62;
+ float: right;
+ height: 26px;
+ line-height: normal;
+ padding: 3px 0 0;
+ position: relative;
+}
+
+#primary-left ul, #primary-right ul {
+ padding: 0 4px 0 4px;
+ margin: 2px 0 0 0;
+ list-style: none;
+}
+
+#primary-left li, #primary-right li {
+ display: inline;
+}
+
+#primary-left a, #primary-right a {
+ color: #ffffff;
+ display: block;
+ float: left;
+ font-weight:normal;
+ margin: 0 1px 0 1px;
+ padding: 7px 8px 4px 10px;
+ text-decoration: none;
+}
+
+#primary-left a:hover, #primary-right a:hover, .selected-menu {
+ background: #ffffff;
+ color:#002E62;
+ text-decoration: none;
+}
+
+#left-cap {
+ background: transparent url(../images/menu-curve-left.png) no-repeat top left;
+ height: 29px;
+ width: 30px;
+ float: left;
+}
+
+#right-cap {
+ background: transparent url(../images/menu-curve-right.png) no-repeat top right;
+ height: 29px;
+ width: 30px;
+ float: right;
+}
+
+/*
+ * CONTAINER STYLES
+ */
+#content-no-nav {
+ display: block;
+ margin: 0px 22px 20px 22px;
+ padding: 0;
+}
+
+#container {
+ margin: 0;
+ padding-bottom: 20px;
+ overflow:hidden;
+ background:#fff;
+}
+
+/*
+ * FOOTER STYLES
+ */
+#footer-wrapper {
+ clear: both;
+ margin: 0;
+ background-image: url(../images/footer-stretch.png);
+ background-repeat: repeat-x;
+ height: 29px;
+ width: 100%;
+}
+
+#footer-left, #footer-right {
+ margin: 0;
+ font-size: 85%;
+ padding: 1em;
+ height: 29px;
+ color: #bbb;
+}
+
+#footer-left {
+ text-align: left;
+ background-image: url(../images/footer-left.png);
+ background-repeat: no-repeat;
+ position: relative;
+ left: 0;
+ float: left;
+}
+
+#footer-right {
+ text-align: right;
+ background-image: url(../images/footer-right.png);
+ background-repeat: no-repeat;
+ background-position: top right;
+ position: relative;
+ right: 0;
+ float: right;
+}
+
+#footer-left a, #footer-right a {
+ color: #999;
+ text-decoration:none;
+}
+
+#mini-header, #mini-header-left, #mini-header-right {
+ height: 7px;
+ width: 7px;
+ margin: 0px;
+ padding: 0px;
+}
+
+#mini-header {
+ width: 100%;
+ background-color: #002e62;
+}
+
+#mini-header-left {
+ background-image: url(../images/mini-header-left.png);
+ background-repeat: no-repeat;
+ background-position: left top;
+ float: left;
+}
+
+#mini-header-right {
+ background-image: url(../images/mini-header-right.png);
+ background-repeat: no-repeat scroll;
+ background-position: right top;
+ float: right;
+}
+
+#splash-container{
+ display: block;
+ margin: 30px auto;
+ width: 500px;
+}
+
+#version-text {
+ text-align: right;
+ font-size: 30px;
+ font-family: arial;
+ text-align: right;
+ color: #848589;
+}
diff --git a/no-spring-web/src/main/webapp/styles/print.css b/no-spring-web/src/main/webapp/styles/print.css
new file mode 100644
index 0000000..3abe1c0
--- /dev/null
+++ b/no-spring-web/src/main/webapp/styles/print.css
@@ -0,0 +1,60 @@
+/* print.css 2008/04/22 nicolekonicki */
+
+/* White background, black text, arial font, decent font size */
+ body
+ {
+ background-color: #fff;
+ color: #000;
+ font-family: Arial, Helvetica, "Bitstream Vera Sans", sans-serif;
+ font-size: 10pt;
+ width: 100%;
+ }
+
+/* Change the layout to remove columns */
+ html body
+ {
+ background: transparent;
+ width: auto;
+ }
+
+ #main, #container
+ {
+ width: 100%;
+ }
+
+ #page
+ {
+ margin: 0;
+ width: 90%;
+ }
+
+ #content
+ {
+ margin:0;
+ overflow:visible;
+ }
+
+
+/* Hide header and nav elements */
+ #header, #primary-navigation, #secondary-navigation, #footer-wrapper
+ {
+ visibility: hidden;
+ display: none;
+ }
+
+/* Style links */
+ a:link, a:visited
+ {
+ color: #520;
+ background: transparent;
+ text-decoration: underline !important;
+ }
+
+/* Remove table header graphic */
+ .bordered-table th
+ {
+ background-image:none;
+ }
+
+
+
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/resources/.gitignore b/no-spring-web/src/test/java/.gitignore
index e69de29..e69de29 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/src/test/resources/.gitignore
+++ b/no-spring-web/src/test/java/.gitignore
diff --git a/no-spring-web/src/test/java/META-INF/TEST.MF b/no-spring-web/src/test/java/META-INF/TEST.MF
new file mode 100644
index 0000000..3ec0672
--- /dev/null
+++ b/no-spring-web/src/test/java/META-INF/TEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+
diff --git a/no-spring-web/template.mf b/no-spring-web/template.mf
new file mode 100644
index 0000000..9503fd3
--- /dev/null
+++ b/no-spring-web/template.mf
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-Name: Splash Screen
+Bundle-Version: ${version}
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.virgo.apps.splash
+Bundle-ClassPath: WEB-INF/classes
+Web-ContextPath: /
+Import-Template:
+ javax.servlet.*;version="${javax.servlet:[2.5.0,+1)}",
+ org.slf4j;version="${org.slf4j:[=.=.=,+1)}"
+Excluded-Exports: *
+
diff --git a/osgi-examples/bundle.x/.settings/org.eclipse.wst.common.project.facet.core.xml b/osgi-examples/bundle.x/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856..88ceb05 100644
--- a/osgi-examples/bundle.x/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/osgi-examples/bundle.x/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/osgi-examples/bundle.y1/.settings/org.eclipse.wst.common.project.facet.core.xml b/osgi-examples/bundle.y1/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856..88ceb05 100644
--- a/osgi-examples/bundle.y1/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/osgi-examples/bundle.y1/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
</faceted-project>
diff --git a/osgi-examples/bundle.y2/.settings/org.eclipse.wst.common.project.facet.core.xml b/osgi-examples/bundle.y2/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856..88ceb05 100644
--- a/osgi-examples/bundle.y2/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/osgi-examples/bundle.y2/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
</faceted-project>

Back to the top