io.gravitee.plugin.core.api.Plugin.id()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中io.gravitee.plugin.core.api.Plugin.id()方法的一些代码示例,展示了Plugin.id()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.id()方法的具体详情如下:
包路径:io.gravitee.plugin.core.api.Plugin
类名称:Plugin
方法名:id

Plugin.id介绍

暂无

代码示例

代码示例来源:origin: gravitee-io/gravitee-gateway

LOGGER.info("Register a new repository plugin: {} [{}]", plugin.id(), plugin.clazz());

代码示例来源:origin: gravitee-io/gravitee-gateway

public Set<Plugin> plugins() {
  return pluginRegistry.plugins().stream().map(regPlugin -> {
    Plugin plugin = new Plugin();
    plugin.setId(regPlugin.id());
    plugin.setName(regPlugin.manifest().name());
    plugin.setDescription(regPlugin.manifest().description());
    plugin.setVersion(regPlugin.manifest().version());
    plugin.setType(regPlugin.type().name().toLowerCase());
    plugin.setPlugin(regPlugin.clazz());
    return plugin;
  }).collect(Collectors.toSet());
}

代码示例来源:origin: io.gravitee.node/gravitee-node-reporter

private boolean isEnabled(Plugin reporterPlugin) {
    boolean enabled = environment.getProperty("reporters." + reporterPlugin.id() + ".enabled", Boolean.class, true);
    LOGGER.debug("Plugin {} configuration: {}", reporterPlugin.id(), enabled);
    return enabled;
  }
}

代码示例来源:origin: io.gravitee.node/gravitee-node-notifier

private boolean isEnabled(Plugin notifierPlugin) {
    boolean enabled = environment.getProperty(notifierPlugin.id() + ".enabled", Boolean.class, true);
    LOGGER.debug("Plugin {} configuration: {}", notifierPlugin.id(), enabled);
    return enabled;
  }
}

代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-identityprovider

@Override
public Collection<Plugin> getAll() {
  Set<String> oauth2ProviderIds = getOAuth2Providers().stream().map(plugin -> plugin.id()).collect(Collectors.toSet());
  return identityProviderPlugins.values().stream().filter(plugin -> !oauth2ProviderIds.contains(plugin.id())).collect(Collectors.toSet());
}

代码示例来源:origin: gravitee-io/graviteeio-access-management

@Override
public Collection<Plugin> getAll() {
  Set<String> oauth2ProviderIds = getOAuth2Providers().stream().map(plugin -> plugin.id()).collect(Collectors.toSet());
  return identityProviderPlugins.values().stream().filter(plugin -> !oauth2ProviderIds.contains(plugin.id())).collect(Collectors.toSet());
}

代码示例来源:origin: io.gravitee.am.gateway.extensiongrant/gravitee-am-gateway-extensiongrant

@Override
public void register(ExtensionGrantDefinition extensionGrantDefinition) {
  extensionGrants.putIfAbsent(extensionGrantDefinition.getPlugin().id(),
      extensionGrantDefinition.getExtensionGrant());
  extensionGrantPlugins.putIfAbsent(extensionGrantDefinition.getExtensionGrant(),
      extensionGrantDefinition.getPlugin());
}

代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-extensiongrant

@Override
public void register(ExtensionGrantDefinition extensionGrantDefinition) {
  extensionGrants.putIfAbsent(extensionGrantDefinition.getPlugin().id(),
      extensionGrantDefinition.getExtensionGrant());
  extensionGrantPlugins.putIfAbsent(extensionGrantDefinition.getExtensionGrant(),
      extensionGrantDefinition.getPlugin());
}

代码示例来源:origin: gravitee-io/graviteeio-access-management

@Override
public void register(ExtensionGrantDefinition extensionGrantDefinition) {
  extensionGrants.putIfAbsent(extensionGrantDefinition.getPlugin().id(),
      extensionGrantDefinition.getExtensionGrant());
  extensionGrantPlugins.putIfAbsent(extensionGrantDefinition.getExtensionGrant(),
      extensionGrantDefinition.getPlugin());
}

代码示例来源:origin: io.gravitee.am.gateway.certificate/gravitee-am-gateway-certificate

@Override
public void register(CertificateDefinition certificatePluginDefinition) {
  certificates.putIfAbsent(certificatePluginDefinition.getPlugin().id(),
      certificatePluginDefinition.getCertificate());
  certificatePlugins.putIfAbsent(certificatePluginDefinition.getCertificate(),
      certificatePluginDefinition.getPlugin());
}

代码示例来源:origin: gravitee-io/graviteeio-access-management

@Override
public void register(CertificateDefinition certificatePluginDefinition) {
  certificates.putIfAbsent(certificatePluginDefinition.getPlugin().id(),
      certificatePluginDefinition.getCertificate());
  certificatePlugins.putIfAbsent(certificatePluginDefinition.getCertificate(),
      certificatePluginDefinition.getPlugin());
}

代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-identityprovider

@Override
public void handle(Plugin plugin) {
  try {
    ClassLoader classloader = pluginClassLoaderFactory.getOrCreateClassLoader(plugin, this.getClass().getClassLoader());
    final Class<?> identityProviderClass = classloader.loadClass(plugin.clazz());
    LOGGER.info("Register a new identity provider plugin: {} [{}]", plugin.id(), plugin.clazz());
    Assert.isAssignable(IdentityProvider.class, identityProviderClass);
    IdentityProvider identityIdentityProvider = createInstance((Class<IdentityProvider>) identityProviderClass);
    identityProviderPluginManager.register(new IdentityProviderDefinition(identityIdentityProvider, plugin), identityIdentityProvider instanceof OAuth2IdentityProvider);
  } catch (Exception iae) {
    LOGGER.error("Unexpected error while create identity provider instance", iae);
  }
}

代码示例来源:origin: io.gravitee.am.plugins.handlers/gravitee-am-plugins-handlers-identityprovider

@Override
public void register(IdentityProviderDefinition identityProviderPluginDefinition, boolean oauth2Provider) {
  identityProviders.putIfAbsent(identityProviderPluginDefinition.getPlugin().id(),
      identityProviderPluginDefinition.getIdentityProvider());
  identityProviderPlugins.putIfAbsent(identityProviderPluginDefinition.getIdentityProvider(),
      identityProviderPluginDefinition.getPlugin());
  if (oauth2Provider) {
    oauth2IdentityProviderPlugins.putIfAbsent(identityProviderPluginDefinition.getIdentityProvider(),
        identityProviderPluginDefinition.getPlugin());
  }
}

代码示例来源:origin: gravitee-io/graviteeio-access-management

@Override
public void register(IdentityProviderDefinition identityProviderPluginDefinition, boolean oauth2Provider) {
  identityProviders.putIfAbsent(identityProviderPluginDefinition.getPlugin().id(),
      identityProviderPluginDefinition.getIdentityProvider());
  identityProviderPlugins.putIfAbsent(identityProviderPluginDefinition.getIdentityProvider(),
      identityProviderPluginDefinition.getPlugin());
  if (oauth2Provider) {
    oauth2IdentityProviderPlugins.putIfAbsent(identityProviderPluginDefinition.getIdentityProvider(),
        identityProviderPluginDefinition.getPlugin());
  }
}

代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-heartbeat

public Set<Plugin> plugins() {
  return pluginRegistry.plugins().stream().map(regPlugin -> {
    Plugin plugin = new Plugin();
    plugin.setId(regPlugin.id());
    plugin.setName(regPlugin.manifest().name());
    plugin.setDescription(regPlugin.manifest().description());
    plugin.setVersion(regPlugin.manifest().version());
    plugin.setType(regPlugin.type().name().toLowerCase());
    plugin.setPlugin(regPlugin.clazz());
    return plugin;
  }).collect(Collectors.toSet());
}

代码示例来源:origin: io.gravitee.gateway.services/gravitee-gateway-services-monitoring

public Set<Plugin> plugins() {
  return pluginRegistry.plugins().stream().map(regPlugin -> {
    Plugin plugin = new Plugin();
    plugin.setId(regPlugin.id());
    plugin.setName(regPlugin.manifest().name());
    plugin.setDescription(regPlugin.manifest().description());
    plugin.setVersion(regPlugin.manifest().version());
    plugin.setType(regPlugin.type().name().toLowerCase());
    plugin.setPlugin(regPlugin.clazz());
    return plugin;
  }).collect(Collectors.toSet());
}

代码示例来源:origin: io.gravitee.management/gravitee-management-api-service

private PluginEntity convert(Plugin plugin) {
    PluginEntity entity = new PluginEntity();

    entity.setId(plugin.id());
    entity.setDescription(plugin.manifest().description());
    entity.setName(plugin.manifest().name());
    entity.setVersion(plugin.manifest().version());

    return entity;
  }
}

代码示例来源:origin: io.gravitee.management/gravitee-management-api-service

private PluginEntity convert(Plugin plugin) {
    PluginEntity entity = new PluginEntity();

    entity.setId(plugin.id());
    entity.setDescription(plugin.manifest().description());
    entity.setName(plugin.manifest().name());
    entity.setVersion(plugin.manifest().version());

    return entity;
  }
}

代码示例来源:origin: gravitee-io/gravitee-management-rest-api

private PluginEntity convert(Plugin plugin) {
    PluginEntity entity = new PluginEntity();

    entity.setId(plugin.id());
    entity.setDescription(plugin.manifest().description());
    entity.setName(plugin.manifest().name());
    entity.setVersion(plugin.manifest().version());

    return entity;
  }
}

代码示例来源:origin: gravitee-io/gravitee-management-rest-api

private PluginEntity convert(Plugin plugin) {
    PluginEntity entity = new PluginEntity();

    entity.setId(plugin.id());
    entity.setDescription(plugin.manifest().description());
    entity.setName(plugin.manifest().name());
    entity.setVersion(plugin.manifest().version());

    return entity;
  }
}

相关文章