Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 39957 invoked from network); 20 Jan 2004 11:14:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Jan 2004 11:14:01 -0000 Received: (qmail 29905 invoked by uid 500); 20 Jan 2004 11:13:33 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 29845 invoked by uid 500); 20 Jan 2004 11:13:33 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 29834 invoked by uid 500); 20 Jan 2004 11:13:33 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 29831 invoked from network); 20 Jan 2004 11:13:33 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 20 Jan 2004 11:13:33 -0000 Received: (qmail 39903 invoked by uid 1758); 20 Jan 2004 11:14:00 -0000 Date: 20 Jan 2004 11:14:00 -0000 Message-ID: <20040120111400.39902.qmail@minotaur.apache.org> From: unico@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/blocks/slide/WEB-INF slide.xconf X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N unico 2004/01/20 03:14:00 Modified: src/blocks/slide/WEB-INF slide.xconf Added: src/blocks/slide/java/org/apache/cocoon/components/slide/impl ContextTxFileContentStore.java ContextTxXMLFileDescriptorsStore.java Log: reinstate context relative file stores, now based on Tx implementation Revision Changes Path 1.1 cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/slide/impl/ContextTxFileContentStore.java Index: ContextTxFileContentStore.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.components.slide.impl; import java.io.File; import java.util.Hashtable; import org.apache.slide.common.Domain; import org.apache.slide.common.ServiceParameterErrorException; import org.apache.slide.common.ServiceParameterMissingException; import org.apache.slide.store.txfile.TxFileContentStore; /** * Specialized version of the TxFileContentStore from the * Jakarta Slide project, which respects the context path and work directory. * * @author Stephan Michels * @version CVS $Id: ContextTxFileContentStore.java,v 1.1 2004/01/20 11:13:59 unico Exp $ */ public class ContextTxFileContentStore extends TxFileContentStore { public ContextTxFileContentStore() { } public void setParameters(Hashtable parameters) throws ServiceParameterErrorException, ServiceParameterMissingException { // resolve the rootpath parameter relative to the webapp context path String rootpath = (String) parameters.get(STORE_DIR_PARAMETER); rootpath = new File(Domain.getParameter("contextpath"),rootpath).toString(); parameters.put(STORE_DIR_PARAMETER,rootpath); // resolve the workpath parameter relative to the cocoon work directory String workpath = (String) parameters.get(WORK_DIR_PARAMETER); workpath = new File(Domain.getParameter("workdir"),workpath).toString(); parameters.put(WORK_DIR_PARAMETER,workpath); super.setParameters(parameters); } } 1.1 cocoon-2.1/src/blocks/slide/java/org/apache/cocoon/components/slide/impl/ContextTxXMLFileDescriptorsStore.java Index: ContextTxXMLFileDescriptorsStore.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi . For more information on the Apache Software Foundation, please see . */ package org.apache.cocoon.components.slide.impl; import java.io.File; import java.util.Hashtable; import org.apache.slide.common.Domain; import org.apache.slide.common.ServiceParameterErrorException; import org.apache.slide.common.ServiceParameterMissingException; import org.apache.slide.store.txfile.TxXMLFileDescriptorsStore; /** * Specialized version of the TxXMLFileDescriptorStore from the * Jakarta Slide project, which respects the context path and work directory. * * @author Stephan Michels * @version CVS $Id: ContextTxXMLFileDescriptorsStore.java,v 1.1 2004/01/20 11:13:59 unico Exp $ */ public class ContextTxXMLFileDescriptorsStore extends TxXMLFileDescriptorsStore { public ContextTxXMLFileDescriptorsStore() { } public void setParameters(Hashtable parameters) throws ServiceParameterErrorException, ServiceParameterMissingException { // resolve the rootpath parameter relative to the webapp context path String rootpath = (String) parameters.get(STORE_DIR_PARAMETER); rootpath = new File(Domain.getParameter("contextpath"),rootpath).toString(); parameters.put(STORE_DIR_PARAMETER,rootpath); // resolve the workpath parameter relative to the cocoon work directory String workpath = (String) parameters.get(WORK_DIR_PARAMETER); workpath = new File(Domain.getParameter("workdir"),workpath).toString(); parameters.put(WORK_DIR_PARAMETER,workpath); super.setParameters(parameters); } } 1.6 +8 -7 cocoon-2.1/src/blocks/slide/WEB-INF/slide.xconf Index: slide.xconf =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/slide/WEB-INF/slide.xconf,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- slide.xconf 15 Jan 2004 10:53:20 -0000 1.5 +++ slide.xconf 20 Jan 2004 11:13:59 -0000 1.6 @@ -23,9 +23,11 @@ - - store\metadata - work\metadata + + + slide + + slide UTF-8 @@ -40,9 +42,9 @@ - - store\content - work\content + + slide + slide @@ -74,7 +76,6 @@ /users /roles - /groups /actions /files