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

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

public class PortletPreferencesServiceImpl
extends Object
implements org.apache.pluto.spi.optional.PortletPreferencesService

Hooks into uPortal portlet preferences object model

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
protected static String PORTLET_PREFERENCES_MAP_ATTRIBUTE
           
 
Constructor Summary
PortletPreferencesServiceImpl()
           
 
Method Summary
protected  void addPreferencesToMap(List<IPortletPreference> preferencesList, Map<String,org.apache.pluto.internal.InternalPortletPreference> preferencesMap)
          Add all of the preferences in the List to the Map using the preference name as the key
protected  List<IPortletPreference> getDescriptorPreferences(org.apache.pluto.descriptors.portlet.PortletDD portletDescriptor)
          Gets the preferences for a portlet descriptor converted to the uPortal IPortletPreference interface.
 IPersonManager getPersonManager()
           
 IPortalRequestUtils getPortalRequestUtils()
           
 IPortletDefinitionRegistry getPortletDefinitionRegistry()
           
 IPortletEntityRegistry getPortletEntityRegistry()
           
 IPortletWindowRegistry getPortletWindowRegistry()
           
protected  List<IPortletPreference> getSessionPreferences(IPortletEntityId portletEntityId, HttpServletRequest httpServletRequest)
          Gets the session-stored list of IPortletPreferences for the specified request and IPortletEntityId.
 org.apache.pluto.internal.InternalPortletPreference[] getStoredPreferences(org.apache.pluto.PortletWindow plutoPortletWindow, PortletRequest portletRequest)
           
protected  boolean isGuestUser(HttpServletRequest httpServletRequest)
          Determine if the user for the specified request is a guest as it pertains to shared portlet preferences.
 boolean isLoadFromEntity(PortletRequest portletRequest)
           
 boolean isLoadFromMemory(PortletRequest portletRequest)
           
 boolean isLoadGuestPreferencesFromEntity()
           
 boolean isLoadGuestPreferencesFromMemory()
           
 boolean isStoreGuestPreferencesInEntity()
           
 boolean isStoreGuestPreferencesInMemory()
           
 boolean isStoreInEntity(PortletRequest portletRequest)
           
 boolean isStoreInMemory(PortletRequest portletRequest)
           
 void setLoadGuestPreferencesFromEntity(boolean loadGuestPreferencesFromEntity)
           
 void setLoadGuestPreferencesFromMemory(boolean loadGuestPreferencesFromMemory)
           
 void setPersonManager(IPersonManager personManager)
           
 void setPortalRequestUtils(IPortalRequestUtils portalRequestUtils)
           
 void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
           
 void setPortletEntityRegistry(IPortletEntityRegistry portletEntityRegistry)
           
 void setPortletWindowRegistry(IPortletWindowRegistry portletWindowRegistry)
           
 void setStoreGuestPreferencesInEntity(boolean storeGuestPreferencesInEntity)
           
 void setStoreGuestPreferencesInMemory(boolean storeGuestPreferencesInMemory)
           
 void store(org.apache.pluto.PortletWindow plutoPortletWindow, PortletRequest portletRequest, org.apache.pluto.internal.InternalPortletPreference[] newPreferences)
           
protected  void storeSessionPreferences(IPortletEntityId portletEntityId, HttpServletRequest httpServletRequest, List<IPortletPreference> preferences)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTLET_PREFERENCES_MAP_ATTRIBUTE

protected static final String PORTLET_PREFERENCES_MAP_ATTRIBUTE
Constructor Detail

PortletPreferencesServiceImpl

public PortletPreferencesServiceImpl()
Method Detail

getPortalRequestUtils

public IPortalRequestUtils getPortalRequestUtils()
Returns:
the portalRequestUtils

setPortalRequestUtils

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

getPortletWindowRegistry

public IPortletWindowRegistry getPortletWindowRegistry()
Returns:
the portletWindowRegistry

setPortletWindowRegistry

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

getPortletEntityRegistry

public IPortletEntityRegistry getPortletEntityRegistry()
Returns:
the portletEntityRegistry

setPortletEntityRegistry

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

getPortletDefinitionRegistry

public IPortletDefinitionRegistry getPortletDefinitionRegistry()
Returns:
the portletDefinitionRegistry

setPortletDefinitionRegistry

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

getPersonManager

public IPersonManager getPersonManager()
Returns:
the personManager

setPersonManager

public void setPersonManager(IPersonManager personManager)
Parameters:
personManager - the personManager to set

isLoadGuestPreferencesFromMemory

public boolean isLoadGuestPreferencesFromMemory()

setLoadGuestPreferencesFromMemory

public void setLoadGuestPreferencesFromMemory(boolean loadGuestPreferencesFromMemory)

isLoadGuestPreferencesFromEntity

public boolean isLoadGuestPreferencesFromEntity()

setLoadGuestPreferencesFromEntity

public void setLoadGuestPreferencesFromEntity(boolean loadGuestPreferencesFromEntity)

isStoreGuestPreferencesInMemory

public boolean isStoreGuestPreferencesInMemory()

setStoreGuestPreferencesInMemory

public void setStoreGuestPreferencesInMemory(boolean storeGuestPreferencesInMemory)

isStoreGuestPreferencesInEntity

public boolean isStoreGuestPreferencesInEntity()

setStoreGuestPreferencesInEntity

public void setStoreGuestPreferencesInEntity(boolean storeGuestPreferencesInEntity)

isStoreInEntity

public boolean isStoreInEntity(PortletRequest portletRequest)

isLoadFromEntity

public boolean isLoadFromEntity(PortletRequest portletRequest)

isStoreInMemory

public boolean isStoreInMemory(PortletRequest portletRequest)

isLoadFromMemory

public boolean isLoadFromMemory(PortletRequest portletRequest)

getStoredPreferences

public org.apache.pluto.internal.InternalPortletPreference[] getStoredPreferences(org.apache.pluto.PortletWindow plutoPortletWindow,
                                                                                  PortletRequest portletRequest)
                                                                           throws org.apache.pluto.PortletContainerException
Specified by:
getStoredPreferences in interface org.apache.pluto.spi.optional.PortletPreferencesService
Throws:
org.apache.pluto.PortletContainerException

store

public void store(org.apache.pluto.PortletWindow plutoPortletWindow,
                  PortletRequest portletRequest,
                  org.apache.pluto.internal.InternalPortletPreference[] newPreferences)
           throws org.apache.pluto.PortletContainerException
Specified by:
store in interface org.apache.pluto.spi.optional.PortletPreferencesService
Throws:
org.apache.pluto.PortletContainerException

getDescriptorPreferences

protected List<IPortletPreference> getDescriptorPreferences(org.apache.pluto.descriptors.portlet.PortletDD portletDescriptor)
Gets the preferences for a portlet descriptor converted to the uPortal IPortletPreference interface.


addPreferencesToMap

protected void addPreferencesToMap(List<IPortletPreference> preferencesList,
                                   Map<String,org.apache.pluto.internal.InternalPortletPreference> preferencesMap)
Add all of the preferences in the List to the Map using the preference name as the key


isGuestUser

protected boolean isGuestUser(HttpServletRequest httpServletRequest)
Determine if the user for the specified request is a guest as it pertains to shared portlet preferences.


getSessionPreferences

protected List<IPortletPreference> getSessionPreferences(IPortletEntityId portletEntityId,
                                                         HttpServletRequest httpServletRequest)
Gets the session-stored list of IPortletPreferences for the specified request and IPortletEntityId.

Returns:
List of IPortletPreferences for the entity and session, may be null if no preferences have been set.

storeSessionPreferences

protected void storeSessionPreferences(IPortletEntityId portletEntityId,
                                       HttpServletRequest httpServletRequest,
                                       List<IPortletPreference> preferences)


Copyright © 2010 Jasig. All Rights Reserved.