Class ServletResourceProvider
java.lang.Object
org.apache.sling.spi.resource.provider.ResourceProvider<Object>
org.apache.sling.servlets.resolver.internal.resource.ServletResourceProvider
-
Field Summary
Fields inherited from class org.apache.sling.spi.resource.provider.ResourceProvider
AUTH_ADMIN, AUTH_CLONE, AUTH_SERVICE_BUNDLE, AUTHENTICATE_LAZY, AUTHENTICATE_NO, AUTHENTICATE_REQUIRED, MODE_OVERLAY, MODE_PASSTHROUGH, PROPERTY_ADAPTABLE, PROPERTY_ATTRIBUTABLE, PROPERTY_AUTHENTICATE, PROPERTY_MODE, PROPERTY_MODIFIABLE, PROPERTY_NAME, PROPERTY_REFRESHABLE, PROPERTY_ROOT, PROPERTY_USE_RESOURCE_ACCESS_SECURITY, RESOURCE_TYPE_SYNTHETIC -
Method Summary
Modifier and TypeMethodDescriptiongetResource(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) Returns a resource from this resource provider ornullif the resource provider cannot find it.listChildren(ResolveContext<Object> ctx, Resource parent) toString()Return suitable info for loggingMethods inherited from class org.apache.sling.spi.resource.provider.ResourceProvider
adaptTo, authenticate, commit, copy, create, delete, getAttribute, getAttributeNames, getParent, getProviderContext, getQueryLanguageProvider, hasChanges, isLive, logout, move, orderBefore, refresh, revert, start, stop, update
-
Method Details
-
getResource
public Resource getResource(ResolveContext<Object> ctx, String path, ResourceContext resourceContext, Resource parent) Description copied from class:ResourceProviderReturns a resource from this resource provider ornullif the resource provider cannot find it. The path must have theResourceProvider.PROPERTY_ROOTstrings as its prefix. The resource provider must not return cached instances for a resource as the resource resolver will update the resource meta data of the resource at the end of the resolution process and this meta data might be different depending on the full path of resource resolution passed into the resource resolver.- Specified by:
getResourcein classResourceProvider<Object>- Parameters:
ctx- TheResolveContext.path- The full path of the resource.resourceContext- Additional information for resolving the resourceparent- Optional parent resource- Returns:
nullIf this provider does not have a resource for the path.
-
listChildren
Description copied from class:ResourceProviderReturns anIteratorofResourceobjects loaded from the children of the givenResource. The returnedResourceinstances are attached to the sameResourceResolveras the givenparentresource.This method may be called for resource providers whose root path list contains a path such that the resource path is a prefix of the list entry. This allows for the enumeration of deeply nested provided resources for which no actual parent hierarchy exists.
The returned iterator may in turn contain resources which do not actually exist but are required to traverse the resource tree. Such resources SHOULD be
SyntheticResourceobjects whose resource type MUST be set toResourceProvider.RESOURCE_TYPE_SYNTHETIC. As withResourceProvider.getResource(ResolveContext, String, ResourceContext, Resource)the returned Resource objects must not be cached objects.- Specified by:
listChildrenin classResourceProvider<Object>- Parameters:
ctx- TheResolveContext.parent- TheResourcewhose children are requested.- Returns:
- An
IteratorofResourceobjects ornullif the resource provider has no children for the given resource.
-
toString
Return suitable info for logging
-