Class Versioned.Version

java.lang.Object
org.springframework.vault.support.Versioned.Version
Enclosing class:
Versioned<T>

public static class Versioned.Version extends Object
Value object representing a Vault version.

Versions greater zero point to a specific secret version whereas version number zero points to a placeholder whose meaning is tied to a specific operation. Version number zero can mean first created version, latest version.

Author:
Mark Paluch
  • Method Details

    • unversioned

      public static Versioned.Version unversioned()
      Returns:
      the unversioned Versioned.Version as placeholder for specific operations that require version number zero.
    • from

      public static Versioned.Version from(int versionNumber)
      Create a Versioned.Version given a versionNumber.
      Parameters:
      versionNumber - the version number.
      Returns:
      the Versioned.Version for versionNumber.
    • isVersioned

      public boolean isVersioned()
      Returns:
      true if this Versioned.Version points to a valid version number, false otherwise.

      Version numbers that are equal zero are placeholders to denote unversioned or latest versions in the context of particular versioning operations.

    • getVersion

      public int getVersion()
      Returns:
      the version number.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object