Enum ResourceResolverType

java.lang.Object
java.lang.Enum<ResourceResolverType>
org.apache.sling.testing.mock.sling.ResourceResolverType
Alle implementierten Schnittstellen:
Serializable, Comparable<ResourceResolverType>

public enum ResourceResolverType extends Enum<ResourceResolverType>
The resource resolver mock implementation supports different underlying repository implementations.
  • Enum-Konstanten - Details

    • RESOURCERESOLVER_MOCK

      public static final ResourceResolverType RESOURCERESOLVER_MOCK
      Uses Sling "resourceresolver-mock" implementation, no underlying JCR repository.
      • Simulates an In-Memory resource tree, does not provide adaptions to JCR.
      • You can use it to make sure the code you want to test does not contain references to JCR API.
      • Behaves slightly different from JCR resource mapping e.g. handling binary and date values.
      • This resource resolver type is very fast.
    • RESOURCEPROVIDER_MOCK

      public static final ResourceResolverType RESOURCEPROVIDER_MOCK
      Uses Sling "resourceresolver-mock" implementation, no underlying JCR repository.
      • Uses the real Sling Resource Resolver and JCR Resource mapping implementation. This allows using multiple resource providers and loading folders for JSON or FileVault XML content.
      • Simulates an In-Memory resource tree, does not provide adaptions to JCR.
      • You can use it to make sure the code you want to test does not contain references to JCR API.
      • Behaves slightly different from JCR resource mapping e.g. handling binary and date values.
      • This resource resolver type is quite fast.
    • JCR_MOCK

      public static final ResourceResolverType JCR_MOCK
      Uses a simple JCR "in-memory" mock as underlying repository.
      • Uses the real Sling Resource Resolver and JCR Resource mapping implementation. This allows using multiple resource providers and loading folders for JSON or FileVault XML content.
      • The mock JCR implementation from Apache Sling is used.
      • It supports the most important, but not all JCR features. Extended features like Versioning, Eventing, Search, Transaction handling etc. are not supported.
      • This resource resolver type is quite fast.
    • JCR_OAK

      public static final ResourceResolverType JCR_OAK
      Uses a real JCR Jackrabbit Oak repository.
      • Uses the real Sling Resource Resolver and JCR Resource mapping implementation. This allows using multiple resource providers and loading folders for JSON or FileVault XML content.
      • The JCR repository is started on first access, this may take some seconds.
      • The MemoryNodeStore implementation is used, with no customizations.
    • NONE

      public static final ResourceResolverType NONE
      Provides resource resolver environment without any ResourceProvider. You have to register one yourself to do anything useful with it.
      • Uses the real Sling Resource Resolver implementation.
      • The performance of this resource resolver type depends on the resource provider registered.
  • Methodendetails

    • values

      public static ResourceResolverType[] values()
      Gibt ein Array mit den Konstanten dieses Enum-Typs in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieses Enumerationstyps in der Reihenfolge ihrer Deklaration
    • valueOf

      public static ResourceResolverType valueOf(String name)
      Gibt die Enumerationskonstante dieses Typs mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enumerationskonstante in diesem Typ deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn dieser Enumerationstyp keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • getNodeTypeMode

      @NotNull public @NotNull NodeTypeMode getNodeTypeMode()
      Gibt zurück:
      How JCR namespaces and node types have to be handled.