Class BinaryDownloadUriProvider
java.lang.Object
org.apache.sling.jcr.resource.internal.helper.jcr.BinaryDownloadUriProvider
- All Implemented Interfaces:
URIProvider
Provides URIs for direct binary read-access based on the Jackrabbit API
BinaryDownload.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.sling.api.resource.external.URIProvider
URIProvider.Operation, URIProvider.Scope -
Constructor Summary
ConstructorsConstructorDescriptionBinaryDownloadUriProvider(BinaryDownloadUriProvider.Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull javax.jcr.PropertygetPrimaryProperty(@NotNull javax.jcr.Node node) @NotNull URItoURI(@NotNull Resource resource, @NotNull URIProvider.Scope scope, @NotNull URIProvider.Operation operation) Return a URI applicable to the defined scope.
-
Constructor Details
-
BinaryDownloadUriProvider
-
-
Method Details
-
toURI
@NotNull public @NotNull URI toURI(@NotNull @NotNull Resource resource, @NotNull @NotNull URIProvider.Scope scope, @NotNull @NotNull URIProvider.Operation operation) Description copied from interface:URIProviderReturn a URI applicable to the defined scope.- Specified by:
toURIin interfaceURIProvider- Parameters:
resource- the resource to convert from.scope- the required scope.operation- the required operation.- Returns:
- a URI if the resource has a URI suitable for the requested scope and operation, otherwise the implementation should throw an IlleagalArgumentException.
-
getPrimaryProperty
@NotNull protected @NotNull javax.jcr.Property getPrimaryProperty(@NotNull @NotNull javax.jcr.Node node) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-