You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2008/03/21 14:55:20 UTC
svn commit: r639645 [1/7] - in /cocoon/whiteboard/corona/trunk: ./
corona-core/ corona-core/src/ corona-core/src/main/
corona-core/src/main/java/ corona-core/src/main/java/org/
corona-core/src/main/java/org/apache/
corona-core/src/main/java/org/apache/...
Author: reinhard
Date: Fri Mar 21 06:54:32 2008
New Revision: 639645
URL: http://svn.apache.org/viewvc?rev=639645&view=rev
Log:
COCOON-2180 initial import of Corona
Added:
cocoon/whiteboard/corona/trunk/
cocoon/whiteboard/corona/trunk/corona-core/
cocoon/whiteboard/corona/trunk/corona-core/pom.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/
cocoon/whiteboard/corona/trunk/corona-core/src/main/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PrototypePipelineComponentFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/ReflectionPipelineComponentFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Starter.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLConsumer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLProducer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/XMLSerializer.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/ComponentProvider.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/ComponentProviderImpl.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/CustomException.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/Invocation.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationException.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/NoMatchingPipelineException.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/SitemapBuilder.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/SitemapParameters.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreter.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreterFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/PrototypeLanguageInterpreterFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/SitemapLanguageInterpreter.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/AbstractSitemapNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ActNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/CallNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ErrorNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/FlowNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/GenerateNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/InvocationResult.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/OtherwiseNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ParameterNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelineNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelinesNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ReadNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/RedirectNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SelectNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/Sitemap.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNodeFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/TransformNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/WhenNode.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/NodeChild.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/Parameter.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/ClassPathResourceResolver.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/ResourceResolver.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/ExceptionHandler.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/HttpContextHelper.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/WildcardMatcherHelper.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-expression-language.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-action.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-sitemap-node.xml (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/test/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/
cocoon/whiteboard/corona/trunk/corona-core/src/test/java/org/apache/cocoon/corona/pipeline/PipelineTest.java (with props)
cocoon/whiteboard/corona/trunk/corona-core/src/test/resources/
cocoon/whiteboard/corona/trunk/corona-servlet/
cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/rcl.properties (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/ModifiableSource.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/ModifiableTraversableSource.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/MoveableSource.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/Source.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceException.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceNotFoundException.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceParameters.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceResolver.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceUtil.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/SourceValidity.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/TraversableSource.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/source/URIAbsolutizer.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/DynamicURLStreamHandlerFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/Installer.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/ParentAwareURLStreamHandlerFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/URLStreamHandlerFactoryWrapper.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/CompositeMap.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceFactoriesManager.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceIOInputStream.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceSAXResult.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLConnection.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandler.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/jnet/source/SourceURLStreamHandlerFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSource.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/FileSourceFactory.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/sourceresolve/test/Test.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/excalibur/xml/sax/XMLizable.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/COB-INF/sitemap.xmap (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/include.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/aggregation/sub.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/404.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/500.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/501.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/error-handling/503.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/overview.html (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/read/javascript-resource.js (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/simple.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/resources/sax-pipeline/unauthorized.xml (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/MockHttpServletRequest.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/MockHttpServletResponse.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java (with props)
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/resources/
cocoon/whiteboard/corona/trunk/corona-servlet/src/test/resources/COB-INF/
cocoon/whiteboard/corona/trunk/parent/
cocoon/whiteboard/corona/trunk/parent/pom.xml (with props)
cocoon/whiteboard/corona/trunk/pom.xml (with props)
Added: cocoon/whiteboard/corona/trunk/corona-core/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/pom.xml?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/pom.xml (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/pom.xml Fri Mar 21 06:54:32 2008
@@ -0,0 +1,60 @@
+<?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$ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>corona-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <artifactId>corona-core</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <name>Cocoon Corona: Core [jar]</name>
+ <description>The core of Cocoon Corona. A Servlet API independent implementation of XML pipelines and a tree processor</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Propchange: cocoon/whiteboard/corona/trunk/corona-core/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/pom.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.cocoon.corona.pipeline.action.Action;
+import org.apache.cocoon.corona.pipeline.component.Consumer;
+import org.apache.cocoon.corona.pipeline.component.Finisher;
+import org.apache.cocoon.corona.pipeline.component.PipelineComponent;
+import org.apache.cocoon.corona.pipeline.component.Producer;
+import org.apache.cocoon.corona.pipeline.component.Starter;
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public abstract class AbstractPipeline implements Pipeline {
+
+ private List<Action> actions = new LinkedList<Action>();
+
+ private LinkedList<PipelineComponent> components = new LinkedList<PipelineComponent>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.Pipeline#addAction(org.apache.cocoon.corona.pipeline.action.Action)
+ */
+ public void addAction(Action action) {
+ this.actions.add(action);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.Pipeline#addComponent(org.apache.cocoon.corona.pipeline.component.PipelineComponent)
+ */
+ public void addComponent(PipelineComponent pipelineComponent) {
+ this.components.add(pipelineComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.Pipeline#execute(org.apache.cocoon.corona.sitemap.InvocationImpl)
+ */
+ public void execute(Invocation invocation) throws Exception {
+ System.out.println("AbstractPipeline.execute(" + invocation.getRequest() + ")");
+
+ // execute the actions first
+ for (Action action : this.actions) {
+ System.out.println(action + ".execute(" + invocation.getRequest() + ")");
+ action.execute(invocation);
+ }
+
+ // now setup the components
+ this.setupComponents(invocation);
+
+ // and execute the Starter
+ Starter starter = (Starter) this.components.getFirst();
+ starter.execute(invocation);
+ }
+
+ protected void setupComponents(Invocation invocation) {
+ PipelineComponent first = this.components.getFirst();
+
+ // first component must be a Starter
+ if (!(first instanceof Starter)) {
+ throw new IllegalStateException("Cannot execute pipeline, first pipeline component is no starter");
+ }
+
+ // last component must be a Finisher
+ PipelineComponent last = this.components.getLast();
+ if (!(last instanceof Finisher)) {
+ throw new IllegalStateException("Cannot execute pipeline, last pipeline component is no finisher");
+ }
+
+ // now try to link the components, always two components at a time
+ // start at the first component
+ PipelineComponent currentComponent = first;
+ // next component to link is the second in the list
+ for (ListIterator<PipelineComponent> i = this.components.listIterator(1); i.hasNext();) {
+ // link the current with the next component
+ PipelineComponent nextComponent = i.next();
+ this.linkComponents(currentComponent, nextComponent);
+ // now advance to the next component
+ currentComponent = nextComponent;
+ }
+
+ // configure the finisher
+ ((Finisher) last).setOutputStream(invocation.getOutputStream());
+ }
+
+ private void linkComponents(PipelineComponent firstComponent, PipelineComponent secondComponent) {
+ // first component must be a Producer
+ if (!(firstComponent instanceof Producer)) {
+ throw new IllegalStateException("Cannot link components: First component is no producer.");
+ }
+
+ // second component must be a Consumer
+ if (!(secondComponent instanceof Consumer)) {
+ throw new IllegalStateException("Cannot link components: Second component is no consumer.");
+ }
+
+ // let the Producer accept the Consumer (the Producer might reject it)
+ ((Producer) firstComponent).setConsumer((Consumer) secondComponent);
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/AbstractPipeline.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+public class CachingPipeline extends AbstractPipeline {
+
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+public class NonCachingPipeline extends AbstractPipeline {
+
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/NonCachingPipeline.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+import org.apache.cocoon.corona.pipeline.action.Action;
+import org.apache.cocoon.corona.pipeline.component.PipelineComponent;
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public interface Pipeline {
+
+ void addAction(Action action);
+
+ void addComponent(PipelineComponent pipelineComponent);
+
+ void execute(Invocation invocation) throws Exception;
+
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/Pipeline.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+public interface PipelineFactory {
+
+ Pipeline createPipeline(String type);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PipelineFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class PrototypePipelineFactory implements PipelineFactory, ApplicationContextAware {
+
+ private ApplicationContext applicationContext;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.PipelineFactory#createPipeline(java.lang.String)
+ */
+ public Pipeline createPipeline(String type) {
+ return (Pipeline) this.applicationContext.getBean(type, Pipeline.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
+ */
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/PrototypePipelineFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class ReflectionPipelineFactory implements PipelineFactory {
+
+ private Map<String, Class<? extends Pipeline>> types = new HashMap<String, Class<? extends Pipeline>>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.PipelineFactory#createPipeline(java.lang.String)
+ */
+ public Pipeline createPipeline(String type) {
+ Class<? extends Pipeline> pipelineClass = this.types.get(type);
+
+ if (pipelineClass == null) {
+ throw new IllegalArgumentException("Pipeline type '" + type + "' is not supported.");
+ }
+
+ try {
+ Pipeline pipeline = pipelineClass.newInstance();
+ return pipeline;
+ } catch (Exception e) {
+ throw new IllegalArgumentException("A pipeline of type '" + type + "' could not be created.", e);
+ }
+ }
+
+ /**
+ * @param types
+ */
+ @SuppressWarnings("unchecked")
+ public void setTypes(Map<String, String> types) {
+ for (Entry<String, String> entry : types.entrySet()) {
+ try {
+ Class<? extends Pipeline> nodeClass = (Class<? extends Pipeline>) Class.forName(entry.getValue());
+ this.types.put(entry.getKey(), nodeClass);
+ } catch (ClassCastException ccex) {
+ throw new IllegalArgumentException("Could not register class " + entry.getValue() + " as type "
+ + entry.getKey(), ccex);
+ } catch (ClassNotFoundException cnfex) {
+ throw new IllegalArgumentException("Could not register class " + entry.getValue() + " as type "
+ + entry.getKey(), cnfex);
+ }
+ }
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ReflectionPipelineFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.action;
+
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public interface Action {
+
+ void execute(Invocation invocation) throws Exception;
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/Action.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.action;
+
+public interface ActionFactory {
+
+ Action createAction(String type);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ActionFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.action;
+
+import org.apache.cocoon.corona.sitemap.CustomException;
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public class ErrorThrowingAction implements Action {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.action.Action#execute(org.apache.cocoon.corona.sitemap.Invocation)
+ */
+ public void execute(Invocation invocation) throws Exception {
+ throw new CustomException();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "ErrorThrowingAction";
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ErrorThrowingAction.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.action;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class PrototypeActionFactory implements ActionFactory, ApplicationContextAware {
+
+ private ApplicationContext applicationContext;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.action.ActionFactory#createAction(java.lang.String)
+ */
+ public Action createAction(String type) {
+ return (Action) this.applicationContext.getBean(type, Action.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
+ */
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/PrototypeActionFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.action;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class ReflectionActionFactory implements ActionFactory {
+
+ private final Map<String, Class<? extends Action>> types = new HashMap<String, Class<? extends Action>>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.action.ActionFactory#createAction(java.lang.String)
+ */
+ public Action createAction(String type) {
+ Class<? extends Action> actionClass = this.types.get(type);
+
+ if (actionClass == null) {
+ throw new IllegalArgumentException("Action type '" + type + "' is not supported.");
+ }
+
+ try {
+ Action action = actionClass.newInstance();
+ return action;
+ } catch (Exception e) {
+ throw new IllegalArgumentException("An action of type '" + type + "' could not be created.", e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setTypes(Map<String, String> types) {
+ this.types.clear();
+
+ for (Entry<String, String> entry : types.entrySet()) {
+ try {
+ Class<? extends Action> actionClass = (Class<? extends Action>) Class.forName(entry.getValue());
+ this.types.put(entry.getKey(), actionClass);
+ } catch (ClassCastException ccex) {
+ throw new IllegalArgumentException("Could not register class " + entry.getValue() + " as type "
+ + entry.getKey(), ccex);
+ } catch (ClassNotFoundException cnfex) {
+ throw new IllegalArgumentException("Could not register class " + entry.getValue() + " as type "
+ + entry.getKey(), cnfex);
+ }
+ }
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/action/ReflectionActionFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import java.util.Map;
+
+public abstract class AbstractXMLProducer implements XMLProducer {
+
+ private XMLConsumer xmlConsumer;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.Producer#setConsumer(org.apache.cocoon.corona.pipeline.component.Consumer)
+ */
+ public void setConsumer(Consumer consumer) {
+ if (!(consumer instanceof XMLConsumer)) {
+ throw new IllegalArgumentException("XMLProducer requires an XMLConsumer.");
+ }
+
+ this.xmlConsumer = (XMLConsumer) consumer;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.PipelineComponent#setParameters(java.util.Map)
+ */
+ public void setParameters(Map<String, ? extends Object> parameters) {
+ }
+
+ protected XMLConsumer getXMLConsumer() {
+ return this.xmlConsumer;
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/AbstractXMLProducer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+public interface Consumer {
+
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Consumer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Map;
+
+import org.apache.cocoon.corona.sitemap.Invocation;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+public class FileGenerator extends AbstractXMLProducer implements Starter {
+
+ private String src;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.Starter#execute(org.apache.cocoon.corona.sitemap.Invocation)
+ */
+ public void execute(final Invocation invocation) {
+ // resolve the "src" parameter before using it
+ URL url = invocation.resolve(this.src);
+ if (url == null) {
+ // failed to resolve
+ throw new IllegalArgumentException("FileGenerator cannot resolve source '" + this.src + "'");
+ }
+
+ try {
+ XMLReader xmlReader = XMLReaderFactory.createXMLReader();
+
+ xmlReader.setContentHandler(this.getXMLConsumer());
+ xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", this.getXMLConsumer());
+
+ InputStream inputStream = new BufferedInputStream(url.openStream());
+ xmlReader.parse(new InputSource(inputStream));
+ inputStream.close();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.AbstractXMLProducer#setParameters(java.util.Map)
+ */
+ @Override
+ public void setParameters(Map<String, ? extends Object> parameters) {
+ this.src = (String) parameters.get("src");
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileGenerator.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Map;
+
+import org.apache.cocoon.corona.sitemap.Invocation;
+
+public class FileReaderComponent implements Starter, Finisher {
+
+ private String src;
+
+ private OutputStream outputStream;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.Starter#execute(org.apache.cocoon.corona.sitemap.Invocation)
+ */
+ public void execute(Invocation invocation) {
+ try {
+ URL url = invocation.resolve(this.src);
+ if (url == null) {
+ throw new IllegalArgumentException("FileReaderComponent could not resolve '" + this.src + "'");
+ }
+
+ InputStream inputStream = url.openStream();
+
+ byte[] data = new byte[1024];
+ while (true) {
+ int bytesRead = inputStream.read(data, 0, data.length);
+
+ if (bytesRead == -1) {
+ break;
+ }
+
+ this.outputStream.write(data, 0, bytesRead);
+ }
+ } catch (IOException e) {
+ // TODO: a specific exception is in order
+ throw new RuntimeException("FileReader cannot read from '" + this.src + "'", e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.Finisher#setOutputStream(java.io.OutputStream)
+ */
+ public void setOutputStream(OutputStream outputStream) {
+ this.outputStream = outputStream;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.PipelineComponent#setParameters(java.util.Map)
+ */
+ public void setParameters(Map<String, ? extends Object> parameters) {
+ this.src = (String) parameters.get("src");
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "ReaderComponent(" + this.src + ")";
+ }
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/FileReaderComponent.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import java.io.OutputStream;
+
+public interface Finisher extends PipelineComponent {
+
+ void setOutputStream(OutputStream outputStream);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Finisher.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import java.util.Map;
+
+public interface PipelineComponent {
+
+ void setParameters(Map<String, ? extends Object> parameters);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponent.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+public interface PipelineComponentFactory {
+
+ PipelineComponent createComponent(String type);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PipelineComponentFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+public interface Producer extends PipelineComponent {
+
+ void setConsumer(Consumer consumer);
+}
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/Producer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PrototypePipelineComponentFactory.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PrototypePipelineComponentFactory.java?rev=639645&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PrototypePipelineComponentFactory.java (added)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/PrototypePipelineComponentFactory.java Fri Mar 21 06:54:32 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.corona.pipeline.component;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class PrototypePipelineComponentFactory implements PipelineComponentFactory, ApplicationContextAware {
+
+ private ApplicationContext applicationContext;
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.cocoon.corona.pipeline.component.PipelineComponentFactory#createComponent(java.lang.String)
+ */
+ public PipelineComponent createComponent(String type) {
+ return (PipelineComponent) this.applicationContext.getBean(type, PipelineComponent.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
+ */
+ public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ this.applicationContext = applicationContext;
+ }
+}