Package org.opends.quicksetup
Class BuildInformation
- java.lang.Object
-
- org.opends.quicksetup.BuildInformation
-
- All Implemented Interfaces:
Comparable<BuildInformation>
public class BuildInformation extends Object implements Comparable<BuildInformation>
Represents information about the current build that is publicly obtainable by invoking start-ds -F.
-
-
Constructor Summary
Constructors Constructor Description BuildInformation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BuildInformation bi)static BuildInformationcreate(Installation installation)Reads build information for a particular installation by reading the output from invoking the start-ds tool with the full information option.booleanequals(Object o)static BuildInformationfromBuildString(String bn)Creates an instance from a string representing a build number of the for MAJOR.MINOR.POINT.REVISION where MAJOR, MINOR, POINT, and REVISION are integers.StringgetBuildId()Gets the build ID which is the 14 digit number code like 20070420110336.static BuildInformationgetCurrent()Creates an instance from constants present in the current build.IntegergetMajorVersion()Gets the major version.IntegergetMinorVersion()Gets the minor version.StringgetName()Gets the name of this build.IntegergetPointVersion()Gets the point version.StringgetRevision()Gets the VCS revision.inthashCode()StringtoString()
-
-
-
Method Detail
-
create
public static BuildInformation create(Installation installation) throws ApplicationException
Reads build information for a particular installation by reading the output from invoking the start-ds tool with the full information option.- Parameters:
installation- from which to gather build information- Returns:
- BuildInformation object populated with information
- Throws:
ApplicationException- if all or some important information could not be determined
-
fromBuildString
public static BuildInformation fromBuildString(String bn) throws IllegalArgumentException
Creates an instance from a string representing a build number of the for MAJOR.MINOR.POINT.REVISION where MAJOR, MINOR, POINT, and REVISION are integers.- Parameters:
bn- String representation of a build number- Returns:
- a BuildInformation object populated with the information
provided in
bn - Throws:
IllegalArgumentException- ifbnis not a build number
-
getCurrent
public static BuildInformation getCurrent() throws ApplicationException
Creates an instance from constants present in the current build.- Returns:
- BuildInformation created from current constant values
- Throws:
ApplicationException- if all or some important information could not be determined
-
getName
public String getName()
Gets the name of this build. This is the first line of the output from invoking start-ds -F.- Returns:
- String representing the name of the build
-
getBuildId
public String getBuildId()
Gets the build ID which is the 14 digit number code like 20070420110336.- Returns:
- String representing the build ID
-
getMajorVersion
public Integer getMajorVersion()
Gets the major version.- Returns:
- String representing the major version
-
getMinorVersion
public Integer getMinorVersion()
Gets the minor version.- Returns:
- String representing the minor version
-
getPointVersion
public Integer getPointVersion()
Gets the point version.- Returns:
- String representing the point version
-
getRevision
public String getRevision()
Gets the VCS revision.- Returns:
- String representing the VCS revision
-
compareTo
public int compareTo(BuildInformation bi)
- Specified by:
compareToin interfaceComparable<BuildInformation>
-
-