use of com.thoughtworks.go.domain.config.ConfigurationProperty in project gocd by gocd.
the class PackageRepository method applyPackagePluginMetadata.
@PostConstruct
public void applyPackagePluginMetadata() {
String pluginId = pluginConfiguration.getId();
for (ConfigurationProperty configurationProperty : configuration) {
RepositoryMetadataStore repositoryMetadataStore = RepositoryMetadataStore.getInstance();
if (repositoryMetadataStore.getMetadata(pluginId) != null) {
boolean isSecureProperty = repositoryMetadataStore.hasOption(pluginId, configurationProperty.getConfigurationKey().getName(), PackageConfiguration.SECURE);
configurationProperty.handleSecureValueConfiguration(isSecureProperty);
}
}
for (PackageDefinition packageDefinition : packages) {
packageDefinition.applyPackagePluginMetadata(pluginId);
}
}
use of com.thoughtworks.go.domain.config.ConfigurationProperty in project gocd by gocd.
the class SCM method applyPluginMetadata.
@PostConstruct
public void applyPluginMetadata() {
String pluginId = getPluginId();
for (ConfigurationProperty configurationProperty : configuration) {
SCMMetadataStore scmMetadataStore = SCMMetadataStore.getInstance();
if (scmMetadataStore.getConfigurationMetadata(pluginId) != null) {
boolean isSecureProperty = scmMetadataStore.hasOption(pluginId, configurationProperty.getConfigurationKey().getName(), SCMConfiguration.SECURE);
configurationProperty.handleSecureValueConfiguration(isSecureProperty);
}
}
}
use of com.thoughtworks.go.domain.config.ConfigurationProperty in project gocd by gocd.
the class SCM method getConfigForDisplay.
public String getConfigForDisplay() {
String pluginId = getPluginId();
SCMMetadataStore metadataStore = SCMMetadataStore.getInstance();
List<ConfigurationProperty> propertiesToBeUsedForDisplay = ConfigurationDisplayUtil.getConfigurationPropertiesToBeUsedForDisplay(metadataStore, pluginId, configuration);
String prefix = metadataStore.hasPlugin(pluginId) ? "" : "WARNING! Plugin missing. ";
return prefix + configuration.forDisplay(propertiesToBeUsedForDisplay);
}
use of com.thoughtworks.go.domain.config.ConfigurationProperty in project gocd by gocd.
the class PluggableTask method applyPluginMetadata.
@PostConstruct
public void applyPluginMetadata() {
if (taskPreference() != null) {
for (ConfigurationProperty configurationProperty : configuration) {
if (isValidPluginConfiguration(configurationProperty.getConfigKeyName())) {
Boolean isSecure = pluginConfigurationFor(configurationProperty.getConfigKeyName()).getOption(Property.SECURE);
configurationProperty.handleSecureValueConfiguration(isSecure);
}
}
}
}
use of com.thoughtworks.go.domain.config.ConfigurationProperty in project gocd by gocd.
the class PluggableTask method getPropertiesForDisplay.
@Override
public List<TaskProperty> getPropertiesForDisplay() {
ArrayList<TaskProperty> taskProperties = new ArrayList<>();
if (PluggableTaskConfigStore.store().hasPreferenceFor(pluginConfiguration.getId())) {
TaskPreference preference = taskPreference();
List<? extends Property> propertyDefinitions = preference.getConfig().list();
for (Property propertyDefinition : propertyDefinitions) {
ConfigurationProperty configuredProperty = configuration.getProperty(propertyDefinition.getKey());
if (configuredProperty == null)
continue;
taskProperties.add(new TaskProperty(propertyDefinition.getOption(Property.DISPLAY_NAME), configuredProperty.getDisplayValue(), configuredProperty.getConfigKeyName()));
}
return taskProperties;
}
for (ConfigurationProperty property : configuration) {
taskProperties.add(new TaskProperty(property.getConfigKeyName(), property.getDisplayValue()));
}
return taskProperties;
}
Aggregations