@Service(value=DistributionConfigurationManager.class) public class DefaultDistributionConfigurationManager extends Object implements DistributionConfigurationManager
DistributionConfigurationManager
implementation based on OSGI configs.
For each tree of properties a set of OSGI configs is generated and registered in ConfigurationAdmin.
To delete a component all configs owned by that component will be unregistered from ConfigurationAdmin.Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_DEFAULTS |
static String |
CONFIG_ENABLED |
static String |
CONFIG_PREFIX |
static String |
CONFIG_PROPERTIES |
static String |
CONFIG_ROOT |
Constructor and Description |
---|
DefaultDistributionConfigurationManager() |
Modifier and Type | Method and Description |
---|---|
void |
deleteConfig(org.apache.sling.api.resource.ResourceResolver resolver,
DistributionComponentKind kind,
String name) |
DistributionConfiguration |
getConfig(org.apache.sling.api.resource.ResourceResolver resolver,
DistributionComponentKind kind,
String name) |
List<DistributionConfiguration> |
getConfigs(org.apache.sling.api.resource.ResourceResolver resolver,
DistributionComponentKind kind) |
void |
saveConfig(org.apache.sling.api.resource.ResourceResolver resolver,
DistributionConfiguration config) |
@Property(label="Resource Config Enabled", description="If storing config in resource tree is enabled.", boolValue=false) public static final String CONFIG_ENABLED
@Property(label="Resource Config Prefix", description="The prefix of properties to be stored in content", value="etc.") public static final String CONFIG_PREFIX
@Property(label="Resource Config Root", description="The resource config root", value="/etc/distribution") public static final String CONFIG_ROOT
@Property(label="Resource Config Properties", description="The resource config properties", value="enabled") public static final String CONFIG_PROPERTIES
@Property(label="Resource Config Defaults", description="The default values for resource config properties", value="serializationType=distribution") public static final String CONFIG_DEFAULTS
public DefaultDistributionConfigurationManager()
public List<DistributionConfiguration> getConfigs(org.apache.sling.api.resource.ResourceResolver resolver, DistributionComponentKind kind)
getConfigs
in interface DistributionConfigurationManager
public DistributionConfiguration getConfig(org.apache.sling.api.resource.ResourceResolver resolver, DistributionComponentKind kind, String name)
getConfig
in interface DistributionConfigurationManager
public void saveConfig(org.apache.sling.api.resource.ResourceResolver resolver, DistributionConfiguration config)
saveConfig
in interface DistributionConfigurationManager
public void deleteConfig(org.apache.sling.api.resource.ResourceResolver resolver, DistributionComponentKind kind, String name)
deleteConfig
in interface DistributionConfigurationManager
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.