Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2013-01-11 12:09:55 -0500
committerChristopher Frost2013-01-11 12:09:55 -0500
commit0bafbb1db7a8257beee74ffaa7f099da4d49c880 (patch)
tree29690e66955ad84198d7564457e16fe1c7bf8843
parent71df887b0d01eefc307aa61d3113c133a099af3b (diff)
downloadorg.eclipse.virgo.samples-0bafbb1db7a8257beee74ffaa7f099da4d49c880.tar.gz
org.eclipse.virgo.samples-0bafbb1db7a8257beee74ffaa7f099da4d49c880.tar.xz
org.eclipse.virgo.samples-0bafbb1db7a8257beee74ffaa7f099da4d49c880.zip
329368 more fixes to the build, versions are up to date and some deprecated code removed
-rw-r--r--build-samples/build.xml8
-rw-r--r--build.versions32
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.classpath2
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/ivy.xml7
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath8
-rw-r--r--configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/ivy.xml11
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.domain/src/main/java/org/eclipse/virgo/samples/formtags/par/domain/Colour.java43
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/ivy.xml4
-rw-r--r--formtags/par/org.eclipse.virgo.samples.formtags.web/src/main/java/org/eclipse/virgo/samples/formtags/formtags/web/FormController.java7
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/ivy.xml4
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/domain/Colour.java45
-rw-r--r--formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/src/main/java/org/eclipse/virgo/samples/formtags/sharedlibs/web/FormController.java24
-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.java43
-rw-r--r--formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/ivy.xml4
-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.java24
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/ivy.xml4
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/domain/Colour.java41
-rw-r--r--formtags/war/org.eclipse.virgo.samples.formtags.war/src/main/java/org/eclipse/virgo/samples/formtags/war/web/FormController.java12
-rw-r--r--greenpages/greenpages.parent/pom.xml2
19 files changed, 186 insertions, 139 deletions
diff --git a/build-samples/build.xml b/build-samples/build.xml
index 0dc6ae8..0ff88f3 100644
--- a/build-samples/build.xml
+++ b/build-samples/build.xml
@@ -13,6 +13,7 @@
<pathelement location="../formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service"/>
<pathelement location="../formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war"/>
<pathelement location="../formtags/par/org.eclipse.virgo.samples.formtags"/>
+ <pathelement location="../no-spring-web"/>
</path>
<path id="doc.bundles">
@@ -69,6 +70,13 @@
<flattenmapper/>
</copy>
+ <copy todir="${package.output.dir}/no-spring-web">
+ <fileset dir="${basedir}/../no-spring-web">
+ <include name="**/target/artifacts/*.jar"/>
+ </fileset>
+ <flattenmapper/>
+ </copy>
+
<copy todir="${package.output.dir}/formtags">
<fileset dir="${basedir}/../formtags">
<include name="**/target/artifacts/*.jar"/>
diff --git a/build.versions b/build.versions
index 8c2d4a7..0d0ee21 100644
--- a/build.versions
+++ b/build.versions
@@ -1,27 +1,25 @@
# Compile
-org.eclipse.virgo.kernel=3.0.0.D-20110209161555
-org.eclipse.virgo.osgi=3.0.0.D-20110209111605
-org.eclipse.virgo.repository=3.0.0.D-20110209112904
-org.eclipse.virgo.util=3.0.0.D-20110209111851
+org.eclipse.virgo.kernel=3.6.0.RELEASE
+org.eclipse.virgo.osgi=3.6.0.RELEASE
+org.eclipse.virgo.repository=3.6.0.RELEASE
+org.eclipse.virgo.util=3.6.0.RELEASE
javax.annotation=1.0.0
-javax.servlet.jsp=2.1.0
-javax.servlet.jstl=1.1.2
-javax.servlet=2.5.0
+javax.servlet.jsp=2.2.0.v201112011158
+javax.servlet.jsp.jstl=1.2.0.v201105211821
+javax.servlet=3.0.0.v201112011016
org.aopalliance=1.0.0
org.apache.taglibs.standard=1.1.2
org.apache.xmlcommons=1.3.3
-org.aspectj=1.6.6.RELEASE
-org.eclipse.osgi=3.7.0.v20110124-0830
-org.eclipse.osgi.services=3.3.0.v20110110
-org.eclipse.equinox.cm=1.0.300.v20101204
-org.slf4j=1.5.10
+org.aspectj=1.6.12.RELEASE
+org.eclipse.osgi=3.8.1.v20120830-144521
+org.eclipse.osgi.services=3.3.0.v20120307-2102
+org.eclipse.equinox.cm=1.0.400.v20120319-2029
+org.slf4j.api=1.7.2.v20121108-1250
org.springframework.js=2.0.8.RELEASE
-org.springframework.osgi=1.2.1
-org.springframework=3.0.5.RELEASE
+org.springframework=3.1.0.RELEASE
# Test
-org.eclipse.virgo.teststubs=3.0.0.D-20110209111336
-org.eclipse.virgo.test=3.0.0.D-20110209112249
-org.junit.spring.3=4.7.0
+org.eclipse.virgo.test=3.6.0.RELEASE
+org.junit=4.7.0
javax.el=1.0.0
org.easymock=2.3.0 \ No newline at end of file
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.classpath b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.classpath
index 2a0cddf..593d082 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.classpath
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/.classpath
@@ -27,7 +27,7 @@
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.beans/3.1.0.RELEASE/org.springframework.beans-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RC1/org.springframework.beans-sources-3.0.0.RC1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.6.1.R36x_v20100806/org.eclipse.osgi-sources-3.6.1.R36x_v20100806.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.cm/1.0.300.v20101204/org.eclipse.equinox.cm-1.0.300.v20101204.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.cm/1.0.400.v20120319-2029/org.eclipse.equinox.cm-1.0.400.v20120319-2029.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Virgo Runtime at localhost Server"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/ivy.xml b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/ivy.xml
index d541575..0bb7e3f 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/ivy.xml
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.core/ivy.xml
@@ -22,14 +22,13 @@
<!-- === RUNTIME-DEFAULT =========================================== -->
<!-- === PROVIDED-RUNTIME =========================================== -->
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf='provided->runtime'/>
+ <dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf='provided->runtime'/>
<dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->runtime"/>
<!-- === TEST ====================================================== -->
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit.spring.3}" conf="test->runtime"/>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
<dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
</dependencies>
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 cfb457b..4f28a3e 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/.classpath
@@ -13,16 +13,16 @@
<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"/>
- <classpathentry kind="var" path="IVY_CACHE/javax.servlet/com.springsource.javax.servlet/2.5.0/com.springsource.javax.servlet-2.5.0.jar" sourcepath="/IVY_CACHE/javax.servlet/com.springsource.javax.servlet/2.5.0/com.springsource.javax.servlet-sources-2.5.0.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/IVY_CACHE/javax.servlet/com.springsource.javax.servlet/3.0.0.v201112011016/com.springsource.javax.servlet-sources-3.0.0.v201112011016.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.context/3.1.0.RELEASE/org.springframework.context-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/javax.servlet/com.springsource.javax.servlet.jsp/2.1.0/com.springsource.javax.servlet.jsp-2.1.0.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/javax.servlet/com.springsource.javax.servlet.jsp.jstl/1.1.2/com.springsource.javax.servlet.jsp.jstl-1.1.2.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet.jsp/2.2.0.v201112011158/javax.servlet.jsp-2.2.0.v201112011158.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.virgo.mirrored/javax.servlet.jsp.jstl/1.2.0.v201105211821/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-sources-1.1.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework/org.springframework.core/3.1.0.RELEASE/org.springframework.core-3.1.0.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.springframework.webflow/org.springframework.js/2.0.8.RELEASE/org.springframework.js-2.0.8.RELEASE.jar" sourcepath="/IVY_CACHE/org.springframework.webflow/org.springframework.js/2.0.8.RELEASE/org.springframework.js-sources-2.0.8.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.taglibs/com.springsource.org.apache.taglibs.standard/1.1.2/com.springsource.org.apache.taglibs.standard-1.1.2.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.6.1.R36x_v20100806/org.eclipse.osgi-sources-3.6.1.R36x_v20100806.jar"/>
- <classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.cm/1.0.300.v20101204/org.eclipse.equinox.cm-1.0.300.v20101204.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
+ <classpathentry kind="var" path="IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.cm/1.0.400.v20120319-2029/org.eclipse.equinox.cm-1.0.400.v20120319-2029.jar" sourcepath="/IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.samples.configuration-properties.core"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/ivy.xml b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/ivy.xml
index a3ecc53..e5e662a 100644
--- a/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/ivy.xml
+++ b/configuration-properties/org.eclipse.virgo.samples.configuration-properties.web/ivy.xml
@@ -21,21 +21,20 @@
<dependency org="org.eclipse.virgo.samples" name="org.eclipse.virgo.samples.configuration-properties.core" rev="latest.integration" conf="provided->compile"/>
<!-- === RUNTIME-DEFAULT =========================================== -->
<!-- === PROVIDED-RUNTIME =========================================== -->
- <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp" rev="${javax.servlet.jsp}" conf="provided->runtime"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet.jsp.jstl" rev="${javax.servlet.jstl}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet.jsp" rev="${javax.servlet.jsp}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet.jsp.jstl" rev="${javax.servlet.jsp.jstl}" conf="provided->runtime"/>
<dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->runtime"/>
<dependency org="org.apache.xmlcommons" name="com.springsource.org.apache.xmlcommons" rev="${org.apache.xmlcommons}" conf="provided->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.web" rev="${org.springframework}" conf="provided->runtime"/>
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="${org.springframework}" conf="provided->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="provided->runtime"/>
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="${org.springframework.js}" conf="provided->runtime"/>
<!-- === TEST ====================================================== -->
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit.spring.3}" conf="test->runtime"/>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.test" rev="${org.springframework}" conf="test->runtime"/>
<dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
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 f2b2585..57d0338 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,23 +11,44 @@
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");
-
+public enum Colour {
+
+ RED(0, "RED"),
+
+ GREEN(1, "GREEN"),
+
+ BLUE(2, "BLUE");
+
+ private final int code;
+
+ private final String label;
+
private Colour(int code, String label) {
- super(code, label);
+ this.code = code;
+ this.label = label;
}
+ public String getLabel() {
+ return this.label;
+ }
+
+ public int getCode() {
+ return this.code;
+ }
+
+ public static Colour getColour(int code){
+ Colour[] values = Colour.values();
+ for (Colour colour : values) {
+ if(colour.getCode() == code){
+ return colour;
+ }
+ }
+ return null;
+ }
+
}
diff --git a/formtags/par/org.eclipse.virgo.samples.formtags.web/ivy.xml b/formtags/par/org.eclipse.virgo.samples.formtags.web/ivy.xml
index d0649cd..f24c263 100644
--- a/formtags/par/org.eclipse.virgo.samples.formtags.web/ivy.xml
+++ b/formtags/par/org.eclipse.virgo.samples.formtags.web/ivy.xml
@@ -21,8 +21,8 @@
<dependency org="org.eclipse.virgo.samples" name="org.eclipse.virgo.samples.formtags.par.service" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.spring-library" rev="${org.springframework}" conf="server-provided->compile"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="server-provided->compile"/>
- <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="server-provided->compile"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->compile"/>
</dependencies>
</ivy-module>
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 8c274c3..62e2882 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;
import org.eclipse.virgo.samples.formtags.par.domain.Country;
@@ -61,9 +59,8 @@ public class FormController extends SimpleFormController {
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));
+ Integer code = new Integer(string);
+ setValue(Colour.getColour(code));
}
});
}
diff --git a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/ivy.xml b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/ivy.xml
index e62805e..4b278ee 100644
--- a/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/ivy.xml
+++ b/formtags/shared-libs/org.eclipse.virgo.samples.formtags.shared-libs/ivy.xml
@@ -18,8 +18,8 @@
<dependencies>
<dependency org="org.springframework" name="org.springframework.spring-library" rev="${org.springframework}" conf="provided->compile"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="provided->compile"/>
- <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->compile"/>
</dependencies>
</ivy-module>
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 a552062..aff2a03 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
@@ -10,24 +10,43 @@
*******************************************************************************/
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 GREEN = new Colour(1, "GREEN");
-
- public static final Colour BLUE = new Colour(2, "BLUE");
-
+public enum Colour {
+
+ RED(0, "RED"),
+
+ GREEN(1, "GREEN"),
+
+ BLUE(2, "BLUE");
+
+ private final int code;
+
+ private final String label;
+
private Colour(int code, String label) {
- super(code, label);
+ this.code = code;
+ this.label = label;
}
+ public String getLabel() {
+ return this.label;
+ }
+
+ public int getCode() {
+ return this.code;
+ }
+
+ public static Colour getColour(int code){
+ Colour[] values = Colour.values();
+ for (Colour colour : values) {
+ if(colour.getCode() == code){
+ return colour;
+ }
+ }
+ return null;
+ }
+
}
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 1973db6..50ef480 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
@@ -10,34 +10,21 @@
*******************************************************************************/
package org.eclipse.virgo.samples.formtags.sharedlibs.web;
-import org.springframework.core.enums.StaticLabeledEnumResolver;
-
-
+import java.beans.PropertyEditorSupport;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.Colour;
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.Country;
import org.eclipse.virgo.samples.formtags.sharedlibs.domain.User;
import org.eclipse.virgo.samples.formtags.sharedlibs.service.UserManager;
-
import org.springframework.ui.ModelMap;
-
import org.springframework.validation.Errors;
-
import org.springframework.web.bind.ServletRequestDataBinder;
-
import org.springframework.web.bind.ServletRequestUtils;
-
import org.springframework.web.servlet.mvc.SimpleFormController;
-
-
-import javax.servlet.http.HttpServletRequest;
-
-import java.beans.PropertyEditorSupport;
-
-import java.util.Map;
-
/**
* The central form controller for this showcase application.
*
@@ -60,9 +47,8 @@ public class FormController extends SimpleFormController {
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));
+ Integer code = new Integer(string);
+ setValue(Colour.getColour(code));
}
});
}
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/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 a0db340..cf293fe 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.service/src/main/java/org/eclipse/virgo/samples/formtags/sharedservices/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
@@ -10,23 +10,42 @@
*******************************************************************************/
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 GREEN = new Colour(1, "GREEN");
-
- public static final Colour BLUE = new Colour(2, "BLUE");
+public enum Colour {
+ RED(0, "RED"),
+
+ GREEN(1, "GREEN"),
+
+ BLUE(2, "BLUE");
+
+ private final int code;
+
+ private final String label;
+
private Colour(int code, String label) {
- super(code, label);
+ this.code = code;
+ this.label = label;
}
+
+ public String getLabel() {
+ return this.label;
+ }
+
+ public int getCode() {
+ return this.code;
+ }
+
+ public static Colour getColour(int code){
+ Colour[] values = Colour.values();
+ for (Colour colour : values) {
+ if(colour.getCode() == code){
+ return colour;
+ }
+ }
+ return null;
+ }
}
diff --git a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/ivy.xml b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/ivy.xml
index b03c06d..bc53625 100644
--- a/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/ivy.xml
+++ b/formtags/shared-services/org.eclipse.virgo.samples.formtags.shared-services.war/ivy.xml
@@ -20,8 +20,8 @@
<dependency org="org.eclipse.virgo.samples" name="org.eclipse.virgo.samples.formtags.shared-services.service" rev="latest.integration" conf="provided->compile"/>
<dependency org="org.springframework" name="org.springframework.spring-library" rev="${org.springframework}" conf="provided->compile"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="provided->compile"/>
- <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->compile"/>
</dependencies>
</ivy-module>
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 f4c7586..aca0e03 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
@@ -10,34 +10,21 @@
*******************************************************************************/
package org.eclipse.virgo.samples.formtags.formtags.web;
-import org.springframework.core.enums.StaticLabeledEnumResolver;
-
-
+import java.beans.PropertyEditorSupport;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
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;
-
import org.springframework.validation.Errors;
-
import org.springframework.web.bind.ServletRequestDataBinder;
-
import org.springframework.web.bind.ServletRequestUtils;
-
import org.springframework.web.servlet.mvc.SimpleFormController;
-
-
-import javax.servlet.http.HttpServletRequest;
-
-import java.beans.PropertyEditorSupport;
-
-import java.util.Map;
-
/**
* The central form controller for this showcase application.
*
@@ -60,9 +47,8 @@ public class FormController extends SimpleFormController {
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));
+ Integer code = new Integer(string);
+ setValue(Colour.getColour(code));
}
});
}
diff --git a/formtags/war/org.eclipse.virgo.samples.formtags.war/ivy.xml b/formtags/war/org.eclipse.virgo.samples.formtags.war/ivy.xml
index c985b4d..219d1ce 100644
--- a/formtags/war/org.eclipse.virgo.samples.formtags.war/ivy.xml
+++ b/formtags/war/org.eclipse.virgo.samples.formtags.war/ivy.xml
@@ -18,8 +18,8 @@
<dependencies>
<dependency org="org.springframework" name="org.springframework.spring-library" rev="${org.springframework}" conf="provided->compile"/>
- <dependency org="javax.servlet" name="com.springsource.javax.servlet" rev="2.5.0" conf="provided->compile"/>
- <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="1.1.2" conf="provided->compile"/>
+ <dependency org="org.eclipse.virgo.mirrored" name="javax.servlet" rev="${javax.servlet}" conf="provided->runtime"/>
+ <dependency org="org.apache.taglibs" name="com.springsource.org.apache.taglibs.standard" rev="${org.apache.taglibs.standard}" conf="provided->compile"/>
</dependencies>
</ivy-module> \ No newline at end of file
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 774430b..67f7dba 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
@@ -10,22 +10,43 @@
*******************************************************************************/
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");
+public enum Colour {
+ RED(0, "RED"),
+
+ GREEN(1, "GREEN"),
+
+ BLUE(2, "BLUE");
+
+ private final int code;
+
+ private final String label;
+
private Colour(int code, String label) {
- super(code, label);
+ this.code = code;
+ this.label = label;
}
+ public String getLabel() {
+ return this.label;
+ }
+
+ public int getCode() {
+ return this.code;
+ }
+
+ public static Colour getColour(int code){
+ Colour[] values = Colour.values();
+ for (Colour colour : values) {
+ if(colour.getCode() == code){
+ return colour;
+ }
+ }
+ return null;
+ }
+
}
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 a618e38..b3e5597 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
@@ -10,11 +10,6 @@
*******************************************************************************/
package org.eclipse.virgo.samples.formtags.war.web;
-import org.springframework.core.enums.StaticLabeledEnumResolver;
-
-
-
-
import org.eclipse.virgo.samples.formtags.war.domain.Colour;
import org.eclipse.virgo.samples.formtags.war.domain.Country;
import org.eclipse.virgo.samples.formtags.war.domain.User;
@@ -50,7 +45,7 @@ public class FormController extends SimpleFormController {
* 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
+ * component delegates in order to perform complex business logic
*/
public void setUserManager(UserManager userManager) {
this.userManager = userManager;
@@ -60,9 +55,8 @@ public class FormController extends SimpleFormController {
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));
+ Integer code = new Integer(string);
+ setValue(Colour.getColour(code));
}
});
}
diff --git a/greenpages/greenpages.parent/pom.xml b/greenpages/greenpages.parent/pom.xml
index a05f85d..142ade6 100644
--- a/greenpages/greenpages.parent/pom.xml
+++ b/greenpages/greenpages.parent/pom.xml
@@ -205,7 +205,7 @@
<exclude>**/Abstract*.java</exclude>
</excludes>
<junitArtifactName>org.junit:com.springsource.org.junit</junitArtifactName>
- <argLine>-javaagent:${user.home}/.m2/repository/org/springframework/org.springframework.instrument/3.0.5.RELEASE/org.springframework.instrument-3.0.5.RELEASE.jar</argLine>
+ <argLine>-javaagent:${user.home}/.m2/repository/org/springframework/org.springframework.instrument/3.1.0.RELEASE/org.springframework.instrument-3.1.0.RELEASE.jar</argLine>
</configuration>
</plugin>
</plugins>

Back to the top