public final class MockContentPolicyStorage
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static @Nullable com.day.cq.wcm.api.policies.ContentPolicyMapping |
getContentPolicyMapping(@NotNull java.lang.String resourceType,
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
Get content policy mapping that was stored for the given resource type.
|
static @NotNull com.day.cq.wcm.api.policies.ContentPolicyMapping |
storeContentPolicyMapping(@NotNull java.lang.String resourceType,
@NotNull java.util.Map<java.lang.String,java.lang.Object> properties,
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
Creates a mocked content policy with the given properties and maps it to all content resources with the given
resource type.
|
@NotNull public static @NotNull com.day.cq.wcm.api.policies.ContentPolicyMapping storeContentPolicyMapping(@NotNull @NotNull java.lang.String resourceType, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> properties, @NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceType
- Resource type that should be mapped to the content policyproperties
- Properties for the content policyresourceResolver
- Resource resolver@Nullable public static @Nullable com.day.cq.wcm.api.policies.ContentPolicyMapping getContentPolicyMapping(@NotNull @NotNull java.lang.String resourceType, @NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
resourceType
- Resource typeresourceResolver
- Resource resolverCopyright © 2014–2021 wcm.io. All rights reserved.