cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r293351 [1/2] - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: ./ impl/ profile/ profile/impl/
Date Mon, 03 Oct 2005 13:48:11 GMT
Author: cziegeler
Date: Mon Oct  3 06:43:39 2005
New Revision: 293351

URL: http://svn.apache.org/viewcvs?rev=293351&view=rev
Log:
Code formatting and further profile manager cleanup

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/Constants.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/LinkService.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspect.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/LinkInfo.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUser.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUserInfoProvider.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileLS.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationFWUserInfoProvider.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletBaseDataManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletDataManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletInstanceDataManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfo.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfoProvider.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserProfile.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/Constants.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/Constants.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/Constants.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/Constants.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,11 +19,11 @@
  * Defines constants used within portal classes.
  *
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class Constants {
-    
+
     /**
      * Names used in object model or parent context by CopletModule, CopletTransformer and CopletAdapter. 
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/LinkService.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/LinkService.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/LinkService.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/LinkService.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,26 +20,28 @@
 import org.apache.cocoon.portal.event.Event;
 
 /**
+ * This is a central service of the portal. It should be used to create links
+ * inside the portal pages.
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public interface LinkService {
 
     String ROLE = LinkService.class.getName();
-    
+
     String DEFAULT_REQUEST_EVENT_PARAMETER_NAME = "cocoon-portal-event";
     String DEFAULT_CONVERTABLE_EVENT_PARAMETER_NAME = "javax.portlet.events";
 
-
     static class ParameterDescription {
         public final String parameters;
         public ParameterDescription(String parameters) {
             this.parameters = parameters;
         }
     }
+
     /**
      * Get the uri for this coplet containing the additional event
      * @param event The event to add (null is also allowed for convenience)
@@ -78,7 +80,7 @@
      * @param event Event to add
      */
     void addEventToLink(Event event);
-    
+
     /**
      * Add this parameter to every link.
      * If the link already contains a parameter with this name,
@@ -89,7 +91,7 @@
      * @see #addUniqueParameterToLink(String, String)
      */
     void addParameterToLink(String name, String value);
-    
+
     /**
      * Add this parameter to every link.
      * If the link already contains a parameter with this name,

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalComponentManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  *
- * @version CVS $Id$
+ * @version $Id$
  */
 public interface PortalComponentManager {
 
@@ -58,12 +58,12 @@
      * Get the coplet factory.
      */
     CopletFactory getCopletFactory();
-    
+
     /**
      * Get the layout factory
      */
     LayoutFactory getLayoutFactory();
-    
+
     /**
      * Get the event manager
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,21 +27,20 @@
  * request parameters etc.)
  * The section method {@link #showPortal(ContentHandler, Parameters)}
  * starts rendering the portal.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public interface PortalManager {
 
     String ROLE = PortalManager.class.getName();
-    
+
     void process()
     throws ProcessingException;
-    
+
     void showPortal(ContentHandler ch,
-                     Parameters     parameters)
+                    Parameters     parameters)
     throws SAXException;
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspect.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspect.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspect.java Mon Oct  3 06:43:39 2005
@@ -23,7 +23,7 @@
 
 /**
  * @since 2.1.8
- * @version SVN $Id:$
+ * @version $Id$
  */
 public interface PortalManagerAspect {
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectPrepareContext.java Mon Oct  3 06:43:39 2005
@@ -22,7 +22,7 @@
 
 /**
  * @since 2.1.8
- * @version SVN $Id:$
+ * @version $Id$
  */
 public interface PortalManagerAspectPrepareContext {
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalManagerAspectRenderContext.java Mon Oct  3 06:43:39 2005
@@ -23,7 +23,7 @@
 
 /**
  * @since 2.1.8
- * @version SVN $Id:$
+ * @version $Id$
  */
 public interface PortalManagerAspectRenderContext {
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/PortalService.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,63 +31,63 @@
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
  * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public interface PortalService {
 
     /** The role to lookup this component. */
     String ROLE = PortalService.class.getName();
-    
+
     /**
      * The name of the portal - as defined in the portal configuration.
      */
     String getPortalName();
-    
+
     /**
      * Return the value of an attribute.
      * @param key The key of the attribute
      * @return The value of the attribute or null.
      */
     Object getAttribute(String key);
-    
+
     /**
      * Set an attribute.
      * @param key    The key of the attribute
      * @param value  The new value
      */
     void setAttribute(String key, Object value);
-    
+
     /**
      * Remove an attribute.
      * @param key The key of the attribute
      */
     Object removeAttribute(String key);
-    
+
     /**
      * Return the names of all attributes.
      */
     Iterator getAttributeNames();
-    
+
     /**
      * Return the value of a temporary attribute.
      * @param key The key of the attribute
      * @return The value of the attribute or null.
      */
     Object getTemporaryAttribute(String key);
-    
+
     /**
      * Set a temporary attribute.
      * @param key    The key of the attribute
      * @param value  The new value
      */
     void setTemporaryAttribute(String key, Object value);
-    
+
     /**
      * Remove a temporary attribute.
      * @param key The key of the attribute
      */
     Object removeTemporaryAttribute(String key);
-    
+
     /**
      * Return the names of all temporary attributes.
      */
@@ -104,17 +104,17 @@
      */
     void setEntryLayout(String layoutKey, Layout object);
     Layout getEntryLayout(String layoutKey);
-    
+
     /**
      * Change the default layout key for most functions
      */
     void setDefaultLayoutKey(String layoutKey);
-    
+
     /**
      * Get the default layout key
      */
     String getDefaultLayoutKey();
-    
+
     /**
      * Return all skins
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java Mon Oct  3 06:43:39 2005
@@ -43,7 +43,7 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  *
- * @version CVS $Id$
+ * @version $Id$
  */
 public class DefaultPortalComponentManager
     extends AbstractLogEnabled
@@ -236,5 +236,4 @@
     public Core getCore() {
         return this.core;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/DefaultPortalManagerAspectContext.java Mon Oct  3 06:43:39 2005
@@ -30,7 +30,7 @@
 /**
  * The aspect context is passed to every aspect.
  * @since 2.1.8
- * @version SVN $Id:$
+ * @version $Id$
  */
 public final class DefaultPortalManagerAspectContext
     implements PortalManagerAspectRenderContext, PortalManagerAspectPrepareContext {
@@ -40,7 +40,7 @@
     private Iterator iterator;
     private Iterator configIterator;
     private Parameters config;
-    
+
     public DefaultPortalManagerAspectContext(PortalManagerAspectChain chain,
                                              PortalService service,
                                              Map objectModel) {
@@ -49,7 +49,7 @@
         this.iterator = chain.getIterator();
         this.configIterator = chain.getConfigIterator();
     }
-    
+
 	/**
 	 * @see org.apache.cocoon.portal.PortalManagerAspectPrepareContext#invokeNext()
 	 */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/LinkInfo.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/LinkInfo.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/LinkInfo.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/LinkInfo.java Mon Oct  3 06:43:39 2005
@@ -84,7 +84,7 @@
         buffer.append(request.getSitemapURI());
         return buffer.toString();
     }
-        
+
     public String getBase(Boolean secure) {
         // if no information is provided, we stay with the same protocol
         if ( secure == null ) {
@@ -115,7 +115,7 @@
                 // the parameter is available, so remove it
                 this.url.delete(pos, this.url.length() + 1);
                 this.hasParameters = false;
-                
+
                 Enumeration enumeration = params.getParameterNames();
                 while ( enumeration.hasMoreElements() ) {
                     final String paramName = (String)enumeration.nextElement();

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelLinkService.java Mon Oct  3 06:43:39 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@
  *
  * @author Ralph Goers
  *
- * @version CVS $Id:$
+ * @version $Id$
  */
 public class PageLabelLinkService extends DefaultLinkService {
 
@@ -43,9 +43,9 @@
     /** The label manager */
     protected PageLabelManager labelManager;
 
-    /* (non-Javadoc)
-    * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-    */
+    /**
+     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+     */
     public void service(ServiceManager manager) throws ServiceException {
         super.service(manager);
         this.labelManager = (PageLabelManager)this.manager.lookup(PageLabelManager.ROLE);
@@ -96,8 +96,7 @@
                     final StringBuffer buffer = new StringBuffer(info.getBase(secure));
                     if (hasParams) {
                         buffer.append('&');
-                    }
-                    else {
+                    } else {
                         buffer.append('?');
                     }
                     try {
@@ -147,8 +146,7 @@
         Iterator iter = events.iterator();
         StringBuffer value = new StringBuffer("");
 
-        while (iter.hasNext())
-        {
+        while (iter.hasNext()) {
             Event event = (Event)iter.next();
 
             if (event instanceof ChangeAspectDataEvent &&
@@ -164,12 +162,10 @@
                 }
                 if (item instanceof NamedItem) {
                     value.append(((NamedItem)item).getName());
-                }
-                else {
+                } else {
                     value.append(Integer.toString(i));
                 }
-            }
-            else {
+            } else {
                 String label = this.labelManager.getCurrentLabel();
 
                 return getLink(super.getLinkURI(events, secure), requestParameterName, label);
@@ -179,8 +175,7 @@
         if (value.length() > 0 && this.labelManager.getPageLabelEvents(value.toString()) != null) {
             if (hasParams) {
                 buffer.append('&');
-            }
-            else {
+            } else {
                 buffer.append('?');
             }
             try {
@@ -198,9 +193,9 @@
         return getLink(super.getLinkURI(events), requestParameterName, label);
     }
 
-    /* (non-Javadoc)
-    * @see org.apache.avalon.framework.activity.Disposable#dispose()
-    */
+    /**
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
     public void dispose() {
         if (this.manager != null) {
             if (this.labelManager != null) {
@@ -211,7 +206,7 @@
         super.dispose();
     }
 
-    /*
+    /**
      * Generates the page label.
      * @param item An Item.
      * @param key The StringBuffer in which to create the page label.
@@ -229,21 +224,19 @@
         }
         if (item instanceof NamedItem) {
             key.append(((NamedItem) item).getName());
-        }
-        else {
+        } else {
             key.append(parentLayout.getItems().indexOf(item));
         }
     }
 
-    /*
+    /**
      * Append the page label to the link.
      * @param link The link to add the label to.
      * @param parmName The request parameter name.
      * @param label The page label.
      * @return The modified link.
      */
-    private String getLink(String link, String parmName, String label)
-    {
+    private String getLink(String link, String parmName, String label) {
         if (label == null) {
             return link;
         }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PageLabelManager.java Mon Oct  3 06:43:39 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@
  * 'pageLabel'.
  * @author Ralph Goers
  *
- * @version CVS $Id: $
+ * @version $Id$
  */
 public class PageLabelManager
     extends AbstractLogEnabled
@@ -73,19 +73,17 @@
     protected static final String EVENT_MAP = PageLabelManager.class.getName() + "E";
     private static final String DEFAULT_REQUEST_PARAMETER_NAME = "pageLabel";
 
-
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
         this.manager = manager;
     }
 
-    /* (non-Javadoc)
-    * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-    */
-    public void configure(Configuration config)
-    {
+    /**
+     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
+     */
+    public void configure(Configuration config) {
         this.requestParameterName =
             config.getChild("parameterName").getValue(DEFAULT_REQUEST_PARAMETER_NAME);
         this.aspectName = config.getChild("aspectName").getValue("tab");
@@ -95,9 +93,9 @@
             Boolean.valueOf(config.getChild("marshallEvents").getValue("false")).booleanValue();
     }
 
-    /* (non-Javadoc)
-    * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-    */
+    /**
+     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
+     */
     public void contextualize(Context context) throws ContextException {
         this.context = context;
     }
@@ -147,13 +145,11 @@
         return this.requestParameterName;
     }
 
-
     /**
      * Return the Map that contains events for all the page labels.
      * @return The Map to use for converting events to and from urls.
      */
-    public Map getPageEventMap()
-    {
+    public Map getPageEventMap() {
         PortalService service = null;
         try {
             service = (PortalService) this.manager.lookup(PortalService.ROLE);
@@ -164,11 +160,9 @@
             }
 
             return map;
-        }
-        catch (ServiceException ce) {
+        } catch (ServiceException ce) {
             throw new CascadingRuntimeException("Unable to lookup component.", ce);
-        }
-        finally {
+        } finally {
             this.manager.release(service);
         }
     }
@@ -198,11 +192,9 @@
             }
 
             return list;
-        }
-        catch (ServiceException ce) {
+        } catch (ServiceException ce) {
             throw new CascadingRuntimeException("Unable to lookup component.", ce);
-        }
-        finally {
+        } finally {
             this.manager.release(service);
         }
     }
@@ -214,7 +206,7 @@
         return this.marshallEvents;
     }
 
-    /*
+    /**
      * Return the array containing the current and previous labels.
      */
     private String[] getLabels() {
@@ -258,7 +250,6 @@
         return map;
     }
 
-
     /**
      * Populate the event map
      *
@@ -289,14 +280,10 @@
             if (this.nonStickyTabs) {
                 // With non-sticky tabs the non-leaf nodes always display
                 // the left-most child tabs
-                if (lhList == null)
-                {
-                    if (allEvents != null)
-                    {
+                if (lhList == null) {
+                    if (allEvents != null) {
                         lhList = allEvents;
-                    }
-                    else
-                    {
+                    } else {
                         lhList = events;
                     }
                 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerAspectChain.java Mon Oct  3 06:43:39 2005
@@ -30,14 +30,14 @@
 /**
  * This chain holds all configured aspects for a portal manager.
  * @since 2.1.8
- * @version SVN $Id$
+ * @version $Id$
  */
 public final class PortalManagerAspectChain {
-    
+
     protected List aspects = new ArrayList(3);
-    
+
     protected List configs = new ArrayList(3);
-    
+
     public void configure(ServiceSelector     aspectSelector,
                           ServiceSelector     adapterSelector,
                           Configuration       conf,
@@ -78,15 +78,15 @@
         this.aspects.add(endAspect);
         this.configs.add(endAspectParameters);
     }
-    
+
     public Iterator getIterator() {
         return this.aspects.iterator();
     }
-    
+
     public Iterator getConfigIterator() {
         return this.configs.iterator();
     }
-    
+
     public void dispose(ServiceSelector aspectSelector, ServiceSelector adapterSelector) {
         Iterator i = this.aspects.iterator();
         while (i.hasNext()) {

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,8 +47,8 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalManagerImpl
 	extends AbstractLogEnabled

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,11 +51,11 @@
 /**
  * Default implementation of a portal service using a session to store
  * custom information.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalServiceImpl
     extends AbstractLogEnabled
@@ -88,7 +88,7 @@
     protected String attributePrefix;
 
     final protected static String KEY = PortalServiceImpl.class.getName();
-    
+
     /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
@@ -166,7 +166,7 @@
         final Request request = ContextHelper.getRequest(this.context);
         return request.getAttribute(this.attributePrefix + key);
     }
-    
+
     /**
      * @see org.apache.cocoon.portal.PortalService#setTemporaryAttribute(java.lang.String, java.lang.Object)
      */
@@ -174,7 +174,7 @@
         final Request request = ContextHelper.getRequest(this.context);
         request.setAttribute( this.attributePrefix + key, value );
     }
-    
+
     /**
      * @see org.apache.cocoon.portal.PortalService#removeTemporaryAttribute(java.lang.String)
      */
@@ -186,7 +186,7 @@
         }
         return oldValue;
     }
-    
+
     /**
      * @see org.apache.cocoon.portal.PortalService#getTemporaryAttributeNames()
      */
@@ -265,7 +265,7 @@
             ContainerUtil.service( c, this.manager );
             ContainerUtil.configure( c, portal );
             ContainerUtil.initialize( c );
-            
+
             // scan for skins
             final Configuration[] skinConfs = portal.getChild("skins").getChildren("skin");
             if ( skinConfs != null ) {
@@ -328,7 +328,7 @@
             this.setAttribute("default-layout-key", layoutKey);
         }
     }
-    
+
     /**
      * @see org.apache.cocoon.portal.PortalService#getDefaultLayoutKey()
      */
@@ -340,7 +340,7 @@
         }
         return key;
     }
-   
+
     /**
      * @see org.apache.cocoon.portal.PortalService#getSkinDescriptions()
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUser.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUser.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUser.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUser.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
  * This object decouples the portal from the used authentication method.
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * @version SVN $Id$
+ * @version $Id$
  */
 public interface PortalUser {
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUserInfoProvider.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUserInfoProvider.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUserInfoProvider.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/PortalUserInfoProvider.java Mon Oct  3 06:43:39 2005
@@ -26,7 +26,7 @@
  * @version $Id$
  */
 public interface PortalUserInfoProvider {
-    
+
     /**
      * Return the user for a portal.
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileLS.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileLS.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileLS.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileLS.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,10 +26,9 @@
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
  * 
- * @version CVS $Id$
  */
 public interface ProfileLS {
-    
+
     /** Component role */
     String ROLE = ProfileLS.class.getName();
 
@@ -37,21 +36,21 @@
     String PARAMETER_OBJECTMAP = "objectmap";
     /** This parameter is used to define the profiletype */
     String PARAMETER_PROFILETYPE = "profiletype";
-    
+
     String PROFILETYPE_LAYOUT = "layout";
     String PROFILETYPE_COPLETBASEDATA = "copletbasedata";
     String PROFILETYPE_COPLETDATA = "copletdata";
     String PROFILETYPE_COPLETINSTANCEDATA = "copletinstancedata";
-    
+
     /**
      * Load a profile
      */
     Object loadProfile(Object key, Map parameters) throws Exception;  
-    
+
     /**
      * Save a profile
      */
     void saveProfile(Object key, Map parameters, Object profile) throws Exception;  
-    
+
     SourceValidity getValidity(Object key, Map parameters);
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/ProfileManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,16 +26,16 @@
  * The profile manager.
  * Via this component you can get the profile (or parts of it) of the
  * current 'user'.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
  * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public interface ProfileManager {
-    
+
     String ROLE = ProfileManager.class.getName();
-    
+
     /**
      * Get the portal layout defined by the layout key. This
      * usually addresses the layout profile.
@@ -47,32 +47,32 @@
      * @return The layout
      */
 	Layout getPortalLayout(String layoutKey, String layoutID);
-    
+
     CopletInstanceData getCopletInstanceData(String copletID);
-    
+
     List getCopletInstanceData(CopletData data);
-    
+
     /**
      * Return the coplet data object
      */
     CopletData getCopletData(String copletDataId);
-    
+
     /**
      * This method is invoked when the user logs into the portal.
      */
     void login();
-    
+
     /**
      * This method is invoked when the user logs out of the portal
      *
      */
     void logout();
-    
+
     /**
      * New coplet instance datas have to be registered using this method.
      */
     void register(CopletInstanceData coplet);
-    
+
     /**
      * Removed coplet instance datas have to be unregistered using this method.
      */
@@ -82,7 +82,7 @@
      * New layouts have to be registered using this method.
      */
     void register(Layout layout);
-    
+
     /**
      * New layouts have to be unregistered using this method.
      */
@@ -112,19 +112,12 @@
      * Get all instances
      */
     Collection getCopletInstanceDatas();
-    
+
     /**
      * Get all coplets
      */
     Collection getCopletDatas();
-    
-    /**
-     * Store the provided profile under the layoutKey.
-     * This method can be used to overwrite a profile with another
-     * one.
-     */
-    void storeProfile(Layout rootLayout, String layoutKey);
-    
+
     /**
      * Get current user information
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractProfileManager.java Mon Oct  3 06:43:39 2005
@@ -31,7 +31,7 @@
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  *
- * @version CVS $Id$
+ * @version $Id$
  */
 public abstract class AbstractProfileManager 
     extends AbstractLogEnabled 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AbstractUserProfileManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,6 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletData;
 import org.apache.cocoon.portal.coplet.CopletFactory;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
@@ -37,17 +36,17 @@
 import org.apache.cocoon.portal.layout.LayoutFactory;
 
 /**
- * The profile manager using the authentication framework
- * 
+ * An abstract profile manager providing a different profile for each user.
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
  * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public abstract class AbstractUserProfileManager 
     extends AbstractProfileManager { 
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#login()
      */
     public void login() {
@@ -56,19 +55,17 @@
         // for now we use a hack :)
         this.getPortalLayout(null, null);
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#logout()
      */
     public void logout() {
-        PortalService service = null;
         ServiceSelector adapterSelector = null;
         try {
             adapterSelector = (ServiceSelector)this.manager.lookup(CopletAdapter.ROLE+"Selector");
-            service = (PortalService)this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+            final String layoutKey = this.portalService.getDefaultLayoutKey();
 
-            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute("CopletInstanceData:"+layoutKey);
+            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute("CopletInstanceData:"+layoutKey);
             if ( copletInstanceDataManager != null ) {
                 Iterator iter = copletInstanceDataManager.getCopletInstanceData().values().iterator();
                 while ( iter.hasNext() ) {
@@ -83,18 +80,17 @@
                 }
             }
             
-            service.removeAttribute("CopletData:"+layoutKey);
-            service.removeAttribute("CopletInstanceData:"+layoutKey);
-            service.removeAttribute("Layout:"+layoutKey);
+            this.portalService.removeAttribute("CopletData:"+layoutKey);
+            this.portalService.removeAttribute("CopletInstanceData:"+layoutKey);
+            this.portalService.removeAttribute("Layout:"+layoutKey);
         } catch (ServiceException e) {
             throw new CascadingRuntimeException("Unable to lookup portal service.", e);
         } finally {
-            this.manager.release(service);
             this.manager.release(adapterSelector);
         }
         super.logout();
     }
-       
+
     /**
      * @param layoutMap
      * @param layout
@@ -113,7 +109,6 @@
                 }
             }
         }
-        
     }
 
 	/**
@@ -141,295 +136,182 @@
 			}
 		}
 	}
-	
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletInstanceData(java.lang.String)
      */
     public CopletInstanceData getCopletInstanceData(String copletID) {
-        PortalService service = null;
-        String attribute = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
+        final String attribute = "CopletInstanceData:"+layoutKey;
+		CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute(attribute);
 
-			attribute = "CopletInstanceData:"+layoutKey;
-			CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute(attribute);
-
-            return copletInstanceDataManager.getCopletInstanceData(copletID);
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
-        }
+        return copletInstanceDataManager.getCopletInstanceData(copletID);
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletData(java.lang.String)
      */
     public CopletData getCopletData(String copletDataId) {
-        PortalService service = null;
-        String attribute = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
 
-            attribute = "CopletInstanceData:"+layoutKey;
-            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute(attribute);
+        final String attribute = "CopletInstanceData:"+layoutKey;
+        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute(attribute);
 
-            Iterator i = copletInstanceDataManager.getCopletInstanceData().values().iterator();
-            boolean found = false;
-            CopletInstanceData current = null;
-            while ( !found && i.hasNext() ) {
-                current = (CopletInstanceData)i.next();
-                found = current.getCopletData().getId().equals(copletDataId);
-            }
-            if ( found ) {
-                return current.getCopletData();
-            }
-            return null;
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
+        Iterator i = copletInstanceDataManager.getCopletInstanceData().values().iterator();
+        boolean found = false;
+        CopletInstanceData current = null;
+        while ( !found && i.hasNext() ) {
+            current = (CopletInstanceData)i.next();
+            found = current.getCopletData().getId().equals(copletDataId);
+        }
+        if ( found ) {
+            return current.getCopletData();
         }
+        return null;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletInstanceData(org.apache.cocoon.portal.coplet.CopletData)
      */
     public List getCopletInstanceData(CopletData data) {
-        List coplets = new ArrayList();
-        PortalService service = null;
-        String attribute = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+        final List coplets = new ArrayList();
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
 
-            attribute = "CopletInstanceData:" + layoutKey;
-            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute(attribute);
+        final String attribute = "CopletInstanceData:" + layoutKey;
+        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute(attribute);
 
-            Iterator iter = copletInstanceDataManager.getCopletInstanceData().values().iterator();
-            while ( iter.hasNext() ) {
-                CopletInstanceData current = (CopletInstanceData)iter.next();
-                if ( current.getCopletData().equals(data) ) {
-                    coplets.add( current );
-                }
+        Iterator iter = copletInstanceDataManager.getCopletInstanceData().values().iterator();
+        while ( iter.hasNext() ) {
+            CopletInstanceData current = (CopletInstanceData)iter.next();
+            if ( current.getCopletData().equals(data) ) {
+                coplets.add( current );
             }
-            return coplets;
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
         }
+        return coplets;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void register(CopletInstanceData coplet) {
-        PortalService service = null;
-        String attribute = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
-
-            attribute = "CopletInstanceData:" + layoutKey;
-            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute(attribute);
-            
-            copletInstanceDataManager.putCopletInstanceData( coplet );
-            
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
-        }
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
+        final String attribute = "CopletInstanceData:" + layoutKey;
+        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute(attribute);
+        copletInstanceDataManager.putCopletInstanceData( coplet );
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void unregister(CopletInstanceData coplet) {
-        PortalService service = null;
-        String attribute = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
-
-            attribute = "CopletInstanceData:" + layoutKey;
-            CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)service.getAttribute(attribute);
-            
-            copletInstanceDataManager.getCopletInstanceData().remove(coplet.getId());
-            
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
-        }
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
+        final String attribute = "CopletInstanceData:" + layoutKey;
+        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.portalService.getAttribute(attribute);
+        copletInstanceDataManager.getCopletInstanceData().remove(coplet.getId());
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.layout.Layout)
      */
     public void register(Layout layout) {
-        PortalService service = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
 
-            Map layoutMap = (Map)service.getAttribute("Layout-Map:" + layoutKey);
-            if ( layoutMap == null ) {
-                layout = (Layout)service.getAttribute("Layout:" + layoutKey);
-                if (layout != null) {
-                    layoutMap = new HashMap();
-                    this.cacheLayouts(layoutMap, layout);
-                    service.setAttribute("Layout-Map:" + layoutKey, layoutMap);
-                }
-            }
-            
-            if ( layoutMap != null) {
-                layoutMap.put(layout.getId(), layout);
+        Map layoutMap = (Map)this.portalService.getAttribute("Layout-Map:" + layoutKey);
+        if ( layoutMap == null ) {
+            layout = (Layout)this.portalService.getAttribute("Layout:" + layoutKey);
+            if (layout != null) {
+                layoutMap = new HashMap();
+                this.cacheLayouts(layoutMap, layout);
+                this.portalService.setAttribute("Layout-Map:" + layoutKey, layoutMap);
             }
-            
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
+        }
+
+        if ( layoutMap != null) {
+            layoutMap.put(layout.getId(), layout);
         }
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.layout.Layout)
      */
     public void unregister(Layout layout) {
-        PortalService service = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
 
-            Map layoutMap = (Map)service.getAttribute("Layout-Map:" + layoutKey);
-            
-            if ( layoutMap != null) {
-                layoutMap.remove(layout.getId());
-            }
-            
-        } catch (ServiceException e) {
-            throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
+        Map layoutMap = (Map)this.portalService.getAttribute("Layout-Map:" + layoutKey);
+        if ( layoutMap != null) {
+            layoutMap.remove(layout.getId());
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getPortalLayout(java.lang.String, java.lang.String)
      */
     public Layout getPortalLayout(String layoutKey, String layoutID) {
-        PortalService service = null;
         ServiceSelector adapterSelector = null;
-        
+
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            LayoutFactory factory = service.getComponentManager().getLayoutFactory();
-            CopletFactory copletFactory = service.getComponentManager().getCopletFactory();
-            
+            LayoutFactory factory = this.portalService.getComponentManager().getLayoutFactory();
+            CopletFactory copletFactory = this.portalService.getComponentManager().getCopletFactory();
+
             adapterSelector = (ServiceSelector)this.manager.lookup(CopletAdapter.ROLE+"Selector");
-            
+
             if ( null == layoutKey ) {
-                layoutKey = service.getDefaultLayoutKey();
+                layoutKey = this.portalService.getDefaultLayoutKey();
             }
-            
+
             final String layoutAttributeKey = "Layout:" + layoutKey;
             final String layoutObjectsAttributeKey = "Layout-Map:" + layoutKey;
-            
-            Layout layout = (Layout)service.getAttribute(layoutAttributeKey);
+
+            Layout layout = (Layout)this.portalService.getAttribute(layoutAttributeKey);
             if (layout == null) {
-                layout = this.loadProfile(layoutKey, service, copletFactory, factory, adapterSelector);
+                layout = this.loadProfile(layoutKey, copletFactory, factory, adapterSelector);
             }
-            
+
             if ( layoutID != null ) {
                 // now search for a layout
-                Map layoutMap = (Map)service.getAttribute(layoutObjectsAttributeKey);
+                Map layoutMap = (Map)this.portalService.getAttribute(layoutObjectsAttributeKey);
                 if ( layoutMap == null ) {
                     layoutMap = new HashMap();
                     this.cacheLayouts(layoutMap, layout);
-                    service.setAttribute(layoutObjectsAttributeKey, layoutMap);
+                    this.portalService.setAttribute(layoutObjectsAttributeKey, layoutMap);
                 }
                 if ( layoutMap != null) {
                     return (Layout) layoutMap.get( layoutID );
                 }
             }
-            
+
             return layout;
         } catch (Exception ce) {
             throw new CascadingRuntimeException("Exception during loading of profile.", ce);
         } finally {
-            this.manager.release(service);
             this.manager.release(adapterSelector);
         }
     }
-    
+
     /**
-     * This loads a new profile
+     * This loads a new profile.
      */
     protected abstract Layout loadProfile(String layoutKey, 
-                                            PortalService service,
-                                            CopletFactory copletFactory,
-                                            LayoutFactory layoutFactory,
-                                            ServiceSelector adapterSelector) 
+                                          CopletFactory copletFactory,
+                                          LayoutFactory layoutFactory,
+                                          ServiceSelector adapterSelector) 
     throws Exception;
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletDatas()
      */
     public Collection getCopletDatas() {
-        PortalService service = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
-            CopletDataManager manager = (CopletDataManager)service.getAttribute("CopletData:" + layoutKey);
-            return manager.getCopletData().values();
-        } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletDatas.", e);
-        } finally {
-            this.manager.release(service);
-        }
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
+        CopletDataManager manager = (CopletDataManager)this.portalService.getAttribute("CopletData:" + layoutKey);
+        return manager.getCopletData().values();
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletInstanceDatas()
      */
     public Collection getCopletInstanceDatas() {
-        PortalService service = null;
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            final String layoutKey = service.getDefaultLayoutKey();
-            CopletInstanceDataManager manager = (CopletInstanceDataManager)service.getAttribute("CopletInstanceData:" + layoutKey);
-            return manager.getCopletInstanceData().values();
-        } catch (Exception e) {
-            throw new CascadingRuntimeException("Error in getCopletInstanceDatas.", e);
-        } finally {
-            this.manager.release(service);
-        }
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.profile.ProfileManager#storeProfile(org.apache.cocoon.portal.layout.Layout, java.lang.String)
-     */
-    public void storeProfile(Layout rootLayout, String layoutKey) {
-        PortalService service = null;
-        
-        try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            if ( null == layoutKey ) {
-                layoutKey = service.getDefaultLayoutKey();
-            }
-
-            final String layoutAttributeKey = "Layout:" + layoutKey;
-            
-            service.setAttribute(layoutAttributeKey, rootLayout);
-        } catch (Exception ce) {
-            throw new CascadingRuntimeException("Exception during loading of profile.", ce);
-        } finally {
-            this.manager.release(service);
-        }
+        final String layoutKey = this.portalService.getDefaultLayoutKey();
+        CopletInstanceDataManager manager = (CopletInstanceDataManager)this.portalService.getAttribute("CopletInstanceData:" + layoutKey);
+        return manager.getCopletInstanceData().values();
     }
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationFWUserInfoProvider.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationFWUserInfoProvider.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationFWUserInfoProvider.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationFWUserInfoProvider.java Mon Oct  3 06:43:39 2005
@@ -37,7 +37,7 @@
  * This implementation uses the authentication-fw block
  *
  * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Id: MapProfileLS.java 30941 2004-07-29 19:56:58Z vgritsenko $
+ * @version $Id: MapProfileLS.java 30941 2004-07-29 19:56:58Z vgritsenko $
  */
 public class AuthenticationFWUserInfoProvider 
 implements PortalUserInfoProvider, Serviceable {

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,6 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.coplet.CopletFactory;
 import org.apache.cocoon.portal.coplet.CopletInstanceData;
 import org.apache.cocoon.portal.coplet.adapter.CopletAdapter;
@@ -47,20 +46,20 @@
 import org.apache.excalibur.source.SourceValidity;
 
 /**
- * The profile manager using the authentication framework
- * 
+ * The profile manager using the authentication framework.
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class AuthenticationProfileManager 
     extends AbstractUserProfileManager { 
 
     protected ReadWriteLock lock = new ReadWriteLock();
-    
+
     protected Map attributes = new HashMap();
-    
+
     /**
      * Get the current authentication state of the user
      * @return the current authentication state of the user
@@ -77,15 +76,14 @@
             this.manager.release( authManager );
         }
     }
-        
+
     /**
-     * This loads a new profile
+     * This loads a new profile.
      */
     protected Layout loadProfile(String layoutKey, 
-                                PortalService service,
-                                CopletFactory copletFactory,
-                                LayoutFactory layoutFactory,
-                                ServiceSelector adapterSelector) 
+                                 CopletFactory copletFactory,
+                                 LayoutFactory layoutFactory,
+                                 ServiceSelector adapterSelector) 
     throws Exception {
         final RequestState state = this.getRequestState();
         final UserHandler handler = state.getHandler();
@@ -110,29 +108,29 @@
             parameters.put("profiletype", "copletbasedata");
             parameters.put("objectmap", null);
 
-            Object[] result = this.getProfile(layoutKey, parameters, null, false, service);
+            Object[] result = this.getProfile(layoutKey, parameters, null, false);
             CopletBaseDataManager copletBaseDataManager = (CopletBaseDataManager)result[0];
-                    
+
             // load coplet data
             parameters.put("profiletype", "copletdata");
             parameters.put("objectmap", copletBaseDataManager.getCopletBaseData());
-            copletDataManager = (CopletDataManager)this.getDeltaProfile(layoutKey, parameters, service, copletFactory, ((Boolean)result[1]).booleanValue());
-            service.setAttribute("CopletData:" + layoutKey, copletDataManager);        
+            copletDataManager = (CopletDataManager)this.getDeltaProfile(layoutKey, parameters, copletFactory, ((Boolean)result[1]).booleanValue());
+            this.portalService.setAttribute("CopletData:" + layoutKey, copletDataManager);        
         } finally {
             this.lock.releaseLocks();
         }
         // load coplet instance data
         parameters.put("profiletype", "copletinstancedata");
         parameters.put("objectmap", copletDataManager.getCopletData());
-        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.getOrCreateProfile(layoutKey, parameters, service, copletFactory);
-        service.setAttribute("CopletInstanceData:" + layoutKey, copletInstanceDataManager);
-                
+        CopletInstanceDataManager copletInstanceDataManager = (CopletInstanceDataManager)this.getOrCreateProfile(layoutKey, parameters, copletFactory);
+        this.portalService.setAttribute("CopletInstanceData:" + layoutKey, copletInstanceDataManager);
+
         // load layout
         parameters.put("profiletype", "layout");
         parameters.put("objectmap", copletInstanceDataManager.getCopletInstanceData());
-        Layout layout = (Layout)this.getOrCreateProfile(layoutKey, parameters, service, layoutFactory);
-        service.setAttribute("Layout:" + layoutKey, layout);
-                
+        Layout layout = (Layout)this.getOrCreateProfile(layoutKey, parameters, layoutFactory);
+        this.portalService.setAttribute("Layout:" + layoutKey, layout);
+
         // now invoke login on each instance
         Iterator iter =  copletInstanceDataManager.getCopletInstanceData().values().iterator();
         while ( iter.hasNext() ) {
@@ -145,21 +143,19 @@
                 adapterSelector.release( adapter );
             }
         }
-        
+
         return layout;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserCopletInstanceDatas(java.lang.String)
      */
     public void saveUserCopletInstanceDatas(String layoutKey) {
         ProfileLS adapter = null;
-        PortalService service = null;
         try {
             adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
             if (layoutKey == null) {
-                layoutKey = service.getDefaultLayoutKey();
+                layoutKey = this.portalService.getDefaultLayoutKey();
             }
 
             final RequestState state = this.getRequestState();
@@ -171,9 +167,9 @@
             parameters.put("handler", handler);
             parameters.put("profiletype", "copletinstancedata");
 
-            final Map key = this.buildKey(service, parameters, layoutKey, false);
+            final Map key = this.buildKey(parameters, layoutKey, false);
 
-            final  CopletInstanceDataManager profileManager = ((CopletInstanceDataManager) service.getAttribute("CopletInstanceData:" +
+            final  CopletInstanceDataManager profileManager = ((CopletInstanceDataManager) this.portalService.getAttribute("CopletInstanceData:" +
                 layoutKey));
             adapter.saveProfile(key, parameters, profileManager);
         } catch (Exception e) {
@@ -181,21 +177,18 @@
             throw new CascadingRuntimeException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
-            this.manager.release(service);
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserLayout(java.lang.String)
      */
     public void saveUserLayout(String layoutKey) {
         ProfileLS adapter = null;
-        PortalService service = null;
         try {
             adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
             if ( layoutKey == null ) {
-                layoutKey = service.getDefaultLayoutKey();
+                layoutKey = this.portalService.getDefaultLayoutKey();
             }
 
             final RequestState state = this.getRequestState();
@@ -207,16 +200,14 @@
             parameters.put("handler", handler);
             parameters.put("profiletype", "layout");
 
-            final Map key = this.buildKey(service, parameters, layoutKey, false);
-            final Layout layout = (Layout)service.getAttribute("Layout:" + layoutKey);
+            final Map key = this.buildKey(parameters, layoutKey, false);
+            final Layout layout = (Layout)this.portalService.getAttribute("Layout:" + layoutKey);
             adapter.saveProfile(key, parameters, layout);
-            
         } catch (Exception e) {
             // TODO
             throw new CascadingRuntimeException("Exception during save profile", e);
         } finally {
             this.manager.release(adapter);
-            this.manager.release(service);
         }
     }
 
@@ -224,23 +215,22 @@
 	 * Gets a profile and applies possible user and role deltas to it.
 	 */
     protected Object getDeltaProfile(String layoutKey, 
-                                    Map parameters, 
-                                    PortalService service, 
-                                    Object factory, 
-                                    boolean forcedLoad) 
+                                     Map parameters, 
+                                     Object factory, 
+                                     boolean forcedLoad) 
 	throws Exception {
 		DeltaApplicableReferencesAdjustable result;
 		Object object;
 
         parameters.put("type", "global");
-		Object global = this.getProfile(layoutKey, parameters, factory, forcedLoad, service)[0];
-        Object key = this.buildKey(service, parameters, layoutKey, true);
+		Object global = this.getProfile(layoutKey, parameters, factory, forcedLoad)[0];
+        Object key = this.buildKey(parameters, layoutKey, true);
 		result = (DeltaApplicableReferencesAdjustable)this.loadProfile(key, parameters, factory);
-	
+
 		// load role delta
         parameters.put("type", "role");
 		try {
-			object = this.getProfile(layoutKey, parameters, factory, forcedLoad, service)[0];
+			object = this.getProfile(layoutKey, parameters, factory, forcedLoad)[0];
 			if (object != null)
 				result.applyDelta(object); 		
 		} catch (Exception e) {
@@ -251,7 +241,7 @@
 		// load user delta
         parameters.put("type", "user");
 		try {
-            key = this.buildKey(service, parameters, layoutKey, true);
+            key = this.buildKey(parameters, layoutKey, true);
 			object = this.loadProfile(key, parameters, factory);
 			if (object != null)
 				result.applyDelta(object);
@@ -259,29 +249,29 @@
 			if (!isSourceNotFoundException(e))
 				throw e;
 		}
-		
+
 		if (result == null)
 			throw new SourceNotFoundException("Global profile does not exist.");
-		
+
 		// change references to objects where no delta has been applied
 		result.adjustReferences(global);
-		
+
         // FIXME
 		this.attributes.put(key, result);
-		
+
 		return result;
 	}
 
 	/**
 	 * Gets a user profile and creates it by copying the role or the global profile.
 	 */
-    protected Object getOrCreateProfile(String layoutKey, Map parameters, PortalService service, Object factory) 
+    protected Object getOrCreateProfile(String layoutKey, Map parameters, Object factory) 
 	throws Exception {
 		Object result;
-    	
+
 		// load user profile
 		parameters.put("type", "user");
-        Map keyMap = this.buildKey(service, parameters, layoutKey, true);
+        Map keyMap = this.buildKey(parameters, layoutKey, true);
 		try {
 			result = this.loadProfile(keyMap, parameters, factory);
 		} catch (Exception e1) {
@@ -290,7 +280,7 @@
 
 			// load role profile
 			parameters.put("type", "role");
-            keyMap = this.buildKey(service, parameters, layoutKey, true);
+            keyMap = this.buildKey(parameters, layoutKey, true);
 			try {
 				result = this.loadProfile(keyMap, parameters, factory);
 			} catch (Exception e2) {
@@ -299,23 +289,23 @@
 
 				// load global profile
 				parameters.put("type", "global");
-                keyMap = this.buildKey(service, parameters, layoutKey, true);
+                keyMap = this.buildKey(parameters, layoutKey, true);
 				result = this.loadProfile(keyMap, parameters, factory);
 			}
-			
+
 			// save profile as user profile
 			ProfileLS adapter = null;
 			try {
 				adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
                 parameters.put("type", "user");
-                keyMap = this.buildKey(service, parameters, layoutKey, false);
-				
+                keyMap = this.buildKey(parameters, layoutKey, false);
+
                 //adapter.saveProfile(keyMap, parameters, result);
 			} finally {
 				this.manager.release(adapter);
 			}
 		}
-		
+
         // FIXME
         this.attributes.put(keyMap, result);
 
@@ -328,19 +318,18 @@
 	 * which signals whether the profile has been loaded or reused.
 	 */
     protected Object[] getProfile(String layoutKey, 
-                                 Map parameters, 
-                                 Object factory, 
-                                 boolean forcedLoad, 
-                                 PortalService service) 
+                                  Map parameters, 
+                                  Object factory, 
+                                  boolean forcedLoad) 
 	throws Exception {
-        final Map key = this.buildKey(service, parameters, layoutKey, true);
+        final Map key = this.buildKey(parameters, layoutKey, true);
 
         ProfileLS adapter = null;
 		try {
 			adapter = (ProfileLS)this.manager.lookup(ProfileLS.ROLE);
 
 			Object result = this.checkValidity(key, parameters, forcedLoad, adapter);
-            
+
 			if ( result != null && !(result instanceof SourceValidity)) {
 				return new Object[]{result, Boolean.FALSE};
             }
@@ -348,10 +337,10 @@
 
 			this.lock.releaseReadLock();
 			this.lock.writeLock();
-			
+
 			// check validity again in case of another thread has already loaded
 			result = this.checkValidity(key, parameters, forcedLoad, adapter);
-            
+
 			if ( result != null && !(result instanceof SourceValidity) ) {
 				return new Object[]{result, Boolean.FALSE};
             }
@@ -377,14 +366,14 @@
 			this.manager.release(adapter);
 		}
 	}
-	
+
 	/**
 	 * If the profile is valid itself is returned, otherwise a newly created SourceValidity object is returned.
 	 */
     protected Object checkValidity(Object key, 
-                                  Map parameters, 
-                                  boolean forcedLoad, 
-                                  ProfileLS adapter) {
+                                   Map parameters, 
+                                   boolean forcedLoad, 
+                                   ProfileLS adapter) {
 		Object[] objects = (Object[])this.attributes.get(key);
 
 		SourceValidity sourceValidity = null;
@@ -401,7 +390,7 @@
 			if (sourceValidity.isValid(newValidity) == SourceValidity.VALID)
 				return objects[0];
 		}
-		
+
 		return newValidity;
 	}
 
@@ -432,20 +421,19 @@
 		}
 		return false;
 	}
-	
-    protected Map buildKey(PortalService service, 
-                            Map           parameters,
-                            String        layoutKey, 
-                            boolean      load) 
+
+    protected Map buildKey(Map     parameters,
+                           String  layoutKey, 
+                           boolean load) 
     throws ProcessingException, ConfigurationException {
-        
+
         // TODO Change to KeyManager usage
         final String type = (String)parameters.get("type");
         final Configuration config = (Configuration) parameters.get("config");
         final String profileType = (String)parameters.get("profiletype");
         final String postFix = (load ? "load" : "save");
         final UserHandler handler = (UserHandler)parameters.get("handler");
-        
+
         String uri = null;
         if (type == null) {
             uri = config.getChild(profileType + "-" + postFix).getAttribute("uri");
@@ -460,7 +448,7 @@
         Map key = new LinkedMap();
         key.put("baseuri", uri);
         key.put("separator", "?");
-        key.put("portal", service.getPortalName());
+        key.put("portal", this.portalService.getPortalName());
         key.put("layout", layoutKey);
         if ( type != null ) {
             key.put("type", type);
@@ -478,7 +466,7 @@
     	private Thread activeWriter = null;
     	private HashSet activeReaders = new HashSet();
     	private int waitingWriters = 0;
-    	
+
     	public void readLock() 
     	throws InterruptedException {
     		synchronized (ReadWriteLock.this) {
@@ -488,7 +476,7 @@
 				this.activeReaders.add(Thread.currentThread());
     		}
     	}
-    	
+
     	public void writeLock()
     	throws InterruptedException {
     		synchronized (ReadWriteLock.this) {
@@ -504,7 +492,7 @@
 				}
     		}
     	}
-    	
+
 		public void releaseReadLock() {
 			synchronized (ReadWriteLock.this) {
 				Thread current = Thread.currentThread();
@@ -520,7 +508,7 @@
 			synchronized (ReadWriteLock.this) {
 				Thread current = Thread.currentThread();
 				boolean notify = false;
-				
+
 	    		if (this.activeWriter == current) {
 	    			this.activeWriter = null;
 	    			notify = true;
@@ -538,44 +526,42 @@
        	}
     }
 
-
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getUser()
      */
     public PortalUser getUser() {
         final RequestState state = this.getRequestState();
         return new User(state);
     }
-    
+
     protected static final class User implements PortalUser, Serializable {
-        
+
         protected final RequestState state;
-        
+
         public User(RequestState state) {
             this.state = state;    
         }
-        
-        /* (non-Javadoc)
+
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#getGroup()
          */
         public String getGroup() {
             // TODO Auto-generated method stub
             return null;
         }
-        
-        /* (non-Javadoc)
+
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#getUserName()
          */
         public String getUserName() {
             return this.state.getHandler().getUserId();
         }
-        
-        /* (non-Javadoc)
+
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#isUserInRole(java.lang.String)
          */
         public boolean isUserInRole(String role) {
             return this.state.getHandler().isUserInRole(role);
         }
     }
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletBaseDataManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletBaseDataManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletBaseDataManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletBaseDataManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,8 +24,8 @@
  * Holds instances of CopletBaseData.
  *
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
- * 
- * @version CVS $Id: CopletBaseDataManager.java,v 1.4 2004/03/05 13:02:16 bdelacretaz Exp $
+ *
+ * @version $Id$
  */
 public class CopletBaseDataManager {
 
@@ -33,7 +33,7 @@
 	 * The coplet base data instances.
 	 */
 	private Map copletBaseData = new HashMap();
-	
+
 	/**
 	 * Gets all coplet base data.
 	 */
@@ -47,7 +47,7 @@
 	public CopletBaseData getCopletBaseData(String name) {
 		return (CopletBaseData)this.copletBaseData.get(name);
 	}
-	
+
 	/**
 	 * Puts the specified coplet base data to the manager.
 	 */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletDataManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletDataManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletDataManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletDataManager.java Mon Oct  3 06:43:39 2005
@@ -1,12 +1,12 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
  *
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
  * 
- * @version CVS $Id: CopletDataManager.java,v 1.5 2004/03/05 13:02:16 bdelacretaz Exp $
+ * @version $Id$
  */
 public class CopletDataManager 
 implements DeltaApplicableReferencesAdjustable {
@@ -36,12 +36,12 @@
 	 * The coplet data instances.
 	 */
 	private Map copletData = new HashMap();
-	
+
 	/**
 	 * Signals whether a delta has been applied.
 	 */
 	private boolean deltaApplied = false;
-	
+
 	/**
 	 * Gets all coplet data.
 	 */
@@ -55,21 +55,21 @@
 	public CopletData getCopletData(String name) {
 		return (CopletData)this.copletData.get(name);
 	}
-	
+
 	/**
 	 * Puts the specified coplet data to the manager.
 	 */
 	public void putCopletData(CopletData data) {
 		this.copletData.put(data.getId(), data);
 	}
-	
+
 	/**
 	 * Applies the specified delta.
 	 * @throws ClassCastException If the object is not of the expected type.
 	 */
 	public boolean applyDelta(Object object) {
 		CopletDataManager manager = (CopletDataManager)object;
-		
+
 		this.deltaApplied = true;
 
 		Iterator iterator = manager.getCopletData().values().iterator();
@@ -83,10 +83,10 @@
 				data.applyDelta(delta); 
 			}
 		}
-		
+
 		return true;
 	}
-	
+
 	/**
 	 * Checks if a delta has been applied.
 	 */
@@ -101,7 +101,7 @@
 	 */
 	public void adjustReferences(Object object) {
 		CopletDataManager manager = (CopletDataManager)object;
-		
+
 		Iterator iterator = this.copletData.values().iterator();
 		CopletData data, other;
 		while (iterator.hasNext()) {



Mime
View raw message