cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r586238 [2/2] - in /cocoon/trunk/core: cocoon-core/src/main/java/org/apache/cocoon/servlet/ cocoon-core/src/main/java/org/apache/cocoon/servlet/multipart/ cocoon-core/src/main/java/org/apache/cocoon/sitemap/ cocoon-core/src/main/java/org/ap...
Date Fri, 19 Oct 2007 02:45:20 GMT
Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/reading/ResourceReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/reading/ResourceReader.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/reading/ResourceReader.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/reading/ResourceReader.java Thu Oct 18 19:45:18 2007
@@ -16,10 +16,20 @@
  */
 package org.apache.cocoon.reading;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceValidity;
 
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.caching.CacheableProcessingComponent;
@@ -31,73 +41,55 @@
 import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.environment.http.HttpResponse;
 import org.apache.cocoon.util.ByteRange;
-import org.apache.cocoon.util.avalon.CLLoggerWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceValidity;
 import org.xml.sax.SAXException;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
- * @cocoon.sitemap.component.documentation
- * The <code>ResourceReader</code> component is used to serve binary data
+ * @version $Id$
+ * @cocoon.sitemap.component.documentation The <code>ResourceReader</code> component is used to serve binary data
  * in a sitemap pipeline. It makes use of HTTP Headers to determine if
  * the requested resource should be written to the <code>OutputStream</code>
  * or if it can signal that it hasn't changed.
- *
+ * <p/>
  * <p>Configuration:
  * <dl>
- *   <dt>&lt;expires&gt;</dt>
- *   <dd>This parameter is optional. When specified it determines how long
- *       in miliseconds the resources can be cached by any proxy or browser
- *       between Cocoon and the requesting visitor. Defaults to -1.
- *   </dd>
- *   <dt>&lt;quick-modified-test&gt;</dt>
- *   <dd>This parameter is optional. This boolean parameter controls the
- *       last modified test. If set to true (default is false), only the
- *       last modified of the current source is tested, but not if the
- *       same source is used as last time
- *       (see http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102921894301915 )
- *   </dd>
- *   <dt>&lt;byte-ranges&gt;</dt>
- *   <dd>This parameter is optional. This boolean parameter controls whether
- *       Cocoon should support byterange requests (to allow clients to resume
- *       broken/interrupted downloads).
- *       Defaults to true.
+ * <dt>&lt;expires&gt;</dt>
+ * <dd>This parameter is optional. When specified it determines how long
+ * in miliseconds the resources can be cached by any proxy or browser
+ * between Cocoon and the requesting visitor. Defaults to -1.
+ * </dd>
+ * <dt>&lt;quick-modified-test&gt;</dt>
+ * <dd>This parameter is optional. This boolean parameter controls the
+ * last modified test. If set to true (default is false), only the
+ * last modified of the current source is tested, but not if the
+ * same source is used as last time
+ * (see http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102921894301915 )
+ * </dd>
+ * <dt>&lt;byte-ranges&gt;</dt>
+ * <dd>This parameter is optional. This boolean parameter controls whether
+ * Cocoon should support byterange requests (to allow clients to resume
+ * broken/interrupted downloads).
+ * Defaults to true.
  * </dl>
- *
+ * <p/>
  * <p>Default configuration:
  * <pre>
  *   &lt;expires&gt;-1&lt;/expires&gt;
  *   &lt;quick-modified-test&gt;false&lt;/quick-modified-test&gt;
  *   &lt;byte-ranges&gt;true&lt;/byte-ranges&gt;
  * </pre>
- *
+ * <p/>
  * <p>In addition to reader configuration, above parameters can be passed
  * to the reader at the time when it is used.
- *
- * @version $Id$
  */
 public class ResourceReader extends AbstractReader
-                            implements CacheableProcessingComponent, Configurable {
+        implements CacheableProcessingComponent, Configurable {
 
     private static final boolean CONFIGURED_BYTE_RANGES_DEFAULT = true;
     private static final int CONFIGURED_BUFFER_SIZE_DEFAULT = 8192;
     private static final boolean CONFIGURED_QUICK_TEST_DEFAULT = false;
     private static final int CONFIGURED_EXPIRES_DEFAULT = -1;
 
-    /** The default logger for this class. */
-    private Log logger = LogFactory.getLog(getClass());
-
     /**
      * The list of generated documents
      */
@@ -129,7 +121,7 @@
      * Cocoon should support byterange requests (to allow clients to resume
      * broken/interrupted downloads).
      * Defaults to true.
-     *       
+     *
      * @param byteRanges
      */
     public void setByteRanges(boolean byteRanges) {
@@ -153,27 +145,16 @@
      * last modified of the current source is tested, but not if the
      * same source is used as last time
      * (see http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102921894301915 )
-     * 
+     *
      * @param quickTest
      */
     public void setQuickTest(boolean quickTest) {
         this.configuredQuickTest = quickTest;
     }
-    
-    /**
-     * Initialize the logger
-     *
-     * FIXME: This is a hack to enable logging in non Avalon containers while keeping
-     * back compabillity. It would have been neater to just override the get getLogger
-     * method, but it is final.
-     */
-    public void init() {
-        this.enableLogging(new CLLoggerWrapper(this.logger));
-    }
 
     /**
      * Read reader configuration
-     * 
+     *
      * @deprecated use property injection instead
      */
     public void configure(Configuration configuration) throws ConfigurationException {
@@ -185,10 +166,10 @@
         this.setByteRanges(parameters.getParameterAsBoolean("byte-ranges", CONFIGURED_BYTE_RANGES_DEFAULT));
 
         // Configuration has precedence over parameters.
-        this.setExpires(configuration.getChild("expires").getValueAsLong(configuredExpires));
-        this.setQuickTest(configuration.getChild("quick-modified-test").getValueAsBoolean(configuredQuickTest));
-        this.setBufferSize(configuration.getChild("buffer-size").getValueAsInteger(configuredBufferSize));
-        this.setByteRanges(configuration.getChild("byte-ranges").getValueAsBoolean(configuredByteRanges));
+        setExpires(configuration.getChild("expires").getValueAsLong(configuredExpires));
+        setQuickTest(configuration.getChild("quick-modified-test").getValueAsBoolean(configuredQuickTest));
+        setBufferSize(configuration.getChild("buffer-size").getValueAsInteger(configuredBufferSize));
+        setByteRanges(configuration.getChild("byte-ranges").getValueAsBoolean(configuredByteRanges));
     }
 
     /**
@@ -197,7 +178,7 @@
      * the length and the last modification date
      */
     public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
-    throws ProcessingException, SAXException, IOException {
+            throws ProcessingException, SAXException, IOException {
         super.setup(resolver, objectModel, src, par);
 
         this.request = ObjectModelHelper.getRequest(objectModel);
@@ -234,9 +215,9 @@
             response.setDateHeader("Expires", 0);
         }
 
-        long lastModified = getLastModified(); 
-        if (lastModified > 0) { 
-            response.setDateHeader("Last-Modified", lastModified); 
+        long lastModified = getLastModified();
+        if (lastModified > 0) {
+            response.setDateHeader("Last-Modified", lastModified);
         }
     }
 
@@ -311,9 +292,9 @@
     }
 
     protected void processStream(InputStream inputStream)
-    throws IOException, ProcessingException {
+            throws IOException, ProcessingException {
         byte[] buffer = new byte[bufferSize];
-        int length = -1;
+        int length;
 
         String ranges = request.getHeader("Range");
 
@@ -328,7 +309,7 @@
                 // TC: Hm.. why don't we have setStatus in the Response interface ?
                 if (response instanceof HttpResponse) {
                     // Respond with status 416 (Request range not satisfiable)
-                    ((HttpResponse)response).setStatus(416);
+                    response.setStatus(416);
                     if (getLogger().isDebugEnabled()) {
                         getLogger().debug("malformed byte range header [" + String.valueOf(ranges) + "]");
                     }
@@ -354,7 +335,7 @@
             response.setHeader("Content-Range", entityRange + "/" + entityLength);
             if (response instanceof HttpResponse) {
                 // Response with status 206 (Partial content)
-                ((HttpResponse)response).setStatus(206);
+                response.setStatus(206);
             }
 
             int pos = 0;

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/TraxTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/TraxTransformer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/TraxTransformer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/TraxTransformer.java Thu Oct 18 19:45:18 2007
@@ -24,9 +24,8 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
-
+import java.util.Set;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpSession;
 import javax.xml.transform.sax.SAXResult;
@@ -41,6 +40,14 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.commons.lang.exception.NestableRuntimeException;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceValidity;
+import org.apache.excalibur.xml.xslt.XSLTProcessor;
+import org.apache.excalibur.xml.xslt.XSLTProcessorException;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.components.source.util.SourceUtil;
@@ -48,14 +55,9 @@
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.util.avalon.CLLoggerWrapper;
 import org.apache.cocoon.xml.XMLConsumer;
-import org.apache.commons.lang.BooleanUtils;
-import org.apache.commons.lang.exception.NestableRuntimeException;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceValidity;
-import org.apache.excalibur.xml.xslt.XSLTProcessor;
-import org.apache.excalibur.xml.xslt.XSLTProcessorException;
+
 import org.xml.sax.SAXException;
 
 /**
@@ -382,9 +384,9 @@
 
         super.setContentHandler(this.transformerHandler);
         super.setLexicalHandler(this.transformerHandler);
-
+        // Is there even single implementation of LogEnabled TransformerHandler?
         if (this.transformerHandler instanceof LogEnabled) {
-        	((LogEnabled)this.transformerHandler).enableLogging(getLogger());
+        	((LogEnabled) this.transformerHandler).enableLogging(new CLLoggerWrapper(getLogger()));
         }
         // According to TrAX specs, all TransformerHandlers are LexicalHandlers
         final SAXResult result = new SAXResult(consumer);
@@ -402,6 +404,7 @@
         if (this.logicSheetParameters != null) {
             return this.logicSheetParameters;
         }
+
         HashMap map = null;
         if (par != null) {
             String[] params = par.getNames();

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XIncludeTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XIncludeTransformer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XIncludeTransformer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XIncludeTransformer.java Thu Oct 18 19:45:18 2007
@@ -97,7 +97,6 @@
         this.resolver = resolver;
         this.validity = new MultiSourceValidity(resolver, MultiSourceValidity.CHECK_ALWAYS); 
         this.xIncludePipe = new XIncludePipe(); 
-        this.xIncludePipe.enableLogging(getLogger());
         this.xIncludePipe.init(null, null);
         super.setContentHandler(xIncludePipe);
         super.setLexicalHandler(xIncludePipe);
@@ -462,7 +461,6 @@
                     }
 
                     XIncludePipe subPipe = new XIncludePipe();
-                    subPipe.enableLogging(getLogger());
                     subPipe.init(url.getURI(), xpointer);
                     subPipe.setConsumer(xmlConsumer);
                     subPipe.setParent(this);
@@ -471,7 +469,7 @@
                         if (xpointer != null && xpointer.length() > 0) {
                             XPointer xptr;
                             xptr = XPointerFrameworkParser.parse(NetUtils.decodePath(xpointer));
-                            XPointerContext context = new XPointerContext(xpointer, url, subPipe, getLogger(), manager);
+                            XPointerContext context = new XPointerContext(xpointer, url, subPipe, manager);
                             for (Iterator iter = namespaces.keySet().iterator(); iter.hasNext();) {
                                 String prefix = (String) iter.next();
                                 context.addPrefix(prefix, (String) namespaces.get(prefix));

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XSLTTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XSLTTransformer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XSLTTransformer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/XSLTTransformer.java Thu Oct 18 19:45:18 2007
@@ -23,9 +23,8 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 import java.util.Map.Entry;
-
+import java.util.Set;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpSession;
 import javax.xml.transform.sax.SAXResult;
@@ -40,6 +39,12 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.commons.lang.exception.NestableRuntimeException;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceValidity;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.components.source.util.SourceUtil;
@@ -49,12 +54,9 @@
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.util.avalon.CLLoggerWrapper;
 import org.apache.cocoon.xml.XMLConsumer;
-import org.apache.commons.lang.BooleanUtils;
-import org.apache.commons.lang.exception.NestableRuntimeException;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceValidity;
+
 import org.xml.sax.SAXException;
 
 /**
@@ -381,9 +383,9 @@
 
         super.setContentHandler(this.transformerHandler);
         super.setLexicalHandler(this.transformerHandler);
-
+        // Is there even single implementation of LogEnabled TransformerHandler?
         if (this.transformerHandler instanceof LogEnabled) {
-        	((LogEnabled)this.transformerHandler).enableLogging(getLogger());
+            ((LogEnabled) this.transformerHandler).enableLogging(new CLLoggerWrapper(getLogger()));
         }
         // According to TrAX specs, all TransformerHandlers are LexicalHandlers
         final SAXResult result = new SAXResult(consumer);

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/generation/AbstractGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/generation/AbstractGenerator.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/generation/AbstractGenerator.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/generation/AbstractGenerator.java Thu Oct 18 19:45:18 2007
@@ -32,16 +32,18 @@
  * 
  * @version $Id$
  */
-public abstract class AbstractGenerator 
-    extends AbstractXMLProducer 
-    implements Generator {
+public abstract class AbstractGenerator extends AbstractXMLProducer
+                                        implements Generator {
 
     /** The current <code>SourceResolver</code>. */
     protected SourceResolver resolver;
+
     /** The current <code>Map</code> objectModel. */
     protected Map objectModel;
+
     /** The current <code>Parameters</code>. */
     protected Parameters parameters;
+
     /** The source URI associated with the request or <b>null</b>. */
     protected String source;
 
@@ -50,11 +52,11 @@
      * the source and sitemap <code>Parameters</code> used to process the request.
      */
     public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
-        throws ProcessingException, SAXException, IOException {
-        this.resolver=resolver;
-        this.objectModel=objectModel;
-        this.source=src;
-        this.parameters=par;
+    throws ProcessingException, SAXException, IOException {
+        this.resolver = resolver;
+        this.objectModel = objectModel;
+        this.source = src;
+        this.parameters = par;
     }
 
     /**
@@ -67,5 +69,4 @@
         this.source = null;
         this.parameters = null;
     }
-
 }

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/reading/AbstractReader.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/reading/AbstractReader.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/reading/AbstractReader.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/reading/AbstractReader.java Thu Oct 18 19:45:18 2007
@@ -16,17 +16,19 @@
  */
 package org.apache.cocoon.reading;
 
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+
 import org.apache.avalon.excalibur.pool.Recyclable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.environment.SourceResolver;
-import org.xml.sax.SAXException;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Map;
+import org.xml.sax.SAXException;
 
 /**
  * A reader can be used to generate binary output for a request. This
@@ -34,18 +36,21 @@
  *
  * @version $Id$
  */
-public abstract class AbstractReader
-  extends AbstractLogEnabled
-  implements Reader, Recyclable {
+public abstract class AbstractReader extends AbstractLogEnabled
+                                     implements Reader, Recyclable {
 
     /** The current <code>SourceResolver</code>. */
     protected SourceResolver resolver;
+
     /** The current <code>Map</code> of the object model. */
     protected Map objectModel;
+
     /** The current <code>Parameters</code>. */
     protected Parameters parameters;
+
     /** The source URI associated with the request or <b>null</b>. */
     protected String source;
+
     /** The <code>OutputStream</code> to write on. */
     protected OutputStream out;
 
@@ -55,18 +60,19 @@
      */
     public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
     throws ProcessingException, SAXException, IOException {
-        this.resolver=resolver;
-        this.objectModel=objectModel;
-        this.source=src;
-        this.parameters=par;
+        this.resolver = resolver;
+        this.objectModel = objectModel;
+        this.source = src;
+        this.parameters = par;
     }
 
     /**
      * Set the <code>OutputStream</code>
      */
     public void setOutputStream(OutputStream out) {
-        if ( out instanceof BufferedOutputStream
-             || out instanceof org.apache.cocoon.util.BufferedOutputStream ) {
+        if (out instanceof BufferedOutputStream ||
+            out instanceof org.apache.cocoon.util.BufferedOutputStream) {
+
             this.out = out;
         } else {
             this.out = new BufferedOutputStream(out, 1536);
@@ -105,5 +111,4 @@
     public boolean shouldSetContentLength() {
         return false;
     }
-
 }

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java Thu Oct 18 19:45:18 2007
@@ -16,56 +16,51 @@
  */
 package org.apache.cocoon.serialization;
 
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.sax.SAXTransformerFactory;
+import javax.xml.transform.sax.TransformerHandler;
+import javax.xml.transform.stream.StreamResult;
+
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.excalibur.source.SourceValidity;
+import org.apache.excalibur.source.impl.validity.NOPValidity;
+
 import org.apache.cocoon.Constants;
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.util.ClassUtils;
 import org.apache.cocoon.util.TraxErrorHandler;
-import org.apache.cocoon.util.avalon.CLLoggerWrapper;
 import org.apache.cocoon.xml.AbstractXMLPipe;
 import org.apache.cocoon.xml.XMLConsumer;
 import org.apache.cocoon.xml.XMLUtils;
 
-import org.apache.commons.lang.BooleanUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.excalibur.source.SourceValidity;
-import org.apache.excalibur.source.impl.validity.NOPValidity;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.ext.LexicalHandler;
 import org.xml.sax.helpers.AttributesImpl;
 
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamResult;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 /**
  * @version $Id$
  */
 public abstract class AbstractTextSerializer extends AbstractSerializer
-        implements Configurable, Serviceable, CacheableProcessingComponent {
+                                             implements Configurable, Serviceable, CacheableProcessingComponent {
     
-    /** The default logger for this class. */
-    private Log logger = LogFactory.getLog(getClass());
-
     /**
      * Cache for avoiding unnecessary checks of namespaces abilities.
      * It associates a Boolean to the transformer class name.
@@ -123,12 +118,12 @@
      * @throws Exception 
      */
     public void init() throws Exception {
-        this.enableLogging(new CLLoggerWrapper(this.logger));
-        if (!this.format.containsKey(OutputKeys.ENCODING) && this.defaultEncoding != null)
+        if (!this.format.containsKey(OutputKeys.ENCODING) && this.defaultEncoding != null) {
             this.format.put(OutputKeys.ENCODING, this.defaultEncoding);
+        }
         this.cachingKey = createCachingKey(format);
-        this.initTransformerFactory();
-        this.initNamespacePipe();
+        initTransformerFactory();
+        initNamespacePipe();
     }
 
     /**
@@ -293,7 +288,6 @@
      */
     public void recycle() {
         super.recycle();
-    
         if (this.namespacePipe != null) {
             this.namespacePipe.recycle();
         }
@@ -322,7 +316,6 @@
             if (needsNamespacesAsAttributes()) {
                 // Setup a correction pipe
                 this.namespacePipe = new NamespaceAsAttributes();
-                this.namespacePipe.enableLogging(getLogger());
             }
         } catch (Exception e) {
             getLogger().warn("Cannot know if transformer needs namespaces attributes - assuming NO.", e);

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java Thu Oct 18 19:45:18 2007
@@ -518,7 +518,7 @@
      */
     public void ignorableWhitespace(char[] p0, int p1, int p2)
     throws SAXException {
-        if (ignoreWhitespaces == false && ignoreEventsCount == 0) {
+        if (!ignoreWhitespaces && ignoreEventsCount == 0) {
             super.ignorableWhitespace(p0, p1, p2);
         }
     }
@@ -647,7 +647,7 @@
      */
     protected Object removeRecorder() {
         Object recorder = this.recorderStack.pop();
-        if (this.recorderStack.empty() == true) {
+        if (this.recorderStack.empty()) {
             // undo redirect if no recorder any more
             setContentHandler(originalContentHandler);
             setLexicalHandler(originalLexicalHandler);
@@ -855,7 +855,7 @@
         }
 
         if (getLogger().isDebugEnabled()) {
-            Object serializedXML = null;
+            Object serializedXML;
             try {
                 serializedXML = fragment == null? "null": XMLUtils.serializeNode(fragment);
             } catch (ProcessingException ignore) {

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLConsumer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLConsumer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLConsumer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLConsumer.java Thu Oct 18 19:45:18 2007
@@ -16,7 +16,8 @@
  */
 package org.apache.cocoon.xml;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 import org.xml.sax.Attributes;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
@@ -27,7 +28,8 @@
  *
  * @version $Id$
  */
-public abstract class AbstractXMLConsumer extends AbstractLogEnabled implements XMLConsumer {
+public abstract class AbstractXMLConsumer extends AbstractLogEnabled
+                                          implements XMLConsumer {
 
     /**
      * Receive an object for locating the origin of SAX document events.
@@ -199,7 +201,6 @@
     public void endCDATA()
     throws SAXException {
     }
-
 
     /**
      * Report an XML comment anywhere in the document.

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLProducer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLProducer.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLProducer.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLProducer.java Thu Oct 18 19:45:18 2007
@@ -17,7 +17,9 @@
 package org.apache.cocoon.xml;
 
 import org.apache.avalon.excalibur.pool.Recyclable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 import org.xml.sax.ContentHandler;
 import org.xml.sax.ext.LexicalHandler;
 import org.xml.sax.helpers.DefaultHandler;
@@ -30,7 +32,8 @@
  */
 public abstract class AbstractXMLProducer extends AbstractLogEnabled
                                           implements XMLProducer, Recyclable {
-    
+
+    /** Empty, do-nothing content handler */
     protected static final ContentHandler EMPTY_CONTENT_HANDLER = new DefaultHandler();
 
     /** The <code>XMLConsumer</code> receiving SAX events. */
@@ -44,9 +47,12 @@
 
     /**
      * Set the <code>XMLConsumer</code> that will receive XML data.
-     * <br>
-     * This method will simply call <code>setContentHandler(consumer)</code>
-     * and <code>setLexicalHandler(consumer)</code>.
+     *
+     * <p>This method will call <code>setContentHandler(consumer)</code>
+     * and <code>setLexicalHandler(consumer)</code> since {@link XMLConsumer}
+     * interface implements both {@link ContentHandler} and {@link LexicalHandler}.
+     *
+     * @param consumer xml consumer, should never be null.
      */
     public void setConsumer(XMLConsumer consumer) {
         this.xmlConsumer = consumer;
@@ -56,9 +62,11 @@
 
     /**
      * Set the <code>ContentHandler</code> that will receive XML data.
-     * <br>
-     * Subclasses may retrieve this <code>ContentHandler</code> instance
+     *
+     * <p>Subclasses may retrieve this <code>ContentHandler</code> instance
      * accessing the protected <code>super.contentHandler</code> field.
+     *
+     * @param handler content handler, should never be null.
      */
     public void setContentHandler(ContentHandler handler) {
         this.contentHandler = handler;
@@ -66,9 +74,11 @@
 
     /**
      * Set the <code>LexicalHandler</code> that will receive XML data.
-     * <br>
-     * Subclasses may retrieve this <code>LexicalHandler</code> instance
+     *
+     * <p>Subclasses may retrieve this <code>LexicalHandler</code> instance
      * accessing the protected <code>super.lexicalHandler</code> field.
+     *
+     * @param handler lexical handler, should never be null.
      */
     public void setLexicalHandler(LexicalHandler handler) {
         this.lexicalHandler = handler;

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/XMLBaseSupport.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/XMLBaseSupport.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/XMLBaseSupport.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/XMLBaseSupport.java Thu Oct 18 19:45:18 2007
@@ -16,15 +16,16 @@
  */
 package org.apache.cocoon.xml;
 
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.apache.excalibur.source.SourceResolver;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Stack;
+
+import org.apache.commons.logging.Log;
 import org.apache.excalibur.source.Source;
-import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.source.SourceResolver;
 
-import java.util.Stack;
-import java.util.Collections;
-import java.io.IOException;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
 
 /**
  * Helper class for handling xml:base attributes.
@@ -51,9 +52,10 @@
      */
     private Stack bases = new Stack();
     private SourceResolver resolver;
-    private Logger logger;
+    private Log logger;
+
 
-    public XMLBaseSupport(SourceResolver resolver, Logger logger) {
+    public XMLBaseSupport(SourceResolver resolver, Log logger) {
         this.resolver = resolver;
         this.logger = logger;
     }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/CookieMatcher.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/CookieMatcher.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/CookieMatcher.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/CookieMatcher.java Thu Oct 18 19:45:18 2007
@@ -18,15 +18,15 @@
 
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.servlet.http.Cookie;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.sitemap.PatternException;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -34,10 +34,11 @@
  *
  * @version $Id$
  */
-public class CookieMatcher extends AbstractLogEnabled implements Matcher, ThreadSafe {
+public class CookieMatcher extends AbstractLogEnabled
+                           implements Matcher, ThreadSafe {
 
     public Map match(String pattern, Map objectModel, Parameters parameters)
-            throws PatternException {
+    throws PatternException {
 
         if (pattern == null) {
             throw new PatternException("No cookie name given.");

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/MountTableMatcher.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/MountTableMatcher.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/MountTableMatcher.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/matching/MountTableMatcher.java Thu Oct 18 19:45:18 2007
@@ -16,9 +16,13 @@
  */
 package org.apache.cocoon.matching;
 
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameterizable;
 import org.apache.avalon.framework.parameters.Parameters;
@@ -26,20 +30,15 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.source.SourceValidity;
 
 import org.apache.cocoon.components.source.util.SourceUtil;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.sitemap.PatternException;
-
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceValidity;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -85,6 +84,7 @@
     private SourceResolver resolver;
     private Map mountTables = Collections.synchronizedMap(new HashMap());
     private boolean ignoreMissingTables;
+
 
     public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/BrowserSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/BrowserSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/BrowserSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/BrowserSelector.java Thu Oct 18 19:45:18 2007
@@ -29,7 +29,6 @@
  *
  * @version $Id$
  */
-
 public class BrowserSelector extends NamedPatternsSelector {
 
     public void configure(Configuration conf) throws ConfigurationException {

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/CookieSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/CookieSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/CookieSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/CookieSelector.java Thu Oct 18 19:45:18 2007
@@ -17,16 +17,16 @@
 package org.apache.cocoon.selection;
 
 import java.util.Map;
-
 import javax.servlet.http.Cookie;
 
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -43,9 +43,10 @@
  * @version $Id$
  */
 public class CookieSelector extends AbstractLogEnabled
-        implements Configurable, Selector, ThreadSafe {
+                            implements Configurable, Selector, ThreadSafe {
 
     protected String defaultName;
+
 
     public void configure(Configuration config) throws ConfigurationException {
         this.defaultName = config.getChild("cookie-name").getValue(null);

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HeaderSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HeaderSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HeaderSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HeaderSelector.java Thu Oct 18 19:45:18 2007
@@ -16,16 +16,16 @@
  */
 package org.apache.cocoon.selection;
 
+import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
 
 import org.apache.cocoon.environment.ObjectModelHelper;
-
-import java.util.Map;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -41,9 +41,10 @@
  * @version $Id$
  */
 public class HeaderSelector extends AbstractLogEnabled
-  implements Configurable, ThreadSafe, Selector {
+                            implements Configurable, ThreadSafe, Selector {
 
     protected String defaultName;
+
 
     public void configure(Configuration config) throws ConfigurationException {
         // Check old name

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HostSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HostSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HostSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/HostSelector.java Thu Oct 18 19:45:18 2007
@@ -48,7 +48,6 @@
  *
  * @version $Id$
  */
-
 public class HostSelector extends NamedPatternsSelector {
 
     public void configure(Configuration conf) throws ConfigurationException {

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestAttributeSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestAttributeSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestAttributeSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestAttributeSelector.java Thu Oct 18 19:45:18 2007
@@ -16,15 +16,16 @@
  */
 package org.apache.cocoon.selection;
 
+import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.environment.ObjectModelHelper;
 
-import java.util.Map;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -39,9 +40,10 @@
  * @version $Id$
  */
 public class RequestAttributeSelector extends AbstractLogEnabled
-  implements Configurable, ThreadSafe, Selector {
+                                      implements Configurable, ThreadSafe, Selector {
 
     protected String defaultName;
+
 
     public void configure(Configuration config) throws ConfigurationException {
         this.defaultName = config.getChild("attribute-name").getValue(null);

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestMethodSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestMethodSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestMethodSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/RequestMethodSelector.java Thu Oct 18 19:45:18 2007
@@ -16,12 +16,13 @@
  */
 package org.apache.cocoon.selection;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import java.util.Map;
+
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.environment.ObjectModelHelper;
 
-import java.util.Map;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -30,11 +31,9 @@
  * @version $Id$
  */
 public class RequestMethodSelector extends AbstractLogEnabled
-  implements ThreadSafe, Selector {
+                                   implements ThreadSafe, Selector {
 
-    public boolean select(
-         String expression, Map objectModel, Parameters parameters) 
-    {
+    public boolean select(String expression, Map objectModel, Parameters parameters) {
         String method = ObjectModelHelper.getRequest(objectModel).getMethod();
         return method.equals(expression);
     }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/ResourceExistsSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/ResourceExistsSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/ResourceExistsSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/ResourceExistsSelector.java Thu Oct 18 19:45:18 2007
@@ -19,7 +19,6 @@
 import java.util.Map;
 
 import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -29,6 +28,8 @@
 import org.apache.excalibur.source.SourceNotFoundException;
 import org.apache.excalibur.source.SourceResolver;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * @cocoon.sitemap.component.documentation
  * Selects the first of a set of Resources (usually files) that exists.
@@ -82,7 +83,8 @@
 
     private ServiceManager manager;
     private SourceResolver resolver;
-    
+
+
     public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;
         this.resolver = (SourceResolver)manager.lookup(SourceResolver.ROLE);

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/SessionAttributeSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/SessionAttributeSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/SessionAttributeSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/selection/SessionAttributeSelector.java Thu Oct 18 19:45:18 2007
@@ -16,15 +16,16 @@
  */
 package org.apache.cocoon.selection;
 
+import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.environment.ObjectModelHelper;
 
-import java.util.Map;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -39,9 +40,10 @@
  * @version $Id$
  */
 public class SessionAttributeSelector extends AbstractLogEnabled
-  implements Configurable, ThreadSafe, Selector {
+                                      implements Configurable, ThreadSafe, Selector {
 
     protected String defaultName;
+
 
     public void configure(Configuration config) throws ConfigurationException {
         this.defaultName = config.getChild("attribute-name").getValue(null);

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/acting/AbstractAction.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/acting/AbstractAction.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/acting/AbstractAction.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/acting/AbstractAction.java Thu Oct 18 19:45:18 2007
@@ -16,11 +16,11 @@
  */
 package org.apache.cocoon.acting;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-
 import java.util.Collections;
 import java.util.Map;
 
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * AbstractAction gives you the infrastructure for easily deploying more
  * Actions.  In order to get at the Logger, use getLogger().
@@ -28,7 +28,7 @@
  * @version $Id$
  */
 public abstract class AbstractAction extends AbstractLogEnabled
-    implements Action {
+                                     implements Action {
 
     /**
      * Empty unmodifiable map.

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java Thu Oct 18 19:45:18 2007
@@ -25,16 +25,17 @@
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.SingleThreaded;
+import org.apache.excalibur.source.SourceUtil;
+
 import org.apache.cocoon.configuration.Settings;
 import org.apache.cocoon.el.objectmodel.ObjectModel;
 import org.apache.cocoon.environment.Redirector;
 import org.apache.cocoon.processing.ProcessInfoProvider;
-import org.apache.excalibur.source.SourceUtil;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * Abstract superclass for various scripting languages used by Cocoon
@@ -52,10 +53,9 @@
  * @since March 15, 2002
  * @version $Id$
  */
-public abstract class AbstractInterpreter
-        extends AbstractLogEnabled
-        implements Serviceable, Contextualizable, Interpreter,
-                   SingleThreaded, Configurable, Disposable {
+public abstract class AbstractInterpreter extends AbstractLogEnabled
+                                          implements Serviceable, Contextualizable, Interpreter,
+                                                     SingleThreaded, Configurable, Disposable {
 
     // The instance ID of this interpreter, used to identify user scopes
     private String instanceID;

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/AvalonBeanPostProcessor.java Thu Oct 18 19:45:18 2007
@@ -104,6 +104,7 @@
         if (true) {
             return;
         }
+
         // replace properties in configuration objects
         if (this.logger.isDebugEnabled()) {
             this.logger.debug("Processing component configurations.");

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java Thu Oct 18 19:45:18 2007
@@ -21,10 +21,11 @@
 import java.util.Map;
 
 import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.excalibur.source.Source;
 
 import org.apache.cocoon.ProcessingException;
@@ -52,6 +53,8 @@
 public class EnvironmentHelper extends AbstractLogEnabled
                                implements SourceResolver, Serviceable, Disposable {
 
+    private static final Log logger = LogFactory.getLog(EnvironmentHelper.class);
+
     /** The environment information */
     static protected final ThreadLocal environmentStack = new ThreadLocal();
 
@@ -339,8 +342,8 @@
     /**
      * INTERNAL METHOD. Do not use this, can be removed without warning or deprecation cycle.
      */
-    public static void checkEnvironment(int depth, Logger logger)
-            throws Exception {
+    public static void checkEnvironment(int depth)
+    throws Exception {
         // TODO (CZ): This is only for testing - remove it later on. See also Cocoon.java.
         final EnvironmentStack stack = (EnvironmentStack) environmentStack.get();
         int currentDepth = stack != null ? stack.size() : 0;

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractPreparableMatcher.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractPreparableMatcher.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractPreparableMatcher.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractPreparableMatcher.java Thu Oct 18 19:45:18 2007
@@ -16,11 +16,12 @@
  */
 package org.apache.cocoon.matching;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import java.util.Map;
+
 import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.sitemap.PatternException;
 
-import java.util.Map;
+import org.apache.cocoon.sitemap.PatternException;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * A matcher that can prepare patterns during sitemap setup for faster match at request time.
@@ -29,13 +30,14 @@
  *
  * @version $Id$
  */
-public abstract class AbstractPreparableMatcher extends AbstractLogEnabled implements PreparableMatcher {
+public abstract class AbstractPreparableMatcher extends AbstractLogEnabled
+                                                implements PreparableMatcher {
 
     /**
      * Match the pattern by preparing it and matching the prepared pattern.
      */
     public Map match (String pattern, Map objectModel, Parameters parameters)
-      throws PatternException {
+    throws PatternException {
         return preparedMatch(preparePattern(pattern), objectModel, parameters);
     }
 }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractWildcardMatcher.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractWildcardMatcher.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractWildcardMatcher.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/matching/AbstractWildcardMatcher.java Thu Oct 18 19:45:18 2007
@@ -16,37 +16,36 @@
  */
 package org.apache.cocoon.matching;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import java.util.Map;
+
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.thread.ThreadSafe;
+
 import org.apache.cocoon.sitemap.PatternException;
 import org.apache.cocoon.sitemap.SitemapParameters;
+import org.apache.cocoon.util.AbstractLogEnabled;
 import org.apache.cocoon.util.WildcardMatcherHelper;
 
-import java.util.Map;
-
 /**
  * Base class for wildcard matchers
  *
  * @version $Id$
  */
-
-public abstract class AbstractWildcardMatcher
-    extends AbstractLogEnabled
-    implements Matcher, ThreadSafe {
+public abstract class AbstractWildcardMatcher extends AbstractLogEnabled
+                                              implements Matcher, ThreadSafe {
 
     /**
      * Match the prepared pattern against the result of {@link #getMatchString(Map, Parameters)}.
-     * @see org.apache.cocoon.matching.AbstractPreparableMatcher#match(java.lang.String, java.util.Map, org.apache.avalon.framework.parameters.Parameters)
+     *
+     * @see AbstractPreparableMatcher#match(String, Map, Parameters)
      */
     public Map match(String pattern, Map objectModel, Parameters parameters) throws PatternException {
         if (pattern == null) {
             throw new PatternException("A pattern is needed at " +
-                    SitemapParameters.getLocation(parameters));
+                                       SitemapParameters.getLocation(parameters));
         }
 
-        final String match = this.getMatchString(objectModel, parameters);
-
+        final String match = getMatchString(objectModel, parameters);
         if (match == null) {
             return null;
         }

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java Thu Oct 18 19:45:18 2007
@@ -16,10 +16,11 @@
  */
 package org.apache.cocoon.selection;
 
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import java.util.Map;
+
 import org.apache.avalon.framework.parameters.Parameters;
 
-import java.util.Map;
+import org.apache.cocoon.util.AbstractLogEnabled;
 
 /**
  * Abstract SwitchSelector class.
@@ -27,12 +28,13 @@
  * @version $Id$
  */
 public abstract class AbstractSwitchSelector extends AbstractLogEnabled
-    implements SwitchSelector {
+                                             implements SwitchSelector {
 
     /**
      * Selectors test pattern against some objects in a <code>Map</code>
-     * model and signals success with the returned boolean value
-     * @param expr        The expression to test.
+     * model and signals success with the returned boolean value.
+     *
+     * @param expr The expression to test.
      * @return Signals successful test.
      */
     public boolean select(String expr, Map objectModel, Parameters params) {

Modified: cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/NamedPatternsSelector.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/NamedPatternsSelector.java?rev=586238&r1=586237&r2=586238&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/NamedPatternsSelector.java (original)
+++ cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/selection/NamedPatternsSelector.java Thu Oct 18 19:45:18 2007
@@ -16,29 +16,30 @@
  */
 package org.apache.cocoon.selection;
 
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.avalon.framework.configuration.Configurable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.thread.ThreadSafe;
+
+import org.apache.cocoon.util.AbstractLogEnabled;
+
 /**
  * Abstract class for selectors that select a value when it matches
  * some patterns associated to the select expression.
  *
- * @see BrowserSelector
- * @see HostSelector
+ * <p>Known implementations of this abstract class include <code>BrowserSelector</code>,
+ * <code>HostSelector</code> from <code>cocoon-sitemap-components</code> maven module.
+ *
  * @version $Id$
  */
-
 public abstract class NamedPatternsSelector extends AbstractLogEnabled
-  implements Configurable, ThreadSafe, Selector {
+                                            implements Configurable, ThreadSafe, Selector {
 
     /**
      * Association of names to String[] of values.



Mime
View raw message