站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

PreferenceSet - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.migration.model20.model
Interface PreferenceSet

All Known Implementing Classes:
MappedPreferenceSet

public interface PreferenceSet

Version:
$Revision: 5449 $
Author:
Julien Viet

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

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


getPreference

public 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

public 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

public 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

public 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

public 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