Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portlet.prefs.spi
Class PreferencePersistenceDelegate

    java.lang.Object
      com.bea.portlet.prefs.spi.PreferencePersistenceDelegate

    public class PreferencePersistenceDelegate

extends Object

Manages portlet preferences. This class can manage preferences across local and remote portlets. This class will use the deployed SPI for managing preferences for local portlets.

Nested Class Summary
`static class` | `PreferencePersistenceDelegate.Factory` Returns an instance of `PreferencePersistenceDelegate`.

Constructor Summary
`protected` | `PreferencePersistenceDelegate()` Creates an instance.

Method Summary
`boolean` | `canPropagatePreferences(PortletPreferencesId uniqueId, javax.servlet.http.HttpServletRequest httpRequest)` Returns `true` if the given portlet supports portlet preferences and can propagate preferences to successor instances.
`Map` | `getPreferences(PortletPreferencesId uniqueId, javax.servlet.http.HttpServletRequest httpRequest, Map defaultPreferences)` Returns preferences for the given portlet.
`protected boolean` | `isRemote(javax.servlet.http.HttpServletRequest httpRequest, PortletPreferencesId uniqueId)` Returns `true` if the given portlet is a proxy portlet.
`void` | `removePreferences(PortletPreferencesId uniqueId, javax.servlet.http.HttpServletRequest httpRequest)` Deprecated This method is inherently unsafe, as it may result in a new instance being created without returning an ID to the new instance. use: `storePreferences(uniqueId, Collections.EMPTY_MAP, httpRequest, heckForSuccessor, propagate)`
`PortletPreferencesId` | `storePreferences(javax.servlet.http.HttpServletRequest httpRequest, PortletPreferencesId uniqueId, Map preferences, boolean checkForSuccessor, boolean propagate, boolean visitorMode)` Stores portlet preferences.
`PortletPreferencesId` | `storePreferences(PortletPreferencesId uniqueId, Map preferences, javax.servlet.http.HttpServletRequest httpRequest, boolean checkForSuccessor, boolean propagate)` Stores portlet preferences.
`PortletPreferencesId` | `storePreferences(PortletPreferencesId uniqueId, Map preferences, javax.servlet.http.HttpServletRequest httpRequest, boolean checkForSuccessor, boolean propagate, boolean forceSuccessorCreate)` Deprecated use `storePreferences(PortletPreferencesId, Map, HttpServletRequest, boolean, boolean)`
`boolean` | `supportsPreferences(PortletPreferencesId uniqueId, javax.servlet.http.HttpServletRequest httpRequest)` Indicates whether the given portlet supports preferences or not.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PreferencePersistenceDelegate

    protected PreferencePersistenceDelegate()

  Creates an instance.

Method Detail

### getPreferences

    public Map getPreferences(PortletPreferencesId uniqueId,
                              javax.servlet.http.HttpServletRequest httpRequest,
                              Map defaultPreferences)
                       throws PreferenceStoreException

  Returns preferences for the given portlet.

  Parameters
    `uniqueId` - unique ID
    `httpRequest` - HTTP request
    `defaultPreferences` - defaults
  Returns
    preferences
  Throws
    `PreferenceStoreException`

### storePreferences

    public PortletPreferencesId storePreferences(javax.servlet.http.HttpServletRequest httpRequest,
                                                 PortletPreferencesId uniqueId,
                                                 Map preferences,
                                                 boolean checkForSuccessor,
                                                 boolean propagate,
                                                 boolean visitorMode)
                                          throws PreferenceStoreException

  Stores portlet preferences.

  Parameters
    `uniqueId` -
    `preferences` -
    `httpRequest` -
    `checkForSuccessor` - Create a successor portlet if the portlet is a more generic type
    `propagate` - Push these preferences down to children of the portlet
    `visitorMode` - If this operation is being called by an admin, do the changes apply to the admin's specific portlet instance, or not
  Returns
    the preferences ID
  Throws
    `PreferenceStoreException`

### storePreferences

    public PortletPreferencesId storePreferences(PortletPreferencesId uniqueId,
                                                 Map preferences,
                                                 javax.servlet.http.HttpServletRequest httpRequest,
                                                 boolean checkForSuccessor,
                                                 boolean propagate)
                                          throws PreferenceStoreException

  Stores portlet preferences.

  Parameters
    `uniqueId` -
    `preferences` -
    `httpRequest` -
    `checkForSuccessor` -
    `propagate` -
  Returns
    the preferences ID
  Throws
    `PreferenceStoreException`

### storePreferences

    @Deprecated
    public PortletPreferencesId storePreferences(PortletPreferencesId uniqueId,
                                                            Map preferences,
                                                            javax.servlet.http.HttpServletRequest httpRequest,
                                                            boolean checkForSuccessor,
                                                            boolean propagate,
                                                            boolean forceSuccessorCreate)
                                          throws PreferenceStoreException

  Deprecated use `storePreferences(PortletPreferencesId, Map, HttpServletRequest, boolean, boolean)`

  Stores portlet preferences.

  Parameters
    `uniqueId` -
    `preferences` -
    `httpRequest` -
    `checkForSuccessor` -
    `propagate` -
  Returns
    the preferences ID
  Throws
    `PreferenceStoreException`

### removePreferences

    @Deprecated
    public void removePreferences(PortletPreferencesId uniqueId,
                                             javax.servlet.http.HttpServletRequest httpRequest)
                           throws PreferenceStoreException

  Deprecated This method is inherently unsafe, as it may result in a new instance being created without returning an ID to the new instance. use: `storePreferences(uniqueId, Collections.EMPTY_MAP, httpRequest, heckForSuccessor, propagate)`

  Removes preferences.

  Parameters
    `uniqueId` -
    `httpRequest` -
  Throws
    `PreferenceStoreException`
  See Also
    `Collections.EMPTY_MAP`, `storePreferences(PortletPreferencesId, Map, HttpServletRequest, boolean, boolean)`

### supportsPreferences

    public boolean supportsPreferences(PortletPreferencesId uniqueId,
                                       javax.servlet.http.HttpServletRequest httpRequest)
                                throws PreferenceStoreException

  Indicates whether the given portlet supports preferences or not.

  Parameters
    `uniqueId` -
    `httpRequest` -
  Returns
    boolean
  Throws
    `PreferenceStoreException`

### canPropagatePreferences

    public boolean canPropagatePreferences(PortletPreferencesId uniqueId,
                                           javax.servlet.http.HttpServletRequest httpRequest)
                                    throws PreferenceStoreException

  Returns `true` if the given portlet supports portlet preferences and can propagate preferences to successor instances.

  Parameters
    `uniqueId` -
    `httpRequest` -
  Returns
    `true` if the given portlet supports portlet preferences and can propagate preferences to successor instances.
  Throws
    `PreferenceStoreException`

### isRemote

    protected boolean isRemote(javax.servlet.http.HttpServletRequest httpRequest,
                               PortletPreferencesId uniqueId)
                        throws PreferenceStoreException

  Returns `true` if the given portlet is a proxy portlet. If the portlet is remote, this class uses an internal SPI for proxy portlets.

  Parameters
    `httpRequest` -
    `uniqueId` -
  Returns
    `true` if the given portlet is a proxy portlet
  Throws
    `PreferenceStoreException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.