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

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

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

Plugin.path介绍

暂无

代码示例

代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-resource

@Override
public Path path() {
  return plugin.path();
}

代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-service-discovery

@Override
public Path path() {
  return plugin.path();
}

代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-policy

@Override
public Path path() {
  return plugin.path();
}

代码示例来源:origin: io.gravitee.plugin/gravitee-plugin-fetcher

@Override
public Path path() {
  return plugin.path();
}

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

@Override
public String getSchema(String identityProviderId) throws IOException {
  IdentityProvider identityProvider = identityProviders.get(identityProviderId);
  Path policyWorkspace = identityProviderPlugins.get(identityProvider).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String identityProviderId) throws IOException {
  IdentityProvider identityProvider = identityProviders.get(identityProviderId);
  Path policyWorkspace = identityProviderPlugins.get(identityProvider).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String tokenGranterId) throws IOException {
  ExtensionGrant extensionGrant = extensionGrants.get(tokenGranterId);
  Path policyWorkspace = extensionGrantPlugins.get(extensionGrant).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String certificateId) throws IOException {
  Certificate certificate = certificates.get(certificateId);
  Path policyWorkspace = certificatePlugins.get(certificate).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String tokenGranterId) throws IOException {
  ExtensionGrant extensionGrant = extensionGrants.get(tokenGranterId);
  Path policyWorkspace = extensionGrantPlugins.get(extensionGrant).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String tokenGranterId) throws IOException {
  ExtensionGrant extensionGrant = extensionGrants.get(tokenGranterId);
  Path policyWorkspace = extensionGrantPlugins.get(extensionGrant).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

@Override
public String getSchema(String certificateId) throws IOException {
  Certificate certificate = certificates.get(certificateId);
  Path policyWorkspace = certificatePlugins.get(certificate).path();
  File[] schemas = policyWorkspace.toFile().listFiles(
      pathname -> pathname.isDirectory() && pathname.getName().equals(SCHEMAS_DIRECTORY));
  if (schemas.length == 1) {
    File schemaDir = schemas[0];
    if (schemaDir.listFiles().length > 0) {
      return new String(Files.readAllBytes(schemaDir.listFiles()[0].toPath()));
    }
  }
  return null;
}

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

private FetcherEntity convert(FetcherPlugin fetcherPlugin, boolean withPlugin) {
    FetcherEntity entity = new FetcherEntity();

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

    if (withPlugin) {
      // Plugin information
      Plugin plugin = fetcherPlugin;
      PluginEntity pluginEntity = new PluginEntity();

      pluginEntity.setPlugin(plugin.clazz());
      pluginEntity.setPath(plugin.path().toString());
      pluginEntity.setType(plugin.type().toString().toLowerCase());
      pluginEntity.setDependencies(plugin.dependencies());

      entity.setPlugin(pluginEntity);
    }

    return entity;
  }
}

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

private FetcherEntity convert(FetcherPlugin fetcherPlugin, boolean withPlugin) {
    FetcherEntity entity = new FetcherEntity();

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

    if (withPlugin) {
      // Plugin information
      Plugin plugin = fetcherPlugin;
      PluginEntity pluginEntity = new PluginEntity();

      pluginEntity.setPlugin(plugin.clazz());
      pluginEntity.setPath(plugin.path().toString());
      pluginEntity.setType(plugin.type().toString().toLowerCase());
      pluginEntity.setDependencies(plugin.dependencies());

      entity.setPlugin(pluginEntity);
    }

    return entity;
  }
}

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

pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());

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

pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());

相关文章