You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2008/05/02 01:27:49 UTC
svn commit: r652709 -
/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
Author: ate
Date: Thu May 1 16:27:49 2008
New Revision: 652709
URL: http://svn.apache.org/viewvc?rev=652709&view=rev
Log:
Correcting usage of UserInfoService which should provide user attribute filtering *itself* against the portlet definition.
This is a (very) small step in reducing (and eventually) removing internal dependencies on DD classes
Modified:
portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java?rev=652709&r1=652708&r2=652709&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java Thu May 1 16:27:49 2008
@@ -476,35 +476,17 @@
public Map createUserInfoMap() {
- Map userInfoMap = new HashMap();
+ Map userInfoMap = null;
try {
final OptionalContainerServices optionalContainerServices = container.getOptionalContainerServices();
final UserInfoService userInfoService = optionalContainerServices.getUserInfoService();
- //PLUTO-388 fix:
- //The PortletWindow is currently ignored in the implementing class
- // See: org.apache.pluto.core.DefaultUserInfoService
- final Map allMap = userInfoService.getUserInfo( this, this.internalPortletWindow );
-
- //PLUTO-477 null attribute maps are ok
- if (null == allMap) {
- return null;
- }
-
- final PortletRegistryService portletRegistryService = optionalContainerServices.getPortletRegistryService();
- final PortletApp dd = portletRegistryService.getPortletApplicationDescriptor(internalPortletWindow.getContextPath());
-
- Iterator i = dd.getUserAttribute().iterator();
- while(i.hasNext()) {
- UserAttribute udd = (UserAttribute)i.next();
- userInfoMap.put(udd.getName(), allMap.get(udd.getName()));
- }
+ userInfoMap = userInfoService.getUserInfo( this, this.internalPortletWindow );
} catch (PortletContainerException e) {
LOG.warn("Unable to retrieve user attribute map for user " + getRemoteUser() + ". Returning null.");
return null;
}
-
return Collections.unmodifiableMap(userInfoMap);
}