org.apache.pluto.core
Class DefaultPortletPreferencesService

java.lang.Object
  extended by org.apache.pluto.core.DefaultPortletPreferencesService
All Implemented Interfaces:
ContainerService, PortletPreferencesService

public class DefaultPortletPreferencesService
extends Object
implements PortletPreferencesService

Default implementation of the portlet preferences service. The portlet preferences service is a singleton held by the pluto portlet container.

See Also:
PortletPreferences, PortletPreferencesImpl, PortletPreferences

Constructor Summary
DefaultPortletPreferencesService()
          Default no-arg constructor.
 
Method Summary
 InternalPortletPreference[] getStoredPreferences(PortletWindow portletWindow, PortletRequest request)
          Returns the stored portlet preferences array.
 void store(PortletWindow portletWindow, PortletRequest request, InternalPortletPreference[] preferences)
          Stores the portlet preferences to the in-memory storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPortletPreferencesService

public DefaultPortletPreferencesService()
Default no-arg constructor.

Method Detail

getStoredPreferences

public InternalPortletPreference[] getStoredPreferences(PortletWindow portletWindow,
                                                        PortletRequest request)
                                                 throws PortletContainerException
Returns the stored portlet preferences array. The preferences managed by this service should be protected from being directly accessed, so this method returns a cloned copy of the stored preferences.

Specified by:
getStoredPreferences in interface PortletPreferencesService
Parameters:
portletWindow - the portlet window.
request - the portlet request from which the remote user is retrieved.
Returns:
a copy of the stored portlet preferences array.
Throws:
PortletContainerException

store

public void store(PortletWindow portletWindow,
                  PortletRequest request,
                  InternalPortletPreference[] preferences)
           throws PortletContainerException
Stores the portlet preferences to the in-memory storage. This method should be invoked after the portlet preferences are validated by the preference validator (if defined).

The preferences managed by this service should be protected from being directly accessed, so this method clones the passed-in preferences array and saves it.

Specified by:
store in interface PortletPreferencesService
Parameters:
portletWindow - the portlet window
request - the portlet request from which the remote user is retrieved.
preferences - the portlet preferences to store.
Throws:
PortletContainerException
See Also:
PortletPreferences.store()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.