use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class GoPluginDescriptorModelTest method shouldNotAddHttpToUrlIfSecureProtocolIsAlreadyPresent.
@Test
public void shouldNotAddHttpToUrlIfSecureProtocolIsAlreadyPresent() throws Exception {
GoPluginDescriptor.Vendor vendor = new GoPluginDescriptor.Vendor(null, "https://ali.com");
GoPluginDescriptor.About about = new GoPluginDescriptor.About(null, null, "13.3.0", "some description", vendor, Arrays.asList("Linux", "Windows"));
GoPluginDescriptor descriptor = new GoPluginDescriptor("plugin.jar", "1", about, "some_path", new File("bundle_location"), false);
GoPluginDescriptor descriptorModel = GoPluginDescriptorModel.convertToDescriptorWithAllValues(descriptor);
assertThat(descriptorModel.about().vendor().url(), is("https://ali.com"));
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class PluginSettingsMetadataLoaderTest method setUp.
@Before
public void setUp() {
initMocks(this);
pluginDescriptor = new GoPluginDescriptor("plugin-id", "1.0", null, null, null, true);
extensions = Arrays.asList(packageRepositoryExtension, scmExtension, taskExtension, notificationExtension, authenticationExtension, configRepoExtension);
metadataLoader = new PluginSettingsMetadataLoader(extensions, pluginManager);
PluginSettingsMetadataStore.getInstance().clear();
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class AuthenticationViewModelBuilder method allPluginInfos.
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (String pluginId : registry.getAuthenticationPlugins()) {
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
pluginInfos.add(new PluginInfo(descriptor, AuthenticationExtension.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 allPluginInfos.
public List<PluginInfo> allPluginInfos() {
List<PluginInfo> pluginInfos = new ArrayList<>();
for (String pluginId : PackageMetadataStore.getInstance().pluginIds()) {
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
pluginInfos.add(new PluginInfo(descriptor, PackageRepositoryExtension.EXTENSION_NAME, null, null, null));
}
return pluginInfos;
}
use of com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor in project gocd by gocd.
the class PluggableTaskViewModelBuilder method pluginInfoFor.
public PluginInfo pluginInfoFor(String pluginId) {
if (!PluggableTaskConfigStore.store().hasPreferenceFor(pluginId)) {
return null;
}
GoPluginDescriptor descriptor = pluginManager.getPluginDescriptorFor(pluginId);
TaskPreference taskPreference = PluggableTaskConfigStore.store().preferenceFor(pluginId);
List<PluginConfiguration> pluginConfigurations = configurations(taskPreference.getConfig());
PluginView pluginView = new PluginView(taskPreference.getView().template());
return new PluginInfo(descriptor, TaskExtension.TASK_EXTENSION, taskPreference.getView().displayValue(), new PluggableInstanceSettings(pluginConfigurations, pluginView));
}
Aggregations