cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r586219 - in /cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer: PortletRegistryImpl.java ProducerRegistryImpl.java
Date Fri, 19 Oct 2007 01:49:03 GMT
Author: vgritsenko
Date: Thu Oct 18 18:49:02 2007
New Revision: 586219

URL: http://svn.apache.org/viewvc?rev=586219&view=rev
Log:
switching to new AbstractLogEnabled

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/PortletRegistryImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/ProducerRegistryImpl.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/PortletRegistryImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/PortletRegistryImpl.java?rev=586219&r1=586218&r2=586219&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/PortletRegistryImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/PortletRegistryImpl.java
Thu Oct 18 18:49:02 2007
@@ -19,8 +19,8 @@
 import java.util.Hashtable;
 import java.util.Iterator;
 
-import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.wsrp4j.consumer.PortletKey;
 import org.apache.wsrp4j.consumer.WSRPPortlet;
 import org.apache.wsrp4j.consumer.driver.ConsumerPortletContext;
@@ -36,22 +36,15 @@
  *  
  * @version $Id$
  */
-public class PortletRegistryImpl
-    extends GenericPortletRegistryImpl
-    implements StateChangedListener, LogEnabled {
+public class PortletRegistryImpl extends GenericPortletRegistryImpl
+                                 implements StateChangedListener {
 
     /** The logger. */
-    protected Logger logger;
+    protected final Log logger = LogFactory.getLog(getClass());
 
     /** maps portlet keys to portlet context. */
     private Hashtable contextMap = new Hashtable();
 
-    /**
-     * @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
-     */
-    public void enableLogging(Logger logger) {
-        this.logger = logger;
-    }
 
     /**
      * Add a portlet to the registry<br/>

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/ProducerRegistryImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/ProducerRegistryImpl.java?rev=586219&r1=586218&r2=586219&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/ProducerRegistryImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-wsrp-impl/src/main/java/org/apache/cocoon/portal/wsrp/consumer/ProducerRegistryImpl.java
Thu Oct 18 18:49:02 2007
@@ -23,15 +23,16 @@
 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.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.wsrp4j.consumer.ConsumerEnvironment;
 import org.apache.wsrp4j.consumer.Producer;
 import org.apache.wsrp4j.consumer.driver.GenericProducerRegistryImpl;
 import org.apache.wsrp4j.consumer.driver.ProducerImpl;
 import org.apache.wsrp4j.exception.WSRPException;
 
+import org.apache.cocoon.portal.wsrp.adapter.WSRPAdapter;
+
 /**
  * A producer registry storing all producers in a {@link java.util.Hashtable}
  * in memory.<br/>
@@ -39,12 +40,11 @@
  *
  * @version $Id$
  */
-public class ProducerRegistryImpl
-    extends GenericProducerRegistryImpl
-    implements LogEnabled, Configurable, RequiresConsumerEnvironment, RequiresWSRPAdapter
{
+public class ProducerRegistryImpl extends GenericProducerRegistryImpl
+                                  implements Configurable, RequiresConsumerEnvironment, RequiresWSRPAdapter
{
 
     /** The logger. */
-    protected Logger logger;
+    protected final Log logger = LogFactory.getLog(getClass());
 
     /** The environment. */
     protected ConsumerEnvironment environment;
@@ -53,7 +53,7 @@
     protected Map descriptions = new Hashtable();
 
     /** Initialized? */
-    protected boolean initialized = false;
+    protected boolean initialized;
 
     /** The wsrp adapter. */
     protected WSRPAdapter adapter;
@@ -89,13 +89,6 @@
     }
 
     /**
-     * @see org.apache.avalon.framework.logger.LogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
-     */
-    public void enableLogging(Logger newLogger) {
-        this.logger = newLogger;
-    }
-
-    /**
      * Check if we have read our configuration already.
      * If not, read the config and invoke the configure method.
      */
@@ -154,10 +147,11 @@
      * @see org.apache.wsrp4j.consumer.ProducerRegistry#existsProducer(java.lang.String)
      */
     public boolean existsProducer(String id) {
-        this.checkInitialized();
-        if ( this.descriptions.containsKey(id) ) {
+        checkInitialized();
+        if (this.descriptions.containsKey(id)) {
             return true;
         }
+
         return super.existsProducer(id);
     }
 



Mime
View raw message