com.ibm.portal.portlet
Interface ModifiablePortletPreferences

All Superinterfaces:
ListModel, MetaData, Modifiable, ModifiableMetaData, PortletPreferences

public interface ModifiablePortletPreferences
extends PortletPreferences, ModifiableMetaData, Modifiable

An interface representing modifiable portlet preferences. It can be obtained through the ModifiablePortletPreferencesProvider.

Since:
6.1.0

Method Summary
 boolean confirmRemoveName(java.lang.String aName)
          Indicates if the preference identified with the specified name may be removed.
 boolean confirmRemoveNames()
          Indicates if all preferences data may be removed.
 boolean confirmRemoveNames(java.util.Collection aCollection)
          Indicates if the preferences identified by the names specified in the collection may be removed.
 boolean confirmRetainNames(java.util.Collection aCollection)
          Indicates if the preferences identified by the names specified in the collection may be retained.
 boolean confirmSetStringValue(java.lang.String aName, java.lang.String aValue)
          Indicates if the value for the preference identified by the specified name may be set.
 boolean confirmSetStringValues(java.lang.String aName, java.lang.String[] aValue)
          Indicates if the value for the preference identified by the specified name may be set.
 boolean confirmSetValue(java.lang.String aName, java.lang.Object aValue)
          Indicates if the value for the preference identified by the specified name may be set.
 boolean com.ibm.portal.portletmodel.PortletPreferences)">confirmSetValues(PortletPreferences aPortletPreferences)
          Indicates the specified preferences may be set.
 java.lang.Object removeName(java.lang.String aName)
          Removes the preference identified with the specified name.
 boolean removeNames()
          Removes all preferences.
 boolean removeNames(java.util.Collection aCollection)
          Removes the preferences identified by the names specified in the collection.
 boolean retainNames(java.util.Collection aCollection)
          Retains only the preferences identified by the names specified in the collection.
 java.lang.String setStringValue(java.lang.String aName, java.lang.String aValue)
          Sets the value for the preference identified by the specified name.
 java.lang.String[] setStringValues(java.lang.String aName, java.lang.String[] aValue)
          Sets the value for the preference identified by the specified name.
 java.lang.Object setValue(java.lang.String aName, java.lang.Object aValue)
          Sets the value for the preference identified by the specified name.
 boolean com.ibm.portal.portletmodel.PortletPreferences)">setValues(PortletPreferences aPortletPreferences)
          Sets the specified portlet preferences.
 
Methods inherited from interface com.ibm.portal.portletmodel.PortletPreferences
getStringValue, getStringValues, getValue, isPreferenceDefined, isReadOnly, iterator
 
Methods inherited from interface com.ibm.portal.MetaData
getNames
 
Methods inherited from interface com.ibm.portal.ModifiableMetaData
confirmSetValues, setValues
 
Methods inherited from interface com.ibm.portal.MetaData
getNames
 

Method Detail

setValue

java.lang.Object setValue(java.lang.String aName,
                          java.lang.Object aValue)
                          throws CannotModifyPropertyException
Sets the value for the preference identified by the specified name. The value has to be of type String. If the name does not exist a new preference is created with the given name, value and read-only set to false.

Specified by:
setValue in interface ModifiableMetaData
Parameters:
aName - name of preference to set the value for
aValue - preference value to set
Returns:
the former value for the name; if none existed, null is returned
Throws:
CannotModifyPropertyException - in case the value of the preference cannot be set, or the value is not of type string

setStringValue

java.lang.String setStringValue(java.lang.String aName,
                                java.lang.String aValue)
                                throws CannotModifyPropertyException
Sets the value for the preference identified by the specified name. If the name does not exist a new preference is created with the given name, value and read-only set to false.

Parameters:
aName - name of preference to set the value for
aValue - preference value to set
Returns:
the former value for the name; if none existed, null is returned
Throws:
CannotModifyPropertyException - in case the value of the preference cannot be set

setStringValues

java.lang.String[] setStringValues(java.lang.String aName,
                                   java.lang.String[] aValue)
                                   throws CannotModifyPropertyException
Sets the value for the preference identified by the specified name. If the name does not exist a new preference is created with the given name, value and read-only set to false.

Parameters:
aName - name of preference to set the value for
aValue - preference value to set
Returns:
the former value for the name as an array of String or null, if the preference is not set
Throws:
CannotModifyPropertyException - in case the value of the preference cannot be set

com.ibm.portal.portletmodel.PortletPreferences)">

setValues

boolean setValues(PortletPreferences aPortletPreferences)
                  throws CannotModifyPropertyException
Sets the specified portlet preferences.

Parameters:
aPortletPreferences - portlet preferences to set
Returns:
true if this ModifiablePortletPreferences was changed as a result of this call
Throws:
CannotModifyPropertyException - in case a specified portlet preferences cannot be set; in this case, the portlet preferences are set only partially

removeName

java.lang.Object removeName(java.lang.String aName)
                            throws CannotModifyPropertyException
Removes the preference identified with the specified name.

Specified by:
removeName in interface ModifiableMetaData
Parameters:
aName - name of preference to remove
Returns:
the former value for the name as String[]; if none existed, null is returned
Throws:
CannotModifyPropertyException - in case the preference cannot be removed

removeNames

boolean removeNames(java.util.Collection aCollection)
                    throws CannotModifyPropertyException
Removes the preferences identified by the names specified in the collection.

Specified by:
removeNames in interface ModifiableMetaData
Parameters:
aCollection - names of preferences to remove
Returns:
true if this ModifiablePortletPreferences was changed as a result of this call
Throws:
CannotModifyPropertyException - in case a specified preference cannot be removed; in this case, the preferences are removed only partially

removeNames

boolean removeNames()
                    throws CannotModifyPropertyException
Removes all preferences.

Specified by:
removeNames in interface ModifiableMetaData
Returns:
true if this ModifiablePortletPreferences was changed as a result of this call
Throws:
CannotModifyPropertyException - in case a preference cannot be removed; in this case, the preferences are removed only partially

retainNames

boolean retainNames(java.util.Collection aCollection)
                    throws CannotModifyPropertyException
Retains only the preferences identified by the names specified in the collection.

Specified by:
retainNames in interface ModifiableMetaData
Parameters:
aCollection - names of preferences to retain
Returns:
true if this ModifiablePortletPreferences was changed as a result of this call
Throws:
CannotModifyPropertyException - in case a preference, which is not to be retained, cannot be removed; in this case, the preferences are removed only partially.

confirmSetValue

boolean confirmSetValue(java.lang.String aName,
                        java.lang.Object aValue)
Indicates if the value for the preference identified by the specified name may be set.

Specified by:
confirmSetValue in interface ModifiableMetaData
Parameters:
aName - name of preference
aValue - preference value
Returns:
true in case the preference may be set, false otherwise

confirmSetStringValue

boolean confirmSetStringValue(java.lang.String aName,
                              java.lang.String aValue)
Indicates if the value for the preference identified by the specified name may be set.

Parameters:
aName - name of preference
aValue - preference value
Returns:
true in case the preference may be set, false otherwise

confirmSetStringValues

boolean confirmSetStringValues(java.lang.String aName,
                               java.lang.String[] aValue)
Indicates if the value for the preference identified by the specified name may be set.

Parameters:
aName - name of preference
aValue - preference value
Returns:
true in case the preference may be set, false otherwise

com.ibm.portal.portletmodel.PortletPreferences)">

confirmSetValues

boolean confirmSetValues(PortletPreferences aPortletPreferences)
Indicates the specified preferences may be set.

Parameters:
aPortletPreferences - preferences
Returns:
true in case the preferences may be set, false otherwise

confirmRemoveName

boolean confirmRemoveName(java.lang.String aName)
Indicates if the preference identified with the specified name may be removed.

Specified by:
confirmRemoveName in interface ModifiableMetaData
Parameters:
aName - name of preference
Returns:
true in case the preference may be removed, false otherwise

confirmRemoveNames

boolean confirmRemoveNames(java.util.Collection aCollection)
Indicates if the preferences identified by the names specified in the collection may be removed.

Specified by:
confirmRemoveNames in interface ModifiableMetaData
Parameters:
aCollection - names identifying preferences
Returns:
true in case the preferences may be removed, false otherwise

confirmRemoveNames

boolean confirmRemoveNames()
Indicates if all preferences data may be removed.

Specified by:
confirmRemoveNames in interface ModifiableMetaData
Returns:
true in case all preferences may be removed, false otherwise

confirmRetainNames

boolean confirmRetainNames(java.util.Collection aCollection)
Indicates if the preferences identified by the names specified in the collection may be retained.

Specified by:
confirmRetainNames in interface ModifiableMetaData
Parameters:
aCollection - names of preferences
Returns:
true in case the preferences may be retained, false otherwise