Class VersionInfo
java.lang.Object
org.springframework.credhub.support.info.VersionInfo
Version information about a CredHub server, as reported by the server's
/version endpoint. This reflects the server's own release version number, not
CredHub's URL-path API versioning (/api/v1/... vs /api/v2/...) — for
example, a server whose reported version is 2.6.0 still serves many
/api/v1/... endpoints.- Author:
- Scott Frederick
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionInfo(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.booleanDetermine if the CredHub server's reported release version is 1.x.booleanDetermine if the CredHub server's reported release version is 2.x.booleanDetermine if the CredHub server's reported release version is 2.0.x.booleanDetermine if the CredHub server's reported release version is 2.1.x.
-
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's reported release version is 1.x.- Returns:
trueif the server's reported release version starts with1.;falseotherwise
-
isVersion2
public boolean isVersion2()Determine if the CredHub server's reported release version is 2.x.- Returns:
trueif the server's reported release version starts with2.;falseotherwise
-
isVersion2_0
public boolean isVersion2_0()Determine if the CredHub server's reported release version is 2.0.x.- Returns:
trueif the server's reported release version starts with2.0;falseotherwise
-
isVersion2_1
public boolean isVersion2_1()Determine if the CredHub server's reported release version is 2.1.x.- Returns:
trueif the server's reported release version starts with2.1;falseotherwise
-