Class VersionInfo
java.lang.Object
org.springframework.credhub.support.info.VersionInfo
Version information about a CredHub server.
- Author:
- Scott Frederick
-
Constructor Summary
ConstructorDescriptionVersionInfo
(String version) Create a new VersionInfo containing the specified version string. -
Method Summary
Modifier and TypeMethodDescriptionGet the value of the version string returned from the CredHub server.boolean
Determine if the CredHub server implements the v1 API.boolean
Determine if the CredHub server implements the v2 API.boolean
Determine if the CredHub server implements the v2.0 API.boolean
Determine if the CredHub server implements the v2.1 API.
-
Constructor Details
-
VersionInfo
Create a new VersionInfo containing the specified version string. Intended for internal use. Clients will get VersionInfo objects populated from CredHub responses.- Parameters:
version
- a version string
-
-
Method Details
-
getVersion
Get the value of the version string returned from the CredHub server.- Returns:
- the version string
-
isVersion1
public boolean isVersion1()Determine if the CredHub server implements the v1 API.- Returns:
true
if the server implements the CredHub v1 API;false
otherwise
-
isVersion2
public boolean isVersion2()Determine if the CredHub server implements the v2 API.- Returns:
true
if the server implements the CredHub v2 API;false
otherwise
-
isVersion2_0
public boolean isVersion2_0()Determine if the CredHub server implements the v2.0 API.- Returns:
true
if the server implements the CredHub v2.0 API;false
otherwise
-
isVersion2_1
public boolean isVersion2_1()Determine if the CredHub server implements the v2.1 API.- Returns:
true
if the server implements the CredHub v2.1 API;false
otherwise
-