com.ibm.mashups.enabler.widget
Interface ModifiablePreferences

All Superinterfaces:
com.ibm.mashups.enabler.DirtyFlagProvider, Preferences

public ModifiablePreferences
extends Preferences, com.ibm.mashups.enabler.DirtyFlagProvider

An interface representing modifiable preferences. It can be obtained through an PreferencesProvider .

Since:
2.4

Method Summary
 boolean confirmRemove(String name)
           Indicates if the preference identified with the specified name may be removed.
 boolean confirmSetValue(String name, String value)
           Indicates if the value for the preference identified by the specified name may be set.
 boolean confirmSetValues(String name, String[] values)
           Indicates if the values for the preference identified by the specified name may be set.
 boolean confirmSetReadOnly(String name)
           Indicates if the readOnly parameter of the setValue method is evaluated by the remote system.
 boolean setValue(String name, String value)
           Sets the value for the preference identified by the specified name.
 boolean setValue(String name, String value, boolean readOnly)
           Sets the value for the preference identified by the specified name.
 boolean setValues(String name, String[] values)
           Sets the values for the preference identified by the specified name.
 boolean setValues(String name, String[] values, boolean readOnly)
           Sets the values for the preference identified by the specified name.
 boolean remove(String name)
           Removes the preference identified with the specified name.
 
Methods inherited from interface com.ibm.mashups.enabler.widget.Preferences
getValue, getValues, isReadOnly, getNames, getMap
 

Method Detail

confirmRemove

boolean confirmRemove(String name)
Indicates if the preference identified with the specified name may be removed.

Parameters:
name - name of preference. Must not be null
Returns:
true in case the preference may be removed, false otherwise

confirmSetValue

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

Parameters:
name - name of preference. Must not be null
value - preference value. Must not be null
Returns:
true in case the preference may be set, false otherwise

confirmSetValues

boolean confirmSetValues(String name,
                         String[] values)
Indicates if the values for the preference identified by the specified name may be set.

Parameters:
name - name of preference. Must not be null
values - preference values. Must not be null
Returns:
true in case the preference may be set, false otherwise

confirmSetReadOnly

boolean confirmSetReadOnly(String name)
Indicates if the readOnly parameter of the setValue method is evaluated by the remote system.

Parameters:
name - name of preference. Must not be null
Returns:
true in case the readOnly parameter is evaluated, false otherwise.

setValue

boolean setValue(String name,
                 String value)
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 to false.

Parameters:
name - name of preference to set the value for. Must not be null
value - preference value to set. Must not be null
Returns:
returns true in case the setting of the value was successful, false otherwise.

setValue

boolean setValue(String name,
                 String value,
                 boolean readOnly)
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.

Parameters:
name - name of preference to set the value for. Must not be null
value - preference value to set. Must not be null
readOnly - true if a new created preference should be read-only. false otherwise. default: false
Returns:
returns true in case the setting of the value was successful, false otherwise.

setValues

boolean setValues(String name,
                  String[] values)
Sets the values for the preference identified by the specified name. The values have to be of type String. If the name does not exist a new preference is created with the given name, value.

Parameters:
name - name of preference to set the value for. Must not be null
values - preference values to set. Must not be null
Returns:
returns true in case the setting of the values was successful, false otherwise.

setValues

boolean setValues(String name,
                  String[] values,
                  boolean readOnly)
Sets the values for the preference identified by the specified name. The values have to be of type String. If the name does not exist a new preference is created with the given name, value.

Parameters:
name - name of preference to set the value for. Must not be null
values - preference values to set. Must not be null
readOnly - true if a new created preference should be read-only. false otherwise. default: false
Returns:
returns true in case the setting of the values was successful, false otherwise.

remove

boolean remove(String name)
Removes the preference identified with the specified name. If read-only is specified, the preference will not be removed. Note: if this object is hierachical, then the remove method will only remove any value on the top layer (if available).

Parameters:
name - name of preference to remove. Must not be null
Returns:
returns true in case the removing of the value was successful, false otherwise.
See Also:
com.ibm.mashups.enabler.widget.WidgetModel#getHierachicalPreferences


Copyright IBM Corp. 2010 All Rights Reserved.