Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 18869 invoked from network); 22 May 2007 19:36:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2007 19:36:31 -0000 Received: (qmail 72375 invoked by uid 500); 22 May 2007 19:36:36 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 72326 invoked by uid 500); 22 May 2007 19:36:36 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 72315 invoked by uid 99); 22 May 2007 19:36:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2007 12:36:36 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2007 12:36:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 4BE671A981D; Tue, 22 May 2007 12:36:09 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r540711 [2/2] - in /cocoon/branches/BRANCH_2_1_X/src: blocks/axis/java/org/apache/cocoon/components/axis/ blocks/linotype/java/org/apache/cocoon/components/ deprecated/java/org/apache/cocoon/components/xslt/ java/org/apache/cocoon/ java/org... Date: Tue, 22 May 2007 19:36:08 -0000 To: cvs@cocoon.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070522193609.4BE671A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java?view=diff&rev=540711&r1=540710&r2=540711 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/modules/input/XMLFileModule.java Tue May 22 12:36:07 2007 @@ -16,6 +16,7 @@ */ package org.apache.cocoon.components.modules.input; +import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; import org.apache.avalon.framework.component.Composable; @@ -292,7 +293,7 @@ public void dispose() { super.dispose(); if (this.manager != null) { - this.manager.release(this.resolver); + this.manager.release((Component)this.resolver); this.resolver = null; this.manager = null; } @@ -313,8 +314,8 @@ if (modeConf != null && modeConf.getChildren().length > 0) { fileConf = modeConf.getChild("file", false); if (fileConf == null) { - if (getLogger().isDebugEnabled()) { - getLogger().debug("Missing 'file' child element at " + modeConf.getLocation()); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Missing 'file' child element at " + modeConf.getLocation()); } } else { hasDynamicConf = true; @@ -331,7 +332,7 @@ "No source specified" + (modeConf != null ? ", either dynamically in " + modeConf.getLocation() + ", or " : "") + " statically in " - + staticConfLocation); + + this.staticConfLocation); } if (!this.documents.containsKey(src)) { boolean reload = this.reloadAll; @@ -367,32 +368,32 @@ */ protected Object getContextObject(Configuration modeConf, Map objectModel) throws ConfigurationException { - DocumentHelper helper = getDocumentHelper(modeConf); + DocumentHelper helper = this.getDocumentHelper(modeConf); try { - return helper.getDocument(this.manager, this.resolver, getLogger()); + return helper.getDocument(this.manager, this.resolver, this.getLogger()); } catch (Exception e) { - if (getLogger().isDebugEnabled()) { - getLogger().debug("Error using source " + src + "\n" + e.getMessage(), e); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Error using source " + this.src + "\n" + e.getMessage(), e); } - throw new ConfigurationException("Error using source " + src, e); + throw new ConfigurationException("Error using source " + this.src, e); } } public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { - return getAttribute(name, modeConf, objectModel, false); + return this.getAttribute(name, modeConf, objectModel, false); } public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { - Object result = getAttribute(name, modeConf, objectModel, true); + Object result = this.getAttribute(name, modeConf, objectModel, true); return (result != null ? (Object[]) result : null); } private Object getAttribute(String name, Configuration modeConf, Map objectModel, boolean getValues) throws ConfigurationException { - Object contextObj = getContextObject(modeConf, objectModel); + Object contextObj = this.getContextObject(modeConf, objectModel); if (modeConf != null) { name = modeConf.getChild("parameter").getValue(this.parameter != null ? this.parameter : name); } @@ -401,7 +402,7 @@ Map cache = null; boolean hasBeenCached = false; if (this.cacheExpressions) { - cache = getExpressionCache(getValues? this.expressionValuesCache: this.expressionCache, contextObj); + cache = this.getExpressionCache(getValues? this.expressionValuesCache: this.expressionCache, contextObj); hasBeenCached = cache.containsKey(name); if (hasBeenCached) { result = cache.get(name); Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java?view=diff&rev=540711&r1=540710&r2=540711 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java Tue May 22 12:36:07 2007 @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.Map; +import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.ComponentManager; import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.logger.Logger; @@ -249,7 +250,7 @@ } // VG: Why exception is not thrown in constructor? if (this.exception != null) { - throw new SourceException("Cannot get input stream for " + getURI(), this.exception); + throw new SourceException("Cannot get input stream for " + this.getURI(), this.exception); } if (this.redirectSource != null) { @@ -372,10 +373,10 @@ this.mimeType = this.redirectSource.getMimeType(); } } catch (SAXException e) { - reset(); + this.reset(); this.exception = e; } catch (Exception e) { - reset(); + this.reset(); this.exception = new SAXException("Could not get sitemap source " + this.systemId, e); } this.needsRefresh = false; @@ -460,7 +461,7 @@ this.validity = new SitemapSourceValidity(); this.reset(); if (this.sourceResolver != null) { - this.manager.release(this.sourceResolver); + this.manager.release((Component)this.sourceResolver); this.sourceResolver = null; } } Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java?view=diff&rev=540711&r1=540710&r2=540711 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java Tue May 22 12:36:07 2007 @@ -21,6 +21,7 @@ import org.apache.avalon.excalibur.component.RoleManageable; import org.apache.avalon.excalibur.component.RoleManager; import org.apache.avalon.framework.activity.Disposable; +import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; import org.apache.avalon.framework.component.Composable; @@ -149,8 +150,8 @@ TreeProcessor child = new TreeProcessor(this, manager); child.checkReload = checkReload; child.resolver = (SourceResolver)manager.lookup(SourceResolver.ROLE); - child.source = new DelayedRefreshSourceWrapper(child.resolver.resolveURI(actualSource), lastModifiedDelay); - + child.source = new DelayedRefreshSourceWrapper(child.resolver.resolveURI(actualSource), this.lastModifiedDelay); + return child; } @@ -196,9 +197,9 @@ this.lastModifiedDelay = config.getChild("reload").getAttributeAsLong("delay", 1000L); String fileName = config.getAttribute("file", "sitemap.xmap"); - + try { - this.source = new DelayedRefreshSourceWrapper(this.resolver.resolveURI(fileName), lastModifiedDelay); + this.source = new DelayedRefreshSourceWrapper(this.resolver.resolveURI(fileName), this.lastModifiedDelay); } catch (Exception e) { throw new ConfigurationException("Cannot resolve " + fileName, e); } @@ -209,7 +210,7 @@ Source source = this.resolver.resolveURI(xconfURL); try { Settings settings = SettingsHelper.getSettings(this.context); - SAXConfigurationHandler handler = new PropertyAwareSAXConfigurationHandler(settings, getLogger()); + SAXConfigurationHandler handler = new PropertyAwareSAXConfigurationHandler(settings, this.getLogger()); SourceUtil.toSAX( this.manager, source, null, handler); builtin = handler.getConfiguration(); } finally { @@ -224,7 +225,7 @@ this.builderSelector = new ExtendedComponentSelector(Thread.currentThread().getContextClassLoader()); try { LifecycleHelper.setupComponent(this.builderSelector, - getLogger(), + this.getLogger(), this.context, this.manager, this.roleManager, @@ -261,7 +262,7 @@ public ProcessingPipeline buildPipeline(Environment environment) throws Exception { - setupConcreteProcessor(environment); + this.setupConcreteProcessor(environment); return this.concreteProcessor.buildPipeline(environment); } @@ -293,7 +294,7 @@ } private void setupConcreteProcessor(Environment env) throws Exception { - + if (this.parent == null) { // Ensure root sitemap uses the correct context, even if not located in the webapp context env.changeContext("", this.source.getURI()); @@ -302,7 +303,7 @@ // check for sitemap changes if (this.concreteProcessor == null || (this.checkReload && this.source.getLastModified() != this.lastModified)) { - buildConcreteProcessor(env); + this.buildConcreteProcessor(env); } } @@ -310,7 +311,7 @@ // Now that we entered the synchronized area, recheck what's already // been checked in process(). - if (this.concreteProcessor != null && source.getLastModified() == this.lastModified) { + if (this.concreteProcessor != null && this.source.getLastModified() == this.lastModified) { // Nothing changed return; } @@ -334,7 +335,7 @@ ((Recomposable)builder).recompose(this.manager); } builder.setProcessor(newProcessor); - + newLastModified = this.source.getLastModified(); ProcessingNode root = builder.build(this.source); @@ -345,9 +346,9 @@ this.builderSelector.release(builder); } - if (getLogger().isDebugEnabled()) { + if (this.getLogger().isDebugEnabled()) { double time = (this.lastModified - startTime) / 1000.0; - getLogger().debug("TreeProcessor built in " + time + " secs from " + source.getURI()); + this.getLogger().debug("TreeProcessor built in " + time + " secs from " + this.source.getURI()); } // Switch to the new processor (ensure it's never temporarily null) @@ -377,14 +378,14 @@ } // Release resolver looked up in compose() - this.manager.release(this.resolver); + this.manager.release((Component)this.resolver); this.resolver = null; this.manager = null; } } - + public String toString() { - return "TreeProcessor - " + (source == null ? "[unknown location]" : source.getURI()); + return "TreeProcessor - " + (this.source == null ? "[unknown location]" : this.source.getURI()); } } Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/AbstractEnvironment.java URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/AbstractEnvironment.java?view=diff&rev=540711&r1=540710&r2=540711 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/AbstractEnvironment.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/AbstractEnvironment.java Tue May 22 12:36:07 2007 @@ -26,6 +26,7 @@ import java.util.Map; import org.apache.avalon.framework.CascadingRuntimeException; +import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.component.ComponentException; import org.apache.avalon.framework.component.ComponentManager; import org.apache.avalon.framework.logger.AbstractLogEnabled; @@ -215,8 +216,8 @@ * Set the prefix of the URI in progress */ protected void setURIPrefix(String prefix) { - if (getLogger().isDebugEnabled()) { - getLogger().debug("Set the URI Prefix (OLD=" + getURIPrefix() + ", NEW=" + prefix + ")"); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Set the URI Prefix (OLD=" + this.getURIPrefix() + ", NEW=" + prefix + ")"); } this.prefix = new StringBuffer(prefix); } @@ -236,8 +237,8 @@ this.setContext(context); this.setURIPrefix(prefix == null ? "" : prefix); this.uris = uri; - if (getLogger().isDebugEnabled()) { - getLogger().debug("Reset context to " + this.context); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Reset context to " + this.context); } } @@ -250,11 +251,11 @@ this.initComponents(); } - if (getLogger().isDebugEnabled()) { - getLogger().debug("Changing Cocoon context"); - getLogger().debug(" from context(" + this.context + ") and prefix(" + this.prefix + ")"); - getLogger().debug(" to context(" + newContext + ") and prefix(" + newPrefix + ")"); - getLogger().debug(" at URI " + this.uris); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Changing Cocoon context"); + this.getLogger().debug(" from context(" + this.context + ") and prefix(" + this.prefix + ")"); + this.getLogger().debug(" to context(" + newContext + ") and prefix(" + newPrefix + ")"); + this.getLogger().debug(" at URI " + this.uris); } int l = newPrefix.length(); @@ -262,7 +263,7 @@ if (!this.uris.startsWith(newPrefix)) { String message = "The current URI (" + this.uris + ") doesn't start with given prefix (" + newPrefix + ")"; - getLogger().error(message); + this.getLogger().error(message); throw new RuntimeException(message); } this.prefix.append(newPrefix); @@ -278,8 +279,8 @@ if (this.context.startsWith("zip:")) { // if the resource is zipped into a war file (e.g. Weblogic temp deployment) // FIXME (VG): Is this still required? Better to unify both cases. - if (getLogger().isDebugEnabled()) { - getLogger().debug("Base context is zip: " + this.context); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Base context is zip: " + this.context); } org.apache.excalibur.source.Source source = null; @@ -318,13 +319,13 @@ } } - if (getLogger().isDebugEnabled()) { - getLogger().debug("New context is " + this.context); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("New context is " + this.context); } } public void globalRedirect(boolean sessionmode, String newURL) throws IOException { - redirect(sessionmode, newURL); + this.redirect(sessionmode, newURL); } // Request methods @@ -369,11 +370,11 @@ Deprecation.logger.warn("The method SourceResolver.resolve(String) is " + "deprecated. Use resolveURI(String) instead."); if (!this.initializedComponents) { - initComponents(); + this.initComponents(); } - if (getLogger().isDebugEnabled()) { - getLogger().debug("Resolving '" + systemId + "' in context '" + this.context + "'"); + if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("Resolving '" + systemId + "' in context '" + this.context + "'"); } if (systemId == null) { @@ -392,7 +393,7 @@ } if (null == avalonToCocoonSourceWrapper) { - synchronized (getClass()) { + synchronized (this.getClass()) { try { avalonToCocoonSourceWrapper = clazz.getDeclaredMethod("createProxy", new Class[] {ClassUtils.loadClass("org.apache.excalibur.source.Source"), @@ -408,7 +409,7 @@ } try { - org.apache.excalibur.source.Source source = resolveURI(systemId); + org.apache.excalibur.source.Source source = this.resolveURI(systemId); Source wrappedSource = (Source)avalonToCocoonSourceWrapper.invoke( clazz, new Object[] {source, this.sourceResolver, this, this.manager}); @@ -467,7 +468,7 @@ Deprecation.logger.warn("The method Environment.getOutputStream() " + "is deprecated. Use getOutputStream(-1) instead."); // by default we use the complete buffering output stream - return getOutputStream(-1); + return this.getOutputStream(-1); } /** @@ -605,7 +606,7 @@ */ public void finishingProcessing() { if (null != this.manager) { - this.manager.release(this.sourceResolver); + this.manager.release((Component)this.sourceResolver); this.manager = null; this.sourceResolver = null; }