Enum ResourceResolverType
- All Implemented Interfaces:
Serializable
,Comparable<ResourceResolverType>
The resource resolver mock implementation supports different underlying
repository implementations.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUses a simple JCR "in-memory" mock as underlying repository.Uses a real JCR Jackrabbit Oak repository.Provides resource resolver environment without any ResourceProvider.Uses Sling "resourceresolver-mock" implementation, no underlying JCR repository.Uses Sling "resourceresolver-mock" implementation, no underlying JCR repository. -
Method Summary
Modifier and TypeMethodDescription@NotNull NodeTypeMode
static ResourceResolverType
Returns the enum constant of this type with the specified name.static ResourceResolverType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getNodeTypeMode
- Returns:
- How JCR namespaces and node types have to be handled.
-