com.github.nagyesta.lowkeyvault.service.EntityId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lowkey-vault-app Show documentation
Show all versions of lowkey-vault-app Show documentation
Assembled application of Lowkey Vault.
package com.github.nagyesta.lowkeyvault.service;
import java.net.URI;
import java.util.Optional;
public interface EntityId {
String entityType();
URI vault();
String id();
String version();
default String asString() {
return entityType() + ":" + vault() + "/" + id() + "/" + Optional.ofNullable(version()).orElse("--");
}
URI asUriNoVersion(URI vaultUri);
URI asUri(URI vaultUri);
URI asRecoveryUri(URI vaultUri);
URI asUri(URI vaultUri, String query);
}