Package org.opends.server.util
Class BuildVersion
java.lang.Object
org.opends.server.util.BuildVersion
Utility class used for manipulating OpenDJ instance, binary and data versions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents the version used for determining if the upgrade tool must be run and whether an upgrade task must run during the upgrade process. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The buildinfo file name.static final String
The config version file name, replaced buildinfo in 6.5.0, and replaced by the ds-cfg-version attribute in config.ldif in 7.0.0 and related development releases.static final com.forgerock.opendj.util.Version
The default data version, used whenever the datainfo file doesn't exist. -
Method Summary
Modifier and TypeMethodDescriptionconfigUpgradeVersion
(DirectoryEnvironmentConfig environmentConfig) Returns the configuration upgrade version of the instance.static com.forgerock.opendj.util.Version
configVersion
(DirectoryEnvironmentConfig environmentConfig) Gets the configuration version of the instance.dataUpgradeVersion
(DirectoryEnvironmentConfig environmentConfig) Returns the data upgrade version of the instance.
-
Field Details
-
BUILDINFO_FILE_NAME
The buildinfo file name.- See Also:
-
CONFIG_VERSION_FILE_NAME
The config version file name, replaced buildinfo in 6.5.0, and replaced by the ds-cfg-version attribute in config.ldif in 7.0.0 and related development releases.- See Also:
-
DEFAULT_DATA_VERSION
public static final com.forgerock.opendj.util.Version DEFAULT_DATA_VERSIONThe default data version, used whenever the datainfo file doesn't exist.
-
-
Method Details
-
configVersion
public static com.forgerock.opendj.util.Version configVersion(DirectoryEnvironmentConfig environmentConfig) throws InitializationException Gets the configuration version of the instance.- Parameters:
environmentConfig
- the environment config- Returns:
- The configuration version of the instance
- Throws:
InitializationException
- If an error occurred while reading or parsing the version.
-
configUpgradeVersion
public static BuildVersion.UpgradeTaskVersion configUpgradeVersion(DirectoryEnvironmentConfig environmentConfig) throws InitializationException Returns the configuration upgrade version of the instance.- Parameters:
environmentConfig
- the environment config- Returns:
- The configuration
upgrade version
of the instance - Throws:
InitializationException
- If an error occurred while reading or parsing the version.
-
dataUpgradeVersion
public static BuildVersion.UpgradeTaskVersion dataUpgradeVersion(DirectoryEnvironmentConfig environmentConfig) throws InitializationException Returns the data upgrade version of the instance.- Parameters:
environmentConfig
- the environment config- Returns:
- The data
upgrade version
of the instance - Throws:
InitializationException
- If an error occurred while reading or parsing the version.
-