Class FileResourceMapper
java.lang.Object
org.apache.sling.fsprovider.internal.mapper.FileResourceMapper
- Direct Known Subclasses:
FileVaultResourceMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContentFileCache
protected final org.apache.sling.fsprovider.internal.FileStatCache
protected final boolean
protected final File
-
Constructor Summary
ConstructorsConstructorDescriptionFileResourceMapper
(String providerRoot, File providerFile, org.apache.sling.fsprovider.internal.ContentFileExtensions contentFileExtensions, ContentFileCache contentFileCache, org.apache.sling.fsprovider.internal.FileStatCache fileStatCache, boolean overlayParentResourceProvider, boolean createContentFileMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChildren
(List<Iterator<? extends org.apache.sling.api.resource.Resource>> allChildren, Iterator<org.apache.sling.api.resource.Resource> children) org.apache.sling.api.resource.Resource
getResource
(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull String path, @NotNull org.apache.sling.spi.resource.provider.ResourceContext resourceContext, @Nullable org.apache.sling.api.resource.Resource parent) Returns a resource wrapping a file system file or folder for the given path.Iterator<org.apache.sling.api.resource.Resource>
listChildren
(@NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull org.apache.sling.api.resource.Resource parent) Returns an iterator of resources.protected boolean
resolveChildren
(org.apache.sling.api.resource.ResourceResolver resolver, org.apache.sling.api.resource.Resource parent, List<Iterator<? extends org.apache.sling.api.resource.Resource>> allChildren) resolveResource
(org.apache.sling.api.resource.ResourceResolver resolver, String path) transformPath
(String path) Transforms the path based on the mode.
-
Field Details
-
providerFile
-
contentFileCache
-
fileStatCache
protected final org.apache.sling.fsprovider.internal.FileStatCache fileStatCache -
overlayParentResourceProvider
protected final boolean overlayParentResourceProvider
-
-
Constructor Details
-
FileResourceMapper
public FileResourceMapper(String providerRoot, File providerFile, org.apache.sling.fsprovider.internal.ContentFileExtensions contentFileExtensions, ContentFileCache contentFileCache, org.apache.sling.fsprovider.internal.FileStatCache fileStatCache, boolean overlayParentResourceProvider, boolean createContentFileMapper)
-
-
Method Details
-
resolveResource
-
resolveChildren
-
getResource
public org.apache.sling.api.resource.Resource getResource(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull @NotNull String path, @NotNull @NotNull org.apache.sling.spi.resource.provider.ResourceContext resourceContext, @Nullable @Nullable org.apache.sling.api.resource.Resource parent) Returns a resource wrapping a file system file or folder for the given path. If thepath
is equal to the configured resource tree location of this provider, the configured file system file or folder is used for the resource. Otherwise the configured resource tree location prefix is removed from the path and the remaining relative path is used to access the file or folder. If no such file or folder exists, this method returnsnull
. -
addChildren
-
listChildren
public Iterator<org.apache.sling.api.resource.Resource> listChildren(@NotNull @NotNull org.apache.sling.spi.resource.provider.ResolveContext<Object> ctx, @NotNull @NotNull org.apache.sling.api.resource.Resource parent) Returns an iterator of resources. -
transformPath
Transforms the path based on the mode. By default this method does nothing- Parameters:
path
-- Returns:
- The transformed path
-