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:
java.util.Map<java.lang.String,java.lang.Object>, PersistableValueMap, ValueMap

public class JcrModifiablePropertyMap
extends JcrPropertyMap
implements PersistableValueMap

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


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

Constructor Detail

JcrModifiablePropertyMap

public JcrModifiablePropertyMap(javax.jcr.Node node)
Method Detail

get

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

clear

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

put

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

putAll

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

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,java.lang.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 © 2007-2009. All Rights Reserved.