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, toString
public ValueMapResourceWrapper(@Nonnull Resource resource, java.lang.String resourceType)
resource
- The resource to wrapresourceType
- The resource type of the resource wrapperpublic java.lang.String getResourceType()
ResourceWrapper
getResourceType
on the
wrapped resource
.getResourceType
in interface Resource
getResourceType
in class ResourceWrapper
public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
ResourceWrapper
adaptTo
on the
wrapped resource
.adaptTo
in interface Adaptable
adaptTo
in class ResourceWrapper
AdapterType
- 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.class
null
if the object cannot
adapt to the requested typepublic ValueMap getValueMap()
Resource
getValueMap
in interface Resource
getValueMap
in class ResourceWrapper
Resource.getValueMap()
Copyright © 2010 - 2020 Adobe. All Rights Reserved