Search in sources :

Example 1 with MetadataStore

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

the class DefaultPluginInfoFinder method pluginInfoFor.

public CombinedPluginInfo pluginInfoFor(String pluginId) {
    CombinedPluginInfo result = new CombinedPluginInfo();
    List<PluginInfo> allPluginInfosForPluginID = builders.values().stream().map(new Function<MetadataStore, PluginInfo>() {

        @Override
        public PluginInfo apply(MetadataStore metadataStore) {
            return metadataStore.getPluginInfo(pluginId);
        }
    }).filter(new Predicate<PluginInfo>() {

        @Override
        public boolean test(PluginInfo obj) {
            return Objects.nonNull(obj);
        }
    }).collect(toList());
    if (allPluginInfosForPluginID.isEmpty()) {
        return null;
    }
    result.addAll(allPluginInfosForPluginID);
    return result;
}
Also used : AnalyticsMetadataStore(com.thoughtworks.go.plugin.access.analytics.AnalyticsMetadataStore) NewSCMMetadataStore(com.thoughtworks.go.plugin.access.scm.NewSCMMetadataStore) ElasticAgentMetadataStore(com.thoughtworks.go.plugin.access.elastic.ElasticAgentMetadataStore) PluggableTaskMetadataStore(com.thoughtworks.go.plugin.access.pluggabletask.PluggableTaskMetadataStore) NotificationMetadataStore(com.thoughtworks.go.plugin.access.notification.NotificationMetadataStore) ArtifactMetadataStore(com.thoughtworks.go.plugin.access.artifact.ArtifactMetadataStore) AuthorizationMetadataStore(com.thoughtworks.go.plugin.access.authorization.AuthorizationMetadataStore) MetadataStore(com.thoughtworks.go.plugin.access.common.MetadataStore) ConfigRepoMetadataStore(com.thoughtworks.go.plugin.access.configrepo.ConfigRepoMetadataStore) PackageMaterialMetadataStore(com.thoughtworks.go.plugin.access.packagematerial.PackageMaterialMetadataStore) PluginInfo(com.thoughtworks.go.plugin.domain.common.PluginInfo) CombinedPluginInfo(com.thoughtworks.go.plugin.domain.common.CombinedPluginInfo) CombinedPluginInfo(com.thoughtworks.go.plugin.domain.common.CombinedPluginInfo) Predicate(java.util.function.Predicate)

Aggregations

AnalyticsMetadataStore (com.thoughtworks.go.plugin.access.analytics.AnalyticsMetadataStore)1 ArtifactMetadataStore (com.thoughtworks.go.plugin.access.artifact.ArtifactMetadataStore)1 AuthorizationMetadataStore (com.thoughtworks.go.plugin.access.authorization.AuthorizationMetadataStore)1 MetadataStore (com.thoughtworks.go.plugin.access.common.MetadataStore)1 ConfigRepoMetadataStore (com.thoughtworks.go.plugin.access.configrepo.ConfigRepoMetadataStore)1 ElasticAgentMetadataStore (com.thoughtworks.go.plugin.access.elastic.ElasticAgentMetadataStore)1 NotificationMetadataStore (com.thoughtworks.go.plugin.access.notification.NotificationMetadataStore)1 PackageMaterialMetadataStore (com.thoughtworks.go.plugin.access.packagematerial.PackageMaterialMetadataStore)1 PluggableTaskMetadataStore (com.thoughtworks.go.plugin.access.pluggabletask.PluggableTaskMetadataStore)1 NewSCMMetadataStore (com.thoughtworks.go.plugin.access.scm.NewSCMMetadataStore)1 CombinedPluginInfo (com.thoughtworks.go.plugin.domain.common.CombinedPluginInfo)1 PluginInfo (com.thoughtworks.go.plugin.domain.common.PluginInfo)1 Predicate (java.util.function.Predicate)1