Class MockCAConfig
- java.lang.Object
-
- io.wcm.testing.mock.wcmio.caconfig.MockCAConfig
-
@ProviderType public final class MockCAConfig extends Object
Helps setting up a mock environment for wcm.io Configuration.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidcontextPathStrategyAbsoluteParent(@NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, int... levels)RegisterContextPathStrategythat supports one or multiple fixed levels in content hierarchy where configurations are supported.static voidcontextPathStrategyRootTemplate(@NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, String... templatePaths)RegisterContextPathStrategythat detects context paths by matching parent pages against a list of allowed templates for context root.static voidwriteConfiguration(@NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull String contextPath, @NotNull String configName, @NotNull Object @NotNull ... values)Deprecated.Please useMockContextAwareConfig.writeConfiguration(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Object[])static voidwriteConfiguration(@NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull String contextPath, @NotNull String configName, @NotNull Map<String,Object> values)Deprecated.Please useMockContextAwareConfig.writeConfiguration(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Map)static voidwriteConfigurationCollection(@NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull String contextPath, @NotNull String configName, @NotNull Collection<Map<String,Object>> values)Deprecated.Please useMockContextAwareConfig.writeConfigurationCollection(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Collection)
-
-
-
Method Detail
-
contextPathStrategyAbsoluteParent
public static void contextPathStrategyAbsoluteParent(@NotNull @NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, int... levels)RegisterContextPathStrategythat supports one or multiple fixed levels in content hierarchy where configurations are supported.- Parameters:
context- AEM contextlevels- List of absolute levels where configuration is supported. Levels are used in the same way asText.getAbsoluteParent(String, int). Example:
Text.getAbsoluteParent("/foo/bar/test", 1) == "/foo/bar"
-
contextPathStrategyRootTemplate
public static void contextPathStrategyRootTemplate(@NotNull @NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, String... templatePaths)RegisterContextPathStrategythat detects context paths by matching parent pages against a list of allowed templates for context root.- Parameters:
context- AEM contexttemplatePaths- List of template paths allowed for context root pages.
-
writeConfiguration
@Deprecated public static void writeConfiguration(@NotNull @NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @NotNull @NotNull Map<String,Object> values)
Deprecated.Please useMockContextAwareConfig.writeConfiguration(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Map)Writes configuration parameters using the primary configured persistence provider.- Parameters:
context- AEM contextcontextPath- Configuration idconfigName- Config namevalues- Configuration values
-
writeConfiguration
@Deprecated public static void writeConfiguration(@NotNull @NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @NotNull @NotNull Object @NotNull ... values)
Deprecated.Please useMockContextAwareConfig.writeConfiguration(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Object[])Writes configuration parameters using the primary configured persistence provider.- Parameters:
context- AEM contextcontextPath- Configuration idconfigName- Config namevalues- Configuration values
-
writeConfigurationCollection
@Deprecated public static void writeConfigurationCollection(@NotNull @NotNull io.wcm.testing.mock.aem.context.AemContextImpl context, @NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @NotNull @NotNull Collection<Map<String,Object>> values)
Deprecated.Please useMockContextAwareConfig.writeConfigurationCollection(org.apache.sling.testing.mock.sling.context.SlingContextImpl, String, String, Collection)Writes a collection of configuration parameters using the primary configured persistence provider.- Parameters:
context- AEM contextcontextPath- Configuration idconfigName- Config namevalues- Configuration values
-
-