cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r462609 - in /cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main: java/org/apache/cocoon/portal/coplet/adapter/impl/ java/org/apache/cocoon/portal/profile/impl/ resources/org/apache/cocoon/portal/
Date Tue, 10 Oct 2006 22:25:02 GMT
Author: cziegeler
Date: Tue Oct 10 15:25:00 2006
New Revision: 462609

URL: http://svn.apache.org/viewvc?view=rev&rev=462609
Log:
Fix some bugs

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java?view=diff&rev=462609&r1=462608&r2=462609
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/coplet/adapter/impl/AbstractCopletAdapter.java
Tue Oct 10 15:25:00 2006
@@ -371,6 +371,9 @@
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#init(org.apache.cocoon.portal.om.CopletDefinition)
      */
     public void init(CopletDefinition coplet) {
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Initializing coplet definition: " + coplet);
+        }
         // nothing to do here, can be overwritten in subclasses
     }
 
@@ -379,19 +382,28 @@
      */
     public void destroy(CopletDefinition coplet) {
         // nothing to do here, can be overwritten in subclasses
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Destroying coplet definition: " + coplet);
+        }
     }
 
     /**
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#login(org.apache.cocoon.portal.om.CopletInstance)
      */
     public void login(CopletInstance coplet) {
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Login into coplet " + coplet);
+        }
         // copy temporary attributes from the coplet data
-        Iterator iter = coplet.getCopletDefinition().getAttributes().entrySet().iterator();
+        final Iterator iter = coplet.getCopletDefinition().getAttributes().entrySet().iterator();
         while ( iter.hasNext() ) {
-            Map.Entry entry = (Map.Entry)iter.next();
+            final Map.Entry entry = (Map.Entry)iter.next();
             if ( entry.getKey().toString().startsWith("temporary:") ) {
-                coplet.setTemporaryAttribute(entry.getKey().toString().substring(10),
-                        entry.getValue());
+                final String name = entry.getKey().toString().substring(10);
+                if ( this.getLogger().isDebugEnabled() ) {
+                    this.getLogger().debug("Setting temporary attribute '" + name + "' on
coplet " + coplet + " : " + entry.getValue());
+                }
+                coplet.setTemporaryAttribute(name, entry.getValue());
             }
         }
     }
@@ -400,6 +412,9 @@
      * @see org.apache.cocoon.portal.coplet.adapter.CopletAdapter#logout(org.apache.cocoon.portal.om.CopletInstance)
      */
     public void logout(CopletInstance coplet) {
+        if ( this.getLogger().isDebugEnabled() ) {
+            this.getLogger().debug("Logout from coplet " + coplet);
+        }
         // nothing to do here, can be overwritten in subclasses
     }
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java?view=diff&rev=462609&r1=462608&r2=462609
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
Tue Oct 10 15:25:00 2006
@@ -154,7 +154,7 @@
             }
             if (object instanceof Layout) {
                 preparableObject = this.checkAvailability(profile, (Layout)object);
-            } else if (object instanceof Collection) {
+            } else if (preparableObject instanceof Collection) {
                 final Iterator iterator = ((Collection)preparableObject).iterator();
                 while (iterator.hasNext()) {
                     final Object o = iterator.next();

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles?view=diff&rev=462609&r1=462608&r2=462609
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/resources/org/apache/cocoon/portal/portal.roles
Tue Oct 10 15:25:00 2006
@@ -190,7 +190,7 @@
       +-->
     <role name="org.apache.cocoon.portal.services.UserService"
           default-class="org.apache.cocoon.portal.services.impl.DefaultUserService"
-          shorthand="user-service"/>
+          shorthand="user-service" lazy-init="false"/>
 
   <!--+
       | Event Manager.



Mime
View raw message