use of org.apache.sling.caconfig.impl.ConfigurationResourceWrapper in project sling by apache.
the class DefaultConfigurationInheritanceStrategy method getResource.
@Override
public Resource getResource(Iterator<Resource> configResources) {
if (!config.enabled()) {
return null;
}
if (!configResources.hasNext()) {
return null;
}
Resource primary = configResources.next();
if (!isPropertyInheritance(primary) || !configResources.hasNext()) {
return primary;
}
Map<String, Object> mergedProps = getInheritedProperties(primary.getValueMap(), configResources);
return new ConfigurationResourceWrapper(primary, new ValueMapDecorator(mergedProps));
}
Aggregations