Polishing.

Alphabetically reorder methods.
This commit is contained in:
Mark Paluch
2018-04-11 12:16:37 +02:00
parent 84cc20a3eb
commit d58cdf6021
2 changed files with 24 additions and 23 deletions

View File

@@ -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.

View File

@@ -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) {