public class ValueMapResourceWrapper extends ResourceWrapper
ValueMap}, which can be modified accordingly. It is used for the
scenario where we want to control the ValueMap returned by a resource.RESOURCE_TYPE_NON_EXISTING| Constructor and Description |
|---|
ValueMapResourceWrapper(Resource resource,
java.lang.String resourceType)
Instantiates a new wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
<AdapterType> |
adaptTo(java.lang.Class<AdapterType> type)
Returns the value of calling
adaptTo on the
wrapped resource. |
java.lang.String |
getResourceType()
Returns the value of calling
getResourceType on the
wrapped resource. |
ValueMap |
getValueMap()
Returns a value map for this resource.
|
getChild, getChildren, getName, getParent, getPath, getResource, getResourceMetadata, getResourceResolver, getResourceSuperType, hasChildren, isResourceType, listChildren, toStringpublic ValueMapResourceWrapper(@Nonnull
Resource resource,
java.lang.String resourceType)
resource - The resource to wrapresourceType - The resource type of the resource wrapperpublic java.lang.String getResourceType()
ResourceWrappergetResourceType on the
wrapped resource.getResourceType in interface ResourcegetResourceType in class ResourceWrapperpublic <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
ResourceWrapperadaptTo on the
wrapped resource.adaptTo in interface AdaptableadaptTo in class ResourceWrapperAdapterType - The generic type to which this object is adapted
totype - The Class object of the target type, such as
javax.jcr.Node.class or
java.io.File.classnull if the object cannot
adapt to the requested typepublic ValueMap getValueMap()
ResourcegetValueMap in interface ResourcegetValueMap in class ResourceWrapperResource.getValueMap()Copyright © 2010 - 2023 Adobe. All Rights Reserved