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

MapPreferences - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.common.prefs
Class MapPreferences

java.lang.Object
  extended byorg.jboss.portal.common.prefs.MapPreferences
All Implemented Interfaces:
Preferences, ValueMap

public class MapPreferences
extends java.lang.Object
implements Preferences


Constructor Summary
MapPreferences()
           
MapPreferences(java.util.Map map)
           
 
Method Summary
 java.util.Set getKeys()
          Return the key set of the map.
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPreferences

public MapPreferences()

MapPreferences

public MapPreferences(java.util.Map map)
Method Detail

getKeys

public java.util.Set getKeys()
Description copied from interface: ValueMap
Return the key set of the map.

Specified by:
getKeys in interface ValueMap

getValue

public Value getValue(java.lang.String key)
               throws java.lang.IllegalArgumentException
Description copied from interface: ValueMap
Return the value for the given key or null if it does not exist.

Specified by:
getValue in interface ValueMap
Parameters:
key - the requested key
Returns:
the requested value or null if it does not exist
Throws:
java.lang.IllegalArgumentException - if the key is null

isReadOnly

public boolean isReadOnly(java.lang.String key)
Description copied from interface: Preferences
Return the read only value for the given preference.

Specified by:
isReadOnly in interface Preferences
Parameters:
key - the requested key
Returns:
the read only value

setValue

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

Specified by:
setValue in interface ValueMap
Parameters:
key - the key to update
value - the new value
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported
java.lang.IllegalArgumentException - if the key is null

setReadOnly

public void setReadOnly(java.lang.String key,
                        boolean readOnly)
Description copied from interface: Preferences
Update the read only value for the given key. Implementation can throw an unsupported operation exception when it is abnormal to perform an update.

Specified by:
setReadOnly in interface Preferences
Parameters:
key - the key to update
readOnly - the new read only value