Package com.adobe.granite.rest.utils
Class ModifiableMappedValueMapDecorator
java.lang.Object
org.apache.sling.api.wrappers.ValueMapDecorator
org.apache.sling.api.wrappers.ModifiableValueMapDecorator
com.adobe.granite.rest.utils.ModifiableMappedValueMapDecorator
- All Implemented Interfaces:
Map<String,,Object> ModifiableValueMap,ValueMap
A value map wrapper which implements mapping of certain property names.
By default the following properties are mapped.
- jcr:title to dc:title
- jcr:description to dc:description
- jcr:language to dc:language
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new wrapper around a given map.Creates a new wrapper around a given map. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) entrySet()keySet()static StringmapProperty(String unmappedName) Returns the unmapped property name for the providedunmappedName.voidstatic StringunmapProperty(String mappedName) Returns the unmapped property name for the providedmappedName.Methods inherited from class org.apache.sling.api.wrappers.ValueMapDecorator
clear, containsValue, equals, get, get, hashCode, isEmpty, remove, size, toString, valuesMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
ModifiableMappedValueMapDecorator
Creates a new wrapper around a given map.- Parameters:
base- Wrapped object
-
ModifiableMappedValueMapDecorator
Creates a new wrapper around a given map.- Parameters:
base- Wrapped object
-
-
Method Details
-
get
-
put
-
putAll
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object> - Overrides:
containsKeyin classValueMapDecorator
-
keySet
-
entrySet
-
mapProperty
Returns the unmapped property name for the providedunmappedName. The implementation of this method maps the propertiesjcr:title,jcr:description,jcr:languagetodc:title,dc:description,dc:language.- Parameters:
unmappedName- Unmapped property name- Returns:
- Mapped property name
-
unmapProperty
Returns the unmapped property name for the providedmappedName. The implementation of this method maps the propertiesdc:title,dc:description,dc:languagetojcr:title,jcr:description,jcr:language.- Parameters:
mappedName- Mapped property name- Returns:
- Unmapped property name
-