org.apache.sling.jcr.resource
Class JcrModifiablePropertyMap

java.lang.Object
  extended by org.apache.sling.jcr.resource.JcrPropertyMap
      extended by org.apache.sling.jcr.resource.JcrModifiablePropertyMap
All Implemented Interfaces:
Map<String,Object>, PersistableValueMap, ValueMap

public final class JcrModifiablePropertyMap
extends JcrPropertyMap
implements PersistableValueMap

This implementation of the value map allows to change the properties and save them later on.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.ValueMap
EMPTY
 
Constructor Summary
JcrModifiablePropertyMap(Node node)
          Constructor
JcrModifiablePropertyMap(Node node, ClassLoader dynamicCL)
          Constructor
 
Method Summary
 void clear()
           
 Object put(String aKey, Object value)
           
 void putAll(Map<? extends String,? extends Object> t)
           
 Object remove(Object aKey)
           
 void reset()
          Reset the changes.
 void save()
          Persists the changes.
 
Methods inherited from class org.apache.sling.jcr.resource.JcrPropertyMap
containsKey, containsValue, entrySet, escapeKeyName, get, get, get, getPath, isEmpty, keySet, size, toString, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.sling.api.resource.ValueMap
get, get
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, size, values
 

Constructor Detail

JcrModifiablePropertyMap

public JcrModifiablePropertyMap(Node node)
Constructor

Parameters:
node - The underlying node.

JcrModifiablePropertyMap

public JcrModifiablePropertyMap(Node node,
                                ClassLoader dynamicCL)
Constructor

Parameters:
node - The underlying node.
dynamicCL - Dynamic class loader for loading serialized objects.
Since:
2.0.6
Method Detail

clear

public void clear()
Specified by:
clear in interface Map<String,Object>
Overrides:
clear in class JcrPropertyMap
See Also:
Map.clear()

put

public Object put(String aKey,
                  Object value)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class JcrPropertyMap
See Also:
Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map<? extends String,? extends Object> t)
Specified by:
putAll in interface Map<String,Object>
Overrides:
putAll in class JcrPropertyMap
See Also:
Map.putAll(java.util.Map)

remove

public Object remove(Object aKey)
Specified by:
remove in interface Map<String,Object>
Overrides:
remove in class JcrPropertyMap
See Also:
Map.remove(java.lang.Object)

reset

public void reset()
Description copied from interface: PersistableValueMap
Reset the changes.

Specified by:
reset in interface PersistableValueMap
See Also:
PersistableValueMap.reset()

save

public void save()
          throws PersistenceException
Description copied from interface: PersistableValueMap
Persists the changes.

Specified by:
save in interface PersistableValueMap
Throws:
PersistenceException - If the changes can't be persisted.
See Also:
PersistableValueMap.save()


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.