Novell exteNd
Director 5.2 API

com.novell.afw.portlet.api
Interface EbiPortletPreferencesWritable

All Superinterfaces:
Cloneable, EbiPortletPreferences
All Known Subinterfaces:
EbiPortletPreferencesInstanceType, EbiPortletPreferencesUserType

public interface EbiPortletPreferencesWritable
extends EbiPortletPreferences

Interface to represent a preferences object that is witable. This interface provides methods for the purpose of creating and adding preference objects to a preferences object.

Since:
v5.0

Method Summary
 EbiPortletPreference createPreference(String name, String dataType, boolean readOnly)
          Factory method to create a new EbiPortletPreference object.
 EbiPortletPreference overridePreference(String name)
          Creates an override of the preference at a level higher in the hierarchy, and adds it to the current level's preference store.
 void removePreference(EbiPortletPreference prefToRemove)
          Removes a preference from the preference collection.
 
Methods implemented from interface com.novell.afw.portlet.api.EbiPortletPreferences
getAllPreferences, getDisplayableXML, getParentPreferences, getPreference, getPreferenceMap, isPreferenceInherited, toXML
 

Method Detail

createPreference

public EbiPortletPreference createPreference(String name,
                                             String dataType,
                                             boolean readOnly)
                                      throws EboItemExistenceException
Factory method to create a new EbiPortletPreference object. Once created and initialized, the preference is added to the preferences collection.
Parameters:
name - String name of the preference.
dataType - String type of the preference to create. Use one of the constants defined on EbiPortletPreference for this value.
readOnly - boolean false if the preference should be allowed to be modified.
Returns:
Instance of a class implementing EbiPortletPreference initialized with the data passed in.
Throws:
EboItemExistenceException - thrown if the preference already exists.
Since:
v5.0

overridePreference

public EbiPortletPreference overridePreference(String name)
                                        throws EboItemExistenceException
Creates an override of the preference at a level higher in the hierarchy, and adds it to the current level's preference store. The preference created will initially have all the same property values as the preference being overridden. For this method to succeed, there must be a preference with the name specified at some level higher in the in the hierarchy , and there must not be a preference with the same name at the current level. If there are localized preferences at the current level with the same name, each of these localized preferences will have their thier base preference set to the new base preference. If there are localized versions of the overridden preference (preference at the next level up in the hierarchy) that do not exist at the current level, these will be created at the current level to override the localized versions as well.
Parameters:
name - String name of the preference to override.
Returns:
EbiPortletPreference reference to the preference created to override the named preference.
Throws:
EboItemExistenceException - thrown if either the preference already exists at the current level or no preference with the given name exists at a level higher up the hieracrhy.
Since:
v5.0

removePreference

public void removePreference(EbiPortletPreference prefToRemove)
Removes a preference from the preference collection. This will only remove preferences located at the current level, and will not affect preferences locate at higher levels of the hierarchy. If locale of the preference passed in is null (default locale), the default preference is removed. When the default preference is removed, then ALL localized versions of that preference are removed too.
Since:
v5.0

Novell exteNd
Director 5.2 API