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

AbstractPropertyMap - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet.state
Class AbstractPropertyMap

java.lang.Object
  extended byorg.jboss.portal.common.util.TypedMap
      extended byorg.jboss.portal.portlet.state.AbstractPropertyMap
All Implemented Interfaces:
java.util.Map, PropertyMap, java.io.Serializable
Direct Known Subclasses:
SimplePropertyMap

public abstract class AbstractPropertyMap
extends TypedMap
implements PropertyMap

Version:
$Revision: 5448 $
Author:
Julien Viet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jboss.portal.common.util.TypedMap
TypedMap.TypedEntry, TypedMap.TypedEntryIterator, TypedMap.TypedEntrySet
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private static long serialVersionUID
          The serialVersionUID
 
Constructor Summary
AbstractPropertyMap()
           
 
Method Summary
protected  void assertKeyValidity(java.lang.Object value)
          Only accept non null string objects.
protected  java.lang.Object getExternalValue(java.lang.Object value)
          Wrap the internal value into its external representation.
protected  java.lang.Object getInternalValue(java.lang.Object value)
          Only check are made to the value.
 Value getProperty(java.lang.String key)
          Return the value for the given key or null if it does not exist.
 void setProperty(java.lang.String key, Value value)
          Update the value of the given key.
 
Methods inherited from class org.jboss.portal.common.util.TypedMap
clear, containsKey, containsValue, entrySet, get, getDelegate, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

serialVersionUID

private static final long serialVersionUID
The serialVersionUID

See Also:
Constant Field Values
Constructor Detail

AbstractPropertyMap

public AbstractPropertyMap()
Method Detail

assertKeyValidity

protected void assertKeyValidity(java.lang.Object value)
Only accept non null string objects.

Specified by:
assertKeyValidity in class TypedMap
Throws:
java.lang.NullPointerException - if the value is null
java.lang.ClassCastException - if the value is not an instance of string

getInternalValue

protected java.lang.Object getInternalValue(java.lang.Object value)
Only check are made to the value. The only valid values accepted are non null instance of org.jboss.portal.common.value.Value.

Specified by:
getInternalValue in class TypedMap
Parameters:
value - the value to unwrap
Returns:
the unwrapped value
Throws:
java.lang.NullPointerException - if the value is null
java.lang.ClassCastException - if the value type is not an instance of org.jboss.portal.common.value.Value

getExternalValue

protected java.lang.Object getExternalValue(java.lang.Object value)
Description copied from class: TypedMap
Wrap the internal value into its external representation.

Specified by:
getExternalValue in class TypedMap

getProperty

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

Specified by:
getProperty in interface PropertyMap
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

setProperty

public void setProperty(java.lang.String key,
                        Value value)
                 throws java.lang.IllegalArgumentException
Description copied from interface: PropertyMap
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:
setProperty in interface PropertyMap
Parameters:
key - the key to update
value - the new value
Throws:
java.lang.IllegalArgumentException - if the key is null