Package com.irurueta.commons
Class BuildInfo
- java.lang.Object
-
- com.irurueta.commons.BuildInfo
-
public final class BuildInfo extends java.lang.Object
Contains build data for this library.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ARTIFACT_ID_KEY
Key to obtain artifactId of this library from properties file.private static java.lang.String
BRANCH_KEY
Key to obtain build branch from properties file.private static java.lang.String
BUILD_INFO_PROPERTIES
Location of properties file that contains build data.private static java.lang.String
BUILD_NUMBER_KEY
Key to obtain build number from properties file.private static java.lang.String
BUILD_TIMESTAMP_KEY
Key to obtain build timestamp from properties file.private static java.lang.String
COMMIT_KEY
Key to obtain build commit from properties file.private static java.lang.String
GROUP_ID_KEY
Key to obtain groupID of this library from properties file.private static java.util.logging.Logger
LOGGER
This class logger.private java.lang.String
mArtifactId
ArtifactId of this library.private java.lang.String
mBranch
Build branch.private java.lang.String
mBuildNumber
Build number.private java.util.Date
mBuildTimestamp
Build timestamp.private java.lang.String
mCommit
Build commit.private java.lang.String
mGroupId
GroupId of this library.private static java.lang.ref.SoftReference<BuildInfo>
mReference
Singleton stored in a soft reference (to keep it cached in memory unless memory is claimed).private java.lang.String
mVersion
Version of this library.private static java.lang.String
TIMESTAMP_FORMAT
Format for build timestamp.private static java.lang.String
VERSION_KEY
Key to obtain version of this library from properties file.
-
Constructor Summary
Constructors Modifier Constructor Description private
BuildInfo()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getArtifactId()
Obtains artifactId of this library.java.lang.String
getBranch()
Obtains build branch.java.lang.String
getBuildNumber()
Obtains build number.java.util.Date
getBuildTimestamp()
Obtains build timestamp.java.lang.String
getCommit()
Obtains build commit.java.lang.String
getGroupId()
Obtains groupId of this library.static BuildInfo
getInstance()
Obtains singleton instance.java.lang.String
getVersion()
Obtains version of this library.
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
This class logger.
-
BUILD_INFO_PROPERTIES
private static final java.lang.String BUILD_INFO_PROPERTIES
Location of properties file that contains build data. Build data is stored in this file, which is modified each time that compilation is run in the CI server.- See Also:
- Constant Field Values
-
BUILD_TIMESTAMP_KEY
private static final java.lang.String BUILD_TIMESTAMP_KEY
Key to obtain build timestamp from properties file.- See Also:
- Constant Field Values
-
GROUP_ID_KEY
private static final java.lang.String GROUP_ID_KEY
Key to obtain groupID of this library from properties file.- See Also:
- Constant Field Values
-
ARTIFACT_ID_KEY
private static final java.lang.String ARTIFACT_ID_KEY
Key to obtain artifactId of this library from properties file.- See Also:
- Constant Field Values
-
VERSION_KEY
private static final java.lang.String VERSION_KEY
Key to obtain version of this library from properties file.- See Also:
- Constant Field Values
-
BUILD_NUMBER_KEY
private static final java.lang.String BUILD_NUMBER_KEY
Key to obtain build number from properties file.- See Also:
- Constant Field Values
-
COMMIT_KEY
private static final java.lang.String COMMIT_KEY
Key to obtain build commit from properties file.- See Also:
- Constant Field Values
-
BRANCH_KEY
private static final java.lang.String BRANCH_KEY
Key to obtain build branch from properties file.- See Also:
- Constant Field Values
-
TIMESTAMP_FORMAT
private static final java.lang.String TIMESTAMP_FORMAT
Format for build timestamp.- See Also:
- Constant Field Values
-
mReference
private static java.lang.ref.SoftReference<BuildInfo> mReference
Singleton stored in a soft reference (to keep it cached in memory unless memory is claimed).
-
mBuildTimestamp
private java.util.Date mBuildTimestamp
Build timestamp.
-
mGroupId
private java.lang.String mGroupId
GroupId of this library.
-
mArtifactId
private java.lang.String mArtifactId
ArtifactId of this library.
-
mVersion
private java.lang.String mVersion
Version of this library.
-
mBuildNumber
private java.lang.String mBuildNumber
Build number.
-
mCommit
private java.lang.String mCommit
Build commit.
-
mBranch
private java.lang.String mBranch
Build branch.
-
-
Method Detail
-
getInstance
public static BuildInfo getInstance()
Obtains singleton instance.- Returns:
- singleton instance.
-
getBuildTimestamp
public java.util.Date getBuildTimestamp()
Obtains build timestamp.- Returns:
- build timestamp.
-
getGroupId
public java.lang.String getGroupId()
Obtains groupId of this library.- Returns:
- groupId of this library.
-
getArtifactId
public java.lang.String getArtifactId()
Obtains artifactId of this library.- Returns:
- artifactId of this library.
-
getVersion
public java.lang.String getVersion()
Obtains version of this library.- Returns:
- version of this library.
-
getBuildNumber
public java.lang.String getBuildNumber()
Obtains build number.- Returns:
- build number.
-
getCommit
public java.lang.String getCommit()
Obtains build commit.- Returns:
- build commit.
-
getBranch
public java.lang.String getBranch()
Obtains build branch.- Returns:
- build branch.
-
-