* the adapterConfig OR adapter details pointed by the mixin
*/
private List<MixinConfiguration> processMixinConfig(String namespace, MixinConfiguration mixin)
throws FeedConfigStoreException {
List<MixinConfiguration> mixinConfigs = new ArrayList<MixinConfiguration>();
MapMixinConfiguration mixinConfig = new MapMixinConfiguration();
if (null == mixin.getWrapperConfig()) {
// This has to be a mixin with config stored seperately.
NamespacedAdapterConfiguration adapterConfiguration =
(NamespacedAdapterConfiguration) getAdapterConfiguration(namespace, mixin
.getWrapperName());
mixinConfig.setWrapperConfig(adapterConfiguration.getConfigData());
for (MixinConfiguration adapterMixinConfig : adapterConfiguration.getMixins()) {
mixinConfigs.add(adapterMixinConfig);
}
mixinConfig.setWrapperName(adapterConfiguration.getAdapterType());
} else {
// Just load the adapter config properties and use the adapter class name
// as mixin wrapper name
Map<String, Object> adapterWrapper = getAdapter(namespace, mixin.getWrapperName());
mixinConfig.setWrapperName((String) adapterWrapper.get(ADAPTER_CLASS_NAME));
mixinConfig.setWrapperConfig(mixin.getWrapperConfig());
}
mixinConfigs.add(mixinConfig);
return mixinConfigs;
}