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, getMethods inherited from class org.apache.sling.api.wrappers.ValueMapDecorator
containsValue, entrySet, equals, hashCode, isEmpty, keySet, size, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, valuesMethods 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:
getin interfaceorg.apache.sling.api.resource.ValueMap- Overrides:
getin classorg.apache.sling.api.wrappers.DeepReadValueMapDecorator
-
put
-
putAll
-
remove
-
clear
public void clear()
-