com.sapportals.wcm.repository

Class MutablePropertyMap

java.lang.Object
  extended by com.sapportals.wcm.WcmObject
      extended by com.sapportals.wcm.repository.PropertyMap
          extended by com.sapportals.wcm.repository.MutablePropertyMap
All Implemented Interfaces:
IMutablePropertyMap, IPropertyMap

public class MutablePropertyMap
extends PropertyMap
implements IMutablePropertyMap

Holds a mutable map of Property objects.


Field Summary
 
Fields inherited from class com.sapportals.wcm.repository.PropertyMap
exceptionMap, map
 
Fields inherited from class com.sapportals.wcm.WcmObject
ORDER_TYPE_MANUAL, ORDER_TYPE_NONE
 
Constructor Summary
  MutablePropertyMap()
          Constructs a new, empty property map
protected MutablePropertyMap(HashMap m)
           
  MutablePropertyMap(int initialCapacity)
          Constructs a new, empty property map with the specified initial capacity
  MutablePropertyMap(MutablePropertyMap propMap)
          Constructs a new property map with the same mappings as the given map
 
Method Summary
 void addException(IPropertyName propertyName, Exception ex)
          Record an exception for a particular property.
 IPropertyMap getImmutable()
          Returns a read-only version of this map.
 IMutablePropertyMap getMutable()
          Returns a copy of the map that can be modified.
 IProperty put(IProperty property)
          Puts a property into the map.
 IProperty remove(IPropertyName propertyName)
          Removes the mapping for the specified property name from this map if present.
 
Methods inherited from class com.sapportals.wcm.repository.PropertyMap
containsProperty, containsProperty, get, getException, getExceptions, isEmpty, iterator, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.repository.IPropertyMap
containsProperty, containsProperty, get, getException, getExceptions, isEmpty, iterator, size
 

Constructor Detail

MutablePropertyMap

public MutablePropertyMap()
Constructs a new, empty property map


MutablePropertyMap

public MutablePropertyMap(MutablePropertyMap propMap)
Constructs a new property map with the same mappings as the given map

Parameters:
propMap - The map whose mappings are to be places in this map

MutablePropertyMap

public MutablePropertyMap(int initialCapacity)
Constructs a new, empty property map with the specified initial capacity

Parameters:
initialCapacity - The initial capacity of the contained map

MutablePropertyMap

protected MutablePropertyMap(HashMap m)
Method Detail

put

public IProperty put(IProperty property)
Description copied from interface: IMutablePropertyMap
Puts a property into the map. Associates the property with the it's IPropertyName as a key in this map. If the map previously contained a mapping for this name, the old property is replaced.

Specified by:
put in interface IMutablePropertyMap
Parameters:
property - The property to add.
Returns:
previous value associated with specified property's name, or null if there was no mapping.

remove

public IProperty remove(IPropertyName propertyName)
Description copied from interface: IMutablePropertyMap
Removes the mapping for the specified property name from this map if present.

Specified by:
remove in interface IMutablePropertyMap
Parameters:
propertyName - TBD: Description of the incoming method parameter
Returns:
previous value associated with specified name, or null if there was no mapping.

getImmutable

public IPropertyMap getImmutable()
Description copied from interface: IMutablePropertyMap
Returns a read-only version of this map. The map is not copied.

Specified by:
getImmutable in interface IMutablePropertyMap
Returns:
a read-only version of this map

addException

public void addException(IPropertyName propertyName,
                         Exception ex)
Description copied from interface: IMutablePropertyMap
Record an exception for a particular property.

Specified by:
addException in interface IMutablePropertyMap
Parameters:
propertyName - name of property
ex - exception

getMutable

public IMutablePropertyMap getMutable()
Description copied from interface: IPropertyMap
Returns a copy of the map that can be modified.

Specified by:
getMutable in interface IPropertyMap
Overrides:
getMutable in class PropertyMap
Returns:
a copy of the map that can be modified.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice