info.magnolia.dam.asset.model
Class AssetMap
java.lang.Object
info.magnolia.dam.asset.model.AssetMap
- All Implemented Interfaces:
- Map<String,Object>
public class AssetMap
- extends Object
- implements Map<String,Object>
Map based read only representation of an Asset. This class is for
instance used in template scripts to allow notations like
asset.propName
.
It read a property with name (key) and return his value. If not found an
empty string is returned.
Binary data will not be part of the AssetMap.
Try to access the property name from the Asset object.
key = fileName, returned value is Asset.getFileName().
If not found try to access the value based on the Metadata map.
key = contributor, returned value is metadataMap.get('contributor').
If not part of the MetadataMap, return an empty String.
By convenience
We also support asset.metadata.dc or asset.metadata.mgnl call for metadata
property access.
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AssetMap
public AssetMap(Asset asset,
Map<String,Object> metadataMap)
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>
keySet
public Set<String> keySet()
- Specified by:
keySet
in interface Map<String,Object>
size
public int size()
- Specified by:
size
in interface Map<String,Object>
values
public Collection<Object> values()
- Specified by:
values
in interface Map<String,Object>
entrySet
public Set<Map.Entry<String,Object>> entrySet()
- Specified by:
entrySet
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>
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.