summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatsy Phelan2010-12-13 10:59:44 (EST)
committer Christopher Frost2010-12-13 10:59:44 (EST)
commit3055636913a07164d6784747f263f213779957b7 (patch)
tree033a00d8ef45bd8cc9b14e31925cad7928e47ffa
parent805dad71e3e4ef91a7f2a4ceb72fa7e7ca47b738 (diff)
downloadorg.eclipse.virgo.snaps-3055636913a07164d6784747f263f213779957b7.zip
org.eclipse.virgo.snaps-3055636913a07164d6784747f263f213779957b7.tar.gz
org.eclipse.virgo.snaps-3055636913a07164d6784747f263f213779957b7.tar.bz2
Apply patch of improved sample application
-rw-r--r--build.versions3
-rw-r--r--samples/menu-bar/animal.menu.bar/src/main/webapp/WEB-INF/web.xml27
-rw-r--r--samples/menu-bar/menu-sample-deployment.plan16
-rw-r--r--samples/menu-bar/sample.api/.classpath15
-rw-r--r--samples/menu-bar/sample.api/.gitignore5
-rw-r--r--samples/menu-bar/sample.api/.project30
-rw-r--r--samples/menu-bar/sample.api/.settings/com.springsource.server.ide.jdt.core.xml2
-rw-r--r--samples/menu-bar/sample.api/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--samples/menu-bar/sample.api/.settings/org.eclipse.wst.common.project.facet.core.xml6
-rw-r--r--samples/menu-bar/sample.api/.springBeans13
-rw-r--r--samples/menu-bar/sample.api/build.xml7
-rw-r--r--samples/menu-bar/sample.api/ivy.xml24
-rw-r--r--samples/menu-bar/sample.api/src/main/java/sample/api/SampleAPI.java21
-rw-r--r--samples/menu-bar/sample.api/src/main/java/sample/api/SampleDao.java45
-rw-r--r--samples/menu-bar/sample.api/src/main/resources/META-INF/MANIFEST.MF7
-rw-r--r--samples/menu-bar/sample.api/src/main/resources/META-INF/spring/module-context.xml10
-rw-r--r--samples/menu-bar/sample.api/src/main/resources/META-INF/spring/osgi-context.xml10
-rw-r--r--samples/menu-bar/sample.impl/.classpath41
-rw-r--r--samples/menu-bar/sample.impl/.gitignore5
-rw-r--r--samples/menu-bar/sample.impl/.project30
-rw-r--r--samples/menu-bar/sample.impl/.settings/com.springsource.server.ide.jdt.core.xml2
-rw-r--r--samples/menu-bar/sample.impl/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--samples/menu-bar/sample.impl/.settings/org.eclipse.wst.common.project.facet.core.xml6
-rw-r--r--samples/menu-bar/sample.impl/.springBeans13
-rw-r--r--samples/menu-bar/sample.impl/build.xml7
-rw-r--r--samples/menu-bar/sample.impl/ivy.xml25
-rw-r--r--samples/menu-bar/sample.impl/src/main/java/sample/impl/SampleAPIImpl.java50
-rw-r--r--samples/menu-bar/sample.impl/src/main/resources/META-INF/MANIFEST.MF9
-rw-r--r--samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/module-context.xml12
-rw-r--r--samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/osgi-context.xml14
-rw-r--r--samples/menu-bar/sample.snap/.classpath10
-rwxr-xr-xsamples/menu-bar/sample.snap/.gitignore5
-rwxr-xr-xsamples/menu-bar/sample.snap/.project30
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/.jsdtscope11
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/com.springsource.server.ide.jdt.core.prefs3
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.component12
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.project.facet.core.xml7
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rwxr-xr-xsamples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rwxr-xr-xsamples/menu-bar/sample.snap/.springBeans14
-rwxr-xr-xsamples/menu-bar/sample.snap/build.xml7
-rwxr-xr-xsamples/menu-bar/sample.snap/ivy.xml26
-rwxr-xr-xsamples/menu-bar/sample.snap/src/main/java/sample/snap/SampleController.java64
-rw-r--r--samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleFormController.java58
-rwxr-xr-xsamples/menu-bar/sample.snap/src/main/webapp/META-INF/MANIFEST.MF21
-rw-r--r--samples/menu-bar/sample.snap/src/main/webapp/META-INF/snap.properties3
-rwxr-xr-xsamples/menu-bar/sample.snap/src/main/webapp/WEB-INF/applicationContext.xml10
-rw-r--r--samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/getDaoForm.jsp29
-rwxr-xr-xsamples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/index.jsp30
-rw-r--r--samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/snap-servlet.xml29
-rwxr-xr-xsamples/menu-bar/sample.snap/src/main/webapp/WEB-INF/web.xml40
-rwxr-xr-xsamples/menu-bar/sample.snap/src/test/java/.gitignore0
-rwxr-xr-xsamples/menu-bar/sample.snap/src/test/resources/.gitignore0
54 files changed, 889 insertions, 8 deletions
diff --git a/build.versions b/build.versions
index 51d3245..49d4a06 100644
--- a/build.versions
+++ b/build.versions
@@ -1,4 +1,4 @@
-# Compile
+#Compile
org.eclipse.osgi=3.6.1.R36x_v20100806
org.slf4j=1.6.1
org.tuckey=3.1.0
@@ -13,6 +13,7 @@ org.eclipse.gemini.web=1.1.0.RELEASE
org.eclipse.virgo.test=2.1.0.RELEASE
org.eclipse.virgo.web=2.1.0.RELEASE
org.eclipse.virgo.osgi=2.1.0.RELEASE
+org.eclipse.virgo.snaps.samples=1.0.0
# Test
diff --git a/samples/menu-bar/animal.menu.bar/src/main/webapp/WEB-INF/web.xml b/samples/menu-bar/animal.menu.bar/src/main/webapp/WEB-INF/web.xml
index 665883d..8febda2 100644
--- a/samples/menu-bar/animal.menu.bar/src/main/webapp/WEB-INF/web.xml
+++ b/samples/menu-bar/animal.menu.bar/src/main/webapp/WEB-INF/web.xml
@@ -7,13 +7,26 @@
version="2.5">
<filter>
- <filter-name>host-filter</filter-name>
- <filter-class>org.eclipse.virgo.snaps.core.SnapHostFilter</filter-class>
- </filter>
+ <filter-name>host-filter</filter-name>
+ <filter-class>org.eclipse.virgo.snaps.core.SnapHostFilter</filter-class>
+ </filter>
- <filter-mapping>
- <filter-name>host-filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
+ <filter-mapping>
+ <filter-name>host-filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ </filter-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+ <error-page>
+ <exception-type>java.lang.Exception</exception-type>
+ <!-- Displays a stack trace -->
+ <location>/uncaughtException.jsp</location>
+ </error-page>
</web-app>
diff --git a/samples/menu-bar/menu-sample-deployment.plan b/samples/menu-bar/menu-sample-deployment.plan
new file mode 100644
index 0000000..b876f70
--- /dev/null
+++ b/samples/menu-bar/menu-sample-deployment.plan
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plan name="menu-sample-deployment.plan" version="1.0.0" scoped="true" atomic="true"
+ xmlns="http://www.springsource.org/schema/dm-server/plan"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan
+ http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">
+<!-- Web Console -->
+ <artifact type="bundle" name="animal.menu.bar" version="[1, 2)">
+ <!-- Override the Web-ContextPath for a shorter path e.g. http://localhost:8080/animal-menu-bar -> http://localhost:8080/menu -->
+ <property name="header:Web-ContextPath" value="menu"/>
+ </artifact>
+ <artifact type="bundle" name="sample.api" version="[1, 2)" />
+ <artifact type="bundle" name="sample.impl" version="[1, 2)" />
+ <artifact type="bundle" name="sample.snap" version="[1, 2)" />
+
+</plan>
diff --git a/samples/menu-bar/sample.api/.classpath b/samples/menu-bar/sample.api/.classpath
new file mode 100644
index 0000000..b8ea233
--- /dev/null
+++ b/samples/menu-bar/sample.api/.classpath
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER"/>
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.antlr/com.springsource.antlr/2.7.6/com.springsource.antlr-2.7.6.jar"/>
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-4.4.0.jar"/>
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/license-4.4.0.txt"/>
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.antlr/com.springsource.antlr/2.7.6/com.springsource.antlr-sources-2.7.6.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/samples/menu-bar/sample.api/.gitignore b/samples/menu-bar/sample.api/.gitignore
new file mode 100644
index 0000000..ca7ba75
--- /dev/null
+++ b/samples/menu-bar/sample.api/.gitignore
@@ -0,0 +1,5 @@
+# vi temporary files
+*~
+.DS_STORE
+# target directory
+target/
diff --git a/samples/menu-bar/sample.api/.project b/samples/menu-bar/sample.api/.project
new file mode 100644
index 0000000..f164226
--- /dev/null
+++ b/samples/menu-bar/sample.api/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>sample.api</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/samples/menu-bar/sample.api/.settings/com.springsource.server.ide.jdt.core.xml b/samples/menu-bar/sample.api/.settings/com.springsource.server.ide.jdt.core.xml
new file mode 100644
index 0000000..0a4413c
--- /dev/null
+++ b/samples/menu-bar/sample.api/.settings/com.springsource.server.ide.jdt.core.xml
@@ -0,0 +1,2 @@
+<classpath>
+</classpath>
diff --git a/samples/menu-bar/sample.api/.settings/org.eclipse.jdt.core.prefs b/samples/menu-bar/sample.api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b69dbb0
--- /dev/null
+++ b/samples/menu-bar/sample.api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Tue Nov 09 16:54:47 GMT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/samples/menu-bar/sample.api/.settings/org.eclipse.wst.common.project.facet.core.xml b/samples/menu-bar/sample.api/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..9f0380b
--- /dev/null
+++ b/samples/menu-bar/sample.api/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Virgo Web Server (Runtime) v2.1"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="com.springsource.server.bundle" version="1.0"/>
+</faceted-project>
diff --git a/samples/menu-bar/sample.api/.springBeans b/samples/menu-bar/sample.api/.springBeans
new file mode 100644
index 0000000..4dff647
--- /dev/null
+++ b/samples/menu-bar/sample.api/.springBeans
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.3.2.201003220227-RELEASE]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
diff --git a/samples/menu-bar/sample.api/build.xml b/samples/menu-bar/sample.api/build.xml
new file mode 100644
index 0000000..817a67c
--- /dev/null
+++ b/samples/menu-bar/sample.api/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="sample.api" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <property name="disable.bundlor" value="true"/>
+ <property file="${basedir}/../../../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <import file="${basedir}/../../../virgo-build/standard/default.xml"/>
+</project>
diff --git a/samples/menu-bar/sample.api/ivy.xml b/samples/menu-bar/sample.api/ivy.xml
new file mode 100644
index 0000000..f59d387
--- /dev/null
+++ b/samples/menu-bar/sample.api/ivy.xml
@@ -0,0 +1,24 @@
+<?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="2.0">
+
+ <info organisation="org.eclipse.virgo.snaps.samples" module="${ant.project.name}">
+ <ivyauthor name="Patsy Phelan" />
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+<!-- Tests -->
+ <dependency org="org.antlr" name="com.springsource.antlr" rev="${org.antlr}" conf="test->runtime" />
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime" />
+ </dependencies>
+
+</ivy-module>
diff --git a/samples/menu-bar/sample.api/src/main/java/sample/api/SampleAPI.java b/samples/menu-bar/sample.api/src/main/java/sample/api/SampleAPI.java
new file mode 100644
index 0000000..60ddcd0
--- /dev/null
+++ b/samples/menu-bar/sample.api/src/main/java/sample/api/SampleAPI.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Pouzin Society, http://www.pouzinsociety.org
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patsy Phelan, Pouzin Society - initial contribution
+ *******************************************************************************/
+
+package sample.api;
+
+import java.util.List;
+
+public interface SampleAPI {
+ List<SampleDao> get();
+ void add(SampleDao dao);
+ void remove(SampleDao dao);
+}
diff --git a/samples/menu-bar/sample.api/src/main/java/sample/api/SampleDao.java b/samples/menu-bar/sample.api/src/main/java/sample/api/SampleDao.java
new file mode 100644
index 0000000..394f8ff
--- /dev/null
+++ b/samples/menu-bar/sample.api/src/main/java/sample/api/SampleDao.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Pouzin Society, http://www.pouzinsociety.org
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patsy Phelan, Pouzin Society - initial contribution
+ *******************************************************************************/
+
+package sample.api;
+
+public class SampleDao {
+ String text;
+
+ public SampleDao() {
+ text = new String("Default");
+ }
+
+ public SampleDao(String text) {
+ this.text = text;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ @Override public boolean equals(Object aThat) {
+ //check for self-comparison
+ if ( this == aThat ) return true;
+
+ if ( !(aThat instanceof SampleDao) ) return false;
+ //cast to native object is now safe
+ SampleDao that = (SampleDao)aThat;
+
+ //now a proper field-by-field evaluation can be made
+ return this.getText().equals(that.getText());
+ }
+}
diff --git a/samples/menu-bar/sample.api/src/main/resources/META-INF/MANIFEST.MF b/samples/menu-bar/sample.api/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..d9fbf3e
--- /dev/null
+++ b/samples/menu-bar/sample.api/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sample API bundle
+Bundle-SymbolicName: sample.api
+Bundle-Version: 1.0.0
+Bundle-Vendor: Virgo Snaps Samples
+Export-Package: sample.api;version="1.0.0"
diff --git a/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/module-context.xml b/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 0000000..5caac61
--- /dev/null
+++ b/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+</beans>
diff --git a/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/osgi-context.xml b/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 0000000..ba469a4
--- /dev/null
+++ b/samples/menu-bar/sample.api/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+</beans>
diff --git a/samples/menu-bar/sample.impl/.classpath b/samples/menu-bar/sample.impl/.classpath
new file mode 100644
index 0000000..7560ad1
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.classpath
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java" />
+ <classpathentry kind="src" path="src/test/java" />
+ <classpathentry kind="src" path="src/main/resources" />
+ <classpathentry kind="src" output="target/test-classes" path="src/test/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/JVM 1.6.0 (MacOS X Default)">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.java" />
+
+
+
+
+
+
+
+
+
+
+
+ </attributes>
+
+
+
+
+
+
+
+
+
+
+
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes" />
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.antlr/com.springsource.antlr/2.7.6/com.springsource.antlr-2.7.6.jar" />
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar" />
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-4.4.0.jar" />
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.junit/com.springsource.org.junit/4.4.0/license-4.4.0.txt" />
+ <classpathentry ivygen="true" kind="lib" path="/Users/pphelan/development/github/tinos/repository/ivy-cache/repository/org.antlr/com.springsource.antlr/2.7.6/com.springsource.antlr-sources-2.7.6.jar" />
+</classpath>
diff --git a/samples/menu-bar/sample.impl/.gitignore b/samples/menu-bar/sample.impl/.gitignore
new file mode 100644
index 0000000..ca7ba75
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.gitignore
@@ -0,0 +1,5 @@
+# vi temporary files
+*~
+.DS_STORE
+# target directory
+target/
diff --git a/samples/menu-bar/sample.impl/.project b/samples/menu-bar/sample.impl/.project
new file mode 100644
index 0000000..dbe3ad1
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>sample.impl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/samples/menu-bar/sample.impl/.settings/com.springsource.server.ide.jdt.core.xml b/samples/menu-bar/sample.impl/.settings/com.springsource.server.ide.jdt.core.xml
new file mode 100644
index 0000000..0a4413c
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.settings/com.springsource.server.ide.jdt.core.xml
@@ -0,0 +1,2 @@
+<classpath>
+</classpath>
diff --git a/samples/menu-bar/sample.impl/.settings/org.eclipse.jdt.core.prefs b/samples/menu-bar/sample.impl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e439cb4
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Tue Nov 09 16:36:24 GMT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/samples/menu-bar/sample.impl/.settings/org.eclipse.wst.common.project.facet.core.xml b/samples/menu-bar/sample.impl/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..9f0380b
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Virgo Web Server (Runtime) v2.1"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="com.springsource.server.bundle" version="1.0"/>
+</faceted-project>
diff --git a/samples/menu-bar/sample.impl/.springBeans b/samples/menu-bar/sample.impl/.springBeans
new file mode 100644
index 0000000..4dff647
--- /dev/null
+++ b/samples/menu-bar/sample.impl/.springBeans
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.3.2.201003220227-RELEASE]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
diff --git a/samples/menu-bar/sample.impl/build.xml b/samples/menu-bar/sample.impl/build.xml
new file mode 100644
index 0000000..6c4d31f
--- /dev/null
+++ b/samples/menu-bar/sample.impl/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="sample.impl" xmlns:ivy="antlib:org.apache.ivy.ant">
+ <property name="disable.bundlor" value="true"/>
+ <property file="${basedir}/../../../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <import file="${basedir}/../../../virgo-build/standard/default.xml"/>
+</project>
diff --git a/samples/menu-bar/sample.impl/ivy.xml b/samples/menu-bar/sample.impl/ivy.xml
new file mode 100644
index 0000000..b60d7fe
--- /dev/null
+++ b/samples/menu-bar/sample.impl/ivy.xml
@@ -0,0 +1,25 @@
+<?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="2.0">
+
+ <info organisation="org.eclipse.virgo.snaps.samples" module="${ant.project.name}">
+ <ivyauthor name="Patsy Phelan" />
+ </info>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.eclipse.virgo.snaps.samples" name="sample.api" rev="${org.eclipse.virgo.snaps.samples}" conf="compile->runtime" />
+<!-- Tests -->
+ <dependency org="org.antlr" name="com.springsource.antlr" rev="${org.antlr}" conf="test->runtime" />
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime" />
+ </dependencies>
+
+</ivy-module>
diff --git a/samples/menu-bar/sample.impl/src/main/java/sample/impl/SampleAPIImpl.java b/samples/menu-bar/sample.impl/src/main/java/sample/impl/SampleAPIImpl.java
new file mode 100644
index 0000000..d9f6475
--- /dev/null
+++ b/samples/menu-bar/sample.impl/src/main/java/sample/impl/SampleAPIImpl.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Pouzin Society, http://www.pouzinsociety.org
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patsy Phelan, Pouzin Society - initial contribution
+ *******************************************************************************/
+
+package sample.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import sample.api.SampleDao;
+import sample.api.SampleAPI;
+public class SampleAPIImpl implements SampleAPI {
+
+ List<SampleDao> daoList = new ArrayList<SampleDao>();
+
+ public SampleAPIImpl() {
+ synchronized (daoList) {
+ daoList.add(new SampleDao("PreLoaded"));
+ }
+ }
+
+ public void add(SampleDao arg0) {
+ synchronized (daoList) {
+ daoList.add(arg0);
+ }
+ }
+
+ public List<SampleDao> get() {
+ List<SampleDao> copy;
+ synchronized (daoList) {
+ copy = Collections.unmodifiableList(daoList);
+ }
+ return copy;
+ }
+
+ public void remove(SampleDao arg0) {
+ synchronized (daoList) {
+ daoList.remove(arg0);
+ }
+ }
+}
diff --git a/samples/menu-bar/sample.impl/src/main/resources/META-INF/MANIFEST.MF b/samples/menu-bar/sample.impl/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254bdb5
--- /dev/null
+++ b/samples/menu-bar/sample.impl/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Sample IMPL bundle
+Bundle-SymbolicName: sample.impl
+Bundle-Version: 1.0.0
+Bundle-Vendor: Virgo Snaps Samples
+Export-Package: sample.impl;version="1.0.0"
+Import-Package: sample.api;version="[1.0.0,1.0.0]"
+Import-Bundle: sample.api;version="[1.0.0,1.0.0]"
diff --git a/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/module-context.xml b/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/module-context.xml
new file mode 100644
index 0000000..d7cf57e
--- /dev/null
+++ b/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/module-context.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+ <bean id="sampleAPIImplBean" class="sample.impl.SampleAPIImpl"/>
+</beans>
diff --git a/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/osgi-context.xml b/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/osgi-context.xml
new file mode 100644
index 0000000..1a740e1
--- /dev/null
+++ b/samples/menu-bar/sample.impl/src/main/resources/META-INF/spring/osgi-context.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <osgi:service id="sampleAPIService"
+ interface="sample.api.SampleAPI" ref="sampleAPIImplBean" />
+
+</beans>
diff --git a/samples/menu-bar/sample.snap/.classpath b/samples/menu-bar/sample.snap/.classpath
new file mode 100644
index 0000000..ade6909
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java" />
+ <classpathentry kind="src" path="src/main/resources" />
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java" />
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources" />
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
+ <classpathentry kind="con" path="com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER" />
+ <classpathentry kind="output" path="target/classes" />
+</classpath>
diff --git a/samples/menu-bar/sample.snap/.gitignore b/samples/menu-bar/sample.snap/.gitignore
new file mode 100755
index 0000000..ca7ba75
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.gitignore
@@ -0,0 +1,5 @@
+# vi temporary files
+*~
+.DS_STORE
+# target directory
+target/
diff --git a/samples/menu-bar/sample.snap/.project b/samples/menu-bar/sample.snap/.project
new file mode 100755
index 0000000..724faf6
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>sample.snap</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/samples/menu-bar/sample.snap/.settings/.jsdtscope b/samples/menu-bar/sample.snap/.settings/.jsdtscope
new file mode 100755
index 0000000..bbb8e68
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.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="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/samples/menu-bar/sample.snap/.settings/com.springsource.server.ide.jdt.core.prefs b/samples/menu-bar/sample.snap/.settings/com.springsource.server.ide.jdt.core.prefs
new file mode 100755
index 0000000..9229324
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.settings/com.springsource.server.ide.jdt.core.prefs
@@ -0,0 +1,3 @@
+#Wed Jun 17 12:54:11 BST 2009
+com.springsource.server.ide.jdt.core.source.attachment-org.springframework.web.servlet-3.0.0.CI-282.jar=/Users/chrisfrost/SVN_Repos/dm-server-servlet/main-branches/jersey/ivy-cache/repository/org.springframework/org.springframework.web.servlet/3.0.0.CI-282/org.springframework.web.servlet-sources-3.0.0.CI-282.jar
+eclipse.preferences.version=1
diff --git a/samples/menu-bar/sample.snap/.settings/org.eclipse.jdt.core.prefs b/samples/menu-bar/sample.snap/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..c7ae855
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon Jun 29 10:49:58 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.component b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.component
new file mode 100755
index 0000000..4bd4932
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="sample.snap">
+<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"/>
+<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="tinos"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
diff --git a/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.project.facet.core.xml b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100755
index 0000000..0f2bca3
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Virgo Web Server (Runtime) v2.1"/>
+ <installed facet="com.springsource.server.bundle" version="1.0"/>
+ <installed facet="jst.web" version="2.4"/>
+ <installed facet="jst.java" version="5.0"/>
+</faceted-project>
diff --git a/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.container b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100755
index 0000000..3bd5d0a
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.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/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.name b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100755
index 0000000..05bd71b
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/samples/menu-bar/sample.snap/.springBeans b/samples/menu-bar/sample.snap/.springBeans
new file mode 100755
index 0000000..67501ba
--- /dev/null
+++ b/samples/menu-bar/sample.snap/.springBeans
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.3.1.201001252100-CI-R3667-B621]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ <config>src/main/webapp/WEB-INF/snap-servlet.xml</config>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
diff --git a/samples/menu-bar/sample.snap/build.xml b/samples/menu-bar/sample.snap/build.xml
new file mode 100755
index 0000000..39a4fbd
--- /dev/null
+++ b/samples/menu-bar/sample.snap/build.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="sample.snap">
+ <property name="disable.bundlor" value="true"/>
+ <property file="${basedir}/../../../build.properties"/>
+ <property file="${basedir}/../../../build.versions"/>
+ <import file="${basedir}/../../../virgo-build/war/default.xml"/>
+</project>
diff --git a/samples/menu-bar/sample.snap/ivy.xml b/samples/menu-bar/sample.snap/ivy.xml
new file mode 100755
index 0000000..e3917e8
--- /dev/null
+++ b/samples/menu-bar/sample.snap/ivy.xml
@@ -0,0 +1,26 @@
+<?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.snaps.samples" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}" ext="war"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.eclipse.virgo.snaps.samples" name="sample.api" rev="${org.eclipse.virgo.snaps.samples}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.virgo.snaps.samples" name="sample.impl" rev="${org.eclipse.virgo.snaps.samples}" conf="compile->runtime"/>
+ <!-- Compile-time dependencies that are known to be provided by the dmServer -->
+ <dependency org="org.springframework" name="org.springframework.spring-library" rev="${org.springframework}" conf="server-provided->compile"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleController.java b/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleController.java
new file mode 100755
index 0000000..25100f1
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleController.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Pouzin Society, http://www.pouzinsociety.org
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patsy Phelan, Pouzin Society - initial contribution
+ *******************************************************************************/
+
+package sample.snap;
+
+import java.util.List;
+import sample.api.SampleDao;
+import sample.api.SampleAPI;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * Annotation-driven <em>MultiActionController</em> that handles all non-form
+ * URL's.
+ *
+ * Used to provide sample snap
+ */
+@Controller
+public class SampleController {
+ private final SampleAPI apiService;
+ private static Log log = LogFactory.getLog(SampleController.class);
+
+ @Autowired
+ public SampleController(SampleAPI apiService) {
+ this.apiService = apiService;
+ }
+
+ /**
+ * Custom handler for displaying index
+ */
+ @RequestMapping("/sample/index")
+ public ModelMap indexHandler() {
+ List<SampleDao> daoList;
+ log.info("Calling OSGi Service");
+ daoList = apiService.get();
+ log.info("Returned from OSGi Service");
+ return new ModelMap().addAttribute("daoList", daoList);
+ }
+
+ /**
+ * Custom handler for delete action
+ */
+ @RequestMapping("/sample/delete")
+ public String deleteHandler(@RequestParam("textVal") String text) {
+ log.info("Calling OSGi Service");
+ apiService.remove(new SampleDao(text));
+ log.info("Returned from OSGi Service");
+ return "redirect:/sample/index.htm";
+ }
+}
diff --git a/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleFormController.java b/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleFormController.java
new file mode 100644
index 0000000..0fb24ff
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/java/sample/snap/SampleFormController.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010, Pouzin Society, http://www.pouzinsociety.org
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patsy Phelan, Pouzin Society - initial contribution
+ *******************************************************************************/
+
+package sample.snap;
+
+import javax.servlet.http.HttpSession;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.SessionAttributes;
+import org.springframework.web.bind.support.SessionStatus;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import sample.api.SampleDao;
+import sample.api.SampleAPI;
+
+@Controller
+@RequestMapping("/sample/addDaoForm")
+@SessionAttributes("dao")
+public class SampleFormController {
+ private final SampleAPI apiService;
+ private static Log log = LogFactory.getLog(SampleFormController.class);
+
+ @Autowired
+ public SampleFormController(SampleAPI apiService) {
+ this.apiService = apiService;
+ }
+
+ @RequestMapping(method = RequestMethod.GET)
+ public String setupForm(Model model) {
+ log.info("setupForm()");
+ SampleDao dao = new SampleDao("Put Your Value here");
+ model.addAttribute("dao", dao);
+ return "sample/getDaoForm";
+ }
+
+ @RequestMapping(method = RequestMethod.POST)
+ public String processSubmit( @ModelAttribute("dao") SampleDao dao, BindingResult result, SessionStatus status, HttpSession session) {
+ log.info("calling OSGi apiService.add()");
+ apiService.add(dao);
+ log.info("back from OSGi apiService.add()");
+ session.setAttribute("message", "called apiService.add(" +dao.getText() + ")");
+ return "redirect:/sample/index.htm";
+ }
+}
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/META-INF/MANIFEST.MF b/samples/menu-bar/sample.snap/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..e01aa5b
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: sample.snap
+Bundle-Version: 1.0
+Bundle-Name: Sample Snap
+Bundle-Vendor: Virgo Snaps Samples
+Import-Library: org.springframework.spring;version="[3.0,3.1)"
+Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.2)",
+ sample.api;version="[1.0.0,1.0.0]"
+Import-Package: org.eclipse.virgo.web.dm;version="[2.0.0,2.5.0)",
+ org.eclipse.virgo.snaps.core;version="[1.0,2.0)",
+ javax.servlet;version="[2.4.0,3.0.0)",
+ javax.servlet.http;version="[2.4.0,3.0.0)",
+ javax.servlet.jsp.jstl.core;version="[1.1.2,1.2.0)",
+ org.apache.commons.logging;version="[1.1.1,1.1.1]",
+ sample.api;version="[1.0.0,1.0.0]",
+ org.springframework.web.context;version="[3.0.0,3.1.0)",
+ org.springframework.web.context.support;version="[3.0.0,3.1.0)"
+Snap-Host: animal.menu.bar;version="[1.0, 2.0)"
+Snap-ContextPath: /sample
+
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/META-INF/snap.properties b/samples/menu-bar/sample.snap/src/main/webapp/META-INF/snap.properties
new file mode 100644
index 0000000..2b985fc
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/META-INF/snap.properties
@@ -0,0 +1,3 @@
+link.text=Sample
+link.path=/index.htm
+snap.order=1
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/applicationContext.xml b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/applicationContext.xml
new file mode 100755
index 0000000..0684411
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/applicationContext.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+
+<!-- done in snap-servlet.xml - needs to have the service before the MVCs are autowired -->
+
+</beans>
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/getDaoForm.jsp b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/getDaoForm.jsp
new file mode 100644
index 0000000..3f8133d
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/getDaoForm.jsp
@@ -0,0 +1,29 @@
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<jsp:include page="/../top.jsp"/>
+
+<br>
+<br>
+<form:form modelAttribute="dao">
+ <table>
+ <tr>
+ <th>
+ Text: <form:errors path="text" cssClass="errors"/>
+ <br/>
+ <form:input path="text" size="20" maxlength="30"/>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <br>
+ <p class="submit"><input type="submit" value="Add Dao Now!"/></p>
+ </td>
+ </tr>
+ </table>
+</form:form>
+<br>
+<br>
+
+<jsp:include page="/../bottom.jsp"/> \ No newline at end of file
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/index.jsp b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/index.jsp
new file mode 100755
index 0000000..d9ded9d
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/sample/index.jsp
@@ -0,0 +1,30 @@
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+
+<jsp:include page="/../top.jsp"/>
+<h1>Sample DAO Information</h1>
+<table>
+ <tr>
+ <thead><th>Name</th></thead>
+ </tr>
+ <c:forEach var="dao" items="${daoList}">
+ <tr>
+ <td>${dao.text} </td>
+ <spring:url value="/sample/delete.htm${textVal}" var="deleteUrl">
+ <td>
+ <spring:param name="textVal" value="${dao.text}"/>
+ </spring:url>
+ <a href="${fn:escapeXml(deleteUrl)}">Delete Me</a>
+ </tr>
+ </c:forEach>
+</table>
+
+<ul>
+ <li><a href="<c:url value="/sample/addDaoForm.htm"/>">Add a new Sample DAO</a></li>
+</ul>
+
+<jsp:include page="/../bottom.jsp"/>
+
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/snap-servlet.xml b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/snap-servlet.xml
new file mode 100644
index 0000000..0991d71
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/snap-servlet.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+ http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+<!--
+ OSGi Services
+ -->
+<osgi:reference id="sampleApiService" interface="sample.api.SampleAPI" bean-name="sampleAPIImplBean" />
+
+<!--
+ - The controllers are autodetected POJOs labeled with the @Controller annotation.
+-->
+<context:component-scan base-package="sample.snap"/>
+
+<!--
+ - This bean configures the 'prefix' and 'suffix' properties of
+ - InternalResourceViewResolver, which resolves logical view names
+ - returned by Controllers. For example, a logical view name of "devices/index"
+ - will be mapped to "/WEB-INF/devices/index.jsp".
+-->
+<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/" p:suffix=".jsp"/>
+
+</beans>
diff --git a/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/web.xml b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000..434d751
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <context-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
+ </context-param>
+
+ <!-- Handles all requests into the slice -->
+ <servlet>
+ <servlet-name>snap</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>2</load-on-startup>
+ <init-param>
+ <param-name>contextClass</param-name>
+ <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>snap</servlet-name>
+ <url-pattern>*.htm</url-pattern>
+ </servlet-mapping>
+
+ <filter>
+ <filter-name>httpMethodFilter</filter-name>
+ <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>httpMethodFilter</filter-name>
+ <servlet-name>snap</servlet-name>
+ </filter-mapping>
+
+</web-app>
diff --git a/samples/menu-bar/sample.snap/src/test/java/.gitignore b/samples/menu-bar/sample.snap/src/test/java/.gitignore
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/test/java/.gitignore
diff --git a/samples/menu-bar/sample.snap/src/test/resources/.gitignore b/samples/menu-bar/sample.snap/src/test/resources/.gitignore
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/samples/menu-bar/sample.snap/src/test/resources/.gitignore