Search in sources :

Example 6 with PluginProfileMetadataKey

use of com.thoughtworks.go.plugin.access.common.models.PluginProfileMetadataKey in project gocd by gocd.

the class PluginConfiguration method getPluginConfigurations.

public static ArrayList<PluginConfiguration> getPluginConfigurations(PluginProfileMetadataKeys config) {
    ArrayList<PluginConfiguration> pluginConfigurations = new ArrayList<>();
    for (PluginProfileMetadataKey property : config) {
        Map<String, Object> metaData = new HashMap<>();
        metaData.put(ViewModelBuilder.REQUIRED_OPTION, property.getMetadata().isRequired());
        metaData.put(ViewModelBuilder.SECURE_OPTION, property.getMetadata().isSecure());
        pluginConfigurations.add(new PluginConfiguration(property.getKey(), metaData));
    }
    return pluginConfigurations;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) PluginProfileMetadataKey(com.thoughtworks.go.plugin.access.common.models.PluginProfileMetadataKey)

Aggregations

PluginProfileMetadataKey (com.thoughtworks.go.plugin.access.common.models.PluginProfileMetadataKey)6 Image (com.thoughtworks.go.plugin.access.common.models.Image)5 PluginProfileMetadata (com.thoughtworks.go.plugin.access.common.models.PluginProfileMetadata)5 PluginProfileMetadataKeys (com.thoughtworks.go.plugin.access.common.models.PluginProfileMetadataKeys)5 PluginView (com.thoughtworks.go.server.ui.plugins.PluginView)5 Test (org.junit.Test)5 GoPluginDescriptor (com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor)4 PluggableInstanceSettings (com.thoughtworks.go.server.ui.plugins.PluggableInstanceSettings)4 AuthorizationPluginConfigMetadataStore (com.thoughtworks.go.plugin.access.authorization.AuthorizationPluginConfigMetadataStore)2 ElasticPluginConfigMetadataStore (com.thoughtworks.go.plugin.access.elastic.ElasticPluginConfigMetadataStore)2 AuthorizationPluginInfo (com.thoughtworks.go.server.ui.plugins.AuthorizationPluginInfo)2 ElasticPluginInfo (com.thoughtworks.go.server.ui.plugins.ElasticPluginInfo)2 PluginConfiguration (com.thoughtworks.go.server.ui.plugins.PluginConfiguration)1 PluginInfo (com.thoughtworks.go.server.ui.plugins.PluginInfo)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1