Interface ResolveContext<T>

All Known Implementing Classes:
BasicResolveContext

@ProviderType public interface ResolveContext<T>
The resolve context is passed to most of the methods of the ResourceProvider to provide additional context information for the provider. If the provider requires authentication, the object returned by ResourceProvider.authenticate(Map) is returned in getProviderState().
Since:
1.0.0 (Sling API Bundle 2.11.0)
  • Method Details

    • getResourceResolver

      @NotNull @NotNull ResourceResolver getResourceResolver()
      Get the current resource resolver.
      Returns:
      The resource resolver.
    • getProviderState

      @Nullable T getProviderState()
      This is the object returned by ResourceProvider.authenticate(Map)
      Returns:
      The data object or null
    • getParentResolveContext

      @Nullable @Nullable ResolveContext<?> getParentResolveContext()
      Return a resolve context for the parent resource provider.
      Returns:
      A resolve context or null if there is no parent.
      See Also:
    • getParentResourceProvider

      @Nullable @Nullable ResourceProvider<?> getParentResourceProvider()
      Return the parent resource provider. If the parent should be used for resolving, a context created with getParentResolveContext() should be passed to that instance.
      Returns:
      The parent provider or null if there is no parent.