You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/02/23 11:17:22 UTC

svn commit: r380088 - in /cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring: ./ conf/ conf/applicationContext.xml flow.js sitemap.xmap spring-app.xsamples test.xml

Author: cziegeler
Date: Thu Feb 23 02:16:45 2006
New Revision: 380088

URL: http://svn.apache.org/viewcvs?rev=380088&view=rev
Log:
Move spring samples to core

Added:
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml   (with props)
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js   (with props)
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap   (with props)
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples
    cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml   (with props)

Added: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml?rev=380088&view=auto
==============================================================================
--- cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml (added)
+++ cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml Thu Feb 23 02:16:45 2006
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  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.
+-->
+<!-- @version $Id$ -->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+
+	<bean id="spring-test" 
+	      class="org.apache.cocoon.spring.samples.SpringTest"
+	      abstract="false"
+	      singleton="true"
+	      lazy-init="default">
+      <property name="core"><ref bean="org.apache.cocoon.core.Core"/></property>
+	    <property name="javaVersion" value="${java.specification.version}"/>
+	</bean>
+
+</beans>

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/conf/applicationContext.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js?rev=380088&view=auto
==============================================================================
--- cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js (added)
+++ cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js Thu Feb 23 02:16:45 2006
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * 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.
+ */
+//
+// @version $Id$
+//
+
+function test() {
+
+    var component = cocoon.getComponent("spring-test");
+    var core = cocoon.getComponent("org.apache.cocoon.core.Core");
+    
+    cocoon.sendPage("test", { "message" : component.getMessage(),
+                              "configuration" : core.getSettings().getConfiguration(),
+                              "coreinjection" : component.getCore().getSettings().getWorkDirectory(),
+                              "javaVersion" : component.getJavaVersion()
+                             }
+                    );
+}

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/flow.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap?rev=380088&view=auto
==============================================================================
--- cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap (added)
+++ cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap Thu Feb 23 02:16:45 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  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.
+-->
+
+<!-- @version $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:flow language="javascript">
+    <map:script src="flow.js"/>
+  </map:flow>
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="">
+        <map:call function="test"/>
+      </map:match>
+
+      <map:match pattern="test">
+          <map:generate src="test.xml" type="jx"/>
+          <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/sitemap.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples?rev=380088&view=auto
==============================================================================
--- cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples (added)
+++ cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples Thu Feb 23 02:16:45 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  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.
+-->
+<!-- SVN $Id:$ -->
+<xsamples xpath="/samples" unless="group[@name='Spring App']">
+
+  <group name="Spring App">
+    <sample name="Spring App Block" href="spring-app/">
+      This is a demo of the new sitemap application features using Spring.
+    </sample>
+  </group>
+  
+</xsamples>

Added: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml?rev=380088&view=auto
==============================================================================
--- cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml (added)
+++ cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml Thu Feb 23 02:16:45 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  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.
+-->
+<!-- SVN $Id$ -->
+<document xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <p>This is a simple demo page</p>
+  <p>Message from a Spring Bean:</p>
+  <p>#{message}</p>
+  <p>Using the Cocoon core through Spring: This is the main configuration file location:</p>
+  <p>#{configuration}</p>
+  <p>Testing the injection of the core into a bean. This is the working directory:</p>
+  <p>#{coreinjection}</p>
+  <p>Testing Cocoon settings properties resolution:</p>
+  <p>version of the JVM is #{javaVersion}</p>
+</document>

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/test.xml
------------------------------------------------------------------------------
    svn:keywords = Id