Uses of Interface
org.apache.sling.api.resource.Resource
Packages that use Resource
Package
Description
-
Uses of Resource in org.apache.sling.api
Methods in org.apache.sling.api that return ResourceModifier and TypeMethodDescription@NotNull ResourceSlingHttpServletRequest.getResource()Deprecated.Returns theResourceobject on whose behalf the servlet acts.@NotNull ResourceSlingJakartaHttpServletRequest.getResource()Returns theResourceobject on whose behalf the servlet acts.Methods in org.apache.sling.api with parameters of type ResourceModifier and TypeMethodDescription@Nullable javax.servlet.RequestDispatcherSlingHttpServletRequest.getRequestDispatcher(@NotNull Resource resource) Deprecated.Same asSlingHttpServletRequest.getRequestDispatcher(Resource,RequestDispatcherOptions)but using empty options.@Nullable javax.servlet.RequestDispatcherSlingHttpServletRequest.getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options) Deprecated.Returns aRequestDispatcherobject that acts as a wrapper for the resource located at the given resource.@Nullable jakarta.servlet.RequestDispatcherSlingJakartaHttpServletRequest.getRequestDispatcher(@NotNull Resource resource) Same asSlingJakartaHttpServletRequest.getRequestDispatcher(Resource,RequestDispatcherOptions)but using empty options.@Nullable jakarta.servlet.RequestDispatcherSlingJakartaHttpServletRequest.getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options) Returns aRequestDispatcherobject 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 ResourceModifier and TypeMethodDescription@Nullable ResourceRequestPathInfo.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 ResourceModifier and TypeMethodDescriptionstatic @NotNull SlingHttpServletRequestBuilderBuilders.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 ResourceModifier and TypeClassDescriptionclassTheAbstractResourceis an abstract implementation of theResourceinterface.final classSimple helper class representing nonexisting resources.classTheResourceWrapperis a wrapper for anyResourcedelegating all method calls to the wrapped resource by default.classTheSyntheticResourceclass is a simple implementation of theResourceinterface 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 ResourceModifier and TypeMethodDescriptionThis method copies the subgraph rooted at, and including, the resource atsrcAbsPathto the new location atdestAbsPathand adds it as a child node of the resource atdestAbsPath.ModifyingResourceProvider.create(ResourceResolver resolver, String path, Map<String, Object> properties) Deprecated.Create a new resource at the given path.@NotNull ResourceResourceResolver.create(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Add a child resource to the given parent resource.@Nullable ResourceDecorate a resource.default @Nullable ResourceResourceDecorator.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.Returns the indicated child of this resource.@Nullable ResourceReturns the child at the given relative path of this resource ornullif no such child exists.Returns the value of callinggetChildon thewrapped resource.static @NotNull ResourceResourceUtil.getOrCreateResource(@NotNull ResourceResolver resolver, @NotNull String path, String resourceType, String intermediateResourceType, boolean autoCommit) Creates or gets the resource at the given path.static @NotNull ResourceResourceUtil.getOrCreateResource(@NotNull ResourceResolver resolver, @NotNull String path, Map<String, Object> resourceProperties, String intermediateResourceType, boolean autoCommit) Creates or gets the resource at the given path.AbstractResource.getParent()Returns the parent resource of this resource.NonExistingResource.getParent()@Nullable ResourceResource.getParent()Returns the parent resource ornullif this resource represents the root of the resource tree.@Nullable ResourceReturns the parent resource of this resource.static @Nullable ResourceDeprecated.since 2.1.0, usegetParent()insteadResourceWrapper.getParent()Returns the value of callinggetParenton thewrapped resource.@Nullable ResourceParametrizableResourceProvider.getResource(@NotNull ResourceResolver resourceResolver, @NotNull String path, @NotNull Map<String, String> parameters) Deprecated.Returns a resource from this resource provider ornullif the resource provider cannot find it.@Nullable ResourceResourceProvider.getResource(@NotNull ResourceResolver resourceResolver, @NotNull String path) Deprecated.Returns a resource from this resource provider ornullif the resource provider cannot find it.@Nullable ResourceResourceProvider.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 ResourceResourceResolver.getResource(@NotNull String path) Returns aResourceobject for data located at the given path.@Nullable ResourceResourceResolver.getResource(Resource base, @NotNull String path) Returns aResourceobject for data located at the given path.@NotNull ResourceResourceWrapper.getResource()Returns theResourcewrapped by this instance.This method moves the subgraph rooted at, and including, the resource atsrcAbsPathto the new location atdestAbsPathand adds it as a child node of the resource atdestAbsPath.@NotNull ResourceResourceResolver.resolve(@NotNull jakarta.servlet.http.HttpServletRequest request, @NotNull String absPath) Resolves the resource from the givenabsPathoptionally takingHttpServletRequestinto account, such as the value of theHostrequest header.@NotNull ResourceResolves the resource from the given absolute path.@NotNull ResourceResourceResolver.resolve(javax.servlet.http.HttpServletRequest request) Deprecated.as of 2.0.4, useResourceResolver.resolve(HttpServletRequest, String)instead.@NotNull ResourceDeprecated.UseResourceResolver.resolve(HttpServletRequest, String)instead.static @NotNull ResourceUnwrap the resource and return the wrapped implementation.Methods in org.apache.sling.api.resource that return types with arguments of type ResourceModifier and TypeMethodDescriptionQueriableResourceProvider.findResources(ResourceResolver resolver, String query, String language) Deprecated.Searches for resources using the given query formulated in the given language.ResourceResolver.findResources(@NotNull String query, String language) Searches for resources using the given query formulated in the given language.AbstractResource.getChildren()Resource.getChildren()Returns an iterable of the direct children of this resource.ResourceResolver.getChildren(@NotNull Resource parent) ResourceWrapper.getChildren()AbstractResource.listChildren()Returns an iterator on the direct child resources.Resource.listChildren()Returns an iterator of the direct children of this resource.ResourceProvider.listChildren(@NotNull Resource parent) Deprecated.ResourceResolver.listChildren(@NotNull Resource parent) ResourceUtil.listChildren(@NotNull Resource parent) Deprecated.since 2.1.0, uselistChildren()insteadResourceWrapper.listChildren()Returns the value of callinglistChildrenon thewrapped resource.Methods in org.apache.sling.api.resource with parameters of type ResourceModifier and TypeMethodDescriptionvoidVisit the given resource and all its descendants.@NotNull ResourceResourceResolver.create(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Add a child resource to the given parent resource.static StringResourceUtil.createUniqueChildName(Resource parent, String name) Create a unique name for a child of theparent.@Nullable ResourceDecorate a resource.default @Nullable ResourceResourceDecorator.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.voidDelete the resource Deleting a non existing resource leads to no operation nor exception.voidstatic @Nullable StringResourceUtil.findResourceSuperType(@NotNull Resource resource) Deprecated.ResourceResolver.getChildren(@NotNull Resource parent) static @NotNull StringDeprecated.since 2.1.0, usegetName()instead@Nullable ResourceReturns the parent resource of this resource.static @Nullable ResourceDeprecated.since 2.1.0, usegetParent()instead@Nullable StringResourceResolver.getParentResourceType(Resource resource) Returns the super type of the given resource.@Nullable ResourceResourceResolver.getResource(Resource base, @NotNull String path) Returns aResourceobject for data located at the given path.static @NotNull ValueMapResourceUtil.getValueMap(Resource res) Returns anValueMapobject for the givenResource.booleanResourceResolver.hasChildren(@NotNull Resource resource) Checks if the specified resource has any direct child resources.static booleanDeprecated.static booleanResourceUtil.isNonExistingResource(@NotNull Resource res) Returnstrueif the resourceresis a non-existing resource.booleanResourceResolver.isResourceType(Resource resource, String resourceType) Returnstrueif the resource type or any of the resource's super type(s) equals the given resource type.static booleanResourceUtil.isStarResource(@NotNull Resource res) Returnstrueif the resourceresis a "star resource".static booleanResourceUtil.isSyntheticResource(@NotNull Resource res) Returnstrueif the resourceresis a synthetic resource.ResourceProvider.listChildren(@NotNull Resource parent) Deprecated.ResourceResolver.listChildren(@NotNull Resource parent) ResourceUtil.listChildren(@NotNull Resource parent) Deprecated.since 2.1.0, uselistChildren()insteadbooleanResourceResolver.orderBefore(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) Orders the child resources returned byResourceResolver.getChildren(Resource)andResourceResolver.listChildren(Resource)so that a given resource is listed before the given sibling resource.static @NotNull ResourceUnwrap the resource and return the wrapped implementation.protected abstract voidImplement this method to do actual work on the resources.Method parameters in org.apache.sling.api.resource with type arguments of type ResourceModifier and TypeMethodDescriptionstatic <T> @NotNull Iterator<T>Return an iterator for objects of the specified type.protected voidAbstractResourceVisitor.traverseChildren(@NotNull Iterator<Resource> children) Visit the given resources.Constructors in org.apache.sling.api.resource with parameters of type ResourceModifierConstructorDescriptionResourceWrapper(@NotNull Resource resource) Creates a new wrapper instance delegating all method calls to the givenresource. -
Uses of Resource in org.apache.sling.api.resource.external
Methods in org.apache.sling.api.resource.external with parameters of type ResourceModifier and TypeMethodDescription@NotNull URIURIProvider.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 ResourceModifier and TypeMethodDescription@Nullable ResourceSlingBindings.getResource()@NotNull ResourceSlingScript.getScriptResource()Returns the Resource providing the script source code.Methods in org.apache.sling.api.scripting with parameters of type ResourceModifier and TypeMethodDescriptionvoidSame asSlingScriptHelper.forward(Resource,RequestDispatcherOptions), but using empty options.voidHelper method to forward the request to a Servlet or script for the givenresourceandrequestDispatcherOptions.voidSlingScriptHelper.forward(@NotNull Resource resource, RequestDispatcherOptions options) Helper method to forward the request to a Servlet or script for the givenresourceandoptions.voidSame asSlingScriptHelper.include(Resource,RequestDispatcherOptions), but using empty options.voidHelper method to include the result of processing the request for the givenresourceandrequestDispatcherOptions.voidSlingScriptHelper.include(@NotNull Resource resource, RequestDispatcherOptions options) Helper method to include the result of processing the request for the givenresourceandoptions.voidSlingBindings.setResource(Resource resource) -
Uses of Resource in org.apache.sling.api.security
Methods in org.apache.sling.api.security that return ResourceModifier and TypeMethodDescription@Nullable ResourceResourceAccessSecurity.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 ResourceModifier and TypeMethodDescriptionbooleanCheck whether a resource can be deleted at the path.booleanResourceAccessSecurity.canDeleteValue(@NotNull Resource resource, @NotNull String valueName) Check whether a value can be deletedbooleanResourceAccessSecurity.canExecute(@NotNull Resource resource) Check whether a resource can be executed at the path.default booleanResourceAccessSecurity.canOrderChildren(@NotNull Resource resource) Check whether child resources can be ordered.booleanResourceAccessSecurity.canReadValue(@NotNull Resource resource, @NotNull String valueName) Check whether a value can be readbooleanResourceAccessSecurity.canSetValue(@NotNull Resource resource, @NotNull String valueName) Check whether a value can be setbooleanCheck whether a resource can be updated at the path.@Nullable ResourceResourceAccessSecurity.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 ResourceModifier and TypeMethodDescription@Nullable jakarta.servlet.ServletResolves ajakarta.servlet.Servletwhoseservicemethod may be used to handle a request.javax.servlet.ServletServletResolver.resolveServlet(@NotNull Resource resource, @NotNull String scriptName) Deprecated.UseServletResolver.resolve(Resource, String)instead. -
Uses of Resource in org.apache.sling.api.uri
Methods in org.apache.sling.api.uri that return ResourceModifier and TypeMethodDescription@Nullable ResourceSlingUri.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 ResourceSlingUriBuilder.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 foundMethods in org.apache.sling.api.uri with parameters of type ResourceModifier and TypeMethodDescriptionstatic @NotNull SlingUriBuilderSlingUriBuilder.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 ResourceModifier and TypeMethodDescriptionWraps theResourceobtained by callingcopyon the wrapped resource resolver.@NotNull ResourceResourceResolverWrapper.create(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Wraps theResourceobtained by callingcreateon the wrapped resource resolver.Wraps and returns theResourceobtained by callinggetParenton the wrapped resource resolver.@NotNull ResourceJakartaToJavaxRequestWrapper.getResource()@NotNull ResourceJavaxToJakartaRequestWrapper.getResource()ResourceResolverWrapper.getResource(@NotNull String path) Wraps and returns theResourceobtained by callinggetResourceon the wrapped resource resolver.ResourceResolverWrapper.getResource(Resource base, @NotNull String path) Wraps and returns theResourceobtained by callinggetResourceon the wrapped resource resolver.SlingHttpServletRequestWrapper.getResource()Deprecated.SlingJakartaHttpServletRequestWrapper.getResource()@Nullable ResourceRequestPathInfoWrapper.getSuffixResource()Wraps theResourceobtained by callingmoveon the wrapped resource resolver.@NotNull ResourceResourceResolverWrapper.resolve(@NotNull jakarta.servlet.http.HttpServletRequest request, @NotNull String absPath) Wraps and returns theResourceobtained by callingresolveon the wrapped resource resolver.@NotNull ResourceWraps and returns theResourceobtained by callingresolveon the wrapped resource resolver.@NotNull ResourceResourceResolverWrapper.resolve(javax.servlet.http.HttpServletRequest request) Wraps and returns theResourceobtained by callingresolveon the wrapped resource resolver.@NotNull ResourceResourceResolverWrapper.resolve(javax.servlet.http.HttpServletRequest request, @NotNull String absPath) Deprecated.Methods in org.apache.sling.api.wrappers that return types with arguments of type ResourceModifier and TypeMethodDescriptionResourceResolverWrapper.findResources(@NotNull String query, String language) Wraps and returns theIteratorobtained by callingfindResourceson the wrapped resource resolver.ResourceResolverWrapper.getChildren(@NotNull Resource parent) Wraps and returns theIterableobtained by callinggetChildrenon the wrapped resource resolver.ResourceResolverWrapper.listChildren(@NotNull Resource parent) Wraps and returns theIteratorobtained by callinglistChildrenon the wrapped resource resolver.Methods in org.apache.sling.api.wrappers with parameters of type ResourceModifier and TypeMethodDescription@NotNull ResourceResourceResolverWrapper.create(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Wraps theResourceobtained by callingcreateon the wrapped resource resolver.voidResourceResolverWrapper.getChildren(@NotNull Resource parent) Wraps and returns theIterableobtained by callinggetChildrenon the wrapped resource resolver.Wraps and returns theResourceobtained by callinggetParenton the wrapped resource resolver.ResourceResolverWrapper.getParentResourceType(Resource resource) @Nullable javax.servlet.RequestDispatcherJakartaToJavaxRequestWrapper.getRequestDispatcher(@NotNull Resource resource) @Nullable javax.servlet.RequestDispatcherJakartaToJavaxRequestWrapper.getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options) @Nullable jakarta.servlet.RequestDispatcherJavaxToJakartaRequestWrapper.getRequestDispatcher(@NotNull Resource resource) @Nullable jakarta.servlet.RequestDispatcherJavaxToJakartaRequestWrapper.getRequestDispatcher(@NotNull Resource resource, RequestDispatcherOptions options) javax.servlet.RequestDispatcherSlingHttpServletRequestWrapper.getRequestDispatcher(Resource resource) Deprecated.javax.servlet.RequestDispatcherSlingHttpServletRequestWrapper.getRequestDispatcher(Resource resource, RequestDispatcherOptions options) Deprecated.jakarta.servlet.RequestDispatcherSlingJakartaHttpServletRequestWrapper.getRequestDispatcher(Resource resource) jakarta.servlet.RequestDispatcherSlingJakartaHttpServletRequestWrapper.getRequestDispatcher(Resource resource, RequestDispatcherOptions options) ResourceResolverWrapper.getResource(Resource base, @NotNull String path) Wraps and returns theResourceobtained by callinggetResourceon the wrapped resource resolver.booleanResourceResolverWrapper.hasChildren(@NotNull Resource resource) booleanResourceResolverWrapper.isResourceType(Resource resource, String resourceType) ResourceResolverWrapper.listChildren(@NotNull Resource parent) Wraps and returns theIteratorobtained by callinglistChildrenon the wrapped resource resolver.booleanResourceResolverWrapper.orderBefore(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) Constructors in org.apache.sling.api.wrappers with parameters of type ResourceModifierConstructorDescriptionDeepReadModifiableValueMapDecorator(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 ResourceModifier and TypeMethodDescription@NotNull ResourceCreate a new resource at the given path.@Nullable ResourceResourceProvider.getParent(@NotNull ResolveContext<T> ctx, @NotNull Resource child) Returns the parent resource from this resource provider ornullif the resource provider cannot find it.abstract @Nullable ResourceResourceProvider.getResource(@NotNull ResolveContext<T> ctx, @NotNull String path, @NotNull ResourceContext resourceContext, @Nullable Resource parent) Returns a resource from this resource provider ornullif the resource provider cannot find it.Methods in org.apache.sling.spi.resource.provider that return types with arguments of type ResourceModifier and TypeMethodDescriptionQueryLanguageProvider.findResources(@NotNull ResolveContext<T> ctx, String query, String language) Searches for resources using the given query formulated in the given language.ResourceProvider.listChildren(@NotNull ResolveContext<T> ctx, @NotNull Resource parent) Methods in org.apache.sling.spi.resource.provider with parameters of type ResourceModifier and TypeMethodDescriptionvoidResourceProvider.delete(@NotNull ResolveContext<T> ctx, @NotNull Resource resource) Delete the resource at the given path.@Nullable ResourceResourceProvider.getParent(@NotNull ResolveContext<T> ctx, @NotNull Resource child) Returns the parent resource from this resource provider ornullif the resource provider cannot find it.abstract @Nullable ResourceResourceProvider.getResource(@NotNull ResolveContext<T> ctx, @NotNull String path, @NotNull ResourceContext resourceContext, @Nullable Resource parent) Returns a resource from this resource provider ornullif the resource provider cannot find it.ResourceProvider.listChildren(@NotNull ResolveContext<T> ctx, @NotNull Resource parent) booleanResourceProvider.orderBefore(@NotNull ResolveContext<T> ctx, @NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) Orders the child resources returned byResourceProvider.listChildren(ResolveContext, Resource)so that a given resource is listed before the given sibling resource.