You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2006/06/27 19:09:38 UTC

svn commit: r417520 - in /lenya/trunk/src/modules/neutron: ./ config/ config/cocoon-xconf/ config/cocoon-xconf/usecase-neutron.xmap module.xml sitemap.xmap xslt/ xslt/introspection.xsl

Author: michi
Date: Tue Jun 27 10:09:38 2006
New Revision: 417520

URL: http://svn.apache.org/viewvc?rev=417520&view=rev
Log:
neutron module added

Added:
    lenya/trunk/src/modules/neutron/
    lenya/trunk/src/modules/neutron/config/
    lenya/trunk/src/modules/neutron/config/cocoon-xconf/
    lenya/trunk/src/modules/neutron/config/cocoon-xconf/usecase-neutron.xmap
    lenya/trunk/src/modules/neutron/module.xml
    lenya/trunk/src/modules/neutron/sitemap.xmap
    lenya/trunk/src/modules/neutron/xslt/
    lenya/trunk/src/modules/neutron/xslt/introspection.xsl

Added: lenya/trunk/src/modules/neutron/config/cocoon-xconf/usecase-neutron.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/neutron/config/cocoon-xconf/usecase-neutron.xmap?rev=417520&view=auto
==============================================================================
--- lenya/trunk/src/modules/neutron/config/cocoon-xconf/usecase-neutron.xmap (added)
+++ lenya/trunk/src/modules/neutron/config/cocoon-xconf/usecase-neutron.xmap Tue Jun 27 10:09:38 2006
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 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.
+-->
+
+<!--
+    This file defines the publication specific use-cases
+-->
+
+  <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'neutron']">
+
+   <component-instance name="neutron" logger="lenya.publication">
+      <transaction policy="pessimistic"/>
+      <!--<view template="modules/bxe/usecases/bxe.jx" menu="false"/>-->
+      <exit usecase="lucene.index">
+        <parameter name="indexAction" value="index"/>
+        <parameter name="indexArea" value="authoring"/>
+      </exit>
+    </component-instance>
+    
+  </xconf>

Added: lenya/trunk/src/modules/neutron/module.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/neutron/module.xml?rev=417520&view=auto
==============================================================================
--- lenya/trunk/src/modules/neutron/module.xml (added)
+++ lenya/trunk/src/modules/neutron/module.xml Tue Jun 27 10:09:38 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-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.
+-->
+
+<!-- $Id: publication.xml 374687 2006-02-03 15:24:55Z michi $ -->
+
+<lenya:module xmlns:lenya="http://apache.org/lenya/module/1.0">
+  <lenya:id>org.apache.lenya.modules.neutron</lenya:id>
+  <lenya:package>org.apache.lenya.modules</lenya:package>
+  <lenya:version>0.1-dev</lenya:version>
+  <lenya:name>Neutron Module</lenya:name>
+  <lenya:lenya-version>@lenya.version@</lenya:lenya-version>
+  <lenya:description>Neutron Module</lenya:description>
+</lenya:module>

Added: lenya/trunk/src/modules/neutron/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/neutron/sitemap.xmap?rev=417520&view=auto
==============================================================================
--- lenya/trunk/src/modules/neutron/sitemap.xmap (added)
+++ lenya/trunk/src/modules/neutron/sitemap.xmap Tue Jun 27 10:09:38 2006
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-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.
+-->
+
+<!-- $Id: usecase-bxe.xmap 345495 2005-11-18 15:11:30Z chestnut $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components/>
+
+  <map:pipelines>
+      
+    <!-- Introspection -->
+  <map:pipeline>
+    <map:match pattern="*/**/introspection.xml">
+      <map:generate src="context:/lenya/content/util/empty.xml"/>
+      <map:transform src="context:/lenya/modules/neutron/xslt/introspection.xsl">
+        <map:parameter name="context" value="{page-envelope:context-prefix}"/>
+        <map:parameter name="publication" value="{page-envelope:publication-id}"/>
+        <map:parameter name="area" value="{1}"/>
+        <map:parameter name="page-id" value="{2}"/>
+      </map:transform>
+      <map:serialize type="xml"/>
+    </map:match>
+  </map:pipeline>
+  
+    <map:pipeline>
+      <map:match pattern="neutron" type="usecase">
+        <map:match pattern="checkout" type="step">
+          <map:select type="resource-exists">
+          <map:parameter name="prefix" value="lenya://"/>
+          <map:when test="lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}">
+            <map:act type="reserved-checkout">
+              <map:generate src="context://lenya/content/util/empty.xml"/>
+              <map:serialize type="xml"  status-code="423"/>
+            </map:act>
+            <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
+            <map:serialize type="xml" status-code="200" />
+          </map:when>
+          <map:otherwise>
+            <map:generate src="context://lenya/content/util/empty.xml"/>
+            <map:serialize type="xml" status-code="412"/>
+          </map:otherwise>
+        </map:select>
+        </map:match>
+
+        <map:match pattern="checkin" type="step">
+          <map:generate src="context://lenya/content/util/empty.xml"/>
+          <map:serialize type="xml"/>
+        </map:match>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+
+</map:sitemap>

Added: lenya/trunk/src/modules/neutron/xslt/introspection.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/neutron/xslt/introspection.xsl?rev=417520&view=auto
==============================================================================
--- lenya/trunk/src/modules/neutron/xslt/introspection.xsl (added)
+++ lenya/trunk/src/modules/neutron/xslt/introspection.xsl Tue Jun 27 10:09:38 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2006 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.
+-->
+
+<!-- $Id: publication.xsl 388509 2006-03-24 13:07:10Z michi $ -->
+
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns="http://www.wyona.org/neutron/1.0"
+>
+
+<xsl:param name="context" select="'context-null'"/>
+<xsl:param name="publication" select="'publication-null'"/>
+<xsl:param name="area" select="'area-null'"/>
+<xsl:param name="page-id" select="'page-id-null'"/>
+<xsl:param name="uri" select="'/foo/bar.xml'"/>
+
+<xsl:template match="/">
+  <introspection>
+    <edit mime-type="application/xml" name="Body Content">
+
+      <open url="{$context}/{$publication}/authoring/{$page-id}.xml" method="GET"/>
+
+      <checkout url="{$context}/{$publication}/authoring/{$page-id}.xml?lenya.usecase=neutron&amp;lenya.step=checkout" method="GET"/>
+
+      <save url="{$context}/{$publication}/authoring/{$page-id}.xml?lenya.usecase=neutron&amp;lenya.step=checkin" method="PUT"/>
+
+
+
+<!--
+      <schemas>
+        <schema href="http://foo.bar.com/lenya/modules/docbook/schemas/simple.rng" type="RelaxNG"/>
+        <schema href="http://foo.bar.com/lenya/modules/docbook/schemas/default.rng" type="RelaxNG"/>
+      </schemas>
+      <styles>
+        <style href="http://foo.bar.com/lenya/modules/xhtml/styles/default.xsl"/>
+        <style href="http://foo.bar.com/lenya/modules/xhtml/styles/simple.xsl"/>
+      </styles>
+-->
+    </edit>
+  </introspection>
+</xsl:template>
+
+</xsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org