org.jasig.portal.portlet.container.services
Class PersonDirectoryUserInfoService

java.lang.Object
  extended by org.jasig.portal.portlet.container.services.PersonDirectoryUserInfoService
All Implemented Interfaces:
org.apache.pluto.spi.ContainerService, org.apache.pluto.spi.optional.UserInfoService

public class PersonDirectoryUserInfoService
extends Object
implements org.apache.pluto.spi.optional.UserInfoService

Ties the IPersonAttributeDao to the Pluto UserInfoService

Version:
$Revision$
Author:
Eric Dalquist

Constructor Summary
PersonDirectoryUserInfoService()
           
 
Method Summary
protected  Map<String,String> generateUserInfo(org.jasig.services.persondir.IPersonAttributes personAttributes, List<org.apache.pluto.descriptors.portlet.UserAttributeDD> expectedUserAttributes, HttpServletRequest httpServletRequest)
          Using the Map of portal user attributes and a List of expected attributes generate the USER_INFO map for the portlet
protected  Map<String,String> generateUserInfo(Map<String,Object> portalUserAttributes)
          Converts the full portal user attribute Map to a USER_INFO map for the portlet
protected  List<org.apache.pluto.descriptors.portlet.UserAttributeDD> getExpectedUserAttributes(HttpServletRequest request, IPortletWindow portletWindow)
          Get the list of user attributes the portlet expects
 org.jasig.services.persondir.IPersonAttributeDao getPersonAttributeDao()
           
 IPortalRequestUtils getPortalRequestUtils()
           
 IPortletDefinitionRegistry getPortletDefinitionRegistry()
           
 IPortletEntityRegistry getPortletEntityRegistry()
           
 IPortletWindowRegistry getPortletWindowRegistry()
           
 Map<String,String> getUserInfo(PortletRequest request)
          Deprecated. 
 Map<String,String> getUserInfo(PortletRequest request, org.apache.pluto.PortletWindow plutoPortletWindow)
           
protected  Map<String,String> getUserInfo(String remoteUser, HttpServletRequest httpServletRequest, IPortletWindow portletWindow)
          Commons logic to get a subset of the user's attributes for the specified portlet window.
 void setPersonAttributeDao(org.jasig.services.persondir.IPersonAttributeDao personAttributeDao)
           
 void setPortalRequestUtils(IPortalRequestUtils portalRequestUtils)
           
 void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
           
 void setPortletEntityRegistry(IPortletEntityRegistry portletEntityRegistry)
           
 void setPortletWindowRegistry(IPortletWindowRegistry portletWindowRegistry)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonDirectoryUserInfoService

public PersonDirectoryUserInfoService()
Method Detail

getPortalRequestUtils

public IPortalRequestUtils getPortalRequestUtils()
Returns:
the portalRequestUtils

setPortalRequestUtils

public void setPortalRequestUtils(IPortalRequestUtils portalRequestUtils)
Parameters:
portalRequestUtils - the portalRequestUtils to set

getPortletEntityRegistry

public IPortletEntityRegistry getPortletEntityRegistry()
Returns:
the portletEntityRegistry

setPortletEntityRegistry

public void setPortletEntityRegistry(IPortletEntityRegistry portletEntityRegistry)
Parameters:
portletEntityRegistry - the portletEntityRegistry to set

getPersonAttributeDao

public org.jasig.services.persondir.IPersonAttributeDao getPersonAttributeDao()
Returns:
the personAttributeDao

setPersonAttributeDao

public void setPersonAttributeDao(org.jasig.services.persondir.IPersonAttributeDao personAttributeDao)
Parameters:
personAttributeDao - the personAttributeDao to set

getPortletWindowRegistry

public IPortletWindowRegistry getPortletWindowRegistry()
Returns:
the portletWindowRegistry

setPortletWindowRegistry

public void setPortletWindowRegistry(IPortletWindowRegistry portletWindowRegistry)
Parameters:
portletWindowRegistry - the portletWindowRegistry to set

getPortletDefinitionRegistry

public IPortletDefinitionRegistry getPortletDefinitionRegistry()
Returns:
the portletDefinitionRegistry

setPortletDefinitionRegistry

public void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
Parameters:
portletDefinitionRegistry - the portletDefinitionRegistry to set

getUserInfo

@Deprecated
public Map<String,String> getUserInfo(PortletRequest request)
                               throws org.apache.pluto.PortletContainerException
Deprecated. 

Specified by:
getUserInfo in interface org.apache.pluto.spi.optional.UserInfoService
Throws:
org.apache.pluto.PortletContainerException

getUserInfo

public Map<String,String> getUserInfo(PortletRequest request,
                                      org.apache.pluto.PortletWindow plutoPortletWindow)
                               throws org.apache.pluto.PortletContainerException
Specified by:
getUserInfo in interface org.apache.pluto.spi.optional.UserInfoService
Throws:
org.apache.pluto.PortletContainerException

getUserInfo

protected Map<String,String> getUserInfo(String remoteUser,
                                         HttpServletRequest httpServletRequest,
                                         IPortletWindow portletWindow)
                                  throws org.apache.pluto.PortletContainerException
Commons logic to get a subset of the user's attributes for the specified portlet window.

Parameters:
remoteUser - The user to get attributes for.
httpServletRequest - The current, underlying httpServletRequest
portletWindow - The window to filter attributes for
Returns:
A Map of user attributes for the user and windows
Throws:
org.apache.pluto.PortletContainerException

generateUserInfo

protected Map<String,String> generateUserInfo(org.jasig.services.persondir.IPersonAttributes personAttributes,
                                              List<org.apache.pluto.descriptors.portlet.UserAttributeDD> expectedUserAttributes,
                                              HttpServletRequest httpServletRequest)
Using the Map of portal user attributes and a List of expected attributes generate the USER_INFO map for the portlet

Parameters:
portalUserAttributes - All the attributes the portal knows about the user
expectedUserAttributes - The attributes the portlet expects to get
Returns:
The Map to use for the USER_INFO attribute

generateUserInfo

protected Map<String,String> generateUserInfo(Map<String,Object> portalUserAttributes)
Converts the full portal user attribute Map to a USER_INFO map for the portlet

Parameters:
portalUserAttributes - All the attributes the portal knows about the user
Returns:
The Map to use for the USER_INFO attribute

getExpectedUserAttributes

protected List<org.apache.pluto.descriptors.portlet.UserAttributeDD> getExpectedUserAttributes(HttpServletRequest request,
                                                                                               IPortletWindow portletWindow)
                                                                                        throws org.apache.pluto.PortletContainerException
Get the list of user attributes the portlet expects

Parameters:
request - The current request.
portletWindow - The window to get the expected user attributes for.
Returns:
The List of expected user attributes for the portlet
Throws:
org.apache.pluto.PortletContainerException - If expected attributes cannot be determined


Copyright © 2010 Jasig. All Rights Reserved.