cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r293351 [2/2] - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal: ./ impl/ profile/ profile/impl/
Date Mon, 03 Oct 2005 13:48:11 GMT
Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletInstanceDataManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletInstanceDataManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletInstanceDataManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/CopletInstanceDataManager.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,16 +24,16 @@
  * Holds instances of CopletInstanceData.
  *
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>
- * 
- * @version CVS $Id: CopletInstanceDataManager.java,v 1.5 2004/03/05 13:02:16 bdelacretaz
Exp $
+ *
+ * @version $Id$
  */
 public class CopletInstanceDataManager {
-	
+
 	/**
 	 * The coplet instance data instances.
 	 */
 	private Map copletInstanceData = new HashMap();
-	
+
 	/**
 	 * Gets all coplet instance data.
 	 */
@@ -47,7 +47,7 @@
 	public CopletInstanceData getCopletInstanceData(String copletId) {
 		return (CopletInstanceData)this.copletInstanceData.get(copletId);
 	}
-	
+
 	/**
 	 * Puts the specified coplet instance data to the manager.
 	 */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/GroupBasedProfileManager.java
Mon Oct  3 06:43:39 2005
@@ -69,7 +69,7 @@
  * 
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: AbstractUserProfileManager.java 37123 2004-08-27 12:11:53Z cziegeler
$
+ * @version $Id: AbstractUserProfileManager.java 37123 2004-08-27 12:11:53Z cziegeler $
  */
 public class GroupBasedProfileManager 
     extends AbstractProfileManager
@@ -609,24 +609,6 @@
         }
 
         return key;
-    }
-
-    /**
-     * @see org.apache.cocoon.portal.profile.ProfileManager#storeProfile(org.apache.cocoon.portal.layout.Layout,
java.lang.String)
-     */
-    public void storeProfile(Layout rootLayout, String layoutKey) {
-        UserProfile oldProfile = this.getUserProfile(null);
-        if ( null == layoutKey ) {
-            layoutKey = this.portalService.getDefaultLayoutKey();
-        }
-        // FIXME for now we just copy the root profile, except the root layout
-        UserProfile newProfile = new UserProfile();
-        newProfile.setCopletBaseDatas(oldProfile.getCopletBaseDatas());
-        newProfile.setCopletDatas(oldProfile.getCopletDatas());
-        newProfile.setCopletInstanceDatas(oldProfile.getCopletInstanceDatas());
-        newProfile.setRootLayout(rootLayout);
-        
-        this.storeUserProfile(layoutKey, newProfile);
     }
 
     /**

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.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.
@@ -43,10 +43,10 @@
 
 /**
  * This implementation uses Castor to load/save the profiles.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class MapProfileLS
     extends AbstractLogEnabled
@@ -57,8 +57,8 @@
 
     /** The XPath Processor */
     protected XPathProcessor xpathProcessor;
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
     public void dispose() {
@@ -69,7 +69,7 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
@@ -115,22 +115,22 @@
         
         return buffer.toString();
     }
-    
+
     protected StringBuffer getSaveURI(Map keyMap)
     throws Exception {
         final StringBuffer buffer = new StringBuffer(this.getURI(keyMap));
         return buffer;
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileLS#loadProfile(java.lang.Object)
      */
     public Object loadProfile(Object key, Map parameters) 
     throws Exception {
 		final Map keyMap = (Map) key;
-        
+
         final String uri = this.getURI( keyMap );
-        
+
 		Source source = null;
 		CastorSourceConverter converter = null;
         SourceResolver resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
@@ -148,12 +148,12 @@
 		}
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileLS#saveProfile(java.lang.Object, java.lang.Object)
      */
     public void saveProfile(Object key, Map parameters, Object profile) throws Exception
{
         final Map keyMap = (Map) key;
-        
+
         final String uri = this.getURI( keyMap );
 
         // first test: modifiable source?
@@ -168,7 +168,6 @@
                 converter.storeObject( ((ModifiableSource)source).getOutputStream(), parameters,
profile);
                 return;
             }
-
         } finally {
             if ( resolver != null ) {
                 resolver.release(source);
@@ -179,16 +178,14 @@
             converter = null;
             resolver = null;
         }
-        
-        final StringBuffer buffer = this.getSaveURI( keyMap );
 
+        final StringBuffer buffer = this.getSaveURI( keyMap );
 		SAXParser parser = null;
 		try {
             resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
             converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);
 
             ByteArrayOutputStream writer = new ByteArrayOutputStream();
-        
             converter.storeObject(writer, parameters, profile);
 
             buffer.append("&content=");
@@ -216,7 +213,7 @@
 		}
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileLS#getValidity(java.lang.Object)
      */
     public SourceValidity getValidity(Object key, Map parameters) {
@@ -224,7 +221,7 @@
 		Source source = null;
 		try {
             final Map keyMap = (Map) key;
-        
+
             final String uri = this.getURI( keyMap );
 
 			resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
@@ -240,5 +237,4 @@
 			manager.release(resolver);
 		}
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/StaticProfileManager.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.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-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;
@@ -47,12 +46,12 @@
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
  * @author <a href="mailto:juergen.seitz@basf-it-services.com">J&uuml;rgen Seitz</a>
  * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public class StaticProfileManager 
 extends AbstractProfileManager 
 implements Configurable {
-    
+
     protected String profilesPath;
 
     protected StaticBucketMap copletInstanceDataManagers = new StaticBucketMap();
@@ -61,22 +60,19 @@
     protected static final String LAYOUTKEY_PREFIX = StaticProfileManager.class.getName()
+ "/Layout/";
 
     protected PortalUser portalUser = new StaticPortalUser();
-    
+
     /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getPortalLayout(String, String)
      */
     public Layout getPortalLayout(String layoutKey, String layoutID) {
-        PortalService service = null;
         ProfileLS adapter = null;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-
             if (layoutKey == null) {
-                layoutKey = service.getDefaultLayoutKey();
+                layoutKey = this.portalService.getDefaultLayoutKey();
             }
 
             String serviceKey = LAYOUTKEY_PREFIX + layoutKey;
-            Object[] objects = (Object[]) service.getAttribute(serviceKey);
+            Object[] objects = (Object[]) this.portalService.getAttribute(serviceKey);
 
             // check if the layout is already cached and still valid
             int valid = SourceValidity.INVALID;
@@ -91,7 +87,7 @@
                     return layout;
             }
 
-            CopletInstanceDataManager copletInstanceDataManager = getCopletInstanceDataManager(service);
+            CopletInstanceDataManager copletInstanceDataManager = getCopletInstanceDataManager();
 
             Map parameters = new HashMap();
             parameters.put("profiletype", "layout");
@@ -99,7 +95,7 @@
 
             Map map = new LinkedMap();
             map.put("base", this.profilesPath);
-            map.put("portalname", service.getPortalName());
+            map.put("portalname", this.portalService.getPortalName());
             map.put("profile", "layout");
             map.put("groupKey", layoutKey);
 
@@ -118,20 +114,19 @@
             layouts.put(null, layout); //save root with null as key
             cacheLayouts(layouts, layout);
 
-            LayoutFactory factory = service.getComponentManager().getLayoutFactory();
+            LayoutFactory factory = this.portalService.getComponentManager().getLayoutFactory();
             factory.prepareLayout(layout);
 
             // store the new values in the service
             if (newValidity != null) {
                 objects = new Object[] { layouts, newValidity };
-                service.setAttribute(serviceKey, objects);
+                this.portalService.setAttribute(serviceKey, objects);
             }
 
             return (Layout) layouts.get(layoutID);
         } catch (Exception ce) {
             throw new CascadingRuntimeException("Unable to get layout.", ce);
         } finally {
-            this.manager.release(service);
             this.manager.release(adapter);
         }
     }
@@ -156,26 +151,25 @@
                 }
             }
         }
-
     }
 
-    private CopletDataManager getCopletDataManager(PortalService service) 
+    private CopletDataManager getCopletDataManager() 
     throws Exception {
-        final String portalName = service.getPortalName();
+        final String portalName = this.portalService.getPortalName();
         // ensure that profile is loaded
-        this.getCopletInstanceDataManager(service);
+        this.getCopletInstanceDataManager();
         return (CopletDataManager)this.copletDataManagers.get(portalName);
     }
-    
-    private CopletInstanceDataManager getCopletInstanceDataManager(PortalService service)

+
+    private CopletInstanceDataManager getCopletInstanceDataManager() 
     throws Exception {
-        String portalName = service.getPortalName();
+        String portalName = this.portalService.getPortalName();
         CopletInstanceDataManager copletInstanceDataManager =
             (CopletInstanceDataManager) this.copletInstanceDataManagers.get(portalName);
         if (copletInstanceDataManager != null) {
             return copletInstanceDataManager;
         }
-        
+
         ProfileLS adapter = null;
         try {
             adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
@@ -186,7 +180,7 @@
 
             Map map = new LinkedMap();
             map.put("base", this.profilesPath);
-            map.put("portalname", service.getPortalName());
+            map.put("portalname", this.portalService.getPortalName());
             map.put("profile", "coplet");
             map.put("name", "basedata");
             CopletBaseDataManager copletBaseDataManager = (CopletBaseDataManager) adapter.loadProfile(map,
parameters);
@@ -198,7 +192,7 @@
 
             map.clear();
             map.put("base", this.profilesPath);
-            map.put("portalname", service.getPortalName());
+            map.put("portalname", this.portalService.getPortalName());
             map.put("profile", "coplet");
             map.put("name", "data");
             CopletDataManager copletDataManager = (CopletDataManager) adapter.loadProfile(map,
parameters);
@@ -210,12 +204,12 @@
 
             map.clear();
             map.put("base", this.profilesPath);
-            map.put("portalname", service.getPortalName());
+            map.put("portalname", this.portalService.getPortalName());
             map.put("profile", "coplet");
             map.put("name", "instancedata");
             copletInstanceDataManager = (CopletInstanceDataManager) adapter.loadProfile(map,
parameters);
 
-            CopletFactory copletFactory = service.getComponentManager().getCopletFactory();
+            CopletFactory copletFactory = this.portalService.getComponentManager().getCopletFactory();
             Iterator iterator = copletDataManager.getCopletData().values().iterator();
             while (iterator.hasNext()) {
                 CopletData cd = (CopletData) iterator.next();
@@ -231,37 +225,28 @@
             this.copletInstanceDataManagers.put(portalName, copletInstanceDataManager);
             this.copletDataManagers.put(portalName, copletDataManager);
             return copletInstanceDataManager;
-            
         } finally {
-            this.manager.release(service);
             this.manager.release(adapter);
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletInstanceData(java.lang.String)
      */
     public CopletInstanceData getCopletInstanceData(String copletID) {
-        PortalService service = null;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            return getCopletInstanceDataManager(service).getCopletInstanceData(copletID);
+            return getCopletInstanceDataManager().getCopletInstanceData(copletID);
         } catch (Exception e) {
             throw new CascadingRuntimeException("Error in getCopletInstanceData", e);
-        } finally {
-            this.manager.release(service);
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletData(java.lang.String)
      */
     public CopletData getCopletData(String copletDataId) {
-        PortalService service = null;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-
-            Iterator i = getCopletInstanceDataManager(service).getCopletInstanceData().values().iterator();
+            Iterator i = getCopletInstanceDataManager().getCopletInstanceData().values().iterator();
             boolean found = false;
             CopletInstanceData current = null;
             while ( !found && i.hasNext() ) {
@@ -274,20 +259,16 @@
             return null;
         } catch (Exception e) {
             throw new CascadingRuntimeException("Unable to lookup portal service.", e);
-        } finally {
-            this.manager.release(service);
         }
     }
 
-    /* (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;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            Iterator iter = getCopletInstanceDataManager(service).getCopletInstanceData().values().iterator();
+            Iterator iter = getCopletInstanceDataManager().getCopletInstanceData().values().iterator();
             while (iter.hasNext()){
                 CopletInstanceData current = (CopletInstanceData) iter.next();
                 if (current.getCopletData().equals(data)) {
@@ -297,40 +278,38 @@
             return coplets;
         } catch (Exception e) {
             throw new CascadingRuntimeException("Error in getCopletInstanceData", e);
-        } finally {
-            this.manager.release(service);
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void register(CopletInstanceData coplet) {
         // nothing to do
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.coplet.CopletInstanceData)
      */
     public void unregister(CopletInstanceData coplet) {
         // nothing to do
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.layout.Layout)
      */
     public void register(Layout layout) {
         // nothing to do
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.layout.Layout)
      */
     public void unregister(Layout layout) {
         // nothing to do
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
      */
     public void configure(Configuration configuration) 
@@ -338,73 +317,57 @@
         Configuration child = configuration.getChild("profiles-path");
         this.profilesPath = child.getValue("cocoon:/profiles");
     }
-        
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletDatas()
      */
     public Collection getCopletDatas() {
-        PortalService service = null;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            return this.getCopletDataManager(service).getCopletData().values();
+            return this.getCopletDataManager().getCopletData().values();
         } catch (Exception e) {
             throw new CascadingRuntimeException("Error in getCopletDatas.", e);
-        } finally {
-            this.manager.release(service);
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getCopletInstanceDatas()
      */
     public Collection getCopletInstanceDatas() {
-        PortalService service = null;
         try {
-            service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            return this.getCopletInstanceDataManager(service).getCopletInstanceData().values();
+            return this.getCopletInstanceDataManager().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) {
-        throw new RuntimeException("The static profile manager does not support the storeProfile()
method.");
-    }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.portal.profile.ProfileManager#getUser()
      */
     public PortalUser getUser() {
         return this.portalUser;
     }
-    
+
     protected static final class StaticPortalUser implements PortalUser, Serializable {
-        
-        /* (non-Javadoc)
+
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#getGroup()
          */
         public String getGroup() {
             return null;
         }
-        
-        /* (non-Javadoc)
+
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#getUserName()
          */
         public String getUserName() {
             return "static";
         }
 
-        /* (non-Javadoc)
+        /**
          * @see org.apache.cocoon.portal.profile.PortalUser#isUserInRole(java.lang.String)
          */
         public boolean isUserInRole(String role) {
             return false;
         }
-}
+    }
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfo.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfo.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfo.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfo.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.
@@ -24,27 +24,27 @@
  * Information about the current user.
  * This data object is used for loading the profile. It decouples the
  * portal from the used authentication method.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">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 abstract class UserInfo implements PortalUser, Serializable {
-    
+
     protected String userName;
-    
+
     protected String group;
-    
+
     protected String portalName;
 
     protected String layoutKey;
 
     protected Map    configurations;
-    
+
     public UserInfo(String portalName, String layoutKey) {
         this.portalName = portalName;
         this.layoutKey = layoutKey;
     }
-    
+
     /**
      * @return Returns the group.
      */
@@ -58,51 +58,46 @@
     public void setGroup(String group) {
         this.group = group;
     }
-    
+
     /**
      * @return Returns the userName.
      */
     public String getUserName() {
         return userName;
     }
-    
+
     /**
      * @param userName The userName to set.
      */
     public void setUserName(String userName) {
         this.userName = userName;
     }
-    
+
     /**
      * @return Returns the configurations.
      */
     public Map getConfigurations() {
         return configurations;
     }
-    
+
     /**
      * @param configurations The configurations to set.
      */
     public void setConfigurations(Map configurations) {
         this.configurations = configurations;
     }
-    
+
     /**
      * @return Returns the layoutKey.
      */
     public String getLayoutKey() {
         return layoutKey;
     }
-    
+
     /**
      * @return Returns the portalName.
      */
     public String getPortalName() {
         return portalName;
     }
-    
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.profile.PortalUser#isUserInRole(java.lang.String)
-     */
-    public abstract boolean isUserInRole(String role);
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfoProvider.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfoProvider.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfoProvider.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserInfoProvider.java
Mon Oct  3 06:43:39 2005
@@ -20,14 +20,13 @@
  * This data object is used for loading the profile. It decouples the
  * portal from the used authentication method.
  *
- *
  * @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 $
  * @deprecated This interface is not supported anymore.
  *             Use {@link org.apache.cocoon.portal.profile.PortalUserInfoProvider} instead.
  */
 public interface UserInfoProvider {
-    
+
     /**
      * Return the user info about the current user.
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserProfile.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserProfile.java?rev=293351&r1=293350&r2=293351&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserProfile.java
(original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/profile/impl/UserProfile.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.
@@ -28,78 +28,78 @@
  * - references to the configuration
  * - all selected coplets (coplet instance datas)
  * - layout objects
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">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 UserProfile {
-    
+
     protected Map copletBaseDatas;
-    
+
     protected Map copletDatas;
-    
+
     protected Map copletInstanceDatas;
-    
+
     protected Map layouts;
-    
+
     protected Layout rootLayout;
-    
+
     /**
      * @return Returns the copletBaseDatas.
      */
     public Map getCopletBaseDatas() {
         return copletBaseDatas;
     }
-    
+
     /**
      * @param copletBaseDatas The copletBaseDatas to set.
      */
     public void setCopletBaseDatas(Map copletBaseDatas) {
         this.copletBaseDatas = copletBaseDatas;
     }
-    
+
     /**
      * @return Returns the copletDatas.
      */
     public Map getCopletDatas() {
         return copletDatas;
     }
-    
+
     /**
      * @param copletDatas The copletDatas to set.
      */
     public void setCopletDatas(Map copletDatas) {
         this.copletDatas = copletDatas;
     }
-    
+
     /**
      * @return Returns the copletInstanceDatas.
      */
     public Map getCopletInstanceDatas() {
         return copletInstanceDatas;
     }
-    
+
     /**
      * @param copletInstanceDatas The copletInstanceDatas to set.
      */
     public void setCopletInstanceDatas(Map copletInstanceDatas) {
         this.copletInstanceDatas = copletInstanceDatas;
     }
-    
+
     /**
      * @return Returns the layouts.
      */
     public Map getLayouts() {
         return layouts;
     }
-    
+
     /**
      * @return Returns the rootLayout.
      */
     public Layout getRootLayout() {
         return rootLayout;
     }
-    
+
     /**
      * @param rootLayout The rootLayout to set.
      */
@@ -108,7 +108,7 @@
         this.layouts = new HashMap();
         this.cacheLayouts(this.layouts, rootLayout);
     }
-    
+
     protected void cacheLayouts(Map layoutMap, Layout layout) {
         if ( layout != null ) {
             if ( layout.getId() != null ) {
@@ -124,5 +124,4 @@
             }
         }        
     }
-    
 }



Mime
View raw message