public class ValueMapResource extends SyntheticResource
RESOURCE_TYPE_NON_EXISTING| Constructor and Description |
|---|
ValueMapResource(ResourceResolver resourceResolver,
ResourceMetadata rm,
java.lang.String resourceType,
ValueMap vm)
Creates a
ValueMapResource based on provided parameters |
ValueMapResource(ResourceResolver resourceResolver,
ResourceMetadata rm,
java.lang.String resourceType,
ValueMap vm,
java.util.Collection<Resource> children)
Creates a
ValueMapResource based on provided parameters, with the ability to define the children |
ValueMapResource(ResourceResolver resourceResolver,
java.lang.String path,
java.lang.String resourceType,
ValueMap vm)
Creates a
ValueMapResource based on provided parameters |
ValueMapResource(ResourceResolver resourceResolver,
java.lang.String path,
java.lang.String resourceType,
ValueMap vm,
java.util.Collection<Resource> children)
Creates a
ValueMapResource based on provided parameters, with the ability to define the children |
| Modifier and Type | Method and Description |
|---|---|
<Type> Type |
adaptTo(java.lang.Class<Type> type)
Calls into the registered
AdapterManager to adapt this object to
the desired type. |
Resource |
getChild(java.lang.String relPath)
Returns the indicated child of this resource.
|
java.lang.Iterable<Resource> |
getChildren()
Returns an iterable of the direct children of this resource.
|
boolean |
hasChildren()
Checks to see if there are direct children of this resource by invoking
ResourceResolver.hasChildren(Resource). |
java.util.Iterator<Resource> |
listChildren()
Returns an iterator on the direct child resources.
|
getPath, getResourceMetadata, getResourceResolver, getResourceSuperType, getResourceType, toStringgetName, getParent, getValueMap, isResourceTypesetAdapterManager, unsetAdapterManagerpublic ValueMapResource(ResourceResolver resourceResolver, java.lang.String path, java.lang.String resourceType, ValueMap vm)
ValueMapResource based on provided parametersresourceResolver - The resource resolverpath - The resource pathresourceType - The resource typevm - The properties of the resourcepublic ValueMapResource(ResourceResolver resourceResolver, java.lang.String path, java.lang.String resourceType, ValueMap vm, java.util.Collection<Resource> children)
ValueMapResource based on provided parameters, with the ability to define the childrenresourceResolver - The resource resolverpath - The resource pathresourceType - The resource typevm - The properties of the resourcechildren - The children of the resourcepublic ValueMapResource(ResourceResolver resourceResolver, ResourceMetadata rm, java.lang.String resourceType, ValueMap vm)
ValueMapResource based on provided parametersresourceResolver - The resource resolverrm - The resource meta dataresourceType - The resource typevm - The properties of the resourcepublic ValueMapResource(ResourceResolver resourceResolver, ResourceMetadata rm, java.lang.String resourceType, ValueMap vm, java.util.Collection<Resource> children)
ValueMapResource based on provided parameters, with the ability to define the childrenresourceResolver - The resource resolverrm - The resource meta dataresourceType - The resource typevm - The properties of the resourcechildren - The children of the resourcepublic <Type> Type adaptTo(java.lang.Class<Type> type)
SlingAdaptableAdapterManager to adapt this object to
the desired type.
This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.
adaptTo in interface AdaptableadaptTo in class SlingAdaptableType - The generic type to which this resource is adapted
totype - The Class object of the target type, such as
javax.jcr.Node.class or
java.io.File.classnull if the resource cannot
adapt to the requested typepublic Resource getChild(java.lang.String relPath)
AbstractResource
This method is implemented calling the
ResourceResolver.getResource(Resource, String) method. As such
the relPath argument may even be an absolute path or a path
containing relative path segments . (current resource) and
.. (parent resource).
Implementations should not generally overwrite this method without calling this base class implementation.
getChild in interface ResourcegetChild in class AbstractResourceResource.getChild(String)public java.util.Iterator<Resource> listChildren()
AbstractResource
This method is implemented calling the
ResourceResolver.listChildren(Resource) method.
Implementations should not generally overwrite this method without calling this base class implementation.
listChildren in interface ResourcelistChildren in class AbstractResourceResource.listChildren()public java.lang.Iterable<Resource> getChildren()
Resource
This method is a convenience and returns exactly the same resources as
calling getResourceResolver().getChildren(resource).
getChildren in interface ResourcegetChildren in class AbstractResourceResource.getChildren()public boolean hasChildren()
AbstractResourceResourceResolver.hasChildren(Resource).hasChildren in interface ResourcehasChildren in class AbstractResourcetrue if the resource has any child resourcesResource.hasChildren()"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"