You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by th...@apache.org on 2011/08/29 14:56:15 UTC
svn commit: r1162777 [4/4] - in /cocoon/cocoon3/trunk: ./
cocoon-rest-optional/ cocoon-rest-optional/rcl-config/
cocoon-rest-optional/rcl-config/WEB-INF/
cocoon-rest-optional/rcl-config/WEB-INF/classes/ cocoon-rest-optional/src/
cocoon-rest-optional/sr...
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/jquery-ui-1.8.13.custom.min.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/progress.js
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/progress.js?rev=1162777&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/progress.js (added)
+++ cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/progress.js Mon Aug 29 12:56:14 2011
@@ -0,0 +1,55 @@
+var delayedReset = function(){
+ //Enable button
+ $("#operation").removeAttr('disabled');
+ $("#header").hide();
+ $("#progressbar").hide();
+};
+var onSuccessImport = function(data){
+ $("#header").html("Invoked processing");
+ //Updating progress
+ $("#progressbar").progressbar('value',data.progress);
+ //Setting the timer
+ window.progressIntervalId = window.setInterval(function(){
+ //Getting current operation progress
+ $.get('rest/ProgressService', function(data){
+ //Updating progress
+ $("#progressbar").progressbar('value', data.progress);
+ //If operation is complete
+ if (data.progress == 100) {
+ //Clear timer
+ window.clearInterval(window.progressIntervalId);
+ $("#header").html("Processing finished.");
+ setTimeout("delayedReset()", 3000);
+ }
+ });
+ }, 500);
+};
+
+$(document).ready(function(){
+ $('#ProgressServiceFormResult').hide();
+ //Progressbar initialization
+ $("#progressbar").progressbar({
+ value: 0
+ });
+ //Button click event
+ $("#operation").click(function(e){
+ $("#header").html("Processing request...");
+ $("#header").show();
+ $('#ProgressServiceFormResult').show();
+ $("#progressbar").show();
+ // disable the form submit
+ e.preventDefault();
+ //Disabling button
+ $("#operation").attr('disabled', 'disabled');
+ //Making sure that progress indicate 0
+ $("#progressbar").progressbar('value', 0);
+ // get the input data
+ var input = $("#nameImport").val();
+ //Perform POST for triggering long running operation
+ $.post('rest/ProgressService', {
+ name: input
+ }, function(data){
+ onSuccessImport(data);
+ }, "json");
+ });
+});
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/js/progress.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/sitemap.xmap?rev=1162777&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/sitemap.xmap (added)
+++ cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/sitemap.xmap Mon Aug 29 12:56:14 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ You 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. -->
+<!-- $Id: sitemap.xmap 697547 2008-09-21 16:52:48Z reinhard $ -->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap"
+ xmlns:servlet="http://apache.org/cocoon/servlet" xmlns:controller="http://apache.org/cocoon/controller">
+
+ <map:pipelines>
+ <map:pipeline>
+ <map:match pattern="">
+ <map:read src="welcome.html" />
+ </map:match>
+ <map:match pattern="rest/*">
+ <controller:call controller="rest-controller"
+ select="org.cocooon.rest.optional.sample.{map:1}" />
+ </map:match>
+ <map:match pattern="**">
+ <map:read src="{map:1}" />
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+
+</map:sitemap>
\ No newline at end of file
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/welcome.html
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/welcome.html?rev=1162777&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/welcome.html (added)
+++ cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/welcome.html Mon Aug 29 12:56:14 2011
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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.
+--><!-- $Id: welcome.html 642116 2008-03-28 08:00:47Z reinhard $ -->
+<html>
+ <head>
+ <title>cocoon-rest-optional show case</title>
+ <link href="css/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />
+ <script type="text/javascript" charset="utf-8" src="js/jquery-1.6.2.min.js">
+ </script>
+ <script type="text/javascript" charset="utf-8" src="js/jquery-ui-1.8.13.custom.min.js">
+ </script>
+ <script type="text/javascript" charset="utf-8" src="js/progress.js">
+ </script>
+ </head>
+ <body>
+ <h1>Progressbar based on jquery</h1>
+ <div class="widget">
+ <h1>Importar</h1>
+ <form action="rest/ProgressService" method="post" id="ProgressServiceForm">
+ <input id="operation" type="submit">
+ <div id="ProgressServiceFormResult">
+ <p id="header">
+ </p>
+ <div id="progressbar" style="width:500px">
+ </div>
+ </div>
+ </form>
+ </div>
+ </body>
+</html>
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/COB-INF/welcome.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-application-context.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-application-context.xml?rev=1162777&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-application-context.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-application-context.xml Mon Aug 29 12:56:14 2011
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ You 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. -->
+<!-- $Id: block-application-context.xml 697547 2008-09-21 16:52:48Z reinhard
+ $ -->
+<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:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:pipeline="http://cocoon.apache.org/schema/pipeline"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+ http://cocoon.apache.org/schema/pipeline http://cocoon.apache.org/schema/pipeline/cocoon-pipeline-1.0.xsd">
+ <context:component-scan base-package="org.cocooon.rest.optional.sample"
+ use-default-filters="false"
+ name-generator="org.apache.cocoon.rest.controller.ControllerBeanNameGenerator"
+ scope-resolver="org.apache.cocoon.rest.controller.ControllerBeanScopeResolver">
+ <context:include-filter type="annotation"
+ expression="org.apache.cocoon.rest.controller.annotation.RESTController" />
+ </context:component-scan>
+ <context:annotation-config />
+</beans>
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-application-context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml?rev=1162777&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml Mon Aug 29 12:56:14 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+ und
+-->
+<!-- $Id: block-servlet-service.xml 697547 2008-09-21 16:52:48Z reinhard $ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+ http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+ <bean name="org.cocooon.rest.optional.cocoon-rest-optional.service" class="org.apache.cocoon.servlet.XMLSitemapServlet">
+ <servlet:context mount-path="" context-path="blockcontext:/cocoon-rest-optional/"/>
+ </bean>
+
+</beans>
Propchange: cocoon/cocoon3/trunk/cocoon-rest-optional/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/cocoon3/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/pom.xml?rev=1162777&r1=1162776&r2=1162777&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/pom.xml (original)
+++ cocoon/cocoon3/trunk/pom.xml Mon Aug 29 12:56:14 2011
@@ -58,6 +58,7 @@
<module>cocoon-util</module>
<module>cocoon-wicket</module>
<module>parent</module>
+ <module>cocoon-rest-optional</module>
</modules>
<build>
@@ -128,4 +129,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file