Class MockValueMap
java.lang.Object
org.apache.sling.api.wrappers.ValueMapDecorator
org.apache.sling.api.wrappers.DeepReadValueMapDecorator
org.apache.sling.api.wrappers.DeepReadModifiableValueMapDecorator
org.apache.sling.testing.resourceresolver.MockValueMap
- All Implemented Interfaces:
Map<String,
,Object> org.apache.sling.api.resource.ModifiableValueMap
,org.apache.sling.api.resource.ValueMap
public class MockValueMap
extends org.apache.sling.api.wrappers.DeepReadModifiableValueMapDecorator
implements org.apache.sling.api.resource.ModifiableValueMap
ValueMap for mocked resources to mimick JCR-like behavior.
Implements the following conversions:
- Converts all Date values to Calendar objects internally and vice versa.
- Converts InputStream to byte array and vice versa.
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.apache.sling.api.resource.ValueMap
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionMockValueMap
(org.apache.sling.api.resource.Resource resource) MockValueMap
(org.apache.sling.api.resource.Resource resource, Map<String, Object> map) -
Method Summary
Methods inherited from class org.apache.sling.api.wrappers.DeepReadValueMapDecorator
containsKey, get, get
Methods inherited from class org.apache.sling.api.wrappers.ValueMapDecorator
containsValue, entrySet, equals, hashCode, isEmpty, keySet, size, toString, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
Methods inherited from interface org.apache.sling.api.resource.ValueMap
get
-
Constructor Details
-
MockValueMap
public MockValueMap(org.apache.sling.api.resource.Resource resource) -
MockValueMap
-
-
Method Details
-
get
- Specified by:
get
in interfaceorg.apache.sling.api.resource.ValueMap
- Overrides:
get
in classorg.apache.sling.api.wrappers.DeepReadValueMapDecorator
-
put
-
putAll
-
remove
-
clear
public void clear()
-