mikeh 01/11/13 13:35:45
Modified: src/java/org/apache/turbine/modules ModuleLoader.java
src/java/org/apache/turbine/pipeline DefaultResolver.java
ModuleRunner.java
Added: src/java/org/apache/turbine/pipeline PipelineUtil.java
Removed: src/java/org/apache/turbine/pipeline PipeLineUtil.java
Log:
change PipeLine to Pipeline
Revision Changes Path
1.5 +4 -4
jakarta-turbine-3/src/java/org/apache/turbine/modules/ModuleLoader.java
Index: ModuleLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/modules/ModuleLoader.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ModuleLoader.java 2001/11/13 19:45:09 1.4
+++ ModuleLoader.java 2001/11/13 21:35:44 1.5
@@ -68,13 +68,13 @@
import org.apache.commons.collections.ExtendedProperties;
import org.apache.turbine.Log;
-import org.apache.turbine.pipeline.PipeLineUtil;
+import org.apache.turbine.pipeline.PipelineUtil;
/**
* Load modules for use in the view pipeline.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: ModuleLoader.java,v 1.4 2001/11/13 19:45:09 mikeh Exp $
+ * @version $Id: ModuleLoader.java,v 1.5 2001/11/13 21:35:44 mikeh Exp $
*/
public class ModuleLoader
{
@@ -231,7 +231,7 @@
else
{
StringBuffer sb = new StringBuffer();
- PipeLineUtil.parseTemplatePath(name, sb);
+ PipelineUtil.parseTemplatePath(name, sb);
j = getPossibleModules(sb.toString());
k = getAllPossibleModules(i,j,type);
}
@@ -349,7 +349,7 @@
// Parse the template name and change it into a package.
StringBuffer pckage = new StringBuffer();
- int i = PipeLineUtil.parseTemplatePath(template,pckage);
+ int i = PipelineUtil.parseTemplatePath(template,pckage);
if (pckage.charAt(0) == '/')
{
1.3 +3 -3
jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultResolver.java
Index: DefaultResolver.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/DefaultResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultResolver.java 2001/11/13 20:41:37 1.2
+++ DefaultResolver.java 2001/11/13 21:35:44 1.3
@@ -123,7 +123,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Mike Haberman</a>
- * @version $Id: DefaultResolver.java,v 1.2 2001/11/13 20:41:37 mikeh Exp $
+ * @version $Id: DefaultResolver.java,v 1.3 2001/11/13 21:35:44 mikeh Exp $
*/
public class DefaultResolver
@@ -157,7 +157,7 @@
//
StringBuffer sb = new StringBuffer();
- int i = PipeLineUtil.parseTemplatePath(targetTemplate, sb);
+ int i = PipelineUtil.parseTemplatePath(targetTemplate, sb);
Iterator j = getPossibleTemplates(sb.toString());
while (j.hasNext())
@@ -189,7 +189,7 @@
// Parse the template name and change it into a package.
StringBuffer pckage = new StringBuffer();
- int i = PipeLineUtil.parseTemplatePath(template,pckage);
+ int i = PipelineUtil.parseTemplatePath(template,pckage);
if (pckage.charAt(0) == '/')
{
1.2 +2 -2
jakarta-turbine-3/src/java/org/apache/turbine/pipeline/ModuleRunner.java
Index: ModuleRunner.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/pipeline/ModuleRunner.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ModuleRunner.java 2001/11/13 19:45:09 1.1
+++ ModuleRunner.java 2001/11/13 21:35:44 1.2
@@ -65,7 +65,7 @@
* This class is used execute the module chain.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Mike Haberman</a>
- * @version $Id: ModuleRunner.java,v 1.1 2001/11/13 19:45:09 mikeh Exp $
+ * @version $Id: ModuleRunner.java,v 1.2 2001/11/13 21:35:44 mikeh Exp $
*/
public class ModuleRunner
{
@@ -111,7 +111,7 @@
// normalize the target
target = data.getTarget();
StringBuffer sb = new StringBuffer();
- PipeLineUtil.parseTemplatePath(target,sb);
+ PipelineUtil.parseTemplatePath(target,sb);
return sb.toString();
}
}
1.1
jakarta-turbine-3/src/java/org/apache/turbine/pipeline/PipelineUtil.java
Index: PipelineUtil.java
===================================================================
package org.apache.turbine.pipeline;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, 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" and "Apache Software Foundation" and
* "Apache Turbine" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Turbine", 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 (INCLUDING, 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. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
perhaps this code should go someplace else.
The following classes use it:
+ DefaultResolver
+ ModuleRunner
+ modules/ModuleLoader
*/
/**
*
* @author <a href="mailto:[EMAIL PROTECTED]">Mike Haberman</a>
* @version $Id: PipelineUtil.java,v 1.1 2001/11/13 21:35:45 mikeh Exp $
*/
public class PipelineUtil
{
private PipelineUtil()
{
}
/**
* Parse the template name collected from URL parameters or
* template context to a path name. Double slashes are changed
* into single ones and commas used as path delemiters in
* URL parameters are changed into slashes. Empty names or
* names without a file part are not accepted.
*
* @param template The template name.
* @param buffer A buffer for the result.
* @return The index of the separator between the path and the name.
* @exception Exception Malformed template name.
*/
/*
TODO: it would be nice to cache this info
*/
public static int parseTemplatePath(String template,StringBuffer buffer)
throws Exception
{
char c;
int j = 0;
int ind = -1;
buffer.setLength(0);
buffer.append(template);
int len = buffer.length();
while (j < len)
{
c = buffer.charAt(j);
if (c == ',')
{
c = '/';
buffer.setCharAt(j,c);
}
if (c == '/')
{
ind = j;
if (j < (len - 1))
{
c = buffer.charAt(j + 1);
if ((c == '/') ||
(c == ','))
{
buffer.deleteCharAt(j);
len--;
continue;
}
}
}
j++;
}
if ((len == 0) ||
(ind >= (len - 1)))
{
throw new Exception(
"Syntax error in template name '" + template + '\'');
}
return ind;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>