cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r125515 - /cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Date Tue, 18 Jan 2005 16:33:48 GMT
Author: cziegeler
Date: Tue Jan 18 08:33:45 2005
New Revision: 125515

URL: http://svn.apache.org/viewcvs?view=rev&rev=125515
Log:
Readd missing code
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java?view=diff&rev=125515&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java&r1=125514&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java&r2=125515
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Tue Jan 18 08:33:45 2005
@@ -185,39 +185,44 @@
         }
     }
 
+    /* (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) {
+            if ( layoutKey == null ) {
                 layoutKey = service.getDefaultLayoutKey();
             }
-
+            
             RequestState state = this.getRequestState();
             UserHandler handler = state.getHandler();
 
             HashMap parameters = new HashMap();
             parameters.put("type", "user");
-            parameters.put("config",
-                state.getApplicationConfiguration().getConfiguration("portal").getChild("profiles"));
+            parameters.put("config", state.getApplicationConfiguration().getConfiguration("portal").getChild("profiles"));
             parameters.put("handler", handler);
+            parameters.put("profiletype", "copletinstancedata");
 
             Map key = this.buildKey(service, parameters, layoutKey, false);
+    
+            // save coplet instance data
+            CopletInstanceDataManager profileManager = ((CopletInstanceDataManager)service.getAttribute("CopletInstanceData:"
+ layoutKey));
+            adapter.saveProfile(key, parameters, profileManager);
 
             // save layout data
             parameters.put("profiletype", "layout");
             key = this.buildKey(service, parameters, layoutKey, false);
-            Layout layout = (Layout) service.getAttribute("Layout:" + layoutKey);
+            Layout layout = (Layout)service.getAttribute("Layout:" + layoutKey);
             adapter.saveProfile(key, parameters, layout);
-
-        }
-        catch (Exception e) {
+            
+        } catch (Exception e) {
             // TODO
             throw new CascadingRuntimeException("Exception during save profile", e);
-        }
-        finally {
+        } finally {
             this.manager.release(adapter);
             this.manager.release(service);
         }

Mime
View raw message