public class ConfigurationOverrideMultiplexerImpl extends Object implements ConfigurationOverrideMultiplexer, org.apache.sling.commons.osgi.RankedServices.ChangeListener
ConfigurationOverrideProvider
implementations in the container
and consolidates their result based on service ranking.Constructor and Description |
---|
ConfigurationOverrideMultiplexerImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindConfigurationOverrideProvider(org.apache.sling.caconfig.spi.ConfigurationOverrideProvider item,
Map<String,Object> props) |
void |
changed()
If a provider is added or removed parse and collect all overrides again (to ensure correct overall order is preserved).
|
boolean |
isAllOverridden(@NotNull String contextPath,
@NotNull String configName)
Checks if the whole configuration for the given context path and name is overridden.
|
Map<String,Object> |
overrideProperties(@NotNull String contextPath,
@NotNull String configName,
@NotNull Map<String,Object> properties)
Override properties for given context path and configuration name.
|
org.apache.sling.api.resource.Resource |
overrideProperties(@NotNull String contextPath,
@NotNull String configName,
@Nullable org.apache.sling.api.resource.Resource configResource)
Override properties in given configuration resource (if any overrides are defined).
|
org.apache.sling.api.resource.Resource |
overrideProperties(@NotNull String contextPath,
@NotNull String configName,
@Nullable org.apache.sling.api.resource.Resource configResource,
@NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
Override properties in given configuration resource (if any overrides are defined).
|
protected void |
unbindConfigurationOverrideProvider(org.apache.sling.caconfig.spi.ConfigurationOverrideProvider item,
Map<String,Object> props) |
public ConfigurationOverrideMultiplexerImpl()
protected void bindConfigurationOverrideProvider(org.apache.sling.caconfig.spi.ConfigurationOverrideProvider item, Map<String,Object> props)
protected void unbindConfigurationOverrideProvider(org.apache.sling.caconfig.spi.ConfigurationOverrideProvider item, Map<String,Object> props)
public boolean isAllOverridden(@NotNull @NotNull String contextPath, @NotNull @NotNull String configName)
ConfigurationOverrideMultiplexer
isAllOverridden
in interface ConfigurationOverrideMultiplexer
contextPath
- Context pathconfigName
- Config namepublic Map<String,Object> overrideProperties(@NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @NotNull @NotNull Map<String,Object> properties)
ConfigurationOverrideMultiplexer
overrideProperties
in interface ConfigurationOverrideMultiplexer
contextPath
- Path of context resource for which configuration was resolvedconfigName
- Configuration nameproperties
- Resolved configuration propertiespublic org.apache.sling.api.resource.Resource overrideProperties(@NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @Nullable @Nullable org.apache.sling.api.resource.Resource configResource)
ConfigurationOverrideMultiplexer
overrideProperties
in interface ConfigurationOverrideMultiplexer
contextPath
- Context pathconfigName
- Configuration nameconfigResource
- Resolved configuration resourcepublic org.apache.sling.api.resource.Resource overrideProperties(@NotNull @NotNull String contextPath, @NotNull @NotNull String configName, @Nullable @Nullable org.apache.sling.api.resource.Resource configResource, @NotNull @NotNull org.apache.sling.api.resource.ResourceResolver resourceResolver)
ConfigurationOverrideMultiplexer
overrideProperties
in interface ConfigurationOverrideMultiplexer
contextPath
- Context pathconfigName
- Configuration nameconfigResource
- Resolved configuration resourceresourceResolver
- Resource resolverpublic void changed()
changed
in interface org.apache.sling.commons.osgi.RankedServices.ChangeListener
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.