org.jboss.portal.server.plugins.preferences
Interface PreferenceSet

All Known Implementing Classes:
AbstractPreferenceSet, MappedPreferenceSet, MergedPreferenceSet, PortletPreferenceSetPlugin, PreferenceSetPlugin, UserPrefSet

public interface PreferenceSet


Method Summary
 Preference getPreference(java.lang.String key)
          Return the preference for the given key.
 Value getValue(java.lang.String key)
          Return the value for the given key or null if it does not exist.
 boolean isReadOnly(java.lang.String key)
          Return the read only value for the given preference.
 java.util.Set keySet()
          Return the key set of all the preferences.
 void setReadOnly(java.lang.String key, boolean readOnly)
          Update the read only value for the given key.
 void setValue(java.lang.String key, Value value)
          Update the value of the given key.
 

Method Detail

keySet

java.util.Set keySet()
Return the key set of all the preferences.


getPreference

Preference getPreference(java.lang.String key)
Return the preference for the given key. If no preference exists it must return null.

Parameters:
key - the requested key
Returns:
the requested preference or null if it does not exist

getValue

Value getValue(java.lang.String key)
Return the value for the given key or null if it does not exist.

Parameters:
key - the requested key
Returns:
the requested value or null if it does not exist

setValue

void setValue(java.lang.String key,
              Value value)
              throws java.lang.UnsupportedOperationException
Update the value of the given key. If the value object is null it means that the preference must be removed. Implementation can throw an unsupported operation exception when it is abnormal to perform an update.

Parameters:
key - the key to update
value - the new value
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported

isReadOnly

boolean isReadOnly(java.lang.String key)
Return the read only value for the given preference.

Parameters:
key - the requested key
Returns:
the read only value

setReadOnly

void setReadOnly(java.lang.String key,
                 boolean readOnly)
                 throws java.lang.UnsupportedOperationException
Update the read only value for the given key. Implementation can throw an unsupported operation exception when it is abnormal to perform an update.

Parameters:
key - the key to update
readOnly - the new read only value
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported