Schnittstelle ResourceResolverTypeAdapter


public interface ResourceResolverTypeAdapter
SPI interface for resource resolver type implementations to provide a mock resource resolver factory.

Supported constructors for implementing classes:

  • Empty constructor
  • Constructor with BundleContext parameter
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    @Nullable org.apache.sling.api.resource.ResourceResolverFactory
    Gets resource resolver factory instance.
    @Nullable org.apache.sling.jcr.api.SlingRepository
    Get SlingRepository instance.
    default org.apache.sling.jcr.api.SlingRepository
    Get a SlingRepository instance based on a snapshot taken from another repository.
    default @Nullable Object
    snapshot(org.apache.sling.jcr.api.SlingRepository repository)
    Make a snapshot of the current state of the given repository, or return null if snapshots are not supported.
  • Methodendetails

    • newResourceResolverFactory

      @Nullable @Nullable org.apache.sling.api.resource.ResourceResolverFactory newResourceResolverFactory()
      Gets resource resolver factory instance. Can be null if only a SlingRepository is provided, in this case the method newSlingRepository() has to return a value.
      Gibt zurück:
      Resource resolver factory instance or null
    • newSlingRepository

      @Nullable @Nullable org.apache.sling.jcr.api.SlingRepository newSlingRepository()
      Get SlingRepository instance. Can be null if a resource resolver factory is provided, in this case the method newResourceResolverFactory() has to return a value.
      Gibt zurück:
      Sling repository instance or null
    • snapshot

      @Nullable default @Nullable Object snapshot(org.apache.sling.jcr.api.SlingRepository repository)
      Make a snapshot of the current state of the given repository, or return null if snapshots are not supported. Returning non-null implies that calling newSlingRepositoryFromSnapshot(Object) with the same object will succeed when called on objects of the same implementation type. The returned object must capture the whole state of the repository, and must not reflect any future changes made to the repository after this method returns.
      Parameter:
      repository - The repository to snapshot.
      Gibt zurück:
      A snapshot object.
    • newSlingRepositoryFromSnapshot

      default org.apache.sling.jcr.api.SlingRepository newSlingRepositoryFromSnapshot(Object snapshot)
      Get a SlingRepository instance based on a snapshot taken from another repository.
      Parameter:
      snapshot - A snapshot object, returned by an earlier call to snapshot(SlingRepository).
      Gibt zurück:
      A Sling repository instance.