use of com.thoughtworks.go.server.ui.plugins.PluginInfo in project gocd by gocd.
the class AuthorizationViewModelBuilder method allPluginInfos.
@Override
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (PluginDescriptor descriptor : metadataStore.getPlugins()) {
Image icon = metadataStore.getIcon(descriptor);
pluginInfos.add(new PluginInfo(descriptor, AuthorizationPluginConstants.EXTENSION_NAME, null, null, icon));
}
return pluginInfos;
}
use of com.thoughtworks.go.server.ui.plugins.PluginInfo in project gocd by gocd.
the class ElasticAgentViewViewModelBuilder method allPluginInfos.
@Override
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (PluginDescriptor descriptor : metadataStore.getPlugins()) {
Image icon = metadataStore.getIcon(descriptor);
pluginInfos.add(new PluginInfo(descriptor, ElasticAgentPluginConstants.EXTENSION_NAME, null, null, icon));
}
return pluginInfos;
}
use of com.thoughtworks.go.server.ui.plugins.PluginInfo in project gocd by gocd.
the class ElasticAgentViewViewModelBuilder method pluginInfoFor.
@Override
public PluginInfo pluginInfoFor(String pluginId) {
PluginDescriptor descriptor = metadataStore.find(pluginId);
if (descriptor == null) {
return null;
}
Image icon = metadataStore.getIcon(descriptor);
ArrayList<PluginConfiguration> pluginConfigurations = PluginConfiguration.getPluginConfigurations(metadataStore.getProfileMetadata(descriptor));
PluginView pluginView = new PluginView(metadataStore.getProfileView(descriptor));
PluggableInstanceSettings settings = new PluggableInstanceSettings(pluginConfigurations, pluginView);
return new PluginInfo(descriptor, ElasticAgentPluginConstants.EXTENSION_NAME, null, settings, icon);
}
use of com.thoughtworks.go.server.ui.plugins.PluginInfo 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.server.ui.plugins.PluginInfo 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));
}
Aggregations