use of org.talend.hadoop.distribution.dynamic.adapter.DynamicTemplateAdapter in project tbd-studio-se by Talend.
the class AbstractDynamicDistribution method buildDynamicPlugin.
@Override
public IDynamicPlugin buildDynamicPlugin(IDynamicMonitor monitor, DynamicConfiguration configuration) throws Exception {
String distribution = configuration.getDistribution();
if (!StringUtils.equals(getDistributionName(), distribution)) {
throw new Exception("only support to build dynamic plugin of " + getDistributionName() + " instead of " + distribution);
}
String version = configuration.getVersion();
TemplateBean bestTemplateBean = getCompatibleTemplate(monitor, version);
// normally bestTemplateBean can't be null here
DynamicTemplateAdapter templateAdapter = new DynamicTemplateAdapter(bestTemplateBean, configuration);
templateAdapter.adapt(monitor);
IDynamicPlugin dynamicPlugin = templateAdapter.getDynamicPlugin();
return dynamicPlugin;
}
Aggregations