Novell exteNd
Director 5.2 API

com.novell.afw.portlet.api
Interface EbiPortletPreferencesUserType

All Superinterfaces:
Cloneable, EbiPortletPreferences, EbiPortletPreferencesWritable

public interface EbiPortletPreferencesUserType
extends EbiPortletPreferencesWritable

Interace used to represent a collection of preferences that are related to a user portlet instance. User prferences are on a per user per portlet basis. Unlike the other portlet preferences types, user preferences are not localized.

Note:The localizable methods are still available because the super interface (EbiPortletPreferencesWritable) provides these, however they should not used since only a locale of null will return anything valid. Infact, implementations of this interface should simply ignore the locale argument passed in and delegate to the non localized methods.

Since:
v5.0

Method Summary
 List getAllPreferences()
          Returns a List with all the preferences.
 EbiPortletPreference getPreference(String name)
          Returns a preference by name.
 Map getPreferenceMap()
          Returns a Map with all the preferences keyed by name.
 boolean isLocalesSet()
          Indicates whether any searchable locales have been set for the preferences object.
 void setUserLocales(Locale[] locales)
          Sets a list of user locales (in the order they should be searched) when looking for preferences.
 
Methods implemented from interface com.novell.afw.portlet.api.EbiPortletPreferencesWritable
createPreference, overridePreference, removePreference
 
Methods implemented from interface com.novell.afw.portlet.api.EbiPortletPreferences
getAllPreferences, getDisplayableXML, getParentPreferences, getPreference, getPreferenceMap, isPreferenceInherited, toXML
 

Method Detail

getPreference

public EbiPortletPreference getPreference(String name)
Returns a preference by name.
Parameters:
name - String name of the preference.
Returns:
EbiPortletPreference object for the name in the given locale or null if a preference of the given name does not exist in the specified locale.
Since:
v5.0

getAllPreferences

public List getAllPreferences()
Returns a List with all the preferences. The objects in the List will be sorted according to the order of the preferences. The List returned is unmodifiable, and any attempts to modify it will result in a runtime exception.
Returns:
List of EbiPortletPreference objects.
Since:
v5.0

getPreferenceMap

public Map getPreferenceMap()
Returns a Map with all the preferences keyed by name. The objects in the Map will be sorted according to the order of the preferences. The Map returned is unmodifiable, and any attempts to modify it will result in a runtime exception.
Returns:
Map of EbiPortletPreference objects.
Since:
v5.0

setUserLocales

public void setUserLocales(Locale[] locales)
Sets a list of user locales (in the order they should be searched) when looking for preferences. Note that each preference in the array must be a specific locale, as the list is searched linearly, and permutations of the locales are not considered. For example, if locale "en_US" were passed in, "en" will NOT be searched, and therefore the list should contain "en_US" AND "en". The list does NOT need to contain a null to mean default, since this is included by default. To get a list of possible locale permutations, see the com.novell.afw.portlet.util.EboLocaleHelper. Also, note that if this method is never called or called with null as the argument, that any other methods on this class will deal with ONLY the default (null) locale.
Parameters:
locales - Ordered list of locales to be searched.

isLocalesSet

public boolean isLocalesSet()
Indicates whether any searchable locales have been set for the preferences object. If none have been set, then it can be assumed that only the default locale preferences will be used by any of the methods on this class.
Returns:
 

Novell exteNd
Director 5.2 API