@Test public void testConvertToExternalOk() { SecretResponse actual = underTest.convertToExternal(gson.toJson(secret)); Assert.assertNull(actual.getEnginePath()); Assert.assertEquals(secret.getPath(), actual.getSecretPath()); }
@Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(null, s.getPath())) .orElse(null); }
VaultKvV1Engine extends AbstractVaultEngine<VaultKvV1Engine> { @Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(null, s.getPath())) .orElse(null); } }
VaultKvV1Engine extends AbstractVaultEngine<VaultKvV1Engine> { @Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(null, s.getPath())) .orElse(null); } @Inject  VaultKvV1Engine(VaultTemplate template); }
VaultKvV1Engine extends AbstractVaultEngine<VaultKvV1Engine> { @Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(null, s.getPath())) .orElse(null); } @Inject  VaultKvV1Engine(VaultTemplate template); @Override String put(String path, String value); @Override boolean isExists(String secret); @Override @Cacheable(cacheNames = "vaultCache") String get(@NotNull String secret); @Override @CacheEvict(cacheNames = "vaultCache", allEntries = true) void delete(String secret); @Override SecretResponse convertToExternal(String secret); List<String> listEntries(String path); void cleanup(String path); }
VaultKvV1Engine extends AbstractVaultEngine<VaultKvV1Engine> { @Override public SecretResponse convertToExternal(String secret) { return Optional.ofNullable(convertToVaultSecret(secret)) .map(s -> new SecretResponse(null, s.getPath())) .orElse(null); } @Inject  VaultKvV1Engine(VaultTemplate template); @Override String put(String path, String value); @Override boolean isExists(String secret); @Override @Cacheable(cacheNames = "vaultCache") String get(@NotNull String secret); @Override @CacheEvict(cacheNames = "vaultCache", allEntries = true) void delete(String secret); @Override SecretResponse convertToExternal(String secret); List<String> listEntries(String path); void cleanup(String path);  }