This class binds together Tenant, App, version, status, and branch. These fields together completely identify the application that a given n-cube belongs to.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
DEFAULT_APP |
|
static java.lang.String |
DEFAULT_STATUS |
|
static java.lang.String |
DEFAULT_TENANT |
|
static java.lang.String |
DEFAULT_VERSION |
|
static java.lang.String |
HEAD |
|
static java.lang.String |
TEST_BRANCH |
|
static java.util.regex.Pattern |
VERSION_REGEX |
|
private java.lang.String |
app |
|
private java.lang.String |
branch |
|
private java.lang.String |
status |
|
private java.lang.String |
tenant |
|
static ApplicationID |
testAppId |
|
private java.lang.String |
version |
Constructor and description |
---|
private ApplicationID
() |
ApplicationID
(java.lang.String tenant, java.lang.String app, java.lang.String version, java.lang.String status, java.lang.String branch) |
Type | Name and description |
---|---|
ApplicationID |
asBranch(java.lang.String bran) Convert an ApplicationID from one branch to another |
ApplicationID |
asHead() Creates a new ApplicationID with HEAD as the branch using all the same parameters of this ApplicationID. |
ApplicationID |
asRelease() Creates a new ApplicationID with a status of release using all the same parameters of this ApplicationID, but forcing the branch to HEAD (release versions can only exit on HEAD). |
ApplicationID |
asSnapshot() Creates a new ApplicationID with a status of SNAPSHOT using all the same parameters of this ApplicationID. |
java.util.Map |
asType(java.lang.Class clazz) Allow ApplicationID to be converted to Map as in appId as Map |
ApplicationID |
asVersion(java.lang.String ver) Convert an Application from one version to another |
java.lang.String |
branchAgnosticCacheKey() |
java.lang.String |
cacheKey() |
java.lang.String |
cacheKey(java.lang.String name) |
ApplicationID |
createNewSnapshotId(java.lang.String ver) Creates a new SNAPSHOT version of this application id. |
boolean |
equals(java.lang.Object o) |
boolean |
equalsNotIncludingBranch(ApplicationID that) |
java.lang.String |
getApp() |
static ApplicationID |
getBootVersion(java.lang.String tenant, java.lang.String app) |
java.lang.String |
getBranch() |
java.lang.String |
getStatus() |
java.lang.String |
getTenant() |
java.lang.String |
getVersion() |
long |
getVersionValue()
|
static long |
getVersionValue(java.lang.String version) @param String version in "major.minor.patch" format where all three components are numeric and each one is less than 1,000. |
int |
hashCode() |
boolean |
isHead() |
boolean |
isRelease() |
boolean |
isSnapshot() |
java.lang.String |
toString() |
void |
validate() Ensure that all components of the ApplicationID are valid (with their specs in terms of allowable characters.) |
static void |
validateApp(java.lang.String appName) |
static void |
validateBranch(java.lang.String branch) |
void |
validateBranchIsNotHead() |
static void |
validateStatus(java.lang.String status) |
void |
validateStatusIsNotRelease() |
static void |
validateTenant(java.lang.String tenant) |
static void |
validateVersion(java.lang.String version) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Convert an ApplicationID from one branch to another
bran
- String destination branch nameCreates a new ApplicationID with HEAD as the branch using all the same parameters of this ApplicationID.
Creates a new ApplicationID with a status of release using all the same parameters of this ApplicationID, but forcing the branch to HEAD (release versions can only exit on HEAD). If the current appliationID is already RELEASE just return this.
Creates a new ApplicationID with a status of SNAPSHOT using all the same parameters of this ApplicationID. If the current ApplicationID is already SNAPSHOT just return this.
Allow ApplicationID to be converted to Map as in appId as Map
Convert an Application from one version to another
ver
- String destination versionCreates a new SNAPSHOT version of this application id.
ver
- new version.
String
- version in "major.minor.patch" format where all three components are numeric and each one
is less than 1,000.Ensure that all components of the ApplicationID are valid (with their specs in terms of allowable characters.)