Search in sources :

Example 6 with GeneratorPluginConfiguration

use of org.eclipse.vorto.repository.plugin.generator.GeneratorPluginConfiguration in project vorto by eclipse.

the class DefaultGeneratorPluginService method getPluginInfo.

@Override
public GeneratorPluginConfiguration getPluginInfo(String serviceKey, boolean includeConfigUI) {
    GeneratorPluginConfiguration plugin = this.generatorsPlugins.get(serviceKey);
    if (plugin.getName() == null) {
        GeneratorPluginConfiguration pluginLoadedFromServer = loadFromRemote(plugin);
        this.generatorsPlugins.put(serviceKey, pluginLoadedFromServer);
        plugin = pluginLoadedFromServer;
    }
    plugin.setAmountOfDownloads(this.generatorMetrics.findByGeneratorKey(serviceKey).getInvocationCount());
    return plugin;
}
Also used : GeneratorPluginConfiguration(org.eclipse.vorto.repository.plugin.generator.GeneratorPluginConfiguration)

Aggregations

GeneratorPluginConfiguration (org.eclipse.vorto.repository.plugin.generator.GeneratorPluginConfiguration)6 Test (org.junit.Test)3 ModelId (org.eclipse.vorto.model.ModelId)2 GeneratedOutput (org.eclipse.vorto.repository.plugin.generator.GeneratedOutput)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 PostConstruct (javax.annotation.PostConstruct)1 ImporterPluginInfo (org.eclipse.vorto.plugin.importer.ImporterPluginInfo)1 IModelRepository (org.eclipse.vorto.repository.core.IModelRepository)1 ModelInfo (org.eclipse.vorto.repository.core.ModelInfo)1