# Uses of Interface
org.apache.sling.api.resource.Resource

Packages that use Resource
Package
Description
org.apache.sling.api
org.apache.sling.api.request
org.apache.sling.api.request.builder
org.apache.sling.api.resource
org.apache.sling.api.resource.external
org.apache.sling.api.scripting
org.apache.sling.api.security
org.apache.sling.api.servlets
org.apache.sling.api.uri
org.apache.sling.api.wrappers
org.apache.sling.spi.resource.provider

## Uses of Resource in org.apache.sling.api

Methods in org.apache.sling.api that return Resource
Modifier and Type
Method
Description
`@NotNull Resource`
SlingHttpServletRequest.`getResource()`
Deprecated.
Returns the `Resource` object on whose behalf the servlet acts.
`@NotNull Resource`
SlingJakartaHttpServletRequest.`getResource()`
Returns the `Resource` object on whose behalf the servlet acts.
Methods in org.apache.sling.api with parameters of type Resource
Modifier and Type
Method
Description
`@Nullable javax.servlet.RequestDispatcher`
SlingHttpServletRequest.`getRequestDispatcher(@NotNull Resource resource)`
Deprecated.
Same as `SlingHttpServletRequest.getRequestDispatcher(Resource,RequestDispatcherOptions)` but using empty options.
`@Nullable javax.servlet.RequestDispatcher`
SlingHttpServletRequest.`getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options)`
Deprecated.
Returns a `RequestDispatcher` object that acts as a wrapper for the resource located at the given resource.
`@Nullable jakarta.servlet.RequestDispatcher`
SlingJakartaHttpServletRequest.`getRequestDispatcher(@NotNull Resource resource)`
Same as `SlingJakartaHttpServletRequest.getRequestDispatcher(Resource,RequestDispatcherOptions)` but using empty options.
`@Nullable jakarta.servlet.RequestDispatcher`
SlingJakartaHttpServletRequest.`getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options)`
Returns a `RequestDispatcher` object that acts as a wrapper for the resource located at the given resource.

## Uses of Resource in org.apache.sling.api.request

Methods in org.apache.sling.api.request that return Resource
Modifier and Type
Method
Description
`@Nullable Resource`
RequestPathInfo.`getSuffixResource()`
Returns the resource addressed by the suffix or null if the request does not have a suffix or the suffix does not address an accessible resource.

## Uses of Resource in org.apache.sling.api.request.builder

Methods in org.apache.sling.api.request.builder with parameters of type Resource
Modifier and Type
Method
Description
`static @NotNull SlingHttpServletRequestBuilder`
Builders.`newRequestBuilder(@NotNull Resource resource)`
Creates a new request builder.

## Uses of Resource in org.apache.sling.api.resource

Classes in org.apache.sling.api.resource that implement Resource
Modifier and Type
Class
Description
`class`
`AbstractResource`
The `AbstractResource` is an abstract implementation of the `Resource` interface.
`final class`
`NonExistingResource`
Simple helper class representing nonexisting resources.
`class`
`ResourceWrapper`
The `ResourceWrapper` is a wrapper for any `Resource` delegating all method calls to the wrapped resource by default.
`class`
`SyntheticResource`
The `SyntheticResource` class is a simple implementation of the `Resource` interface which may be used to provide a resource object which has no actual resource data (except for the mandatory property "sling:resourceType").
Methods in org.apache.sling.api.resource that return Resource
Modifier and Type
Method
Description
`Resource`
ResourceResolver.`copy(String srcAbsPath, String destAbsPath)`
This method copies the subgraph rooted at, and including, the resource at `srcAbsPath` to the new location at `destAbsPath` and adds it as a child node of the resource at `destAbsPath`.
`Resource`
ModifyingResourceProvider.`create(ResourceResolver resolver, String path, Map<String,Object> properties)`
Deprecated.
Create a new resource at the given path.
`@NotNull Resource`
ResourceResolver.`create(@NotNull Resource parent, @NotNull String name, Map<String,Object> properties)`
Add a child resource to the given parent resource.
`@Nullable Resource`
ResourceDecorator.`decorate(@NotNull Resource resource)`
Decorate a resource.
`default @Nullable Resource`
ResourceDecorator.`decorate(@NotNull Resource resource, @NotNull javax.servlet.http.HttpServletRequest request)`
Deprecated.
since 2.3.0 (and JCR Resource 2.1.0), this method will not be invoked.
`Resource`
AbstractResource.`getChild(String relPath)`
Returns the indicated child of this resource.
`@Nullable Resource`
Resource.`getChild(@NotNull String relPath)`
Returns the child at the given relative path of this resource or `null` if no such child exists.
`Resource`
ResourceWrapper.`getChild(@NotNull String relPath)`
Returns the value of calling `getChild` on the `wrapped resource`.
`static @NotNull Resource`
ResourceUtil.`getOrCreateResource(@NotNull ResourceResolver resolver, @NotNull String path, String resourceType, String intermediateResourceType, boolean autoCommit)`
Creates or gets the resource at the given path.
`static @NotNull Resource`
ResourceUtil.`getOrCreateResource(@NotNull ResourceResolver resolver, @NotNull String path, Map<String,Object> resourceProperties, String intermediateResourceType, boolean autoCommit)`
Creates or gets the resource at the given path.
`Resource`
AbstractResource.`getParent()`
Returns the parent resource of this resource.
`Resource`
NonExistingResource.`getParent()`
`@Nullable Resource`
Resource.`getParent()`
Returns the parent resource or `null` if this resource represents the root of the resource tree.
`@Nullable Resource`
ResourceResolver.`getParent(@NotNull Resource child)`
Returns the parent resource of this resource.
`static @Nullable Resource`
ResourceUtil.`getParent(@NotNull Resource rsrc)`
Deprecated.
since 2.1.0, use `getParent()` instead
`Resource`
ResourceWrapper.`getParent()`
Returns the value of calling `getParent` on the `wrapped resource`.
`@Nullable Resource`
ParametrizableResourceProvider.`getResource(@NotNull ResourceResolver resourceResolver, @NotNull String path, @NotNull Map<String,String> parameters)`
Deprecated.
Returns a resource from this resource provider or `null` if the resource provider cannot find it.
`@Nullable Resource`
ResourceProvider.`getResource(@NotNull ResourceResolver resourceResolver, @NotNull String path)`
Deprecated.
Returns a resource from this resource provider or `null` if the resource provider cannot find it.
`@Nullable Resource`
ResourceProvider.`getResource(@NotNull ResourceResolver resourceResolver, @NotNull javax.servlet.http.HttpServletRequest request, @NotNull String path)`
Deprecated.
since 2.2.0 (and JCR Resource 2.1.0), this method will not be invoked.
`@Nullable Resource`
ResourceResolver.`getResource(@NotNull String path)`
Returns a `Resource` object for data located at the given path.
`@Nullable Resource`
ResourceResolver.`getResource(Resource base, @NotNull String path)`
Returns a `Resource` object for data located at the given path.
`@NotNull Resource`
ResourceWrapper.`getResource()`
Returns the `Resource` wrapped by this instance.
`Resource`
ResourceResolver.`move(String srcAbsPath, String destAbsPath)`
This method moves the subgraph rooted at, and including, the resource at `srcAbsPath` to the new location at `destAbsPath` and adds it as a child node of the resource at `destAbsPath`.
`@NotNull Resource`
ResourceResolver.`resolve(@NotNull jakarta.servlet.http.HttpServletRequest request, @NotNull String absPath)`
Resolves the resource from the given `absPath` optionally taking `HttpServletRequest` into account, such as the value of the `Host` request header.
`@NotNull Resource`
ResourceResolver.`resolve(@NotNull String absPath)`
Resolves the resource from the given absolute path.
`@NotNull Resource`
ResourceResolver.`resolve(javax.servlet.http.HttpServletRequest request)`
Deprecated.
as of 2.0.4, use `ResourceResolver.resolve(HttpServletRequest, String)` instead.
`@NotNull Resource`
ResourceResolver.`resolve(javax.servlet.http.HttpServletRequest request, @NotNull String absPath)`
Deprecated.
Use `ResourceResolver.resolve(HttpServletRequest, String)` instead.
`static @NotNull Resource`
ResourceUtil.`unwrap(@NotNull Resource rsrc)`
Unwrap the resource and return the wrapped implementation.
Methods in org.apache.sling.api.resource that return types with arguments of type Resource
Modifier and Type
Method
Description
`Iterator<Resource>`
QueriableResourceProvider.`findResources(ResourceResolver resolver, String query, String language)`
Deprecated.
Searches for resources using the given query formulated in the given language.
`@NotNull Iterator<Resource>`
ResourceResolver.`findResources(@NotNull String query, String language)`
Searches for resources using the given query formulated in the given language.
`Iterable<Resource>`
AbstractResource.`getChildren()`
`@NotNull Iterable<Resource>`
Resource.`getChildren()`
Returns an iterable of the direct children of this resource.
`@NotNull Iterable<Resource>`
ResourceResolver.`getChildren(@NotNull Resource parent)`
Returns an `Iterable` of `Resource` objects loaded from the children of the given `Resource`.
`@NotNull Iterable<Resource>`
ResourceWrapper.`getChildren()`
`Iterator<Resource>`
AbstractResource.`listChildren()`
Returns an iterator on the direct child resources.
`@NotNull Iterator<Resource>`
Resource.`listChildren()`
Returns an iterator of the direct children of this resource.
`@Nullable Iterator<Resource>`
ResourceProvider.`listChildren(@NotNull Resource parent)`
Deprecated.
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
`@NotNull Iterator<Resource>`
ResourceResolver.`listChildren(@NotNull Resource parent)`
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
`static @NotNull Iterator<Resource>`
ResourceUtil.`listChildren(@NotNull Resource parent)`
Deprecated.
since 2.1.0, use `listChildren()` instead
`@NotNull Iterator<Resource>`
ResourceWrapper.`listChildren()`
Returns the value of calling `listChildren` on the `wrapped resource`.
Methods in org.apache.sling.api.resource with parameters of type Resource
Modifier and Type
Method
Description
`void`
AbstractResourceVisitor.`accept(Resource res)`
Visit the given resource and all its descendants.
`@NotNull Resource`
ResourceResolver.`create(@NotNull Resource parent, @NotNull String name, Map<String,Object> properties)`
Add a child resource to the given parent resource.
`static String`
ResourceUtil.`createUniqueChildName(Resource parent, String name)`
Create a unique name for a child of the `parent`.
`@Nullable Resource`
ResourceDecorator.`decorate(@NotNull Resource resource)`
Decorate a resource.
`default @Nullable Resource`
ResourceDecorator.`decorate(@NotNull Resource resource, @NotNull javax.servlet.http.HttpServletRequest request)`
Deprecated.
since 2.3.0 (and JCR Resource 2.1.0), this method will not be invoked.
`void`
ResourceResolver.`delete(@NotNull Resource resource)`
Delete the resource Deleting a non existing resource leads to no operation nor exception.
`void`
ResourceUtil.BatchResourceRemover.`delete(@NotNull Resource rsrc)`
`static @Nullable String`
ResourceUtil.`findResourceSuperType(@NotNull Resource resource)`
Deprecated.
Use `ResourceResolver.getParentResourceType(Resource)`
`@NotNull Iterable<Resource>`
ResourceResolver.`getChildren(@NotNull Resource parent)`
Returns an `Iterable` of `Resource` objects loaded from the children of the given `Resource`.
`static @NotNull String`
ResourceUtil.`getName(@NotNull Resource rsrc)`
Deprecated.
since 2.1.0, use `getName()` instead
`@Nullable Resource`
ResourceResolver.`getParent(@NotNull Resource child)`
Returns the parent resource of this resource.
`static @Nullable Resource`
ResourceUtil.`getParent(@NotNull Resource rsrc)`
Deprecated.
since 2.1.0, use `getParent()` instead
`@Nullable String`
ResourceResolver.`getParentResourceType(Resource resource)`
Returns the super type of the given resource.
`@Nullable Resource`
ResourceResolver.`getResource(Resource base, @NotNull String path)`
Returns a `Resource` object for data located at the given path.
`static @NotNull ValueMap`
ResourceUtil.`getValueMap(Resource res)`
Returns an `ValueMap` object for the given `Resource`.
`boolean`
ResourceResolver.`hasChildren(@NotNull Resource resource)`
Checks if the specified resource has any direct child resources.
`static boolean`
ResourceUtil.`isA(@NotNull Resource resource, String resourceType)`
Deprecated.
Use `ResourceResolver.isResourceType(Resource, String)`
`static boolean`
ResourceUtil.`isNonExistingResource(@NotNull Resource res)`
Returns `true` if the resource `res` is a non-existing resource.
`boolean`
ResourceResolver.`isResourceType(Resource resource, String resourceType)`
Returns `true` if the resource type or any of the resource's super type(s) equals the given resource type.
`static boolean`
ResourceUtil.`isStarResource(@NotNull Resource res)`
Returns `true` if the resource `res` is a "star resource".
`static boolean`
ResourceUtil.`isSyntheticResource(@NotNull Resource res)`
Returns `true` if the resource `res` is a synthetic resource.
`@Nullable Iterator<Resource>`
ResourceProvider.`listChildren(@NotNull Resource parent)`
Deprecated.
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
`@NotNull Iterator<Resource>`
ResourceResolver.`listChildren(@NotNull Resource parent)`
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
`static @NotNull Iterator<Resource>`
ResourceUtil.`listChildren(@NotNull Resource parent)`
Deprecated.
since 2.1.0, use `listChildren()` instead
`boolean`
ResourceResolver.`orderBefore(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName)`
Orders the child resources returned by `ResourceResolver.getChildren(Resource)` and `ResourceResolver.listChildren(Resource)` so that a given resource is listed before the given sibling resource.
`static @NotNull Resource`
ResourceUtil.`unwrap(@NotNull Resource rsrc)`
Unwrap the resource and return the wrapped implementation.
`protected abstract void`
AbstractResourceVisitor.`visit(@NotNull Resource res)`
Implement this method to do actual work on the resources.
Method parameters in org.apache.sling.api.resource with type arguments of type Resource
Modifier and Type
Method
Description
`static <T> @NotNull Iterator<T>`
ResourceUtil.`adaptTo(@NotNull Iterator<Resource> iterator, Class<T> type)`
Return an iterator for objects of the specified type.
`protected void`
AbstractResourceVisitor.`traverseChildren(@NotNull Iterator<Resource> children)`
Visit the given resources.
Constructors in org.apache.sling.api.resource with parameters of type Resource
Modifier
Constructor
Description
``
`ResourceWrapper(@NotNull Resource resource)`
Creates a new wrapper instance delegating all method calls to the given `resource`.

## Uses of Resource in org.apache.sling.api.resource.external

Methods in org.apache.sling.api.resource.external with parameters of type Resource
Modifier and Type
Method
Description
`@NotNull URI`
URIProvider.`toURI(@NotNull Resource resource, URIProvider.Scope scope, URIProvider.Operation operation)`
Return a URI applicable to the defined scope.

## Uses of Resource in org.apache.sling.api.scripting

Methods in org.apache.sling.api.scripting that return Resource
Modifier and Type
Method
Description
`@Nullable Resource`
SlingBindings.`getResource()`
Returns the `SlingBindings.RESOURCE` property if not `null` and a `Resource` instance.
`@NotNull Resource`
SlingScript.`getScriptResource()`
Returns the Resource providing the script source code.
Methods in org.apache.sling.api.scripting with parameters of type Resource
Modifier and Type
Method
Description
`void`
SlingScriptHelper.`forward(@NotNull Resource resource)`
Same as `SlingScriptHelper.forward(Resource,RequestDispatcherOptions)`, but using empty options.
`void`
SlingScriptHelper.`forward(@NotNull Resource resource, String requestDispatcherOptions)`
Helper method to forward the request to a Servlet or script for the given `resource` and `requestDispatcherOptions`.
`void`
SlingScriptHelper.`forward(@NotNull Resource resource, RequestDispatcherOptions options)`
Helper method to forward the request to a Servlet or script for the given `resource` and `options`.
`void`
SlingScriptHelper.`include(@NotNull Resource resource)`
Same as `SlingScriptHelper.include(Resource,RequestDispatcherOptions)`, but using empty options.
`void`
SlingScriptHelper.`include(@NotNull Resource resource, String requestDispatcherOptions)`
Helper method to include the result of processing the request for the given `resource` and `requestDispatcherOptions`.
`void`
SlingScriptHelper.`include(@NotNull Resource resource, RequestDispatcherOptions options)`
Helper method to include the result of processing the request for the given `resource` and `options`.
`void`
SlingBindings.`setResource(Resource resource)`
Sets the `SlingBindings.RESOURCE` property to `resource` if not `null`.

## Uses of Resource in org.apache.sling.api.security

Methods in org.apache.sling.api.security that return Resource
Modifier and Type
Method
Description
`@Nullable Resource`
ResourceAccessSecurity.`getReadableResource(Resource resource)`
If supplied Resource can be read, return it (or a wrapped variant of it).
Methods in org.apache.sling.api.security with parameters of type Resource
Modifier and Type
Method
Description
`boolean`
ResourceAccessSecurity.`canDelete(@NotNull Resource resource)`
Check whether a resource can be deleted at the path.
`boolean`
ResourceAccessSecurity.`canDeleteValue(@NotNull Resource resource, @NotNull String valueName)`
Check whether a value can be deleted
`boolean`
ResourceAccessSecurity.`canExecute(@NotNull Resource resource)`
Check whether a resource can be executed at the path.
`default boolean`
ResourceAccessSecurity.`canOrderChildren(@NotNull Resource resource)`
Check whether child resources can be ordered.
`boolean`
ResourceAccessSecurity.`canReadValue(@NotNull Resource resource, @NotNull String valueName)`
Check whether a value can be read
`boolean`
ResourceAccessSecurity.`canSetValue(@NotNull Resource resource, @NotNull String valueName)`
Check whether a value can be set
`boolean`
ResourceAccessSecurity.`canUpdate(@NotNull Resource resource)`
Check whether a resource can be updated at the path.
`@Nullable Resource`
ResourceAccessSecurity.`getReadableResource(Resource resource)`
If supplied Resource can be read, return it (or a wrapped variant of it).

## Uses of Resource in org.apache.sling.api.servlets

Methods in org.apache.sling.api.servlets with parameters of type Resource
Modifier and Type
Method
Description
`@Nullable jakarta.servlet.Servlet`
ServletResolver.`resolve(@NotNull Resource resource, @NotNull String scriptName)`
Resolves a `jakarta.servlet.Servlet` whose `service` method may be used to handle a request.
`javax.servlet.Servlet`
ServletResolver.`resolveServlet(@NotNull Resource resource, @NotNull String scriptName)`
Deprecated.
Use `ServletResolver.resolve(Resource, String)` instead.

## Uses of Resource in org.apache.sling.api.uri

Methods in org.apache.sling.api.uri that return Resource
Modifier and Type
Method
Description
`@Nullable Resource`
SlingUri.`getSuffixResource()`
Returns the corresponding suffix resource or null if no resource resolver is available (depends on the create method used in SlingUriBuilder) the URI does not contain a suffix if the suffix resource could not be found
`@Nullable Resource`
SlingUriBuilder.`getSuffixResource()`
Returns the corresponding suffix resource or null if no resource resolver is available (depends on the create method used in SlingUriBuilder) the URI does not contain a suffix if the suffix resource could not be found
Methods in org.apache.sling.api.uri with parameters of type Resource
Modifier and Type
Method
Description
`static @NotNull SlingUriBuilder`
SlingUriBuilder.`createFrom(@NotNull Resource resource)`
Creates a builder from a resource (only taking the resource path into account).

## Uses of Resource in org.apache.sling.api.wrappers

Methods in org.apache.sling.api.wrappers that return Resource
Modifier and Type
Method
Description
`Resource`
ResourceResolverWrapper.`copy(String srcAbsPath, String destAbsPath)`
Wraps the `Resource` obtained by calling `copy` on the wrapped resource resolver.
`@NotNull Resource`
ResourceResolverWrapper.`create(@NotNull Resource parent, @NotNull String name, Map<String,Object> properties)`
Wraps the `Resource` obtained by calling `create` on the wrapped resource resolver.
`Resource`
ResourceResolverWrapper.`getParent(@NotNull Resource child)`
Wraps and returns the `Resource` obtained by calling `getParent` on the wrapped resource resolver.
`@NotNull Resource`
JakartaToJavaxRequestWrapper.`getResource()`
`@NotNull Resource`
JavaxToJakartaRequestWrapper.`getResource()`
`Resource`
ResourceResolverWrapper.`getResource(@NotNull String path)`
Wraps and returns the `Resource` obtained by calling `getResource` on the wrapped resource resolver.
`Resource`
ResourceResolverWrapper.`getResource(Resource base, @NotNull String path)`
Wraps and returns the `Resource` obtained by calling `getResource` on the wrapped resource resolver.
`Resource`
SlingHttpServletRequestWrapper.`getResource()`
Deprecated.
`Resource`
SlingJakartaHttpServletRequestWrapper.`getResource()`
`@Nullable Resource`
RequestPathInfoWrapper.`getSuffixResource()`
`Resource`
ResourceResolverWrapper.`move(String srcAbsPath, String destAbsPath)`
Wraps the `Resource` obtained by calling `move` on the wrapped resource resolver.
`@NotNull Resource`
ResourceResolverWrapper.`resolve(@NotNull jakarta.servlet.http.HttpServletRequest request, @NotNull String absPath)`
Wraps and returns the `Resource` obtained by calling `resolve` on the wrapped resource resolver.
`@NotNull Resource`
ResourceResolverWrapper.`resolve(@NotNull String absPath)`
Wraps and returns the `Resource` obtained by calling `resolve` on the wrapped resource resolver.
`@NotNull Resource`
ResourceResolverWrapper.`resolve(javax.servlet.http.HttpServletRequest request)`
Wraps and returns the `Resource` obtained by calling `resolve` on the wrapped resource resolver.
`@NotNull Resource`
ResourceResolverWrapper.`resolve(javax.servlet.http.HttpServletRequest request, @NotNull String absPath)`
Deprecated.
Methods in org.apache.sling.api.wrappers that return types with arguments of type Resource
Modifier and Type
Method
Description
`@NotNull Iterator<Resource>`
ResourceResolverWrapper.`findResources(@NotNull String query, String language)`
Wraps and returns the `Iterator` obtained by calling `findResources` on the wrapped resource resolver.
`@NotNull Iterable<Resource>`
ResourceResolverWrapper.`getChildren(@NotNull Resource parent)`
Wraps and returns the `Iterable` obtained by calling `getChildren` on the wrapped resource resolver.
`@NotNull Iterator<Resource>`
ResourceResolverWrapper.`listChildren(@NotNull Resource parent)`
Wraps and returns the `Iterator` obtained by calling `listChildren` on the wrapped resource resolver.
Methods in org.apache.sling.api.wrappers with parameters of type Resource
Modifier and Type
Method
Description
`@NotNull Resource`
ResourceResolverWrapper.`create(@NotNull Resource parent, @NotNull String name, Map<String,Object> properties)`
Wraps the `Resource` obtained by calling `create` on the wrapped resource resolver.
`void`
ResourceResolverWrapper.`delete(@NotNull Resource resource)`
`@NotNull Iterable<Resource>`
ResourceResolverWrapper.`getChildren(@NotNull Resource parent)`
Wraps and returns the `Iterable` obtained by calling `getChildren` on the wrapped resource resolver.
`Resource`
ResourceResolverWrapper.`getParent(@NotNull Resource child)`
Wraps and returns the `Resource` obtained by calling `getParent` on the wrapped resource resolver.
`String`
ResourceResolverWrapper.`getParentResourceType(Resource resource)`
`@Nullable javax.servlet.RequestDispatcher`
JakartaToJavaxRequestWrapper.`getRequestDispatcher(@NotNull Resource resource)`
`@Nullable javax.servlet.RequestDispatcher`
JakartaToJavaxRequestWrapper.`getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options)`
`@Nullable jakarta.servlet.RequestDispatcher`
JavaxToJakartaRequestWrapper.`getRequestDispatcher(@NotNull Resource resource)`
`@Nullable jakarta.servlet.RequestDispatcher`
JavaxToJakartaRequestWrapper.`getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options)`
`javax.servlet.RequestDispatcher`
SlingHttpServletRequestWrapper.`getRequestDispatcher(Resource resource)`
Deprecated.
`javax.servlet.RequestDispatcher`
SlingHttpServletRequestWrapper.`getRequestDispatcher(Resource resource, RequestDispatcherOptions options)`
Deprecated.
`jakarta.servlet.RequestDispatcher`
SlingJakartaHttpServletRequestWrapper.`getRequestDispatcher(Resource resource)`
`jakarta.servlet.RequestDispatcher`
SlingJakartaHttpServletRequestWrapper.`getRequestDispatcher(Resource resource, RequestDispatcherOptions options)`
`Resource`
ResourceResolverWrapper.`getResource(Resource base, @NotNull String path)`
Wraps and returns the `Resource` obtained by calling `getResource` on the wrapped resource resolver.
`boolean`
ResourceResolverWrapper.`hasChildren(@NotNull Resource resource)`
`boolean`
ResourceResolverWrapper.`isResourceType(Resource resource, String resourceType)`
`@NotNull Iterator<Resource>`
ResourceResolverWrapper.`listChildren(@NotNull Resource parent)`
Wraps and returns the `Iterator` obtained by calling `listChildren` on the wrapped resource resolver.
`boolean`
ResourceResolverWrapper.`orderBefore(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName)`
Constructors in org.apache.sling.api.wrappers with parameters of type Resource
Modifier
Constructor
Description
``
`DeepReadModifiableValueMapDecorator(Resource resource, ValueMap base)`
``
`DeepReadValueMapDecorator(Resource resource, ValueMap base)`

## Uses of Resource in org.apache.sling.spi.resource.provider

Methods in org.apache.sling.spi.resource.provider that return Resource
Modifier and Type
Method
Description
`@NotNull Resource`
ResourceProvider.`create(@NotNull ResolveContext<T> ctx, String path, Map<String,Object> properties)`
Create a new resource at the given path.
`@Nullable Resource`
ResourceProvider.`getParent(@NotNull ResolveContext<T> ctx, @NotNull Resource child)`
Returns the parent resource from this resource provider or `null` if the resource provider cannot find it.
`abstract @Nullable Resource`
ResourceProvider.`getResource(@NotNull ResolveContext<T> ctx, @NotNull String path, @NotNull ResourceContext resourceContext, @Nullable Resource parent)`
Returns a resource from this resource provider or `null` if the resource provider cannot find it.
Methods in org.apache.sling.spi.resource.provider that return types with arguments of type Resource
Modifier and Type
Method
Description
`Iterator<Resource>`
QueryLanguageProvider.`findResources(@NotNull ResolveContext<T> ctx, String query, String language)`
Searches for resources using the given query formulated in the given language.
`abstract @Nullable Iterator<Resource>`
ResourceProvider.`listChildren(@NotNull ResolveContext<T> ctx, @NotNull Resource parent)`
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
Methods in org.apache.sling.spi.resource.provider with parameters of type Resource
Modifier and Type
Method
Description
`void`
ResourceProvider.`delete(@NotNull ResolveContext<T> ctx, @NotNull Resource resource)`
Delete the resource at the given path.
`@Nullable Resource`
ResourceProvider.`getParent(@NotNull ResolveContext<T> ctx, @NotNull Resource child)`
Returns the parent resource from this resource provider or `null` if the resource provider cannot find it.
`abstract @Nullable Resource`
ResourceProvider.`getResource(@NotNull ResolveContext<T> ctx, @NotNull String path, @NotNull ResourceContext resourceContext, @Nullable Resource parent)`
Returns a resource from this resource provider or `null` if the resource provider cannot find it.
`abstract @Nullable Iterator<Resource>`
ResourceProvider.`listChildren(@NotNull ResolveContext<T> ctx, @NotNull Resource parent)`
Returns an `Iterator` of `Resource` objects loaded from the children of the given `Resource`.
`boolean`
ResourceProvider.`orderBefore(@NotNull ResolveContext<T> ctx, @NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName)`
Orders the child resources returned by `ResourceProvider.listChildren(ResolveContext, Resource)` so that a given resource is listed before the given sibling resource.