You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by fl...@apache.org on 2010/11/09 20:14:19 UTC
svn commit: r1033164 - in
/lenya/trunk/org.apache.lenya.module.export/src/main:
java/org/apache/lenya/cms/export/ resources/ resources/COB-INF/
resources/COB-INF/jx/ resources/COB-INF/resources/
resources/COB-INF/resources/i18n/ resources/COB-INF/xslt/...
Author: florent
Date: Tue Nov 9 19:14:19 2010
New Revision: 1033164
URL: http://svn.apache.org/viewvc?rev=1033164&view=rev
Log:
enable module export
Added:
lenya/trunk/org.apache.lenya.module.export/src/main/resources/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/import.jx
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/importExampleContent.jx
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui.xml
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui_de.xml
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/sitemap.xmap
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/dir2xhtml.xsl
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-blockServlet.xml
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-components.xml
lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-registration.xml
Modified:
lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Import.java
lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Importer.java
Modified: lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Import.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Import.java?rev=1033164&r1=1033163&r2=1033164&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Import.java (original)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Import.java Tue Nov 9 19:14:19 2010
@@ -19,27 +19,23 @@ package org.apache.lenya.cms.export;
import java.io.File;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
import org.apache.lenya.cms.publication.Area;
-import org.apache.lenya.cms.publication.DocumentManager;
+import org.apache.lenya.cms.publication.Document;
import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.ResourceTypeResolver;
-import org.apache.lenya.cms.publication.URLInformation;
import org.apache.lenya.cms.usecase.AbstractUsecase;
-
+import org.apache.lenya.utils.URLInformation;
/**
* Import content.
*/
public class Import extends AbstractUsecase {
- private SourceResolver sourceResolver;
- private DocumentManager documentManager;
- private ResourceTypeResolver resourceTypeResolver;
-
- protected void initParameters() {
+ private Importer importer;
+
+ protected void initParameters() {
+
super.initParameters();
- String pubId = new URLInformation(getSourceURL()).getPublicationId();
+ //String pubId = new URLInformation(getSourceURL()).getPublicationId();
+ String pubId = new URLInformation().getPublicationId();
Publication pub = getSession().getPublication(pubId);
String path = getExampleContentPath(pub);
if (!new File(path).exists()) {
@@ -59,14 +55,17 @@ public class Import extends AbstractUsec
protected void doCheckPreconditions() throws Exception {
super.doCheckPreconditions();
Area area = getArea();
+ Document[] doc = area.getDocuments();
+ String test = "test";
if (area.getDocuments().length > 0) {
addErrorMessage("You can't import anything because this publication already contains content.");
}
}
protected Area getArea() {
- String url = getSourceURL();
- URLInformation info = new URLInformation(url);
+ /*String url = getSourceURL();
+ URLInformation info = new URLInformation(url);*/
+ URLInformation info = new URLInformation();
String pubId = info.getPublicationId();
String areaName = info.getArea();
return getSession().getPublication(pubId).getArea(areaName);
@@ -77,52 +76,30 @@ public class Import extends AbstractUsec
String path = getParameterAsString("path");
String baseUri = "file://" + path;
String sitetreeUri = baseUri + "/sitetree.xml";
- if (!SourceUtil.exists(sitetreeUri, getSourceResolver())) {
- addErrorMessage("The sitetree file does not exist in this directory.");
+ if (!importer.checkSitetreeUri(sitetreeUri)){
+ addErrorMessage("The sitetree file does not exist in this directory.");
}
+
}
protected void doExecute() throws Exception {
super.doExecute();
String path = getParameterAsString("path");
- Importer importer = new Importer(getLogger());
+ /*Importer importer = new Importer(getLogger());
importer.setDocumentManager(getDocumentManager());
importer.setResourceTypeResolver(getResourceTypeResolver());
- importer.setSourceResolver(getSourceResolver());
+ importer.setSourceResolver(getSourceResolver());*/
+
+ importer.setLogger(getLogger());
importer.importContent(getDefaultPub(), getArea(), path);
}
-
- protected SourceResolver getSourceResolver() {
- return sourceResolver;
- }
-
- /**
- * TODO: Bean wiring
- */
- public void setSourceResolver(SourceResolver sourceResolver) {
- this.sourceResolver = sourceResolver;
- }
-
- protected ResourceTypeResolver getResourceTypeResolver() {
- return resourceTypeResolver;
- }
-
- /**
- * TODO: Bean wiring
- */
- public void setResourceTypeResolver(ResourceTypeResolver resourceTypeResolver) {
- this.resourceTypeResolver = resourceTypeResolver;
- }
-
- protected DocumentManager getDocumentManager() {
- return documentManager;
- }
-
- /**
- * TODO: Bean wiring
- */
- public void setDocumentManager(DocumentManager documentManager) {
- this.documentManager = documentManager;
- }
+
+ public Importer getImporter() {
+ return importer;
+ }
+
+ public void setImporter(Importer importer) {
+ this.importer = importer;
+ }
}
Modified: lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Importer.java
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Importer.java?rev=1033164&r1=1033163&r2=1033164&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Importer.java (original)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/java/org/apache/lenya/cms/export/Importer.java Tue Nov 9 19:14:19 2010
@@ -53,7 +53,14 @@ public class Importer extends AbstractLo
public Importer(Log logger) {
setLogger(logger);
}
-
+
+ public Importer(){
+
+ }
+
+ public boolean checkSitetreeUri(String sitetreeUri) throws Exception {
+ return SourceUtil.exists(sitetreeUri, getSourceResolver());
+ }
/**
* Imports content into an area.
* @param area The area.
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/import.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/import.jx?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/import.jx (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/import.jx Tue Nov 9 19:14:19 2010
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+ 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: forms.jx 416646 2006-06-23 09:02:03Z andreas $ -->
+<page:page
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:ci="http://apache.org/cocoon/include/1.0"
+ >
+
+ <page:title><i18n:text>Import</i18n:text></page:title>
+ <page:body>
+
+ <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
+
+ <form method="post">
+ <input type="hidden" name="lenya.continuation" value="${cocoon.continuation.id}"/>
+ <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
+
+ <jx:choose>
+ <jx:when test="${! usecase.hasErrors()}">
+ <p><i18n:text>Select import directory</i18n:text>:</p>
+ <p style="margin-bottom: 0">
+ <jx:set var="path" value="${usecase.getParameter('path')}"/>
+ <jx:set var="lastIndex" value="${path.lastIndexOf('/')}"/>
+ <jx:if test="${lastIndex > -1}">
+ <a href="?lenya.usecase=${usecase.getName()}&lenya.continuation=${cocoon.continuation.id}}&path=${path.substring(0, lastIndex)}">..</a>
+ </jx:if>
+ </p>
+ <!-- TODO : test this use case, may have to change cocoon://modules/export/directory/... by cocoon:/directory.. -->
+ <ci:include src="cocoon://modules/export/directory/${usecase.getParameter('path')}:${cocoon.continuation.id}"/>
+ <p>
+ <input type="submit" name="submit" value="Import" i18n:attr="value"/>
+ <input type="submit" value="Cancel" i18n:attr="value"/>
+ </p>
+ </jx:when>
+ <jx:otherwise>
+ <p>
+ <input type="submit" value="Cancel" i18n:attr="value"/>
+ </p>
+ </jx:otherwise>
+ </jx:choose>
+
+ </form>
+
+ </page:body>
+</page:page>
\ No newline at end of file
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/importExampleContent.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/importExampleContent.jx?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/importExampleContent.jx (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/jx/importExampleContent.jx Tue Nov 9 19:14:19 2010
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+ 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: forms.jx 416646 2006-06-23 09:02:03Z andreas $ -->
+
+<page:page
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:ci="http://apache.org/cocoon/include/1.0"
+ >
+
+ <page:title><i18n:text>getting-started</i18n:text></page:title>
+ <page:body>
+
+ <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
+
+ <jx:choose>
+ <jx:when test="${! usecase.hasErrors()}">
+ <p><i18n:text>thanks</i18n:text></p>
+ <form name="import" method="post">
+ <p>
+ <input type="hidden" name="lenya.continuation" value="${cocoon.continuation.id}"/>
+ <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
+ <input type="submit" name="submit" value="import-example-content" i18n:attr="value"/>
+ <i18n:text>may-take-a-while</i18n:text>
+ </p>
+ </form>
+ <form name="create" method="get">
+ <p>
+ <input type="hidden" name="lenya.usecase" value="sitemanagement.create"/>
+ <input type="hidden" name="path" value="/index"/>
+ <input type="submit" name="submit" value="create-own-page" i18n:attr="value"/>
+ </p>
+ </form>
+ </jx:when>
+ <jx:otherwise>
+ <p>
+ <form method="post">
+ <input type="hidden" name="lenya.continuation" value="${cocoon.continuation.id}"/>
+ <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
+ <input type="submit" value="Cancel" i18n:attr="value"/>
+ </form>
+ </p>
+ </jx:otherwise>
+ </jx:choose>
+
+ </page:body>
+</page:page>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui.xml?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui.xml (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui.xml Tue Nov 9 19:14:19 2010
@@ -0,0 +1,30 @@
+<?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: cmsui.xml 447395 2006-09-18 13:01:33Z andreas $ -->
+
+<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns="http://apache.org/cocoon/i18n/2.1">
+
+ <message key="getting-started">Getting Started</message>
+ <message key="thanks">Thank you for considering Apache Lenya!</message>
+ <message key="import-example-content">Import example pages</message>
+ <message key="create-own-page">Start with own page</message>
+ <message key="may-take-a-while">This may take a couple of seconds.</message>
+
+</catalogue>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui_de.xml?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui_de.xml (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/resources/i18n/cmsui_de.xml Tue Nov 9 19:14:19 2010
@@ -0,0 +1,30 @@
+<?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: cmsui.xml 447395 2006-09-18 13:01:33Z andreas $ -->
+
+<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns="http://apache.org/cocoon/i18n/2.1">
+
+ <message key="getting-started">Erste Schritte</message>
+ <message key="thanks">Vielen Dank, dass Sie sich Apache Lenya näher anschauen!</message>
+ <message key="import-example-content">Beispiel-Inhalt importieren</message>
+ <message key="create-own-page">Eigene Seite anlegen</message>
+ <message key="may-take-a-while">Dies kann einige Sekunden dauern.</message>
+
+</catalogue>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/sitemap.xmap?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/sitemap.xmap (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/sitemap.xmap Tue Nov 9 19:14:19 2010
@@ -0,0 +1,38 @@
+<?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$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
+
+ <map:pipeline>
+ <map:match pattern="directory/**:*">
+ <map:generate type="directory" src="/{1}"/>
+ <map:transform src="xslt/dir2xhtml.xsl">
+ <map:parameter name="path" value="{1}"/>
+ <map:parameter name="continuationId" value="{2}"/>
+ <map:parameter name="uri" value="{request:requestUri}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+
+ </map:pipelines>
+
+</map:sitemap>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/dir2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/dir2xhtml.xsl?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/dir2xhtml.xsl (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/COB-INF/xslt/dir2xhtml.xsl Tue Nov 9 19:14:19 2010
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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: xinclude.xsl 123414 2004-12-27 14:52:24Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:dir="http://apache.org/cocoon/directory/2.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ >
+
+ <xsl:param name="path"/>
+ <xsl:param name="uri"/>
+ <xsl:param name="continuationId"/>
+
+
+ <xsl:template match="/dir:directory">
+ <p style="margin-bottom: 0">
+ <xsl:value-of select="$path"/>
+ </p>
+ <xsl:call-template name="children"/>
+ </xsl:template>
+
+
+ <xsl:template match="dir:directory">
+ <li>
+ <a href="{$uri}?lenya.usecase=export.import&lenya.continuation={$continuationId}&path={$path}/{@name}"><xsl:value-of select="@name"/></a>
+ </li>
+ <xsl:if test="*">
+ <xsl:call-template name="children"/>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template name="children">
+ <ul style="margin-top: 0; margin-bottom: 0; list-style-type: none;">
+ <xsl:apply-templates select="*">
+ <xsl:sort/>
+ </xsl:apply-templates>
+ </ul>
+ </xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-blockServlet.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-blockServlet.xml?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-blockServlet.xml (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-blockServlet.xml Tue Nov 9 19:14:19 2010
@@ -0,0 +1,34 @@
+<?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
+-->
+
+<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.apache.lenya.module.export.block" class="org.apache.cocoon.sitemap.SitemapServlet">
+ <servlet:context mount-path="/export" context-path="blockcontext:/lenya-module-export-2.2.0-SNAPSHOT/">
+ <servlet:connections>
+ <entry key="usecase" value-ref="org.apache.lenya.core.usecase.block"/>
+ </servlet:connections>
+ </servlet:context>
+ </bean>
+</beans>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-components.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-components.xml?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-components.xml (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-components.xml Tue Nov 9 19:14:19 2010
@@ -0,0 +1,45 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+ <bean name="org.apache.lenya.cms.usecase.Usecase/export.importExampleContent"
+ class="org.apache.lenya.cms.export.Import" scope="session" init-method="initialize">
+ <!-- Abstractusecase properties -->
+ <property name="repository" ref="org.apache.lenya.cms.publication.Repository" />
+ <property name="view">
+ <bean class="org.apache.lenya.cms.usecase.UsecaseViewImpl">
+ <property name="guiManager" ref="org.apache.lenya.cms.usecase.gui.GUIManager" />
+ <property name="viewUri" value="fallback://lenya/modules/export/jx/importExampleContent.jx" />
+ <property name="createContinuation" value="true" />
+ </bean>
+ </property>
+ <!-- Import property importer -->
+ <property name="importer">
+ <bean class="org.apache.lenya.cms.export.Importer">
+ <property name="sourceResolver" ref="org.apache.excalibur.source.SourceResolver" />
+ <property name="documentManager" ref="org.apache.lenya.cms.publication.DocumentManager" />
+ <property name="resourceTypeResolver" ref="org.apache.lenya.cms.publication.ResourceTypeResolver" />
+ </bean>
+ </property>
+ </bean>
+
+</beans>
Added: lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-registration.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-registration.xml?rev=1033164&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-registration.xml (added)
+++ lenya/trunk/org.apache.lenya.module.export/src/main/resources/META-INF/cocoon/spring/lenya-module-export-registration.xml Tue Nov 9 19:14:19 2010
@@ -0,0 +1,28 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+ <bean name="org.apache.lenya.cms.module.Module/export" class="org.apache.lenya.cms.module.ModuleImpl">
+ <property name="baseUri" value="file://${lenya.home}/org.apache.lenya.module.export/target/classes/COB-INF"/>
+ </bean>
+
+</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org