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

## org.jasig.portal
Interface IPortletPreferencesStore

All Known Implementing Classes:
  RDBMPortletPreferencesStore

    public interface IPortletPreferencesStore

The IPortletPreferenceStore allows a portlet to atomicly persist preferences at two different levels. Definition level preferences are common to all instances of a channel. Entity level preferences are specific for on a per user per instance basis.

Version:
  $Revision: 1.5 $
Author:
  Eric Dalquist edalquist@unicon.net

Method Summary
`void` | `deletePortletPreferencesByInstance(int userId, int layoutId, java.lang.String chanDescId)` Removes portlet preferences for the specific user and instance of a portlet.
`void` | `deletePortletPreferencesByUser(int userId)` Removes all portlet preferences stored for the specified user.
`org.apache.pluto.om.common.PreferenceSet` | `getDefinitionPreferences(int chanId)` Gets the definition level preferences for the specified channel into an implementation of the PreferenceSet interface.
`org.apache.pluto.om.common.PreferenceSet` | `getEntityPreferences(int userId, int layoutId, java.lang.String chanDescId)` Gets the enitity level preferences for the specified channel into an implementation of the PreferenceSet interface.
`void` | `setDefinitionPreferences(int chanId, org.apache.pluto.om.common.PreferenceSet prefs)` Stores the definition level preferences described by the PreferenceSet interface.
`void` | `setEntityPreferences(int userId, int layoutId, java.lang.String chanDescId, org.apache.pluto.om.common.PreferenceSet prefs)` Stores the entity level preferences described by the PreferenceSet interface.

Method Detail

### setDefinitionPreferences

    void setDefinitionPreferences(int chanId,
                                  org.apache.pluto.om.common.PreferenceSet prefs)
                                  throws java.lang.Exception

  Stores the definition level preferences described by the PreferenceSet interface. The store operation is atomic, it can be assumed that if the method completes with no exception being thrown the store was successfull. If an exception is thrown it can be assumed that no changes were made to the underlying persistant store.

  Parameters:
    `chanId` - The id of the channel to store the preferences for.
    `prefs` - The PreferenceSet which describes the data to store.
  Throws:
    `java.lang.Exception` - If any error occurs while storing the data.

### getDefinitionPreferences

    org.apache.pluto.om.common.PreferenceSet getDefinitionPreferences(int chanId)
                                                                      throws java.lang.Exception

  Gets the definition level preferences for the specified channel into an implementation of the PreferenceSet interface.

  Parameters:
    `chanId` - The id of the channel to get the preferences for.
  Returns:
    An implementation of the PreferenceSet interface that contains the preferences.
  Throws:
    `java.lang.Exception` - If any error occurs while getting the data.

### setEntityPreferences

    void setEntityPreferences(int userId,
                              int layoutId,
                              java.lang.String chanDescId,
                              org.apache.pluto.om.common.PreferenceSet prefs)
                              throws java.lang.Exception

  Stores the entity level preferences described by the PreferenceSet interface. The store operation is atomic, it can be assumed that if the method completes with no exception being thrown the store was successfull. If an exception is thrown it can be assumed that no changes were made to the underlying persistant store. The userId, layoutId and structId make up the primary key for the preferences.

  Parameters:
    `userId` - The id of the user to store the preferences for.
    `layoutId` - The layout fragment id to store the preferences for.
    `chanDescId` - The structure id to store the preferences for.
    `prefs` - The PreferenceSet which describes the data to store.
  Throws:
    `java.lang.Exception` - If any error occurs while storing the data.

### getEntityPreferences

    org.apache.pluto.om.common.PreferenceSet getEntityPreferences(int userId,
                                                                  int layoutId,
                                                                  java.lang.String chanDescId)
                                                                  throws java.lang.Exception

  Gets the enitity level preferences for the specified channel into an implementation of the PreferenceSet interface. The userId, layoutId and structId make up the primary key for the preferences.

  Parameters:
    `userId` - The id of the user to get the preferences for.
    `layoutId` - The layout fragment id to get the preferences for.
    `chanDescId` - The structure id to get the preferences for.
  Returns:
    An implementation of the PreferenceSet interface that contains the preferences.
  Throws:
    `java.lang.Exception` - If any error occurs while getting the data.

### deletePortletPreferencesByUser

    void deletePortletPreferencesByUser(int userId)
                                        throws java.lang.Exception

  Removes all portlet preferences stored for the specified user.

  Parameters:
    `userId` - The id of the user to remove the preferences for.
  Throws:
    `java.lang.Exception` - If any error occurs while removing the data.

### deletePortletPreferencesByInstance

    void deletePortletPreferencesByInstance(int userId,
                                            int layoutId,
                                            java.lang.String chanDescId)
                                            throws java.lang.Exception

  Removes portlet preferences for the specific user and instance of a portlet.

  Parameters:
    `userId` - The id of the user to remove the preferences for.
    `layoutId` - The layout fragment id to remove the preferences for.
    `chanDescId` - The structure id to remove the preferences for.
  Throws:
    `java.lang.Exception` - If any error occurs while removing the data.

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