use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class NotificationViewModelBuilder method allPluginInfos.
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (String pluginId : notificationPluginRegistry.getNotificationPlugins()) {
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
pluginInfos.add(new PluginInfo(descriptor, NotificationExtension.EXTENSION_NAME, null, null, null));
}
return pluginInfos;
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class PackageViewModelBuilder method pluginInfoFor.
public PluginInfo pluginInfoFor(String pluginId) {
String PACKAGE_CONFIGRATION_TYPE = "package";
String REPOSITORY_CONFIGRATION_TYPE = "repository";
if (!PackageMetadataStore.getInstance().hasPreferenceFor(pluginId)) {
return null;
}
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
ArrayList<PluginConfiguration> pluginConfigurations = new ArrayList<>();
pluginConfigurations.addAll(configurations(PackageMetadataStore.getInstance().getMetadata(pluginId), PACKAGE_CONFIGRATION_TYPE));
pluginConfigurations.addAll(configurations(RepositoryMetadataStore.getInstance().getMetadata(pluginId), REPOSITORY_CONFIGRATION_TYPE));
return new PluginInfo(descriptor, PackageRepositoryExtension.EXTENSION_NAME, null, new PluggableInstanceSettings(pluginConfigurations));
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class PluggableTaskPluginInfoBuilder method pluginInfoFor.
@Override
public PluggableTaskPluginInfo pluginInfoFor(String pluginId) {
if (!store.pluginIds().contains(pluginId)) {
return null;
}
GoPluginDescriptor plugin = pluginManager.getPluginDescriptorFor(pluginId);
TaskPreference taskPreference = store.preferenceFor(pluginId);
List<PluginConfiguration> pluginConfigurations = configurations(taskPreference.getConfig());
PluginView pluginView = new PluginView(taskPreference.getView().template());
return new PluggableTaskPluginInfo(plugin, taskPreference.getView().displayValue(), new PluggableInstanceSettings(pluginConfigurations, pluginView));
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class PluggableTaskViewModelBuilder method allPluginInfos.
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (String pluginId : PluggableTaskConfigStore.store().pluginIds()) {
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
TaskPreference taskPreference = PluggableTaskConfigStore.store().preferenceFor(pluginId);
pluginInfos.add(new PluginInfo(descriptor, TaskExtension.TASK_EXTENSION, taskPreference.getView().displayValue(), null, null));
}
return pluginInfos;
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class SCMViewModelBuilder method allPluginInfos.
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (String pluginId : SCMMetadataStore.getInstance().pluginIds()) {
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
SCMPreference scmPreference = SCMMetadataStore.getInstance().preferenceFor(pluginId);
pluginInfos.add(new PluginInfo(descriptor, SCMExtension.EXTENSION_NAME, scmPreference.getScmView().displayValue(), null, null));
}
return pluginInfos;
}
Aggregations