info.magnolia.jcr.util
Class ContentMap

java.lang.Object
  extended by info.magnolia.jcr.util.ContentMap
All Implemented Interfaces:
Map<String,Object>

public class ContentMap
extends Object
implements Map<String,Object>

Map based representation of JCR content. This class is for instance used in template scripts to allow notations like content.propName. It first tries to read a property with name (key) and if not present checks for the presence of child node. Few special property names map to the JCR methods: \@name, \@id, \@path, \@level, \@nodeType


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ContentMap(javax.jcr.Node content)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object arg0)
           
 Set<Map.Entry<String,Object>> entrySet()
           
 Object get(Object key)
           
 javax.jcr.Node getJCRNode()
           
 boolean isEmpty()
           
 Set<String> keySet()
           
 Object put(String arg0, Object arg1)
           
 void putAll(Map<? extends String,? extends Object> arg0)
           
 Object remove(Object arg0)
           
 int size()
           
 Collection<Object> 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
equals, hashCode
 

Constructor Detail

ContentMap

public ContentMap(javax.jcr.Node content)
Method Detail

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,Object>

get

public Object get(Object key)
Specified by:
get in interface Map<String,Object>

size

public int size()
Specified by:
size in interface Map<String,Object>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,Object>

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>

values

public Collection<Object> values()
Specified by:
values in interface Map<String,Object>

containsValue

public boolean containsValue(Object arg0)
Specified by:
containsValue in interface Map<String,Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,Object>

clear

public void clear()
Specified by:
clear in interface Map<String,Object>

put

public Object put(String arg0,
                  Object arg1)
Specified by:
put in interface Map<String,Object>

putAll

public void putAll(Map<? extends String,? extends Object> arg0)
Specified by:
putAll in interface Map<String,Object>

remove

public Object remove(Object arg0)
Specified by:
remove in interface Map<String,Object>

getJCRNode

public javax.jcr.Node getJCRNode()


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.