Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-05-16 19:26:47 +0000
committerRoberto E. Escobar2014-05-27 20:09:01 +0000
commit5d89d189c306cc2662f7081ebc281a176e36b911 (patch)
tree5dcfcece7c39cbdf110a355f66d0fee1c57b72ad /plugins/org.eclipse.osee.ats.core
parent17e1ce014155ab4cf0e6e97047abffc2121fe383 (diff)
downloadorg.eclipse.osee-5d89d189c306cc2662f7081ebc281a176e36b911.tar.gz
org.eclipse.osee-5d89d189c306cc2662f7081ebc281a176e36b911.tar.xz
org.eclipse.osee-5d89d189c306cc2662f7081ebc281a176e36b911.zip
feature[ats_ATS34674]: Add configurable ATS Branch
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core')
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
index 689e50a0d54..71ea509be3a 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
@@ -13,7 +13,9 @@ package org.eclipse.osee.ats.core.util;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.workflow.IAttribute;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreBranches;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.orcs.data.ArtifactId;
import org.eclipse.osee.orcs.data.AttributeId;
@@ -23,9 +25,17 @@ import org.eclipse.osee.orcs.data.AttributeId;
public class AtsUtilCore {
public final static double DEFAULT_HOURS_PER_WORK_DAY = 8;
+ private static IOseeBranch commonBranch = null;
public static IOseeBranch getAtsBranch() {
- return CoreBranches.COMMON;
+ if (commonBranch == null) {
+ if (Strings.isValid(System.getProperty("ats.branch"))) {
+ commonBranch = TokenFactory.createBranch(Long.valueOf(System.getProperty("ats.branch")), "ATS Branch");
+ } else {
+ commonBranch = CoreBranches.COMMON;
+ }
+ }
+ return commonBranch;
}
public static boolean isInTest() {

Back to the top