Package org.apache.sling.api.resource
Interface ParametrizableResourceProvider
-
@Deprecated @ConsumerType public interface ParametrizableResourceProvider
Deprecated.Use theResourceProvider
This extension allows resource provider implementations to support semicolon-separated parameters added to the URI, eg.:/content/test;v='1.0'
. If aResourceProvider
implements this interface, thegetResource(ResourceResolver, String, Map)
method is called instead ofResourceProvider.getResource(ResourceResolver, String)
if such parameters are available. If no map (or an empty map) is available,ResourceProvider.getResource(ResourceResolver, String)
is called.- Since:
- 2.8.0 (Sling API Bundle 2.9.0)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @Nullable Resource
getResource(@NotNull ResourceResolver resourceResolver, @NotNull java.lang.String path, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Deprecated.Returns a resource from this resource provider ornull
if the resource provider cannot find it.
-
-
-
Method Detail
-
getResource
@Nullable @Nullable Resource getResource(@NotNull @NotNull ResourceResolver resourceResolver, @NotNull @NotNull java.lang.String path, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
Deprecated.Returns a resource from this resource provider ornull
if the resource provider cannot find it. The path should have one of theResourceProvider.ROOTS
strings as its prefix. The resource provider must not return cached instances for a resource as the resource resolver will update the resource metadata of the resource at the end of the resolution process and this metadata might be different depending on the full path of resource resolution passed into the resource resolver.- Parameters:
resourceResolver
- TheResourceResolver
to which the returnedResource
is attached.path
- The full path of the resource.parameters
- A map of additional parameters, the map contains at least one parameter.- Returns:
null
If this provider does not have a resource for the path.- Throws:
SlingException
- may be thrown in case of any problem creating theResource
instance.- See Also:
ResourceProvider.getResource(ResourceResolver, String)
-
-