From d58cdf6021124693b36499becbe9ca406ed8c159 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 11 Apr 2018 12:16:37 +0200 Subject: [PATCH] Polishing. Alphabetically reorder methods. --- .../vault/core/VaultOperations.java | 28 +++++++++---------- .../vault/core/VaultTemplate.java | 19 +++++++------ 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultOperations.java b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultOperations.java index 767a2596..e091c533 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultOperations.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultOperations.java @@ -43,6 +43,20 @@ import org.springframework.web.client.RestClientException; */ public interface VaultOperations { + /** + * @return the operations interface to interact with the Vault PKI backend. + */ + VaultPkiOperations opsForPki(); + + /** + * Return {@link VaultPkiOperations} if the PKI backend is mounted on a different path + * than {@code pki}. + * + * @param path the mount path + * @return the operations interface to interact with the Vault PKI backend. + */ + VaultPkiOperations opsForPki(String path); + /** * @return the operations interface administrative Vault access. */ @@ -67,20 +81,6 @@ public interface VaultOperations { */ VaultTransitOperations opsForTransit(String path); - /** - * @return the operations interface to interact with the Vault PKI backend. - */ - VaultPkiOperations opsForPki(); - - /** - * Return {@link VaultPkiOperations} if the PKI backend is mounted on a different path - * than {@code pki}. - * - * @param path the mount path - * @return the operations interface to interact with the Vault PKI backend. - */ - VaultPkiOperations opsForPki(String path); - /** * Read from a Vault path. Reading data using this method is suitable for API * calls/secret backends that do not require a request body. diff --git a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTemplate.java b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTemplate.java index 99d9ae32..13add496 100644 --- a/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTemplate.java +++ b/spring-vault-core/src/main/java/org/springframework/vault/core/VaultTemplate.java @@ -206,6 +206,16 @@ public class VaultTemplate implements InitializingBean, VaultOperations, Disposa } } + @Override + public VaultPkiOperations opsForPki() { + return opsForPki("pki"); + } + + @Override + public VaultPkiOperations opsForPki(String path) { + return new VaultPkiTemplate(this, path); + } + @Override public VaultSysOperations opsForSys() { return new VaultSysTemplate(this); @@ -226,15 +236,6 @@ public class VaultTemplate implements InitializingBean, VaultOperations, Disposa return new VaultTransitTemplate(this, path); } - @Override - public VaultPkiOperations opsForPki() { - return opsForPki("pki"); - } - - @Override - public VaultPkiOperations opsForPki(String path) { - return new VaultPkiTemplate(this, path); - } @Override public VaultResponse read(String path) {