Uses of Interface
org.apache.sling.api.resource.Resource
Package
Description
API for accessing context-aware configuration.
Management API of the Context-Aware configuration implementation.
Multiplexer services provide aggregated access to all implementations of the related SPI interface.
API for accessing context-aware configuration resources.
SPI for applications hooking into the configuration resource infrastructure for parameterizing and customizing.
SPI for applications hooking into the configuration infrastructure for parameterizing and customizing.
Provides topology announcement implementations for discovery
implementors that choose to extend from discovery.base
Provides some static helpers for providers of the Discovery API.
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.
-
Uses of Resource in org.apache.sling.api
Modifier and TypeMethodDescription@NotNull Resource
SlingHttpServletRequest.getResource()
Returns theResource
object on whose behalf the servlet acts.Modifier and TypeMethodDescription@Nullable javax.servlet.RequestDispatcher
SlingHttpServletRequest.getRequestDispatcher
(@NotNull Resource resource) Same asSlingHttpServletRequest.getRequestDispatcher(Resource,RequestDispatcherOptions)
but using empty options.@Nullable javax.servlet.RequestDispatcher
SlingHttpServletRequest.getRequestDispatcher
(@NotNull Resource resource, RequestDispatcherOptions options) Returns aRequestDispatcher
object that acts as a wrapper for the resource located at the given resource. -
Uses of Resource in org.apache.sling.api.request
Modifier and TypeMethodDescription@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
Modifier and TypeMethodDescriptionstatic @NotNull SlingHttpServletRequestBuilder
Builders.newRequestBuilder
(@NotNull Resource resource) Creates a new request builder. -
Uses of Resource in org.apache.sling.api.resource
Modifier and TypeClassDescriptionclass
TheAbstractResource
is an abstract implementation of theResource
interface.final class
Simple helper class representing nonexisting resources.class
TheResourceWrapper
is a wrapper for anyResource
delegating all method calls to the wrapped resource by default.class
TheSyntheticResource
class is a simple implementation of theResource
interface which may be used to provide a resource object which has no actual resource data.Modifier and TypeMethodDescriptionThis method copies the subgraph rooted at, and including, the resource atsrcAbsPath
to the new location atdestAbsPath
and 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 Resource
ResourceResolver.create
(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Add a child resource to the given parent resource.@Nullable Resource
Decorate a resource.@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.Returns the indicated child of this resource.@Nullable Resource
Returns the child at the given relative path of this resource ornull
if no such child exists.Returns the value of callinggetChild
on thewrapped 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.AbstractResource.getParent()
Returns the parent resource of this resource.NonExistingResource.getParent()
@Nullable Resource
Resource.getParent()
Returns the parent resource ornull
if this resource represents the root of the resource tree.@Nullable Resource
Returns the parent resource of this resource.static @Nullable Resource
Deprecated.since 2.1.0, usegetParent()
insteadResourceWrapper.getParent()
Returns the value of callinggetParent
on thewrapped resource
.@Nullable Resource
ParametrizableResourceProvider.getResource
(@NotNull ResourceResolver resourceResolver, @NotNull String path, @NotNull Map<String, String> parameters) Deprecated.Returns a resource from this resource provider ornull
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 ornull
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 aResource
object for data located at the given path.@Nullable Resource
ResourceResolver.getResource
(Resource base, @NotNull String path) Returns aResource
object for data located at the given path.@NotNull Resource
ResourceWrapper.getResource()
Returns theResource
wrapped by this instance.This method moves the subgraph rooted at, and including, the resource atsrcAbsPath
to the new location atdestAbsPath
and adds it as a child node of the resource atdestAbsPath
.@NotNull Resource
Resolves the resource from the given absolute path.@NotNull Resource
ResourceResolver.resolve
(@NotNull javax.servlet.http.HttpServletRequest request) Deprecated.as of 2.0.4, useResourceResolver.resolve(HttpServletRequest, String)
instead.@NotNull Resource
ResourceResolver.resolve
(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String absPath) Resolves the resource from the givenabsPath
optionally takingHttpServletRequest
into account, such as the value of theHost
request header.static @NotNull Resource
Unwrap the resource and return the wrapped implementation.Modifier 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 callinglistChildren
on thewrapped resource
.Modifier and TypeMethodDescriptionvoid
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 theparent
.@Nullable Resource
Decorate a resource.@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
Delete the resource Deleting a non existing resource leads to no operation nor exception.void
static @Nullable String
ResourceUtil.findResourceSuperType
(@NotNull Resource resource) Deprecated.ResourceResolver.getChildren
(@NotNull Resource parent) static @NotNull String
Deprecated.since 2.1.0, usegetName()
instead@Nullable Resource
Returns the parent resource of this resource.static @Nullable Resource
Deprecated.since 2.1.0, usegetParent()
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 aResource
object for data located at the given path.static @NotNull ValueMap
ResourceUtil.getValueMap
(Resource res) Returns anValueMap
object for the givenResource
.boolean
ResourceResolver.hasChildren
(@NotNull Resource resource) Checks if the specified resource has any direct child resources.static boolean
Deprecated.static boolean
ResourceUtil.isNonExistingResource
(@NotNull Resource res) Returnstrue
if the resourceres
is a non-existing resource.boolean
ResourceResolver.isResourceType
(Resource resource, String resourceType) Returnstrue
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) Returnstrue
if the resourceres
is a "star resource".static boolean
ResourceUtil.isSyntheticResource
(@NotNull Resource res) Returnstrue
if the resourceres
is 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()
insteadboolean
ResourceResolver.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 Resource
Unwrap the resource and return the wrapped implementation.protected abstract void
Implement this method to do actual work on the resources.Modifier and TypeMethodDescriptionstatic <T> @NotNull Iterator<T>
Return an iterator for objects of the specified type.protected void
AbstractResourceVisitor.traverseChildren
(@NotNull Iterator<Resource> children) Visit the given resources.ModifierConstructorDescriptionResourceWrapper
(@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
Modifier and TypeMethodDescription@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
Modifier and TypeMethodDescription@Nullable Resource
SlingBindings.getResource()
@NotNull Resource
SlingScript.getScriptResource()
Returns the Resource providing the script source code.Modifier and TypeMethodDescriptionvoid
Same asSlingScriptHelper.forward(Resource,RequestDispatcherOptions)
, but using empty options.void
Helper method to forward the request to a Servlet or script for the givenresource
andrequestDispatcherOptions
.void
SlingScriptHelper.forward
(@NotNull Resource resource, RequestDispatcherOptions options) Helper method to forward the request to a Servlet or script for the givenresource
andoptions
.void
Same asSlingScriptHelper.include(Resource,RequestDispatcherOptions)
, but using empty options.void
Helper method to include the result of processing the request for the givenresource
andrequestDispatcherOptions
.void
SlingScriptHelper.include
(@NotNull Resource resource, RequestDispatcherOptions options) Helper method to include the result of processing the request for the givenresource
andoptions
.void
SlingBindings.setResource
(Resource resource) -
Uses of Resource in org.apache.sling.api.security
Modifier and TypeMethodDescription@Nullable Resource
ResourceAccessSecurity.getReadableResource
(Resource resource) If supplied Resource can be read, return it (or a wrapped variant of it).Modifier and TypeMethodDescriptionboolean
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 deletedboolean
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 readboolean
ResourceAccessSecurity.canSetValue
(@NotNull Resource resource, @NotNull String valueName) Check whether a value can be setboolean
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
Modifier and TypeMethodDescription@Nullable javax.servlet.Servlet
ServletResolver.resolveServlet
(@NotNull Resource resource, @NotNull String scriptName) Resolves ajavax.servlet.Servlet
whoseservice
method may be used to handle a request. -
Uses of Resource in org.apache.sling.api.uri
Modifier and TypeMethodDescription@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 foundModifier and TypeMethodDescriptionstatic @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
Modifier and TypeMethodDescriptionWraps theResource
obtained by callingcopy
on the wrapped resource resolver.@NotNull Resource
ResourceResolverWrapper.create
(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Wraps theResource
obtained by callingcreate
on the wrapped resource resolver.Wraps and returns theResource
obtained by callinggetParent
on the wrapped resource resolver.ResourceResolverWrapper.getResource
(@NotNull String path) Wraps and returns theResource
obtained by callinggetResource
on the wrapped resource resolver.ResourceResolverWrapper.getResource
(Resource base, @NotNull String path) Wraps and returns theResource
obtained by callinggetResource
on the wrapped resource resolver.SlingHttpServletRequestWrapper.getResource()
@Nullable Resource
RequestPathInfoWrapper.getSuffixResource()
Wraps theResource
obtained by callingmove
on the wrapped resource resolver.@NotNull Resource
Wraps and returns theResource
obtained by callingresolve
on the wrapped resource resolver.@NotNull Resource
ResourceResolverWrapper.resolve
(@NotNull javax.servlet.http.HttpServletRequest request) Wraps and returns theResource
obtained by callingresolve
on the wrapped resource resolver.@NotNull Resource
ResourceResolverWrapper.resolve
(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull String absPath) Wraps and returns theResource
obtained by callingresolve
on the wrapped resource resolver.Modifier and TypeMethodDescriptionResourceResolverWrapper.findResources
(@NotNull String query, String language) Wraps and returns theIterator
obtained by callingfindResources
on the wrapped resource resolver.ResourceResolverWrapper.getChildren
(@NotNull Resource parent) Wraps and returns theIterable
obtained by callinggetChildren
on the wrapped resource resolver.ResourceResolverWrapper.listChildren
(@NotNull Resource parent) Wraps and returns theIterator
obtained by callinglistChildren
on the wrapped resource resolver.Modifier and TypeMethodDescription@NotNull Resource
ResourceResolverWrapper.create
(@NotNull Resource parent, @NotNull String name, Map<String, Object> properties) Wraps theResource
obtained by callingcreate
on the wrapped resource resolver.void
ResourceResolverWrapper.getChildren
(@NotNull Resource parent) Wraps and returns theIterable
obtained by callinggetChildren
on the wrapped resource resolver.Wraps and returns theResource
obtained by callinggetParent
on the wrapped resource resolver.ResourceResolverWrapper.getParentResourceType
(Resource resource) javax.servlet.RequestDispatcher
SlingHttpServletRequestWrapper.getRequestDispatcher
(Resource resource) javax.servlet.RequestDispatcher
SlingHttpServletRequestWrapper.getRequestDispatcher
(Resource resource, RequestDispatcherOptions options) ResourceResolverWrapper.getResource
(Resource base, @NotNull String path) Wraps and returns theResource
obtained by callinggetResource
on the wrapped resource resolver.boolean
ResourceResolverWrapper.hasChildren
(@NotNull Resource resource) boolean
ResourceResolverWrapper.isResourceType
(Resource resource, String resourceType) ResourceResolverWrapper.listChildren
(@NotNull Resource parent) Wraps and returns theIterator
obtained by callinglistChildren
on the wrapped resource resolver.boolean
ResourceResolverWrapper.orderBefore
(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) ModifierConstructorDescriptionDeepReadModifiableValueMapDecorator
(Resource resource, ValueMap base) DeepReadValueMapDecorator
(Resource resource, ValueMap base) -
Uses of Resource in org.apache.sling.caconfig
Modifier and TypeMethodDescription@NotNull ConfigurationBuilder
Get configuration for given resource. -
Uses of Resource in org.apache.sling.caconfig.impl.def
Modifier and TypeMethodDescription@Nullable Resource
DefaultConfigurationInjectResourceDetectionStrategy.detectResource
(@NotNull SlingHttpServletRequest request) DefaultConfigurationPersistenceStrategy.getCollectionItemResource
(@NotNull Resource resource) DefaultConfigurationPersistenceStrategy.getCollectionParentResource
(@NotNull Resource resource) DefaultConfigurationInheritanceStrategy.getResource
(@NotNull Iterator<Resource> configResources) DefaultConfigurationPersistenceStrategy.getResource
(@NotNull Resource resource) Modifier and TypeMethodDescriptionDefaultConfigurationPersistenceStrategy.getCollectionItemResource
(@NotNull Resource resource) DefaultConfigurationPersistenceStrategy.getCollectionParentResource
(@NotNull Resource resource) DefaultConfigurationPersistenceStrategy.getResource
(@NotNull Resource resource) Modifier and TypeMethodDescriptionDefaultConfigurationInheritanceStrategy.getResource
(@NotNull Iterator<Resource> configResources) -
Uses of Resource in org.apache.sling.caconfig.impl.override
Modifier and TypeMethodDescriptionConfigurationOverrideMultiplexerImpl.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource) ConfigurationOverrideMultiplexerImpl.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource, @NotNull ResourceResolver resourceResolver) Modifier and TypeMethodDescriptionConfigurationOverrideMultiplexerImpl.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource) ConfigurationOverrideMultiplexerImpl.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource, @NotNull ResourceResolver resourceResolver) -
Uses of Resource in org.apache.sling.caconfig.management
Modifier and TypeMethodDescriptionvoid
ConfigurationManager.deleteConfiguration
(@NotNull Resource resource, @NotNull String configName) Delete configuration or configuration collection data from repository using the inner-most context path as reference.@Nullable ConfigurationData
ConfigurationManager.getConfiguration
(@NotNull Resource resource, @NotNull String configName) Get configuration data for the given context resource and configuration name.@NotNull ConfigurationCollectionData
ConfigurationManager.getConfigurationCollection
(@NotNull Resource resource, @NotNull String configName) Get configuration data collection for the given context resource and configuration name.@Nullable ConfigurationData
ConfigurationManager.newCollectionItem
(@NotNull Resource resource, @NotNull String configName) Creates a new empty configuration data item for a configuration data collection for the given configuration name.void
ConfigurationManager.persistConfiguration
(@NotNull Resource resource, @NotNull String configName, @NotNull ConfigurationPersistData data) Write configuration data to repository using the inner-most context path as reference.void
ConfigurationManager.persistConfigurationCollection
(@NotNull Resource resource, @NotNull String configName, @NotNull ConfigurationCollectionPersistData data) Write configuration data collection using the inner-most context path as reference. -
Uses of Resource in org.apache.sling.caconfig.management.multiplexer
Modifier and TypeMethodDescription@Nullable Resource
ConfigurationOverrideMultiplexer.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource) Deprecated.@Nullable Resource
ConfigurationOverrideMultiplexer.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource, @NotNull ResourceResolver resourceResolver) Override properties in given configuration resource (if any overrides are defined).Modifier and TypeMethodDescription@Nullable Resource
ConfigurationOverrideMultiplexer.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource) Deprecated.@Nullable Resource
ConfigurationOverrideMultiplexer.overrideProperties
(@NotNull String contextPath, @NotNull String configName, @Nullable Resource configResource, @NotNull ResourceResolver resourceResolver) Override properties in given configuration resource (if any overrides are defined). -
Uses of Resource in org.apache.sling.caconfig.resource
Modifier and TypeMethodDescription@Nullable Resource
ConfigurationResourceResolver.getResource
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.Modifier and TypeMethodDescription@NotNull Collection<Resource>
ConfigurationResourceResolver.getResourceCollection
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name.Modifier and TypeMethodDescription@NotNull Collection<String>
ConfigurationResourceResolver.getAllContextPaths
(@NotNull Resource resource) Get all context paths for which context-aware configurations could be defined.ConfigurationResourceResolver.getContextPath
(@NotNull Resource resource) Get the inner-most context path (deepest path) returned byConfigurationResourceResolver.getAllContextPaths(Resource)
.@Nullable Resource
ConfigurationResourceResolver.getResource
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.@NotNull Collection<Resource>
ConfigurationResourceResolver.getResourceCollection
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name. -
Uses of Resource in org.apache.sling.caconfig.resource.impl.def
Modifier and TypeMethodDescriptionDefaultConfigurationResourceResolvingStrategy.getResource
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) Modifier and TypeMethodDescriptionDefaultConfigurationResourceResolvingStrategy.getResourceCollection
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceCollectionInheritanceChain
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceInheritanceChain
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) Modifier and TypeMethodDescription@NotNull Iterator<ContextResource>
DefaultContextPathStrategy.findContextResources
(@NotNull Resource resource) DefaultConfigurationResourceResolvingStrategy.getResource
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceCollection
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceCollectionInheritanceChain
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceCollectionParentPath
(@NotNull Resource contentResource, @NotNull String bucketName, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourceInheritanceChain
(@NotNull Resource contentResource, @NotNull Collection<String> bucketNames, @NotNull String configName) DefaultConfigurationResourceResolvingStrategy.getResourcePath
(@NotNull Resource contentResource, @NotNull String bucketName, @NotNull String configName) -
Uses of Resource in org.apache.sling.caconfig.resource.spi
Modifier and TypeMethodDescription@Nullable Resource
ConfigurationResourceResolvingStrategy.getResource
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.@NotNull Resource
ContextResource.getResource()
Modifier and TypeMethodDescription@Nullable Collection<Resource>
ConfigurationResourceResolvingStrategy.getResourceCollection
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name.@Nullable Collection<Iterator<Resource>>
ConfigurationResourceResolvingStrategy.getResourceCollectionInheritanceChain
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a collection of context-aware configuration resource inheritance chains defined by the given configuration name.ConfigurationResourceResolvingStrategy.getResourceInheritanceChain
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a context-aware singleton configuration resource inheritance chain defined by the given configuration name.Modifier and TypeMethodDescription@Nullable InheritanceDecision
Decide whether the provided resource should be included in the collection.@NotNull Iterator<ContextResource>
ContextPathStrategy.findContextResources
(@NotNull Resource resource) Finds context paths for the given resource.@Nullable Resource
ConfigurationResourceResolvingStrategy.getResource
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.@Nullable Collection<Resource>
ConfigurationResourceResolvingStrategy.getResourceCollection
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name.@Nullable Collection<Iterator<Resource>>
ConfigurationResourceResolvingStrategy.getResourceCollectionInheritanceChain
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a collection of context-aware configuration resource inheritance chains defined by the given configuration name.@Nullable String
ConfigurationResourceResolvingStrategy.getResourceCollectionParentPath
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get the configuration resource collection parent path for storing configuration data for the given context resource and configuration name.ConfigurationResourceResolvingStrategy.getResourceInheritanceChain
(@NotNull Resource resource, @NotNull Collection<String> bucketNames, @NotNull String configName) Get a context-aware singleton configuration resource inheritance chain defined by the given configuration name.@Nullable String
ConfigurationResourceResolvingStrategy.getResourcePath
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get the configuration resource path for storing configuration data for the given context resource and configuration name.ModifierConstructorDescriptionContextResource
(@NotNull Resource resource, String configRef) Deprecated.ContextResource
(@NotNull Resource resource, String configRef, int serviceRanking) -
Uses of Resource in org.apache.sling.caconfig.spi
Modifier and TypeMethodDescription@Nullable Resource
ConfigurationInjectResourceDetectionStrategy.detectResource
(@NotNull SlingHttpServletRequest request) Detects the resource that is associated with the given request.@Nullable Resource
ConfigurationPersistenceStrategy2.getCollectionItemResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationPersistenceStrategy2.getCollectionParentResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationInheritanceStrategy.getResource
(@NotNull Iterator<Resource> configResources) Pick or merge resources for inheritance.@Nullable Resource
ConfigurationPersistenceStrategy.getResource
(@NotNull Resource resource) Deprecated.Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationPersistenceStrategy2.getResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.Modifier and TypeMethodDescription@Nullable Resource
ConfigurationPersistenceStrategy2.getCollectionItemResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationPersistenceStrategy2.getCollectionParentResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationPersistenceStrategy.getResource
(@NotNull Resource resource) Deprecated.Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.@Nullable Resource
ConfigurationPersistenceStrategy2.getResource
(@NotNull Resource resource) Allows the strategy to transform the given configuration resource according to it's persistent strategies, e.g. fetching the data from a child resource instead of the given resource.Modifier and TypeMethodDescription@Nullable Resource
ConfigurationInheritanceStrategy.getResource
(@NotNull Iterator<Resource> configResources) Pick or merge resources for inheritance. -
Uses of Resource in org.apache.sling.discovery.base.connectors.announcement
-
Uses of Resource in org.apache.sling.discovery.commons.providers.util
Modifier and TypeMethodDescriptionstatic Resource
ResourceHelper.getOrCreateResource
(ResourceResolver resourceResolver, String path) Modifier and TypeMethodDescriptionstatic StringBuilder
ResourceHelper.getPropertiesForLogging
(Resource resource) Compile a string builder containing the properties of a resource - used for loggingstatic void
ResourceHelper.moveResource
(Resource res, String path) Move resource to given path. -
Uses of Resource in org.apache.sling.engine.impl.request
Modifier and TypeMethodDescriptionDispatchingInfo.getRequestContent()
ContentData.getResource()
SlingRequestPathInfo.getSuffixResource()
RequestData.initResource
(ResourceResolver resourceResolver) Modifier and TypeMethodDescriptionvoid
RequestData.initServlet
(Resource resource, ServletResolver sr) RequestData.setContent
(Resource resource, RequestPathInfo requestPathInfo) void
DispatchingInfo.setRequestContent
(Resource requestContent) ModifierConstructorDescriptionContentData
(Resource resource, RequestPathInfo requestPathInfo) SlingRequestDispatcher
(Resource resource, RequestDispatcherOptions options, boolean protectHeadersOnInclude, boolean checkContentTypeOnInclude) Break requestPath as required by SlingRequestPathInfo. -
Uses of Resource in org.apache.sling.event.impl.jobs
Modifier and TypeMethodDescriptionUtility.getSortedChildren
(org.slf4j.Logger logger, String type, Resource rsrc) Helper method to read all children of a resource and sort them by nameModifier and TypeMethodDescriptionUtility.getSortedChildren
(org.slf4j.Logger logger, String type, Resource rsrc) Helper method to read all children of a resource and sort them by nameboolean
Callback handle for a resource.static JobImpl
Read a jobstatic void
JobTopicTraverser.traverse
(org.slf4j.Logger logger, Resource topicResource, JobTopicTraverser.JobCallback handler) Traverse the topic and call the callback for each found job.static void
JobTopicTraverser.traverse
(org.slf4j.Logger logger, Resource topicResource, JobTopicTraverser.ResourceCallback handler) Traverse the topic and call the callback for each found resource. -
Uses of Resource in org.apache.sling.event.impl.support
Modifier and TypeMethodDescriptionstatic Resource
ResourceHelper.createAndCommitResource
(ResourceResolver resolver, String path, Map<String, Object> props) Create the resource and commit itstatic Resource
ResourceHelper.getOrCreateResource
(ResourceResolver resolver, String path, Map<String, Object> props) Creates or gets the resource at the given path.Modifier and TypeMethodDescriptionvoid
static ValueMap
ResourceHelper.getValueMap
(Resource resource) -
Uses of Resource in org.apache.sling.fsprovider.internal.mapper
Modifier and TypeClassDescriptionfinal class
Represents a JSON File with resource content.final class
TheFsResource
represents a file system file or folder as a Sling Resource.Modifier and TypeMethodDescriptionContentFileResourceMapper.getResource
(ResourceResolver resolver, String resourcePath) FileResourceMapper.getResource
(ResourceResolver resolver, String resourcePath) FileVaultResourceMapper.getResource
(ResourceResolver resolver, String resourcePath) Modifier and TypeMethodDescriptionContentFileResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) FileResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) FileVaultResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) Modifier and TypeMethodDescriptionContentFileResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) FileResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) FileVaultResourceMapper.getChildren
(ResourceResolver resolver, Resource parent) -
Uses of Resource in org.apache.sling.jackrabbit.usermanager
Modifier and TypeMethodDescriptionvoid
DeleteAuthorizables.deleteAuthorizables
(javax.jcr.Session jcrSession, Resource baseResource, String[] paths, List<Modification> changes) Deletes one or more users or groups from the repository -
Uses of Resource in org.apache.sling.jackrabbit.usermanager.impl.post
Modifier and TypeMethodDescriptionvoid
DeleteAuthorizableServlet.deleteAuthorizables
(javax.jcr.Session jcrSession, Resource baseResource, String[] paths, List<Modification> changes) protected void
AbstractGroupPostServlet.updateGroupMembership
(Resource baseResource, Map<String, ?> properties, org.apache.jackrabbit.api.security.user.Authorizable authorizable, List<Modification> changes) Update the group membership based on the ":member" request parameters. -
Uses of Resource in org.apache.sling.jackrabbit.usermanager.impl.resource
Modifier and TypeClassDescriptionclass
Resource implementation for Authorizableclass
Base Resource implementation for the common partsclass
Resource implementation for nested property containers of Authorizableclass
Resource implementation for Principal (SLING-11098)Modifier and TypeMethodDescriptionAuthorizableResourceProvider.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) Modifier and TypeMethodDescriptionAuthorizableResourceProvider.filterPropertyContainers
(String relPath, org.apache.jackrabbit.api.security.user.Authorizable authorizable, Resource r) Filter the resource children to return only the resources that are nested property containersAuthorizableResourceProvider.listChildren
(ResolveContext<Object> ctx, Resource parent) Modifier and TypeMethodDescriptionAuthorizableResourceProvider.filterPropertyContainers
(String relPath, org.apache.jackrabbit.api.security.user.Authorizable authorizable, Resource r) Filter the resource children to return only the resources that are nested property containersAuthorizableResourceProvider.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) AuthorizableResourceProvider.listChildren
(ResolveContext<Object> ctx, Resource parent) -
Uses of Resource in org.apache.sling.jcr.resource.internal.helper
Modifier and TypeMethodDescriptionstatic void
AccessLogger.incrementUsage
(Resource resource, String operation) static void
AccessLogger.incrementUsage
(Resource resource, String operation, long count) -
Uses of Resource in org.apache.sling.jcr.resource.internal.helper.jcr
Modifier and TypeMethodDescription@NotNull Resource
JcrResourceProvider.create
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @Nullable String path, @Nullable Map<String, Object> properties) @Nullable Resource
JcrResourceProvider.getParent
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource child) @Nullable Resource
JcrResourceProvider.getResource
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull String path, @NotNull ResourceContext rCtx, @Nullable Resource parent) JcrNodeResourceIterator.next()
Modifier and TypeMethodDescriptionBasicQueryLanguageProvider.findResources
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, String query, String language) JcrResourceProvider.listChildren
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource parent) Modifier and TypeMethodDescription@Nullable org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResource<?>
JcrItemResourceFactory.createResource
(@NotNull ResourceResolver resourceResolver, @NotNull String resourcePath, @Nullable Resource parent, @Nullable Map<String, String> parameters) Creates aResource
instance for the item found at the given path.void
JcrResourceProvider.delete
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource resource) @Nullable Resource
JcrResourceProvider.getParent
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource child) @Nullable Resource
JcrResourceProvider.getResource
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull String path, @NotNull ResourceContext rCtx, @Nullable Resource parent) JcrResourceProvider.listChildren
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource parent) boolean
JcrResourceProvider.orderBefore
(@NotNull ResolveContext<org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderState> ctx, @NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) @NotNull URI
BinaryDownloadUriProvider.toURI
(@NotNull Resource resource, @NotNull URIProvider.Scope scope, @NotNull URIProvider.Operation operation) -
Uses of Resource in org.apache.sling.models.factory
Modifier and TypeMethodDescription<T> T
ModelFactory.createModelFromWrappedRequest
(@NotNull SlingHttpServletRequest request, @NotNull Resource resource, @NotNull Class<T> targetClass) Create a wrapped request object with the specified resource and instantiates the given Sling Model class from that wrapped request.<T> T
ModelFactory.exportModelForResource
(@NotNull Resource resource, @NotNull String exporterName, @NotNull Class<T> targetClass, @NotNull Map<String, String> options) Export the model object registered to the resource's type using the defined target class using the named exporter.@NotNull Object
ModelFactory.getModelFromResource
(@NotNull Resource resource) Obtain an adapted model class based on the resource type of the provided resource.<T> T
ModelFactory.getModelFromWrappedRequest
(@NotNull SlingHttpServletRequest request, @NotNull Resource resource, @NotNull Class<T> targetClass) Create a wrapped request object with the specified resource and (try to) adapt the request object into the specified class.boolean
ModelFactory.isModelAvailableForResource
(@NotNull Resource resource) Determine is a model class is available for the resource's resource type. -
Uses of Resource in org.apache.sling.models.impl.via
Modifier and TypeMethodDescriptionprotected abstract @Nullable String
AbstractResourceTypeViaProvider.getResourceType
(@NotNull Resource resource, @NotNull String value) protected String
ForcedResourceTypeViaProvider.getResourceType
(@NotNull Resource resource, @NotNull String value) protected String
ResourceSuperTypeViaProvider.getResourceType
(@NotNull Resource resource, @NotNull String value) -
Uses of Resource in org.apache.sling.resource.filter
Modifier and TypeMethodDescriptionResourceStream.listChildren
(Predicate<Resource> childSelector) Provides a stream of the child resources of the base resource.Creates a Predicatebased on the provided script Creates a Predicatebased on the provided script ResourceFilterStream.stream()
Streamwhich uses the branchSelector as the basis of the traversal and then filters the resources based on the childSelector that was provided Provides a depth firstStream<Resource>
traversal of the resource tree starting with the current resource.Modifier and TypeMethodDescriptionResourceStream.listChildren
(Predicate<Resource> childSelector) Provides a stream of the child resources of the base resource.Provides a depth firstStream<Resource>
traversal of the resource tree starting with the current resource.ModifierConstructorDescriptionResourceFilterStream
(Resource resource, ResourcePredicates filter) ResourceStream
(Resource resource) -
Uses of Resource in org.apache.sling.resource.filter.impl.predicates
Modifier and TypeMethodDescriptionRight and Left values are converted to String arraysRight and Left values are converted to String arraysValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonRight and Left values are converted to String arraysValues are converted to Strings.Values are converted to Strings.Values are converted to Strings.Values are converted to a Number, and then additionally converted to a common type as the basis of comparisonValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonComparisonPredicateFactory.toPredicate
(int kind, Function<Resource, Object> leftValue, Function<Resource, Object> rightValue) Modifier and TypeMethodDescriptionRight and Left values are converted to String arraysRight and Left values are converted to String arraysValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonRight and Left values are converted to String arraysValues are converted to Strings.Values are converted to Strings.Values are converted to Strings.Values are converted to a Number, and then additionally converted to a common type as the basis of comparisonValues are converted to a Number, and then additionally converted to a common type as the basis of comparisonComparisonPredicateFactory.toPredicate
(int kind, Function<Resource, Object> leftValue, Function<Resource, Object> rightValue) -
Uses of Resource in org.apache.sling.resourceresolver.impl.helper
Modifier and TypeClassDescriptionfinal class
class
Used to provide the equivalent of an empty Node for GET requests to *.something (SLING-344)Modifier and TypeMethodDescriptionResourceResolverControl.copy
(ResourceResolverContext context, String srcAbsPath, String destAbsPath) Tries to find a resource provider accepting both paths and invokesAuthenticatedResourceProvider.copy(String, String)
method on it.ResourceResolverControl.create
(ResourceResolverContext context, String path, Map<String, Object> properties) Create a resource.Decorate a resource.ResourceResolverControl.getParent
(@NotNull ResourceResolverContext context, @NotNull String parentPath, @NotNull Resource child) Returns parent from the most appropriate resource provider accepting the given children.ResourceResolverControl.getResource
(ResourceResolverContext context, String path, Resource parent, Map<String, String> parameters, boolean isResolve) Returns resource from the most appropriate resource provider.ResourceResolverControl.move
(ResourceResolverContext context, String srcAbsPath, String destAbsPath) Tries to find a resource provider accepting both paths and invokesAuthenticatedResourceProvider.move(String, String)
method on it.ResourceIteratorDecorator.next()
protected Resource
UniqueResourceIterator.seek()
Modifier and TypeMethodDescriptionResourceResolverControl.findResources
(ResourceResolverContext context, String query, String language) Queries all resource providers and combines the results.ResourceResolverControl.listChildren
(ResourceResolverContext context, Resource parent) This method asks all matching resource providers for the children iterators, merges them, addsSyntheticResource
s (seeResourceResolverControl.getResource(ResourceResolverContext, String, Resource, Map, boolean)
for more details), filters out the duplicates and returns the resulting iterator.ResourceResolverControl.listChildrenInternal
(ResourceResolverContext context, Node<ResourceProviderHandler> node, Resource parent, Iterator<Resource> realChildren) Internal methodModifier and TypeMethodDescriptionDecorate a resource.void
ResourceResolverControl.delete
(ResourceResolverContext context, Resource resource) Delete the resource.ResourceResolverControl.getParent
(@NotNull ResourceResolverContext context, @NotNull String parentPath, @NotNull Resource child) Returns parent from the most appropriate resource provider accepting the given children.static String
ResourceResolverControl.getProperty
(Resource res, String propName) static <Type> Type
ResourceResolverControl.getProperty
(Resource res, String propName, Class<Type> type) Returns the value of the name property of the resource converted to the requestedtype
.ResourceResolverControl.getResource
(ResourceResolverContext context, String path, Resource parent, Map<String, String> parameters, boolean isResolve) Returns resource from the most appropriate resource provider.static boolean
StarResource.isStarResource
(Resource res) Returns true if the path of the resource ends with theStarResource.SLASH_STAR
and therefore should be considered a star resource.ResourceResolverControl.listChildren
(ResourceResolverContext context, Resource parent) This method asks all matching resource providers for the children iterators, merges them, addsSyntheticResource
s (seeResourceResolverControl.getResource(ResourceResolverContext, String, Resource, Map, boolean)
for more details), filters out the duplicates and returns the resulting iterator.ResourceResolverControl.listChildrenInternal
(ResourceResolverContext context, Node<ResourceProviderHandler> node, Resource parent, Iterator<Resource> realChildren) Internal methodboolean
ResourceResolverControl.orderBefore
(@NotNull ResourceResolverContext context, @NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) Order resourcesModifier and TypeMethodDescriptionResourceResolverControl.listChildrenInternal
(ResourceResolverContext context, Node<ResourceProviderHandler> node, Resource parent, Iterator<Resource> realChildren) Internal methodModifierConstructorDescriptionResourceIteratorDecorator
(ResourceDecoratorTracker tracker, Iterator<Resource> iterator) UniqueResourceIterator
(Set<String> visited, Iterator<Resource> input) -
Uses of Resource in org.apache.sling.resourceresolver.impl.legacy
Modifier and TypeMethodDescriptionLegacyResourceProviderAdapter.create
(@NotNull ResolveContext<Object> ctx, String path, Map<String, Object> properties) LegacyResourceProviderFactoryAdapter.create
(@NotNull ResolveContext<LegacyResourceProviderAdapter> ctx, String path, Map<String, Object> properties) LegacyResourceProviderAdapter.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) LegacyResourceProviderFactoryAdapter.getResource
(ResolveContext<LegacyResourceProviderAdapter> ctx, String path, ResourceContext resourceContext, Resource parent) Modifier and TypeMethodDescriptionLegacyResourceProviderAdapter.listChildren
(ResolveContext<Object> ctx, Resource parent) LegacyResourceProviderFactoryAdapter.listChildren
(ResolveContext<LegacyResourceProviderAdapter> ctx, Resource parent) Modifier and TypeMethodDescriptionvoid
LegacyResourceProviderAdapter.delete
(@NotNull ResolveContext<Object> ctx, @NotNull Resource resource) void
LegacyResourceProviderFactoryAdapter.delete
(@NotNull ResolveContext<LegacyResourceProviderAdapter> ctx, @NotNull Resource resource) LegacyResourceProviderAdapter.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) LegacyResourceProviderFactoryAdapter.getResource
(ResolveContext<LegacyResourceProviderAdapter> ctx, String path, ResourceContext resourceContext, Resource parent) LegacyResourceProviderAdapter.listChildren
(ResolveContext<Object> ctx, Resource parent) LegacyResourceProviderFactoryAdapter.listChildren
(ResolveContext<LegacyResourceProviderAdapter> ctx, Resource parent) -
Uses of Resource in org.apache.sling.resourceresolver.impl.mapping
Modifier and TypeMethodDescriptionMapEntry.createMapEntry
(String url, Resource resource, boolean trailingSlash) static MapEntry
MapEntry.createResolveEntry
(String url, Resource resource, boolean trailingSlash) -
Uses of Resource in org.apache.sling.resourceresolver.impl.providers.stateful
Modifier and TypeMethodDescriptionAuthenticatedResourceProvider.create
(ResourceResolver resolver, String path, Map<String, Object> properties) Get the parent resourceAuthenticatedResourceProvider.getResource
(String path, Resource parent, Map<String, String> parameters) Modifier and TypeMethodDescriptionAuthenticatedResourceProvider.findResources
(String query, String language) AuthenticatedResourceProvider.listChildren
(Resource parent) Modifier and TypeMethodDescriptionvoid
Get the parent resourceAuthenticatedResourceProvider.getResource
(String path, Resource parent, Map<String, String> parameters) AuthenticatedResourceProvider.listChildren
(Resource parent) boolean
AuthenticatedResourceProvider.orderBefore
(@NotNull Resource parent, @NotNull String name, @Nullable String followingSiblingName) -
Uses of Resource in org.apache.sling.scripting.core
Modifier and TypeMethodDescriptionvoid
void
void
ScriptHelper.forward
(Resource resource, RequestDispatcherOptions options) void
void
void
ScriptHelper.include
(Resource resource, RequestDispatcherOptions options) -
Uses of Resource in org.apache.sling.scripting.javascript.wrapper
-
Uses of Resource in org.apache.sling.scripting.jsp.taglib
Modifier and TypeMethodDescriptionstatic final Resource
SlingFunctions.getAbsoluteParent
(Resource current, String level) Method for retrieving an absolute parent resource.GetResourceTag.getBase()
Gets the base resource.static final Resource
SlingFunctions.getCAConfigResource
(Resource resource, String bucket, String name) Method for retrieving the CA Config resource for a specified resourcestatic Resource
SlingFunctions.getRelativeResource
(Resource base, String path) Gets the resource at the relative path to the provided resource.AbstractCATag.getResource()
GetParentsTag.getResource()
Gets the resource.GetParentTag.getResource()
Gets the resource.ListChildrenTag.getResource()
Gets the resource of which to list the children.static final Resource
SlingFunctions.getResource
(ResourceResolver resolver, String path) Method allow for the retrieval of resources.Modifier and TypeMethodDescriptionSlingFunctions.findResources
(ResourceResolver resourceResolver, String query, String language) Searches for resources using the given query formulated in the given language.SlingFunctions.getCAConfigResources
(Resource resource, String bucket, String name) Method for retrieving the CA Config resources for a specified resourceSlingFunctions.getParents
(Resource current, String startDepth) Function for retrieving all of the parent resources of a specified resource, returning them in hierarchy order.SlingFunctions.listChildren
(Resource resource) Method for allowing the invocation of the Sling Resource listChildren method.Modifier and TypeMethodDescriptionstatic final Resource
SlingFunctions.getAbsoluteParent
(Resource current, String level) Method for retrieving an absolute parent resource.static final Resource
SlingFunctions.getCAConfigResource
(Resource resource, String bucket, String name) Method for retrieving the CA Config resource for a specified resourceSlingFunctions.getCAConfigResources
(Resource resource, String bucket, String name) Method for retrieving the CA Config resources for a specified resourceSlingFunctions.getParents
(Resource current, String startDepth) Function for retrieving all of the parent resources of a specified resource, returning them in hierarchy order.static Resource
SlingFunctions.getRelativeResource
(Resource base, String path) Gets the resource at the relative path to the provided resource.static final boolean
SlingFunctions.hasChildren
(Resource resource) Method for checking whether or not a resource has child resources.SlingFunctions.listChildren
(Resource resource) Method for allowing the invocation of the Sling Resource listChildren method.void
Sets the base resource.void
AbstractCATag.setResource
(Resource resource) void
AbstractDispatcherTagHandler.setResource
(Resource rsrc) void
EvalTagHandler.setResource
(Resource rsrc) void
GetParentsTag.setResource
(Resource resource) Sets the resource.void
GetParentTag.setResource
(Resource resource) Sets the resource.void
ListChildrenTag.setResource
(Resource resource) Sets the resource of which to list the children. -
Uses of Resource in org.apache.sling.scripting.sightly.engine
Modifier and TypeMethodDescriptionstatic Resource
ResourceResolution.getResourceForRequest
(ResourceResolver resolver, SlingHttpServletRequest request) Resolves the resource accessed by arequest
.static Resource
ResourceResolution.getResourceFromSearchPath
(Resource base, String path) Resolves a resource from the search path relative to thebase
resource by traversing thesling:resourceSuperType
chain.Modifier and TypeMethodDescriptionstatic Resource
ResourceResolution.getResourceFromSearchPath
(Resource base, String path) Resolves a resource from the search path relative to thebase
resource by traversing thesling:resourceSuperType
chain. -
Uses of Resource in org.apache.sling.scripting.sightly.impl.utils
Modifier and TypeMethodDescriptionstatic Resource
BindingsUtils.getResource
(Bindings bindings) ScriptDependencyResolver.resolveScript
(RenderContext renderContext, String scriptIdentifier) Resolves a script identifier to a resource -
Uses of Resource in org.apache.sling.scripting.thymeleaf
Modifier and TypeMethodDescription@Nullable org.thymeleaf.templatemode.TemplateMode
TemplateModeProvider.provideTemplateMode
(@NotNull Resource resource) -
Uses of Resource in org.apache.sling.scripting.thymeleaf.internal.processor
Modifier and TypeMethodDescriptionprotected String
SlingIncludeAttributeTagProcessor.dispatch
(Resource resource, String path, SlingHttpServletRequest slingHttpServletRequest, SlingHttpServletResponse slingHttpServletResponse, RequestDispatcherOptions requestDispatcherOptions) -
Uses of Resource in org.apache.sling.servlets.get.impl.helpers
Modifier and TypeMethodDescriptionprotected void
Dumps the information about the provided resource to aPrintWriter
. -
Uses of Resource in org.apache.sling.servlets.get.impl.util
ModifierConstructorDescriptionJsonObjectCreator
(Resource resource, boolean ecmaSupport) Create a new json object creatorResourceTraversor
(int levels, long maxResources, Resource resource, boolean ecmaSupport) Create a ResourceTraversor, optionally limiting recursion and total number of resources -
Uses of Resource in org.apache.sling.servlets.post
Modifier and TypeMethodDescriptionAbstractPostOperation.getApplyToResources
(SlingHttpServletRequest request) Deprecated.Returns an iterator onResource
instances addressed in theSlingPostConstants.RP_APPLY_TO
request parameter. -
Uses of Resource in org.apache.sling.servlets.post.impl.helper
Modifier and TypeMethodDescriptionSlingFileUploadHandler.getLastChunk
(Resource rsrc) Get the lastSlingPostConstants.NT_SLING_CHUNK_NODETYPE
Resource
.StreamedChunk.store
(Resource fileResource, List<Modification> changes) Store the chunk in a file resource under a jcr:content sub node.Modifier and TypeMethodDescriptionboolean
boolean
void
JCRSupport.checkoutIfNecessary
(Resource rsrc, List<Modification> changes, VersioningConfiguration versioningConfiguration) void
JCRSupportImpl.checkoutIfNecessary
(Resource resource, List<Modification> changes, VersioningConfiguration versioningConfiguration) void
SlingFileUploadHandler.deleteChunks
(Resource rsrc) Delete all chunks saved within a resource.SlingFileUploadHandler.getLastChunk
(Resource rsrc) Get the lastSlingPostConstants.NT_SLING_CHUNK_NODETYPE
Resource
.boolean
boolean
boolean
JCRSupport.isNodeType
(Resource rsrc, String typeHint) boolean
JCRSupportImpl.isNodeType
(Resource rsrc, String typeHint) boolean
JCRSupport.isVersionable
(Resource rsrc) boolean
JCRSupportImpl.isVersionable
(Resource rsrc) void
SlingFileUploadHandler.setFile
(Resource parent, RequestProperty prop, List<Modification> changes) Uses the file(s) in the request parameter for creation of new nodes.void
SlingPropertyValueHandler.setProperty
(Resource parent, RequestProperty prop) Set property on given node, with some automatic values when user provides the field name but no value.StreamedChunk.store
(Resource fileResource, List<Modification> changes) Store the chunk in a file resource under a jcr:content sub node.JCRSupport.storeAsReference
(Resource resource, Object node, String name, String[] values, int type, boolean multiValued) Stores property value(s) as reference(s). -
Uses of Resource in org.apache.sling.servlets.post.impl.operations
Modifier and TypeMethodDescriptionprotected Resource
CopyOperation.execute
(List<Modification> changes, Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration) protected Resource
MoveOperation.execute
(List<Modification> changes, Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration) Modifier and TypeMethodDescriptionAbstractPostOperation.getApplyToResources
(SlingHttpServletRequest request) Returns an iterator onResource
instances addressed in theSlingPostConstants.RP_APPLY_TO
request parameter.Modifier and TypeMethodDescriptionprotected Resource
CopyOperation.execute
(List<Modification> changes, Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration) protected Resource
MoveOperation.execute
(List<Modification> changes, Resource source, String destParent, String destName, VersioningConfiguration versioningConfiguration) protected void
AbstractPostOperation.orderResource
(SlingHttpServletRequest request, Resource resource, List<Modification> changes) Orders the given resource according to the specified command. -
Uses of Resource in org.apache.sling.servlets.resolver.internal.bundle
Modifier and TypeMethodDescriptionjavax.servlet.RequestDispatcher
RequestWrapper.getRequestDispatcher
(Resource resource, RequestDispatcherOptions options) -
Uses of Resource in org.apache.sling.servlets.resolver.internal.helper
Modifier and TypeMethodDescriptionprotected final @NotNull Resource
AbstractResourceCollector.getResource
(@NotNull ResourceResolver resolver, @NotNull String path, boolean useCaching) Returns a resource for the givenpath
.protected static @NotNull Resource
LocationCollector.getResource
(@NotNull ResourceResolver resolver, @NotNull String path, @NotNull Map<String, Resource> cacheMap) Resolve a path to a resource, either via the cache or the ResourceResolverstatic @Nullable Resource
AbstractResourceCollector.getResourceOrNull
(@NotNull ResourceResolver resolver, @NotNull String path, boolean useCaching) Resolvers a resource or null if there is no resource resolved from the given path.Modifier and TypeMethodDescriptionfinal Collection<Resource>
AbstractResourceCollector.getServlets
(ResourceResolver resolver, List<String> scriptExtensions) Modifier and TypeMethodDescriptionprotected final void
AbstractResourceCollector.addWeightedResource
(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, Resource resource, int numSelectors, int methodPrefixWeight) Creates aWeightedResource
and adds it to the set of resources.static NamedScriptResourceCollector
NamedScriptResourceCollector.create
(String name, Resource resource, String[] executionPaths, boolean useResourceCaching) static ResourceCollector
ResourceCollector.create
(Resource resource, String extension, String[] executionPaths, String[] defaultExtensions, String methodName, String[] selectors, boolean useResourceCaching) protected abstract void
AbstractResourceCollector.getWeightedResources
(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, Resource location) protected void
NamedScriptResourceCollector.getWeightedResources
(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, Resource location) protected void
ResourceCollector.getWeightedResources
(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, Resource location) Modifier and TypeMethodDescriptionprotected static @NotNull Resource
LocationCollector.getResource
(@NotNull ResourceResolver resolver, @NotNull String path, @NotNull Map<String, Resource> cacheMap) Resolve a path to a resource, either via the cache or the ResourceResolverModifierConstructorDescriptionResourceCollector
(String methodName, String baseResourceType, Resource resource, String[] executionPaths) Deprecated.use#ResourceCollector(String, String, Resource, String, String[])
instead.ResourceCollector
(String methodName, String baseResourceType, Resource resource, String extension, String[] executionPaths, boolean useResourceCaching) Creates aResourceCollector
finding servlets and scripts for the givenmethodName
. -
Uses of Resource in org.apache.sling.servlets.resolver.internal.resource
Modifier and TypeMethodDescription@Nullable Resource
MergingServletResourceProvider.getResource
(@NotNull ResolveContext<Object> resolveContext, @NotNull String s, @NotNull ResourceContext resourceContext, @Nullable Resource resource) MergingServletResourceProvider.getResource
(ResolveContext resolveContext, String path) ServletResourceProvider.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) Modifier and TypeMethodDescriptionMergingServletResourceProvider.listChildren
(ResolveContext ctx, Resource parent) ServletResourceProvider.listChildren
(ResolveContext<Object> ctx, Resource parent) Modifier and TypeMethodDescription@Nullable Resource
MergingServletResourceProvider.getResource
(@NotNull ResolveContext<Object> resolveContext, @NotNull String s, @NotNull ResourceContext resourceContext, @Nullable Resource resource) ServletResourceProvider.getResource
(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) MergingServletResourceProvider.listChildren
(ResolveContext ctx, Resource parent) ServletResourceProvider.listChildren
(ResolveContext<Object> ctx, Resource parent) -
Uses of Resource in org.apache.sling.spi.resource.provider
Modifier and TypeMethodDescription@NotNull Resource
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 ornull
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 ornull
if the resource provider cannot find it.Modifier 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) Modifier and TypeMethodDescriptionvoid
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 ornull
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 ornull
if the resource provider cannot find it.ResourceProvider.listChildren
(@NotNull ResolveContext<T> ctx, @NotNull Resource parent) boolean
ResourceProvider.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. -
Uses of Resource in org.apache.sling.validation
Modifier and TypeMethodDescription@Nullable ValidationModel
ValidationService.getValidationModel
(@NotNull Resource resource, boolean considerResourceSuperTypeModels) Tries to obtain aValidationModel
that is able to validate the givenresource
.@NotNull ValidationResult
ValidationService.validate
(@NotNull Resource resource, @NotNull ValidationModel model) Validates aResource
using a specificValidationModel
.@NotNull ValidationResult
ValidationService.validateResourceRecursively
(@NotNull Resource resource, boolean enforceValidation, Predicate<Resource> filter, boolean considerResourceSuperTypeModels) Validates aResource
and all child resources recursively by traversing through the resource tree starting from the given resource.Modifier and TypeMethodDescription@NotNull ValidationResult
ValidationService.validateResourceRecursively
(@NotNull Resource resource, boolean enforceValidation, Predicate<Resource> filter, boolean considerResourceSuperTypeModels) Validates aResource
and all child resources recursively by traversing through the resource tree starting from the given resource. -
Uses of Resource in org.apache.sling.validation.spi