cvs commit: cocoon-2.1/tools/src blocks-build.xsl
cziegeler2004/05/04 00:14:09 Modified:tools/src/anttasks SitemapTask.java tools/src blocks-build.xsl Log: Disabling doc generation for blocks Revision ChangesPath 1.13 +2 -2 cocoon-2.1/tools/src/anttasks/SitemapTask.java Index: SitemapTask.java === RCS file: /home/cvs/cocoon-2.1/tools/src/anttasks/SitemapTask.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- SitemapTask.java 3 May 2004 14:23:56 - 1.12 +++ SitemapTask.java 4 May 2004 07:14:08 - 1.13 @@ -634,7 +634,7 @@ } else if ( clazz.isA(PIPELINE) ) { return pipe; } else { -throw new BuildException(Sitemap component + clazz.getName() + does not implement a sitemap component interface.); +throw new BuildException(Sitemap component + clazz.getFullyQualifiedName() + does not implement a sitemap component interface.); } } 1.67 +7 -6 cocoon-2.1/tools/src/blocks-build.xsl Index: blocks-build.xsl === RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- blocks-build.xsl 3 May 2004 14:07:12 - 1.66 +++ blocks-build.xsl 4 May 2004 07:14:08 - 1.67 @@ -413,7 +413,7 @@ xpatch file=${{build.webapp}}/WEB-INF/web.xml srcdir=${{blocks}} include name={$block-name}/conf/*.xweb/ /xpatch - !-- generate sitemap entries -- + !-- generate sitemap entries sitemap-components sitemap=${{build.webapp}}/sitemap.xmap source=${{blocks}}/{$block-name}/java block={$block-name} @@ -424,11 +424,12 @@ xsl:attribute name=deprecatedtrue/xsl:attribute /xsl:if /sitemap-components - - !-- TODO - this is the wrong place for documentation, but currently blocks - don't have own docs! -- - mkdir dir=${{build.context}}/xdocs/userdocs/ + -- + !-- generate sitemap components docs -- + !-- TODO - this is the wrong place for documentation, but currently blocks + don't have own docs! +mkdir dir=${{build.context}}/xdocs/userdocs/ sitemap-components docDir=${{build.context}}/xdocs/userdocs source=${{blocks}}/{$block-name}/java block={$block-name} @@ -439,7 +440,7 @@ xsl:attribute name=deprecatedtrue/xsl:attribute /xsl:if /sitemap-components - + -- /target target name=[EMAIL PROTECTED] unless=internal.exclude.block.{$block-name}
cvs commit: cocoon-2.1/src/blocks/portal-fw/samples/resources/auth sunlet-administration.xml
cziegeler2004/05/04 00:19:15 Modified:src/blocks/portal-fw/samples/resources/auth sunlet-administration.xml Log: Correct link to docs Fixing bug 28746 Revision ChangesPath 1.4 +2 -2 cocoon-2.1/src/blocks/portal-fw/samples/resources/auth/sunlet-administration.xml Index: sunlet-administration.xml === RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/samples/resources/auth/sunlet-administration.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sunlet-administration.xml 6 Mar 2004 02:26:01 - 1.3 +++ sunlet-administration.xml 4 May 2004 07:19:15 - 1.4 @@ -44,7 +44,7 @@ td linktarget_new/target textDocumentation/text -url../../docs/index.html/url +url../../../docs/index.html/url /link /td /tr
cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/components/flow/java AbstractContinuable.java
cziegeler2004/05/04 04:54:35 Modified:src/java/org/apache/cocoon/components/flow/util PipelineUtil.java src/java/org/apache/cocoon/components/treeprocessor TreeProcessor.java src/java/org/apache/cocoon/components/flow AbstractInterpreter.java src/blocks/javaflow/java/org/apache/cocoon/components/flow/java AbstractContinuable.java Log: Make call to view from flow a forward again (and not a real redirect) Revision ChangesPath 1.3 +14 -2 cocoon-2.1/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java Index: PipelineUtil.java === RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PipelineUtil.java 5 Mar 2004 13:02:47 - 1.2 +++ PipelineUtil.java 4 May 2004 11:54:35 - 1.3 @@ -21,6 +21,7 @@ import java.util.Map; import org.apache.avalon.excalibur.io.IOUtil; +import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.context.Contextualizable; @@ -45,12 +46,23 @@ * @author a href=http://www.apache.org/~sylvain/;Sylvain Wallez/a * @version CVS $Id$ */ -public class PipelineUtil implements Contextualizable, Serviceable { +public class PipelineUtil implements Contextualizable, Serviceable, Disposable { private Context context; private ServiceManager manager; private SourceResolver resolver; +/* (non-Javadoc) + * @see org.apache.avalon.framework.activity.Disposable#dispose() + */ +public void dispose() { +if ( this.manager != null ) { +this.manager.release( this.resolver ); +this.manager = null; +this.resolver = null; +} +} + public void contextualize(Context context) throws ContextException { this.context = context; 1.25 +5 -2 cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java Index: TreeProcessor.java === RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- TreeProcessor.java18 Mar 2004 15:08:12 - 1.24 +++ TreeProcessor.java4 May 2004 11:54:35 - 1.25 @@ -360,7 +360,10 @@ } Environment newEnv = new ForwardEnvironmentWrapper(environment, this.manager, uri, getLogger()); -((ForwardEnvironmentWrapper)newEnv).setInternalRedirect(true); +// test if this is a call from flow +if ( environment.getObjectModel().remove(cocoon:forward) == null ) { +((ForwardEnvironmentWrapper)newEnv).setInternalRedirect(true); +} if (facade != null) { // Change the facade delegate 1.20 +10 -4 cocoon-2.1/src/java/org/apache/cocoon/components/flow/AbstractInterpreter.java Index: AbstractInterpreter.java === RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/AbstractInterpreter.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- AbstractInterpreter.java 5 Mar 2004 13:02:46 - 1.19 +++ AbstractInterpreter.java 4 May 2004 11:54:35 - 1.20 @@ -155,9 +155,13 @@ { // FIXME (SW): should we deprecate this method in favor of PipelineUtil? PipelineUtil pipeUtil = new PipelineUtil(); -pipeUtil.contextualize(this.avalonContext); -pipeUtil.service(this.manager); -pipeUtil.processToStream(uri, biz, out); +try { +pipeUtil.contextualize(this.avalonContext); +pipeUtil.service(this.manager); +pipeUtil.processToStream(uri, biz, out); +} finally { +pipeUtil.dispose(); +} } public void forwardTo(String uri, Object bizData, @@ -173,6 +177,8 @@ if (redirector.hasRedirected()) { throw new IllegalStateException(Pipeline has already been processed for this request); } +// this is a hint for the redirector +objectModel.put(cocoon:forward, true); redirector.redirect(false, uri); } else { throw new Exception(uri is not allowed to contain a scheme
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet CocoonServlet.java
cziegeler2004/05/04 07:11:17 Modified:src/java/org/apache/cocoon/servlet CocoonServlet.java Log: experimental support for log4j Revision ChangesPath 1.27 +30 -25 cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java Index: CocoonServlet.java === RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- CocoonServlet.java23 Apr 2004 15:50:34 - 1.26 +++ CocoonServlet.java4 May 2004 14:11:16 - 1.27 @@ -42,6 +42,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.avalon.excalibur.logger.Log4JLoggerManager; import org.apache.avalon.excalibur.logger.LogKitLoggerManager; import org.apache.avalon.excalibur.logger.LoggerManager; @@ -761,9 +762,9 @@ * file. */ protected void initLogger() { -String logLevel = getInitParameter(log-level, INFO); +final String logLevel = getInitParameter(log-level, INFO); -final String accesslogger = getInitParameter(servlet-logger); +final String accesslogger = getInitParameter(servlet-logger, cocoon); final Priority logPriority = Priority.getPriorityForName(logLevel); @@ -778,8 +779,14 @@ defaultHierarchy.setDefaultLogTarget(servTarget); defaultHierarchy.setDefaultPriority(logPriority); final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor()); -final LogKitLoggerManager logKitLoggerManager = new LogKitLoggerManager(defaultHierarchy); -logKitLoggerManager.enableLogging(logger); + +// the log4j support requires currently that the log4j system is already configured elsewhere +final boolean isLog4JLogger = log4j.equals(this.getInitParameter(logger-type, logkit)); + +final LoggerManager logKitLoggerManager = (isLog4JLogger ? (LoggerManager)new Log4JLoggerManager() + : new LogKitLoggerManager(defaultHierarchy)); +ContainerUtil.enableLogging(logKitLoggerManager, logger); + final DefaultContext subcontext = new DefaultContext(this.appContext); subcontext.put(servlet-context, this.servletContext); if (this.servletContextPath == null) { @@ -794,33 +801,31 @@ } try { -logKitLoggerManager.contextualize(subcontext); +ContainerUtil.contextualize(logKitLoggerManager, subcontext); this.loggerManager = logKitLoggerManager; -//Configure the logkit management -String logkitConfig = getInitParameter(logkit-config, /WEB-INF/logkit.xconf); - -// test if this is a qualified url -InputStream is = null; -if ( logkitConfig.indexOf(':') == -1) { -is = this.servletContext.getResourceAsStream(logkitConfig); -if (is == null) is = new FileInputStream(logkitConfig); -} else { -URL logkitURL = new URL(logkitConfig); -is = logkitURL.openStream(); +if ( !isLog4JLogger ) { +//Configure the logkit management +String logkitConfig = getInitParameter(logkit-config, /WEB-INF/logkit.xconf); + +// test if this is a qualified url +InputStream is = null; +if ( logkitConfig.indexOf(':') == -1) { +is = this.servletContext.getResourceAsStream(logkitConfig); +if (is == null) is = new FileInputStream(logkitConfig); +} else { +URL logkitURL = new URL(logkitConfig); +is = logkitURL.openStream(); +} +final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); +final Configuration conf = builder.build(is); +ContainerUtil.configure(logKitLoggerManager, conf); } -final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); -final Configuration conf = builder.build(is); -logKitLoggerManager.configure(conf); } catch (Exception e) { errorHandler.error(Could not set up Cocoon Logger, will use screen instead, e, null); } -if (accesslogger != null) { -this.log = logKitLoggerManager.getLoggerForCategory(accesslogger); -} else { -this.log = logKitLoggerManager.getLoggerForCategory(cocoon); -} +this.log =
cvs commit: cocoon-2.1/src/java/org/apache/cocoon CocoonTask.java
cziegeler2004/05/04 07:19:06 Modified:src/java/org/apache/cocoon CocoonTask.java Log: Don't use deprecated api Revision ChangesPath 1.5 +3 -3 cocoon-2.1/src/java/org/apache/cocoon/CocoonTask.java Index: CocoonTask.java === RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/CocoonTask.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CocoonTask.java 5 Mar 2004 13:02:42 - 1.4 +++ CocoonTask.java 4 May 2004 14:19:05 - 1.5 @@ -241,12 +241,12 @@ if (command.getClasspath() == null) { target = Class.forName(classname); } else { -loader = new AntClassLoader(getProject().getCoreLoader(), project, +loader = new AntClassLoader(getProject().getCoreLoader(), getProject(), command.getClasspath(), false); loader.setIsolated(true); loader.setThreadContextLoader(); target = loader.forceLoadClass(classname); -AntClassLoader.initializeClass(target); +Class.forName(classname, true, loader); } Method method = target.getMethod(process, param); if (method == null) {
cvs commit: cocoon-2.1/src/blocks/supersonic/java/org - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java/org - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/java - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/java/org/apache - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java/org/apache - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/samples - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/flow - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/flow - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor - New directory
bdelacretaz2004/05/04 10:20:48 cocoon-2.1/src/blocks/supersonic/samples/bean-editor - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/views - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/views - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/stylesheets - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/bean-editor/cocoon-app/stylesheets - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/multi-channel/docs - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/multi-channel/docs - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/number-guess - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/flow/number-guess - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/intro - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/intro - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/flow - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/multi-channel - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/multi-channel - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/intro/docs - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/intro/docs - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/pipelines/docs - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/pipelines/docs - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/bean-editor/docs - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/bean-editor/docs - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/multi-page - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/flow/multi-page - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/multi-channel/pdf-example - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/multi-channel/pdf-example - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/pipelines/xsl - New directory
bdelacretaz2004/05/04 10:20:51 cocoon-2.1/src/blocks/supersonic/samples/pipelines/xsl - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/pipelines - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/pipelines - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/docs - New directory
bdelacretaz2004/05/04 10:20:49 cocoon-2.1/src/blocks/supersonic/samples/flow/docs - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/intro/presentation - New directory
bdelacretaz2004/05/04 10:20:50 cocoon-2.1/src/blocks/supersonic/samples/intro/presentation - New directory
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/pipelines/xsl html-styling.xsl news-to-html.xsl request-to-html.xsl request-to-svg.xsl
bdelacretaz2004/05/04 10:25:12 Modified:.blocks.properties gump.xml src/blocks/authentication-fw/samples/docs login.xml Added: src/blocks/supersonic/conf supersonic.xsamples src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans DatabaseFacade.java DatabaseFacadeTest.java TaskBean.java TaskCommentBean.java src/blocks/supersonic/samples sitemap.xmap src/blocks/supersonic/samples/bean-editor sitemap.xmap src/blocks/supersonic/samples/bean-editor/cocoon-app/flow supersonic.js src/blocks/supersonic/samples/bean-editor/cocoon-app/forms singleTaskFormBinding.xml singleTaskFormModel.xml singleTaskFormTemplate.xml src/blocks/supersonic/samples/bean-editor/cocoon-app/stylesheets page2html.xsl src/blocks/supersonic/samples/bean-editor/cocoon-app/views singleTaskView.xml taskListView.xml src/blocks/supersonic/samples/bean-editor/docs flowscript.xml forms.xml index.xml javabeans.xml singletask.xml tasklist.xml src/blocks/supersonic/samples/flow sitemap.xmap src/blocks/supersonic/samples/flow/docs index.xml multi-page.xml number-guess.xml src/blocks/supersonic/samples/flow/multi-page multi-page.js page1.xml page2.xml result.xml src/blocks/supersonic/samples/flow/number-guess guess-number.js guess.xml success.xml src/blocks/supersonic/samples/intro/docs bizlayer.xml facts.xml index.xml resources.xml toc.xml use-cases.xml what-is-cocoon.xml src/blocks/supersonic/samples/intro/presentation code2html.xsl format-text-file.xsl insert-toc.xsl page-content.xsl page2html.xsl select-id.xsl supersonic.css toc-to-cinclude.xsl src/blocks/supersonic/samples/multi-channel sitemap.xmap src/blocks/supersonic/samples/multi-channel/docs formats.xml pdf.xml src/blocks/supersonic/samples/multi-channel/pdf-example pdf-example.xsl src/blocks/supersonic/samples/pipelines sitemap.xmap src/blocks/supersonic/samples/pipelines/docs basic-pipelines.xml graphics.xml index.xml xmlnews.xml src/blocks/supersonic/samples/pipelines/xsl html-styling.xsl news-to-html.xsl request-to-html.xsl request-to-svg.xsl Log: supersonic block added Revision ChangesPath 1.75 +5 -2 cocoon-2.1/blocks.properties http://cvs.apache.org/viewcvs/cocoon-2.1/blocks.properties.diff?r1=1.74r2=1.75 1.148 +23 -1 cocoon-2.1/gump.xml http://cvs.apache.org/viewcvs/cocoon-2.1/gump.xml.diff?r1=1.147r2=1.148 1.3 +1 -1 cocoon-2.1/src/blocks/authentication-fw/samples/docs/login.xml http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/authentication-fw/samples/docs/login.xml.diff?r1=1.2r2=1.3 1.1 cocoon-2.1/src/blocks/supersonic/conf/supersonic.xsamples http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/conf/supersonic.xsamples?rev=1.1 1.1 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/DatabaseFacade.java http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/DatabaseFacade.java?rev=1.1 1.1 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/DatabaseFacadeTest.java http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/DatabaseFacadeTest.java?rev=1.1 1.1 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/TaskBean.java http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/TaskBean.java?rev=1.1 1.1 cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/TaskCommentBean.java http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/java/org/apache/cocoon/samples/supersonic/beans/TaskCommentBean.java?rev=1.1 1.1 cocoon-2.1/src/blocks/supersonic/samples/sitemap.xmap http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/supersonic/samples/sitemap.xmap?rev=1.1 1.1
cvs commit: cocoon-2.1 status.xml
bdelacretaz2004/05/04 10:27:20 Modified:.status.xml Log: supersonic block added Revision ChangesPath 1.311 +5 -1 cocoon-2.1/status.xml Index: status.xml === RCS file: /home/cvs/cocoon-2.1/status.xml,v retrieving revision 1.310 retrieving revision 1.311 diff -u -r1.310 -r1.311 --- status.xml1 May 2004 00:49:29 - 1.310 +++ status.xml4 May 2004 17:27:20 - 1.311 @@ -212,6 +212,10 @@ changes release version=@version@ date=@date@ + action dev=BD type=add + Supersonic block added: the Supersonic Tour of Apache Cocoon. + Tutorial/example app focused on the Power Trio: Pipelines, Flow, Forms. + /action action dev=JH type=update Made JSPGenerator cacheable by simply extending the FileGenerator. /action
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel/startup KernelLoader.java KernelServlet.java ServletWrapper.java AbstractLogger.java Main.java Servlet.java
pier2004/05/04 10:38:54 Modified:src/kernel/org/apache/cocoon/kernel/startup AbstractLogger.java Added: src/kernel/org/apache/cocoon/kernel/startup KernelLoader.java KernelServlet.java ServletWrapper.java Removed: src/kernel/org/apache/cocoon/kernel/startup Main.java Servlet.java Log: Slightly refactored the kernel startup package Revision ChangesPath 1.6 +0 -0 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/startup/AbstractLogger.java Index: AbstractLogger.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/startup/AbstractLogger.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 1.1 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/startup/KernelLoader.java Index: KernelLoader.java === /* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.kernel.startup; import org.apache.cocoon.kernel.Installer; import org.apache.cocoon.kernel.KernelDeployer; import org.apache.cocoon.kernel.configuration.ConfigurationBuilder; /** * * @author a href=mailto:[EMAIL PROTECTED]Pier Fumagalli/a * @version 1.0 (CVS $Revision: 1.1 $) */ public class KernelLoader { public static void main(String args[]) { if (args.length 1) { System.err.println(Usage: + KernelLoader.class.getName() + blocks + configuration deployment configuration); System.exit(1); } /* Create a logger for startup operations */ Logger logger = new ConsoleLogger(); try { /* Now let's create our core deployer */ KernelDeployer deployer = new KernelDeployer(); deployer.logger(logger); deployer.configure(ConfigurationBuilder.parse(args[0])); /* Instantiate an installer and process deployment */ Installer installer = new Installer(deployer); installer.process(ConfigurationBuilder.parse(args[1])); } catch (Throwable t) { logger.fatal(An error occurred initializing, t); } } } 1.1 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/startup/KernelServlet.java Index: KernelServlet.java === /* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.kernel.startup; import java.io.IOException; import java.net.URL; import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.apache.cocoon.kernel.CoreWirings; import org.apache.cocoon.kernel.Installer; import org.apache.cocoon.kernel.KernelDeployer; import org.apache.cocoon.kernel.composition.Wirings; import org.apache.cocoon.kernel.configuration.Configuration; import org.apache.cocoon.kernel.configuration.ConfigurationBuilder; /** * p./p * * @author a href=mailto:[EMAIL PROTECTED]Pier Fumagalli/a * @version 1.0 (CVS $Revision: 1.1 $) */ public class KernelServlet implements Servlet { protected static KernelServlet instance = null; private Logger logger = null; private Wirings wirings = null; private ServletConfig config = null; public synchronized void init(ServletConfig config)
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel/composition ComponentComposer.java Component.java Wire.java
pier2004/05/04 10:41:05 Modified:src/kernel/org/apache/cocoon/kernel/composition Component.java Wire.java Added: src/kernel/org/apache/cocoon/kernel/composition ComponentComposer.java Log: Simplifying the Wire and Component interfaces. Revision ChangesPath 1.4 +14 -8 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/composition/Component.java Index: Component.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/composition/Component.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Component.java31 Mar 2004 13:01:38 - 1.3 +++ Component.java4 May 2004 17:41:05 - 1.4 @@ -17,14 +17,16 @@ import java.net.URL; +import org.apache.cocoon.kernel.resolution.Resolver; + /** * pThe [EMAIL PROTECTED] Component} interface identifies a component aware of its * deployment in a block-enabled environment./p * * pAny component implementing this interface bmust be aware/b that - * the [EMAIL PROTECTED] Wire} they will be given will resolve [EMAIL PROTECTED] URL}s in the context - * of the bcalling/b block and not in the context of the block they are - * defined in./p + * the [EMAIL PROTECTED] Resolver} they will be given will resolve [EMAIL PROTECTED] URL}s in the + * context of the bcalling/b block and not in the context of the block they + * are defined in./p * * pThis is done because resource management is decoupled entirely from * component management, and because in block-enabled environments, it will @@ -61,10 +63,14 @@ public interface Component { /** - * pContextualize this [EMAIL PROTECTED] Component} component instance with the - * [EMAIL PROTECTED] Wire} through which its caller is accessing it./p + * pContextualize this [EMAIL PROTECTED] Component} instance./p * - * @param wire the [EMAIL PROTECTED] Wire} instance associated with this instance. + * @param wire the [EMAIL PROTECTED] Wire} instance through which the block requesting + * this instance is accessing it. + * @param wirings the [EMAIL PROTECTED] Wirings} instance associated with the block + *instance in which this [EMAIL PROTECTED] Component} is defined. + * @param resolver the [EMAIL PROTECTED] Resolver} instance resolving resources in the + * calling block instance. */ -public void contextualize(Wire wire); +public void contextualize(Wire wire, Wirings wirings, Resolver resolver); } 1.4 +2 -50 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/composition/Wire.java Index: Wire.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/composition/Wire.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Wire.java 31 Mar 2004 13:01:38 - 1.3 +++ Wire.java 4 May 2004 17:41:05 - 1.4 @@ -15,9 +15,6 @@ */ package org.apache.cocoon.kernel.composition; -import org.apache.cocoon.kernel.resolution.Resolver; -import org.apache.cocoon.kernel.resolution.Resource; - /** * pThe [EMAIL PROTECTED] Wire} interface defines a component as returned by a * [EMAIL PROTECTED] Wirings} instance./p @@ -61,52 +58,7 @@ * @author a href=mailto:[EMAIL PROTECTED]Pier Fumagalli/a * @version 1.0 (CVS $Revision$) */ -public interface Wire extends Resolver { - -/** - * pResolve a resource visible from a [EMAIL PROTECTED] Component} into a - * [EMAIL PROTECTED] Resource}./p - * - * pThis method will resolve resources local to the block requesting - * this wire./p - * - * pIf the specified [EMAIL PROTECTED] String} assumes a format like - * codewiring:/resource/path/code where codewiring/code is the - * wiring name as required in the block's deployment descriptor, the - * resolution of the [EMAIL PROTECTED] Resource} will be performed relative to the - * block target of the wiring./p - * - * p[EMAIL PROTECTED] Component}s using a [EMAIL PROTECTED] Wire} for resource resolution - * bmust/b be aware that resolution will happen in the context of the - * requesting block, rather than in the context of the block composing the - * [EMAIL PROTECTED] Component}./p - * - * pThis is done because resource management is decoupled entirely from - * component management, and because in block-enabled environments, it will - * be possible to have components provided by wired blocks to operate on - * resources available from other wired blocks./p - * - * pLet's examine a simple
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment Block.java Deployer.java Instance.java Loader.java
pier2004/05/04 10:42:50 Modified:src/kernel/org/apache/cocoon/kernel/deployment Block.java Deployer.java Instance.java Loader.java Log: Revision ChangesPath 1.5 +0 -0 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Block.java Index: Block.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Block.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 1.7 +0 -0 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Deployer.java Index: Deployer.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Deployer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 1.5 +0 -0 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Instance.java Index: Instance.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Instance.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 1.5 +0 -0 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Loader.java Index: Loader.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/deployment/Loader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel ProxyWire.java
pier2004/05/04 10:47:08 Modified:src/kernel/org/apache/cocoon/kernel ProxyWire.java Log: Adapting ProxyWire to new Component interface. Fixed bug preventing the proxy instance to be configured with the correct interfaces. Revision ChangesPath 1.6 +8 -22 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/ProxyWire.java Index: ProxyWire.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/ProxyWire.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ProxyWire.java3 May 2004 20:43:40 - 1.5 +++ ProxyWire.java4 May 2004 17:47:08 - 1.6 @@ -18,7 +18,6 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.net.URL; import org.apache.cocoon.kernel.composition.Component; import org.apache.cocoon.kernel.composition.Composer; @@ -66,9 +65,6 @@ /** pThe [EMAIL PROTECTED] Wire#dispose()} method used for interception./p */ private static Method dispose = null; -/** pThe [EMAIL PROTECTED] Wire#resolve(URL)} method used for interception./p */ -private static Method resolve = null; - /** pA static flag indicating whether this class was initialized./p */ private static boolean initialized = false; @@ -80,9 +76,6 @@ /* pThe [EMAIL PROTECTED] Compser} to which the instance should be released./p */ private Composer composer = null; -/* pThe [EMAIL PROTECTED] Resolver} for the wire./p */ -private Resolver resolver = null; - /* pThe [EMAIL PROTECTED] Wire} instance generated with proxies./p */ private Wire wire = null; @@ -102,12 +95,15 @@ * disposal of proxied component instances will occur. * @param role an interface [EMAIL PROTECTED] Class} to which the [EMAIL PROTECTED] Wire} * returned by [EMAIL PROTECTED] #getWire()} bmust/b be castable to. - * @param resolver The [EMAIL PROTECTED] Resolver} providing resolution. + * @param w The [EMAIL PROTECTED] Wirings} instance associated with the block instance + * where the proxied component is deployed. + * @param r The [EMAIL PROTECTED] Resolver} providing resolution in the context of the + * block instance requesting the component instance. * @throws WiringException if an error occurred acquiring the original * object or creating the [EMAIL PROTECTED] Wire}. * @throws NullPointerException if any of the parameters were bnull/b. */ -public ProxyWire(Composer composer, Class role, Resolver resolver) +public ProxyWire(Composer composer, Class role, Wirings w, Resolver r) throws WiringException { ProxyWire.initialize(); @@ -145,21 +141,17 @@ try { /* Create the proxy instance */ -Class i[] = instance.getClass().getInterfaces(); -Class c[] = new Class[i.length + 1]; -for (int x = 0; x i.length; x++) c[x + 1] = i[x]; -c[0] = Wire.class; +Class c[] = new Class[] { Wire.class, role }; this.wire = (Wire)Proxy.newProxyInstance(loader, c, this); /* Contextualize the instance with the wire */ if (instance instanceof Component) { -((Component)instance).contextualize(this.wire); +((Component)instance).contextualize(this.wire, null, r); } -/* Record the original composer, resolver, and instance */ +/* Record the original composer and instance */ this.composer = composer; this.instance = instance; -this.resolver = resolver; } catch (Throwable t) { /* Something bad happened releasing, release the instance */ composer.release(instance); @@ -218,11 +210,6 @@ /* If it's simply the wiring status they require, that they will get */ if (this.check(method, wired)) return(new Boolean(this.isConnected())); -/* Intercept lookup on the proxied Wire */ -if (this.check(method, resolve)) { -return(method.invoke(this.resolver, arguments)); -} - /* Invoke the method on the remote instance */ if (this.instance != null) { return(method.invoke(this.instance, arguments)); @@ -309,7 +296,6 @@ ProxyWire.dispose = Wire.class.getDeclaredMethod(dispose, parameters); ProxyWire.finalize = Object.class.getDeclaredMethod(finalize, parameters); parameters = new Class[] { String.class }; -ProxyWire.resolve =
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel CoreWirings.java
pier2004/05/04 10:48:37 Modified:src/kernel/org/apache/cocoon/kernel CoreWirings.java Log: Tabs-to-spaces Revision ChangesPath 1.2 +15 -13 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/CoreWirings.java Index: CoreWirings.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/CoreWirings.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CoreWirings.java 3 May 2004 20:42:02 - 1.1 +++ CoreWirings.java 4 May 2004 17:48:37 - 1.2 @@ -9,7 +9,8 @@ import org.apache.cocoon.kernel.resolution.Resource; /** - * p/p + * pThe [EMAIL PROTECTED] CoreWirings} provides an implementation of the [EMAIL PROTECTED] Wirings} + * interface wrapping all blocks installed in a [EMAIL PROTECTED] KernelDeployer}./p * * @version CVS $Revision$ * @author a href=mailto:[EMAIL PROTECTED]Pier Fumagalli/a @@ -18,22 +19,23 @@ */ public class CoreWirings implements Wirings { - KernelDeployer deployer = null; +KernelDeployer deployer = null; - /** - * pCreate a new [EMAIL PROTECTED] CoreWirings} instance associated with a specified +/** + * pCreate a new [EMAIL PROTECTED] CoreWirings} instance associated with a specified * [EMAIL PROTECTED] KernelDeployer}./p * * @param deployer a bnon null/b [EMAIL PROTECTED] KernelDeployer} instance. * @throws NullPointerException if the specified deployer was bnull/b. - */ - public CoreWirings(KernelDeployer deployer) { - super(); + */ +public CoreWirings(KernelDeployer deployer) { +super(); if (deployer == null) throw new NullPointerException(Null deployer); this.deployer = deployer; - } +} - public Wire lookup(Class role, String name) throws WiringException { +public Wire lookup(Class role, String name) +throws WiringException { /* Fail if either name or role are null */ if (name == null) throw new WiringException(No name specified); if (role == null) throw new WiringException(No role specified); @@ -44,9 +46,9 @@ /* Wrong wiring name specified */ throw new WiringException(Unknown wiring \ + name + \); - } +} - public Resource resolve(String name) { - return null; - } +public Resource resolve(String name) { +return null; +} }
cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel DeployedWirings.java
pier2004/05/04 10:49:47 Modified:src/kernel/org/apache/cocoon/kernel DeployedWirings.java Log: ProxyWire exposes a different constructor now Revision ChangesPath 1.6 +1 -1 cocoon-2.2/src/kernel/org/apache/cocoon/kernel/DeployedWirings.java Index: DeployedWirings.java === RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/DeployedWirings.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DeployedWirings.java 3 May 2004 20:45:50 - 1.5 +++ DeployedWirings.java 4 May 2004 17:49:46 - 1.6 @@ -157,7 +157,7 @@ */ protected Wire newWire(Class role, Resolver resolver) throws WiringException { -return(new ProxyWire(this.composer, role, resolver).getWire()); +return(new ProxyWire(this.composer, role, this, resolver).getWire()); } /* == */
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/docs number-guess.xml
bdelacretaz2004/05/04 12:28:32 Modified:src/blocks/supersonic/samples/flow/docs number-guess.xml Log: Forgot to credit Tony for this sample Revision ChangesPath 1.2 +3 -0 cocoon-2.1/src/blocks/supersonic/samples/flow/docs/number-guess.xml Index: number-guess.xml === RCS file: /home/cvs/cocoon-2.1/src/blocks/supersonic/samples/flow/docs/number-guess.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- number-guess.xml 4 May 2004 17:25:10 - 1.1 +++ number-guess.xml 4 May 2004 19:28:32 - 1.2 @@ -21,6 +21,9 @@ content p +emAdapted from Tony Collen's GettingStartedWithFlow page on the Cocoon wiki./em +/p +p In this example, an HTML form is shown repeatedly, until the user guesses the correct number. /p
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/multi-page page2.xml
bdelacretaz2004/05/04 12:54:53 Modified:src/blocks/supersonic/samples/flow/multi-page page2.xml Log: Page title was wrong (not enough DRY here ;-) Revision ChangesPath 1.2 +1 -1 cocoon-2.1/src/blocks/supersonic/samples/flow/multi-page/page2.xml Index: page2.xml === RCS file: /home/cvs/cocoon-2.1/src/blocks/supersonic/samples/flow/multi-page/page2.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- page2.xml 4 May 2004 17:25:10 - 1.1 +++ page2.xml 4 May 2004 19:54:53 - 1.2 @@ -25,7 +25,7 @@ page xmlns:c=http://apache.org/cocoon/templates/jx/1.0; -titleFlow example: Guess a number/title +titleFlow example: multi-page form/title content h2Multi-page form: page 2/h2
cvs commit: cocoon-2.1/src/blocks/supersonic/samples/flow/docs multi-page.xml
bdelacretaz2004/05/04 12:56:31 Modified:src/blocks/supersonic/samples/flow/docs multi-page.xml Log: use more sensible path in link to multipage form example Revision ChangesPath 1.2 +1 -1 cocoon-2.1/src/blocks/supersonic/samples/flow/docs/multi-page.xml Index: multi-page.xml === RCS file: /home/cvs/cocoon-2.1/src/blocks/supersonic/samples/flow/docs/multi-page.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- multi-page.xml4 May 2004 17:25:10 - 1.1 +++ multi-page.xml4 May 2004 19:56:31 - 1.2 @@ -25,7 +25,7 @@ email message. /p p -Start the example a href=../number-guess/startMultiPagehere/a. +Start the example a href=../multiPageForm/startMultiPagehere/a. /p p Although a two-page form does not make sense for three fields
cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/forms sample.xml
joerg 2004/05/04 13:19:10 Modified:src/documentation/xdocs/userdocs/forms sample.xml Log: fixed wi/fi (thanks to Helma van der Linden) Revision ChangesPath 1.4 +1 -1 cocoon-2.1/src/documentation/xdocs/userdocs/forms/sample.xml Index: sample.xml === RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/forms/sample.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sample.xml24 Apr 2004 12:09:03 - 1.3 +++ sample.xml4 May 2004 20:19:10 - 1.4 @@ -157,7 +157,7 @@ pThe lt;ft:widget-labelgt; tag will cause the label of a widget to be inserted at the location of the tag. The lt;ft:widgetgt; tag will cause the XML representation of a widget to be inserted at the location of that tag. - The inserted XML will be in the Forms Instance namespace: strongwi/strong./p + The inserted XML will be in the Forms Instance namespace: strongfi/strong./p pThe XML representation of the widget will then be translated to HTML by an XSLT stylesheet (forms-samples-styling.xsl in our case -- see sitemap snippets below).