@@ -0,0 +1,1871 @@
+package com.github.aureliano.evtbridge.core.config;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0A%0Aimport com.github.aureliano.evtbridge.common.helper.ReflectionHelper;%0Aimport com.github.aureliano.evtbridge.common.helper.StringHelper;%0Aimport com.github.aureliano.evtbridge.core.filter.IEventFielter;%0Aimport com.github.aureliano.evtbridge.core.formatter.IOutputFormatter;%0Aimport com.github.aureliano.evtbridge.core.helper.DataHelper;%0Aimport com.github.aureliano.evtbridge.core.listener.DataWritingListener;%0Aimport com.github.aureliano.evtbridge.core.parser.IParser;%0A%0Apublic abstract class AbstractConfigOutputConverter%3CT%3E implements IConfigurationConverter%3CT%3E %7B%0A%0A%09@SuppressWarnings(%22unchecked%22)%0A%09protected void configureObject(IConfigOutput conf, Map%3CString, Object%3E data) %7B%0A%09%09String value = StringHelper.parse(data.get(%22parser%22));%0A%09%09if (!StringHelper.isEmpty(value)) %7B%0A%09%09%09conf.withParser((IParser%3C?%3E) ReflectionHelper.newInstance(value));%0A%09%09%7D%0A%09%09%0A%09%09value = StringHelper.parse(data.get(%22filter%22));%0A%09%09if (!StringHelper.isEmpty(value)) %7B%0A%09%09%09conf.withFilter((IEventFielter) ReflectionHelper.newInstance(value));%0A%09%09%7D%0A%09%09%0A%09%09value = StringHelper.parse(data.get(%22formatter%22));%0A%09%09if (!StringHelper.isEmpty(value)) %7B%0A%09%09%09conf.withOutputFormatter((IOutputFormatter) ReflectionHelper.newInstance(value));%0A%09%09%7D%0A%09%09%0A%09%09if (data.get(%22dataWritingListeners%22) != null) %7B%0A%09%09%09List%3CString%3E listeners = (List%3CString%3E) data.get(%22dataWritingListeners%22);%0A%09%09%09for (String listener : listeners) %7B%0A%09%09%09%09conf.addDataWritingListener((DataWritingListener) ReflectionHelper.newInstance(listener));%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09if (data.get(%22metadata%22) != null) %7B%0A%09%09%09Properties properties = DataHelper.mapToProperties((Map%3CString, Object%3E) data.get(%22metadata%22));%0A%09%09%09for (Object key : properties.keySet()) %7B%0A%09%09%09%09conf.putMetadata(key.toString(), properties.getProperty(key.toString()));%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D

Create abstract config output converter.