Package org.opends.server.util
Class BuildVersion
- java.lang.Object
-
- org.opends.server.util.BuildVersion
-
public final class BuildVersion extends Object
Utility class used for manipulating OpenDJ instance, binary and data versions.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBUILDINFO_FILE_NAMEThe buildinfo file name.static StringCONFIG_VERSION_FILE_NAMEThe 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 StringDATA_VERSION_FILE_NAMEThe data version file name.static com.forgerock.opendj.util.VersionDEFAULT_DATA_VERSIONThe default data version, used whenever the datainfo file doesn't exist.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UpgradeTaskVersionbinaryUpgradeVersion()Returns the build upgrade version of the running binaries.static UpgradeTaskVersionconfigUpgradeVersion()Returns the configuration upgrade version of the instance.static com.forgerock.opendj.util.VersionconfigVersion()Gets the configuration version of the instance.static UpgradeTaskVersiondataUpgradeVersion()Returns the data upgrade version of the instance.static com.forgerock.opendj.util.VersiondataVersion()Gets the data version from the 'data.version' file.
-
-
-
Field Detail
-
BUILDINFO_FILE_NAME
public static final String BUILDINFO_FILE_NAME
The buildinfo file name.- See Also:
- Constant Field Values
-
CONFIG_VERSION_FILE_NAME
public static final String 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:
- Constant Field Values
-
DATA_VERSION_FILE_NAME
public static final String DATA_VERSION_FILE_NAME
The data version file name.- See Also:
- Constant Field Values
-
DEFAULT_DATA_VERSION
public static final com.forgerock.opendj.util.Version DEFAULT_DATA_VERSION
The default data version, used whenever the datainfo file doesn't exist.
-
-
Method Detail
-
binaryUpgradeVersion
public static UpgradeTaskVersion binaryUpgradeVersion()
Returns the build upgrade version of the running binaries.- Returns:
- The build
upgrade versionof the running binaries
-
configVersion
public static com.forgerock.opendj.util.Version configVersion() throws InitializationExceptionGets the configuration version of the instance.- Returns:
- The configuration version of the instance
- Throws:
InitializationException- If an error occurred while reading or parsing the version.
-
configUpgradeVersion
public static UpgradeTaskVersion configUpgradeVersion() throws InitializationException
Returns the configuration upgrade version of the instance.- Returns:
- The configuration
upgrade versionof the instance - Throws:
InitializationException- If an error occurred while reading or parsing the version.
-
dataVersion
public static com.forgerock.opendj.util.Version dataVersion() throws InitializationExceptionGets the data version from the 'data.version' file. If the 'data.version' file doesn't exist then return the default data version (i.e. 6.0.0).- Returns:
- The data version of the instance
- Throws:
InitializationException- If an error occurred while reading or parsing the version.
-
dataUpgradeVersion
public static UpgradeTaskVersion dataUpgradeVersion() throws InitializationException
Returns the data upgrade version of the instance.- Returns:
- The data
upgrade versionof the instance - Throws:
InitializationException- If an error occurred while reading or parsing the version.
-
-