Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigPreferencePage.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java14
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java30
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java12
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java8
-rw-r--r--plugins/org.eclipse.osee.framework.branch.gantt/src/org/eclipse/osee/branch/gantt/views/BranchVisualizationView.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IDefaultInitialBranchesProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInputFactory.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java16
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java44
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultBrowserListener.java9
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectByWidgetDam.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidgetDam.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTypeListViewer.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java3
-rw-r--r--plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java5
45 files changed, 147 insertions, 154 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
index 30ddfabef8f..1b83200ec7b 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsBranchService.java
@@ -109,7 +109,7 @@ public interface IAtsBranchService {
Result isCreateBranchAllowed(IAtsTeamWorkflow teamWf) throws OseeCoreException;
- IOseeBranch getBranchByUuid(long branchUuid);
+ IOseeBranch getBranchByUuid(long branchId);
boolean branchExists(long branchUuid);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
index 50ac01af975..f73db60516f 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/IAtsClientVersionService.java
@@ -14,7 +14,7 @@ import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -30,7 +30,7 @@ public interface IAtsClientVersionService extends IAtsVersionService {
void setTeamDefinition(IAtsVersion version, IAtsTeamDefinition teamDef) throws OseeCoreException;
- Branch getBranch(IAtsVersion version);
+ BranchId getBranch(IAtsVersion version);
IAtsVersion createVersion(String name, String guid, long uuid);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
index eabdd8559c9..6ce228ba181 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AtsVersionServiceImpl.java
@@ -27,13 +27,13 @@ import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.CacheProvider;
import org.eclipse.osee.ats.core.version.AbstractAtsVersionServiceImpl;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
/**
* @author Donald G Dunne
@@ -151,11 +151,11 @@ public class AtsVersionServiceImpl extends AbstractAtsVersionServiceImpl impleme
}
@Override
- public Branch getBranch(IAtsVersion version) {
- Branch branch = null;
+ public BranchId getBranch(IAtsVersion version) {
+ BranchId branch = null;
Long branchUuid = getBranchId(version);
if (branchUuid != null && branchUuid > 0) {
- branch = BranchManager.getBranch(branchUuid);
+ branch = TokenFactory.createBranch(branchUuid);
}
return branch;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigPreferencePage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigPreferencePage.java
index 20f153c6da2..e87e5195c01 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigPreferencePage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigPreferencePage.java
@@ -17,10 +17,10 @@ import org.eclipse.osee.ats.api.config.AtsConfiguration;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.widgets.XText;
import org.eclipse.swt.SWT;
@@ -67,7 +67,7 @@ public class AtsConfigPreferencePage extends PreferencePage implements IWorkbenc
if (dialog.open() == 0) {
AtsConfiguration config = (AtsConfiguration) dialog.getResult()[0];
- Branch branch = BranchManager.getBranch(config.getBranchUuid());
+ BranchId branch = TokenFactory.createBranch(config.getBranchUuid());
AtsUtilCore.storeAtsBranch(branch, config.getName());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index bcdebb5f4a7..0c8c798c15c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -52,6 +52,7 @@ import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.WorldXNavigateItemAction;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.type.AttributeType;
@@ -771,7 +772,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
public static void validateBranchUuid(IAtsConfigObject name, long parentBranchUuid, ValidateResults results) {
Date date = new Date();
try {
- BranchId branch = BranchManager.getBranch(parentBranchUuid);
+ BranchId branch = TokenFactory.createBranch(parentBranchUuid);
if (BranchManager.isArchived(branch)) {
results.log("validateBranchUuid",
String.format(
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java
index e0293712797..c48273f1f18 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java
@@ -25,7 +25,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.util.XResultData;
@@ -121,7 +120,7 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction {
HashCollection<Artifact, TransactionRecord> transactionMap =
ChangeManager.getModifingTransactions(processArts);
- HashCollection<Artifact, IOseeBranch> branchMap = ChangeManager.getModifingBranches(processArts);
+ HashCollection<Artifact, BranchId> branchMap = ChangeManager.getModifingBranches(processArts);
for (Artifact srchArt : processArts) {
String str = String.format("Processing %d/%d - %s ", x++, processArts.size(), srchArt.getName());
// System.out.println(str);
@@ -134,9 +133,9 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction {
// Check for changes on working branches
boolean workingBranchesFound = false;
- Collection<IOseeBranch> branches = branchMap.getValues(srchArt);
+ Collection<BranchId> branches = branchMap.getValues(srchArt);
if (branches != null) {
- for (IOseeBranch branch : branches) {
+ for (BranchId branch : branches) {
Artifact assocArt = BranchManager.getAssociatedArtifact(branch);
if (assocArt != null && !assocArt.equals(AtsCoreUsers.SYSTEM_USER)) {
rd.addRaw(AHTML.addRowMultiColumnTable(new String[] {
@@ -145,7 +144,8 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction {
XResultDataUI.getHyperlink(assocArt),
assocArt.getName()}));
} else {
- rd.addRaw(AHTML.addRowMultiColumnTable(new String[] {"Branch", "", branch.getName()}));
+ rd.addRaw(AHTML.addRowMultiColumnTable(
+ new String[] {"Branch", "", BranchManager.getBranch(branch).getName()}));
}
workingBranchesFound = true;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java
index 280446ba2ff..1563a916710 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java
@@ -43,6 +43,7 @@ import org.eclipse.osee.ats.world.WorldEditorSimpleProvider;
import org.eclipse.osee.ats.world.WorldEditorUISearchItemProvider;
import org.eclipse.osee.ats.world.search.GroupWorldSearchItem;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.model.Branch;
@@ -168,8 +169,7 @@ public final class AtsUtil {
public static void openArtifact(String guid, Long branchUuid, OseeCmEditor view) {
try {
- Branch branch = BranchManager.getBranch(branchUuid);
- Artifact artifact = ArtifactQuery.getArtifactFromId(guid, branch);
+ Artifact artifact = ArtifactQuery.getArtifactFromId(guid, TokenFactory.createBranch(branchUuid));
openATSAction(artifact, AtsOpenOption.OpenOneOrPopupSelect);
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java
index 6ed536dd831..8f6d009c55e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java
@@ -19,11 +19,11 @@ import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.internal.AtsClientService;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.IDefaultInitialBranchesProvider;
/**
@@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IDefaultInitialBranchesPr
public class TeamBasedDefaultBranchProvider implements IDefaultInitialBranchesProvider {
@Override
- public Collection<Branch> getDefaultInitialBranches() throws OseeCoreException {
+ public Collection<BranchId> getDefaultInitialBranches() throws OseeCoreException {
IAtsUser user = AtsClientService.get().getUserService().getCurrentUser();
try {
Collection<IAtsTeamDefinition> teams = new ArrayList<>();
@@ -40,14 +40,10 @@ public class TeamBasedDefaultBranchProvider implements IDefaultInitialBranchesPr
AtsRelationTypes.TeamMember_Team)) {
teams.add(AtsClientService.get().getConfig().getSoleByUuid(art.getUuid(), IAtsTeamDefinition.class));
}
- Collection<Branch> branches = new LinkedList<>();
- Branch branch;
+ Collection<BranchId> branches = new LinkedList<>();
for (IAtsTeamDefinition team : teams) {
- branch = BranchManager.getBranch(team.getTeamBranchUuid());
- if (branch != null) {
- branches.add(branch);
- }
+ branches.add(TokenFactory.createBranch(team.getTeamBranchUuid()));
}
return branches;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
index 80ae3b6117b..952eb15911e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
@@ -21,7 +21,8 @@ import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -101,17 +102,17 @@ public class XCommitLabelProvider extends XViewerLabelProvider {
@Override
public String getColumnText(Object element, XViewerColumn xCol, int columnIndex) throws OseeCoreException {
- Branch branch = null;
+ BranchId branch;
if (element instanceof ICommitConfigItem) {
ICommitConfigItem configArt = (ICommitConfigItem) element;
if (!AtsClientService.get().getBranchService().isBranchValid(configArt)) {
return String.format("Branch not configured for [%s]", element);
} else {
- branch = BranchManager.getBranch(configArt.getBaselineBranchUuid());
+ branch = TokenFactory.createBranch(configArt.getBaselineBranchUuid());
}
} else if (element instanceof TransactionRecord) {
TransactionRecord txRecord = (TransactionRecord) element;
- branch = txRecord.getFullBranch();
+ branch = txRecord.getBranch();
} else {
throw new OseeArgumentException("Unhandled element type [%s]", element.getClass().toString());
}
@@ -176,7 +177,8 @@ public class XCommitLabelProvider extends XViewerLabelProvider {
return "Not Committed";
}
- private String handleDestBranchColumn(Object element, Branch branch) {
+ private String handleDestBranchColumn(Object element, BranchId branchToken) {
+ IOseeBranch branch = BranchManager.getBranch(branchToken);
if (element instanceof IAtsVersion) {
return branch == null ? "Parent Branch Not Configured for Version [" + element + "]" : branch.getShortName();
} else if (element instanceof IAtsTeamDefinition) {
@@ -187,19 +189,25 @@ public class XCommitLabelProvider extends XViewerLabelProvider {
return "";
}
- private String handleDestBranchCreationDateColumn(Object element, Branch branch) throws OseeCoreException {
+ private String handleDestBranchCreationDateColumn(Object element, BranchId branch) throws OseeCoreException {
if (element instanceof IAtsVersion) {
- return branch == null ? "Parent Branch Not Configured for Version [" + element + "]" : DateUtil.getMMDDYYHHMM(
- branch.getBaseTransaction().getTimeStamp());
+ return getColumnText("Version", element, branch);
} else if (element instanceof IAtsTeamDefinition) {
- return branch == null ? "Parent Branch Not Configured for Team Definition [" + element + "]" : DateUtil.getMMDDYYHHMM(
- branch.getBaseTransaction().getTimeStamp());
+ return getColumnText("Team Definition", element, branch);
} else if (element instanceof TransactionRecord) {
- return DateUtil.getMMDDYYHHMM(branch.getBaseTransaction().getTimeStamp());
+ return getColumnText(null, element, branch);
}
return "";
}
+ private String getColumnText(String elementType, Object element, BranchId branch) {
+ if (branch == null) {
+ return "Parent Branch Not Configured for " + elementType + " [" + element + "]";
+ } else {
+ return DateUtil.getMMDDYYHHMM(BranchManager.getBaseTransaction(branch).getTimeStamp());
+ }
+ }
+
private String handleActionColumn(BranchId branch) throws OseeCoreException {
CommitStatus commitStatus = AtsClientService.get().getBranchService().getCommitStatus(
commitXManager.getXCommitViewer().getTeamArt(), branch);
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
index 9813eadc9ae..9b33da3ce2a 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java
@@ -30,7 +30,6 @@ import org.eclipse.osee.define.internal.Activator;
import org.eclipse.osee.define.traceability.TraceUnitExtensionManager;
import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.MutableBoolean;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -172,7 +171,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
/**
* The <code>WizardResourceImportPage</code> implementation of this <code>Listener</code> method handles all events
* and enablements for controls on this page. Subclasses may extend.
- *
+ *
* @param event Event
*/
@Override
@@ -410,12 +409,9 @@ public class ImportTraceUnitPage extends WizardDataTransferPage {
}
try {
- Long branchUuid = settings.getLong(BRANCH_KEY);
- if (branchUuid > 0) {
- Branch branch = BranchManager.getBranch(branchUuid);
- if (branch != null) {
- branchSelectComposite.setSelected(branch);
- }
+ Long branchId = settings.getLong(BRANCH_KEY);
+ if (branchId > 0) {
+ branchSelectComposite.setSelected(BranchManager.getBranch(branchId));
}
} catch (Exception ex) {
// Do Nothing
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
index 8cbfddef6f8..4ea81d64211 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
@@ -33,6 +33,7 @@ import org.eclipse.osee.framework.access.AccessObject;
import org.eclipse.osee.framework.access.internal.data.ArtifactAccessObject;
import org.eclipse.osee.framework.access.internal.data.BranchAccessObject;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -62,7 +63,6 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.SystemGroup;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.OseeEventService;
@@ -254,7 +254,7 @@ public class AccessControlService implements IAccessControlService {
artifactLockCache.put(branchUuid, objectId, subjectId);
} else {
AccessObject accessObject =
- ArtifactAccessObject.getArtifactAccessObject(objectId, BranchManager.getBranch(branchUuid));
+ ArtifactAccessObject.getArtifactAccessObject(objectId, TokenFactory.createBranch(branchUuid));
cacheAccessObject(objectId, subjectId, permission, accessObject);
ArtifactType subjectArtifactType = getArtifactTypeCache().getById(subjectArtifactTypeId);
@@ -540,7 +540,7 @@ public class AccessControlService implements IAccessControlService {
if (recurse) {
Artifact artifact = ArtifactQuery.getArtifactFromId(artifactAccessObject.getArtId(),
- BranchManager.getBranch(artifactAccessObject.getBranchId()));
+ TokenFactory.createBranch(artifactAccessObject.getBranchId()));
for (Artifact child : artifact.getChildren()) {
AccessControlData childAccessControlData = null;
@@ -651,7 +651,7 @@ public class AccessControlService implements IAccessControlService {
private PermissionEnum getBranchPermission(IBasicArtifact<?> subject, Object object) throws OseeCoreException {
long branchUuid = ((AccessObject) object).getBranchId();
- Branch branch = BranchManager.getBranch(branchUuid);
+ BranchId branch = TokenFactory.createBranch(branchUuid);
return getBranchPermission(subject, branch);
}
diff --git a/plugins/org.eclipse.osee.framework.branch.gantt/src/org/eclipse/osee/branch/gantt/views/BranchVisualizationView.java b/plugins/org.eclipse.osee.framework.branch.gantt/src/org/eclipse/osee/branch/gantt/views/BranchVisualizationView.java
index 88d1bd8a84e..a1c18e8a433 100644
--- a/plugins/org.eclipse.osee.framework.branch.gantt/src/org/eclipse/osee/branch/gantt/views/BranchVisualizationView.java
+++ b/plugins/org.eclipse.osee.framework.branch.gantt/src/org/eclipse/osee/branch/gantt/views/BranchVisualizationView.java
@@ -133,11 +133,8 @@ public class BranchVisualizationView extends ViewPart {
String branchUuid = UserManager.getUser().getSetting(BRANCH_KEY);
if (Strings.isValid(branchUuid)) {
try {
- Long uuid = Long.valueOf(branchUuid);
- Branch branch = BranchManager.getBranch(uuid);
- if (branch != null) {
- xBranchSelectWidget.setSelection(branch);
- }
+ IOseeBranch branch = BranchManager.getBranch(Long.valueOf(branchUuid));
+ xBranchSelectWidget.setSelection(branch);
} catch (Exception ex) {
// do nothing
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
index 5374a058590..bce02b89735 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
@@ -86,5 +86,4 @@ public class OseeDslArtifactUpdateOperation extends AbstractOperation {
artifact.setSoleAttributeFromString(CoreAttributeTypes.GeneralStringData, data);
artifact.persist(transaction);
}
-
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
index 0ced616a7cd..3a17a8b94c6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
@@ -23,6 +23,7 @@ import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.LoadLevel;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -305,7 +306,7 @@ public final class ArtifactLoader {
*/
private static Artifact retrieveShallowArtifact(JdbcStatement chStmt, LoadType reload, boolean historical) throws OseeCoreException {
int artifactId = chStmt.getInt("art_id");
- BranchId branch = BranchManager.getBranch(chStmt.getLong("branch_id"));
+ BranchId branch = TokenFactory.createBranch(chStmt.getLong("branch_id"));
int transactionId = Artifact.TRANSACTION_SENTINEL;
if (historical) {
int stripeTransactionNumber = chStmt.getInt("stripe_transaction_id");
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
index b94e8029a94..ba81396f43a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
@@ -504,7 +504,7 @@ public final class BranchManager {
return getCache().getBranches(new BranchFilter(archivedState, branchTypes));
}
- private static IOseeBranch getDefaultInitialBranch() throws OseeCoreException {
+ private static BranchId getDefaultInitialBranch() throws OseeCoreException {
ExtensionDefinedObjects<IDefaultInitialBranchesProvider> extensions =
new ExtensionDefinedObjects<IDefaultInitialBranchesProvider>(
"org.eclipse.osee.framework.skynet.core.DefaultInitialBranchProvider", "DefaultInitialBranchProvider",
@@ -512,7 +512,7 @@ public final class BranchManager {
for (IDefaultInitialBranchesProvider provider : extensions.getObjects()) {
try {
// Guard against problematic extensions
- for (Branch branch : provider.getDefaultInitialBranches()) {
+ for (BranchId branch : provider.getDefaultInitialBranches()) {
if (branch != null) {
return branch;
}
@@ -532,7 +532,7 @@ public final class BranchManager {
lastBranch = getBranch(branchUuid);
} catch (Exception ex) {
try {
- lastBranch = getDefaultInitialBranch();
+ lastBranch = getBranch(getDefaultInitialBranch());
UserManager.setSetting(LAST_DEFAULT_BRANCH, lastBranch.getUuid());
} catch (OseeCoreException ex1) {
OseeLog.log(Activator.class, Level.SEVERE, ex1);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
index 93b76898b42..fc8c0cdf88e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IRelationType;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -138,7 +139,7 @@ public class ChangeArtifactType {
while (chStmt.next()) {
int gammaId = chStmt.getInt("gamma_id");
long branchUuid = chStmt.getLong("branch_id");
- BranchId branch = BranchManager.getBranch(branchUuid);
+ BranchId branch = TokenFactory.createBranch(branchUuid);
int artId = gammaToArtId.get(gammaId);
Artifact artifact = ArtifactQuery.checkArtifactFromId(artId, branch, DeletionFlag.EXCLUDE_DELETED);
if (artifact != null) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IDefaultInitialBranchesProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IDefaultInitialBranchesProvider.java
index 33f65b71489..b8169dc97a4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IDefaultInitialBranchesProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IDefaultInitialBranchesProvider.java
@@ -11,12 +11,12 @@
package org.eclipse.osee.framework.skynet.core.artifact;
import java.util.Collection;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
* @author Robert A. Fisher
*/
public interface IDefaultInitialBranchesProvider {
- public Collection<Branch> getDefaultInitialBranches() throws OseeCoreException;
+ public Collection<BranchId> getDefaultInitialBranches() throws OseeCoreException;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
index 37b7a51cac3..e56dea6a8d0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
@@ -16,9 +16,10 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
@@ -173,7 +174,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation {
int artId = chStmt.getInt("art_id");
long branchUuid = chStmt.getLong("branch_id");
if (recurseChildrenBranches) {
- Branch branch = BranchManager.getBranch(branchUuid);
+ BranchId branch = TokenFactory.createBranch(branchUuid);
Artifact artifactFromId = ArtifactQuery.getArtifactFromId(artId, branch);
artifactsToPurge.add(artifactFromId);
} else {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
index 692b1f3f2aa..de3cbe85271 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
@@ -13,9 +13,10 @@ package org.eclipse.osee.framework.skynet.core.artifact;
import static org.eclipse.osee.framework.core.enums.LoadLevel.ARTIFACT_AND_ATTRIBUTE_DATA;
import static org.eclipse.osee.framework.core.enums.LoadLevel.ARTIFACT_DATA;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.LoadLevel;
import org.eclipse.osee.framework.core.enums.ModificationType;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.type.RelationType;
import org.eclipse.osee.framework.core.sql.OseeSql;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -47,7 +48,7 @@ class RelationLoader {
int relationId = chStmt.getInt("rel_link_id");
int aArtifactId = chStmt.getInt("a_art_id");
int bArtifactId = chStmt.getInt("b_art_id");
- Branch branch = BranchManager.getBranch(chStmt.getLong("branch_id"));
+ BranchId branch = TokenFactory.createBranch(chStmt.getLong("branch_id"));
RelationType relationType = RelationTypeManager.getTypeByGuid(chStmt.getLong("rel_link_type_id"));
int gammaId = chStmt.getInt("gamma_id");
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index 68c3d327506..b6de53d8756 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -80,11 +80,11 @@ public class ArtifactQuery {
}
public static Artifact getArtifactFromToken(EventBasicGuidArtifact guidArt) throws OseeCoreException {
- return getArtifactFromId(guidArt.getGuid(), BranchManager.getBranch(guidArt.getBranchId()));
+ return getArtifactFromId(guidArt.getGuid(), TokenFactory.createBranch(guidArt.getBranchId()));
}
public static Artifact getArtifactFromToken(IBasicGuidArtifact guidArt) throws OseeCoreException {
- return getArtifactFromId(guidArt.getGuid(), BranchManager.getBranch(guidArt.getBranchId()));
+ return getArtifactFromId(guidArt.getGuid(), TokenFactory.createBranch(guidArt.getBranchId()));
}
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
index 661d18b49e9..2afd41f95d6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
@@ -20,6 +20,7 @@ import java.util.logging.Level;
import org.eclipse.core.runtime.Platform;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
import org.eclipse.osee.framework.core.enums.ConflictType;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -484,9 +485,9 @@ public class AttributeConflict extends Conflict {
Artifact destArtifact;
try {
mergeArtifact =
- ArtifactQuery.getArtifactFromId(getArtifact().getArtId(), BranchManager.getBranch(mergeBranchId));
+ ArtifactQuery.getArtifactFromId(getArtifact().getArtId(), TokenFactory.createBranch(mergeBranchId));
destArtifact =
- ArtifactQuery.getArtifactFromId(getArtifact().getArtId(), BranchManager.getBranch(destBranchId));
+ ArtifactQuery.getArtifactFromId(getArtifact().getArtId(), TokenFactory.createBranch(destBranchId));
} catch (ArtifactDoesNotExist ex) {
return false;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java
index 7d1523f24e2..e49f051d9f2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java
@@ -16,6 +16,7 @@ import java.net.HttpURLConnection;
import java.util.Map;
import org.eclipse.osee.framework.core.client.server.HttpResponse;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -51,7 +52,7 @@ public abstract class BaseArtifactLoopbackCmd implements IClientLoopbackCmd {
branch = transactionId.getBranch();
artifact = ArtifactQuery.getHistoricalArtifactFromId(guid, transactionId, searchDeleted);
} else {
- branch = BranchManager.getBranch(Long.parseLong(branchUuid));
+ branch = TokenFactory.createBranch(Long.parseLong(branchUuid));
artifact = ArtifactQuery.getArtifactFromId(guid, branch, searchDeleted);
}
if (artifact == null) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
index d5a29610297..dc5f4176f56 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
@@ -14,6 +14,7 @@ import java.net.URI;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.SystemUser;
import org.eclipse.osee.framework.core.model.Branch;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java
index cde0f18f839..219983fc3d2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java
@@ -19,8 +19,8 @@ import java.util.Set;
import java.util.logging.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.ModificationType;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.change.ChangeIgnoreType;
@@ -34,7 +34,6 @@ import org.eclipse.osee.framework.jdk.core.type.CompositeKeyHashMap;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.change.ArtifactChange;
@@ -262,7 +261,7 @@ public class ChangeDataLoader extends AbstractOperation {
}
private static void preloadArtifacts(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, Collection<Integer> artIds, TransactionRecord tx, boolean isHistorical) throws OseeCoreException {
- Branch branch = BranchManager.getBranch(tx.getBranchId());
+ BranchId branch = TokenFactory.createBranch(tx.getBranchId());
List<Artifact> artifacts;
if (isHistorical) {
artifacts = ArtifactQuery.getHistoricalArtifactListFromIds(artIds, tx, INCLUDE_DELETED);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java
index d0ea579377f..84845999ecc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java
@@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.CoreBranches;
@@ -124,7 +124,7 @@ public final class ChangeManager {
chStmt.runPreparedQuery(joinQuery.size() * 2, ServiceUtil.getSql(OseeSql.CHANGE_TX_MODIFYING),
joinQuery.getQueryId());
while (chStmt.next()) {
- IOseeBranch branch = BranchManager.getBranch(chStmt.getLong("branch_id"));
+ BranchId branch = TokenFactory.createBranch(chStmt.getLong("branch_id"));
Artifact artifact = artifactMap.get(chStmt.getInt("art_id"), branch);
transactionMap.put(artifact, TransactionManager.getTransactionId(chStmt.getInt("transaction_id")));
}
@@ -143,7 +143,7 @@ public final class ChangeManager {
*
* @return a map of artifact to collection of branches which affected the given artifact
*/
- public static HashCollection<Artifact, IOseeBranch> getModifingBranches(Collection<Artifact> artifacts) throws OseeCoreException {
+ public static HashCollection<Artifact, BranchId> getModifingBranches(Collection<Artifact> artifacts) throws OseeCoreException {
ArtifactJoinQuery joinQuery = JoinUtility.createArtifactJoinQuery();
CompositeKeyHashMap<Integer, BranchId, Artifact> artifactMap =
@@ -158,7 +158,7 @@ public final class ChangeManager {
}
}
- HashCollection<Artifact, IOseeBranch> branchMap = new HashCollection<>();
+ HashCollection<Artifact, BranchId> branchMap = new HashCollection<>();
try {
joinQuery.store();
JdbcStatement chStmt = ConnectionHandler.getStatement();
@@ -167,7 +167,7 @@ public final class ChangeManager {
joinQuery.getQueryId());
while (chStmt.next()) {
if (chStmt.getInt("tx_count") > 0) {
- IOseeBranch branch = BranchManager.getBranch(chStmt.getLong("branch_id"));
+ BranchId branch = TokenFactory.createBranch(chStmt.getLong("branch_id"));
Artifact artifact = artifactMap.get(chStmt.getInt("art_id"), BranchManager.getParentBranchId(branch));
branchMap.put(artifact, branch);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
index d3d2c6abda0..549925b7aa7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.exception.BranchMergeException;
@@ -107,7 +108,7 @@ public class ConflictManagerInternal {
AttributeConflict attributeConflict = new AttributeConflict(chStmt.getInt("source_gamma_id"),
chStmt.getInt("dest_gamma_id"), chStmt.getInt("art_id"), null, commitTransaction,
chStmt.getString("source_value"), chStmt.getInt("attr_id"), chStmt.getLong("attr_type_id"),
- BranchManager.getBranch(chStmt.getLong("merge_branch_id")), sourceBranch,
+ TokenFactory.createBranch(chStmt.getLong("merge_branch_id")), sourceBranch,
BranchManager.getBranch(chStmt.getLong("dest_branch_id")));
attributeConflict.setStatus(ConflictStatus.valueOf(chStmt.getInt("status")));
conflicts.add(attributeConflict);
diff --git a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java
index 600bb435597..c7f0d60d494 100644
--- a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.io.StringOutputStream;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -63,7 +64,7 @@ public class ArtifactURIHandler extends URIHandlerImpl {
private <T> T createStream(URI uri, BiFunction<Artifact, Long, T> function) {
String[] segments = uri.segments();
- BranchId branch = BranchManager.getBranch(Long.parseLong(segments[0]));
+ BranchId branch = TokenFactory.createBranch(Long.parseLong(segments[0]));
Artifact artifact = ArtifactQuery.getArtifactFromId(Long.parseLong(segments[2]), branch);
Long attributeId = Long.parseLong(segments[4]);
return function.apply(artifact, attributeId);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java
index 079ceb83993..eb4fd601166 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
@@ -382,7 +383,7 @@ public class ArtifactImportPage extends WizardDataTransferPage {
if (GUID.isValid(guid) && Strings.isNumeric(branchUuidStr)) {
try {
Long bramchUuid = Long.valueOf(branchUuidStr);
- Artifact artifact = ArtifactQuery.getArtifactFromId(guid, BranchManager.getBranch(bramchUuid));
+ Artifact artifact = ArtifactQuery.getArtifactFromId(guid, TokenFactory.createBranch(bramchUuid));
artifactSelectPanel.setDefaultItem(artifact);
} catch (OseeCoreException ex) {
OseeLog.logf(Activator.class, Level.SEVERE,
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java
index c46173e44a5..77334344e69 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java
@@ -16,6 +16,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -157,7 +158,7 @@ public class ArtifactTransfer extends ByteArrayTransfer {
private Artifact readArtifact(DataInputStream dataIn) throws OseeCoreException, IOException {
int artID = dataIn.readInt();
long branchUuid = dataIn.readLong();
- return ArtifactQuery.getArtifactFromId(artID, BranchManager.getBranch(branchUuid));
+ return ArtifactQuery.getArtifactFromId(artID, TokenFactory.createBranch(branchUuid));
}
/**
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInputFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInputFactory.java
index 244b7d21f59..7f5fda9e7f9 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInputFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInputFactory.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.change;
import java.util.logging.Level;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.TransactionRecord;
@@ -55,8 +56,7 @@ public class ChangeReportEditorInputFactory implements IElementFactory {
String branchUuid = memento.getString(BRANCH_ID_KEY);
if (Strings.isNumeric(branchUuid)) {
try {
- Branch branch = BranchManager.getBranch(Long.valueOf(branchUuid));
- toReturn.setBranch(branch);
+ toReturn.setBranch(TokenFactory.createBranch(Long.valueOf(branchUuid)));
} catch (Exception ex) {
// do nothing
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
index 5c38cd47536..16b7bb6a2dd 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
@@ -31,6 +31,7 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
@@ -340,7 +341,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor
if (DbConnectionExceptionComposite.dbConnectionIsOk()) {
try {
if (memento != null && memento.getString(ROOT_UUID) != null && memento.getString(ROOT_BRANCH) != null) {
- Branch branch = BranchManager.getBranch(Long.parseLong(memento.getString(ROOT_BRANCH)));
+ BranchId branch = TokenFactory.createBranch(Long.parseLong(memento.getString(ROOT_BRANCH)));
if (!BranchManager.isArchived(branch) || AccessControlManager.isOseeAdmin()) {
Artifact previousArtifact =
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
index 0de4509b62e..8e8bb434533 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
@@ -24,9 +24,9 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -80,7 +80,7 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList
private Collection<GroupExplorerItem> selected;
private Object[] expanded = new Object[] {};
private XBranchSelectWidget branchSelect;
- private Branch branch;
+ private IOseeBranch branch;
private GroupExplorerDragAndDrop groupExpDnd;
private NeedProjectMenuListener needProjectListener;
@@ -469,15 +469,13 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList
memento = memento.getChild(INPUT);
if (memento != null) {
branchUuid = Long.parseLong(memento.getString(BRANCH_ID));
- if (branchUuid != null) {
- try {
- branch = BranchManager.getBranch(branchUuid);
- if (BranchManager.getState(branch).isDeleted() || BranchManager.isArchived(branch)) {
- branch = null;
- }
- } catch (BranchDoesNotExist ex) {
+ try {
+ branch = BranchManager.getBranch(branchUuid);
+ if (BranchManager.getState(branch).isDeleted() || BranchManager.isArchived(branch)) {
branch = null;
}
+ } catch (BranchDoesNotExist ex) {
+ branch = null;
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java
index 26569093efb..63cf4d50272 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java
@@ -20,10 +20,10 @@ import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -307,7 +307,7 @@ public class GroupExplorerDragAndDrop extends SkynetDragAndDrop {
}
}
- public void setBranch(Branch branch) {
+ public void setBranch(IOseeBranch branch) {
this.branch = branch;
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java
index 54493cafc87..0a2e7b397f1 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java
@@ -163,41 +163,39 @@ public class BranchSelectSimpleComposite extends Composite implements Listener {
}
}
- List<String> branchUuidsToUse = new ArrayList<>();
+ List<Long> branchUuidsToUse = new ArrayList<>();
for (String id : branchUuids) {
try {
- Branch branch = BranchManager.getBranch(Long.parseLong(id));
- if (branch != null) {
- branchUuidsToUse.add(id);
+ Long branchId = Long.parseLong(id);
+ if (BranchManager.branchExists(branchId)) {
+ branchUuidsToUse.add(branchId);
}
} catch (Exception ex) {
// Do nothing
}
}
- setCombo(branchUuidsToUse.toArray(new String[branchUuidsToUse.size()]), lastSelected);
+ setCombo(branchUuidsToUse, lastSelected);
}
- private void setCombo(String[] values, String lastSelected) {
+ private void setCombo(List<Long> values, String lastSelected) {
int toSelect = 0;
- for (int i = 0; i < values.length; i++) {
- String toStore = values[i];
- if (Strings.isValid(toStore)) {
- try {
- Branch branch = BranchManager.getBranch(Long.parseLong(toStore));
-
- String branchName = branch.getName();
- branchSelectCombo.add(branchName);
- branchSelectCombo.setData(String.valueOf(branch.getUuid()), branch);
- branchSelectCombo.setData(branchName, branch);
- if (toStore.equals(lastSelected)) {
- toSelect = i;
- branchSelectCombo.select(toSelect);
- }
- } catch (Exception ex) {
- OseeLog.logf(Activator.class, Level.SEVERE, "Unable to add invalid branch uuid [%s] to selection list.",
- toStore);
+ for (int i = 0; i < values.size(); i++) {
+ Long toStore = values.get(i);
+ try {
+ IOseeBranch branch = BranchManager.getBranch(toStore);
+
+ String branchName = branch.getName();
+ branchSelectCombo.add(branchName);
+ branchSelectCombo.setData(String.valueOf(branch.getUuid()), branch);
+ branchSelectCombo.setData(branchName, branch);
+ if (toStore.equals(lastSelected)) {
+ toSelect = i;
+ branchSelectCombo.select(toSelect);
}
+ } catch (Exception ex) {
+ OseeLog.logf(Activator.class, Level.SEVERE, "Unable to add invalid branch uuid [%s] to selection list.",
+ toStore);
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultBrowserListener.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultBrowserListener.java
index 6a915367b3e..bcbdd7dd2a0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultBrowserListener.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultBrowserListener.java
@@ -14,12 +14,11 @@ package org.eclipse.osee.framework.ui.skynet.results.html;
import java.net.URL;
import java.util.logging.Level;
import java.util.regex.Pattern;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService;
import org.eclipse.osee.framework.ui.skynet.cm.OseeCmEditor;
@@ -67,7 +66,7 @@ public class XResultBrowserListener implements LocationListener {
if (m.find()) {
String guid = m.group(1);
Long branchUuid = Long.parseLong(m.group(2));
- Artifact artifact = ArtifactQuery.getArtifactFromId(guid, BranchManager.getBranch(branchUuid));
+ Artifact artifact = ArtifactQuery.getArtifactFromId(guid, TokenFactory.createBranch(branchUuid));
RendererManager.openInJob(artifact, PresentationType.DEFAULT_OPEN);
}
} catch (Exception ex) {
@@ -81,9 +80,7 @@ public class XResultBrowserListener implements LocationListener {
break;
case openBranch:
event.doit = false;
- long branchUuid = new Long(value);
- Branch branch = BranchManager.getBranch(branchUuid);
- BranchView.revealBranch(branch);
+ BranchView.revealBranch(TokenFactory.createBranch(Long.valueOf(value)));
break;
case browserInternal:
event.doit = false;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
index 26eb16a316f..a406247c082 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
@@ -25,7 +25,6 @@ import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.help.ui.OseeHelpContext;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -148,8 +147,7 @@ public class QuickSearchView extends GenericViewPart {
String uuid = memento.getString(LAST_BRANCH_UUID);
if (Strings.isValid(uuid) && uuid.matches("\\d+")) {
try {
- Branch branch = BranchManager.getBranch(Long.valueOf(uuid));
- branchSelect.setSelection(branch);
+ branchSelect.setSelection(BranchManager.getBranch(Long.valueOf(uuid)));
} catch (OseeCoreException ex) {
// do nothing
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java
index 5839708e7fd..dd507cc90aa 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java
@@ -19,10 +19,11 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.RelationSide;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.RelationTypeSide;
import org.eclipse.osee.framework.core.model.type.RelationType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -31,7 +32,6 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.relation.RelationTypeManager;
@@ -160,7 +160,7 @@ public final class SkyWalkerOptions {
String guid = AXml.getTagData(xml, "guid");
if (Strings.isValid(guid)) {
String branchUuid = AXml.getTagData(xml, "branchUuid");
- Branch branch = BranchManager.getBranch(Long.parseLong(branchUuid));
+ BranchId branch = TokenFactory.createBranch(Long.parseLong(branchUuid));
Artifact art = ArtifactQuery.getArtifactFromId(guid, branch);
if (art != null) {
setArtifact(art);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java
index 11af9ab04b7..fbc5b005b02 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java
@@ -24,6 +24,7 @@ import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.SystemUser;
import org.eclipse.osee.framework.help.ui.OseeHelpContext;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -156,7 +157,7 @@ public class SkyWalkerView extends GenericViewPart {
try {
if (storedGuid != null) {
Artifact art =
- ArtifactQuery.getArtifactFromId(storedGuid, BranchManager.getBranch(Long.parseLong(storedBrandId)));
+ ArtifactQuery.getArtifactFromId(storedGuid, TokenFactory.createBranch(Long.parseLong(storedBrandId)));
if (art != null) {
explore(art);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectByWidgetDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectByWidgetDam.java
index ae27e0f3ad3..8e247c13da6 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectByWidgetDam.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectByWidgetDam.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.ui.skynet.widgets;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -86,10 +85,7 @@ public class XBranchSelectByWidgetDam extends XBranchSelectWidget implements IAt
this.attributeType = attributeTypeName;
Long storedUuid = getStoredUuid();
if (storedUuid != null && getStoredUuid() > 0L) {
- IOseeBranch branch = BranchManager.getBranch(storedUuid);
- if (branch != null) {
- setSelection(branch);
- }
+ setSelection(BranchManager.getBranch(storedUuid));
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidgetDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidgetDam.java
index 1c7b21701ca..117089bc50d 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidgetDam.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidgetDam.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.ui.skynet.widgets;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -92,10 +91,7 @@ public class XBranchSelectWidgetDam extends XBranchSelectWidget implements IAttr
this.attributeType = attributeTypeName;
Long storedUuid = getStoredUuid();
if (storedUuid != null && storedUuid > 0) {
- IOseeBranch branch = BranchManager.getBranch(storedUuid);
- if (branch != null) {
- setSelection(branch);
- }
+ setSelection(BranchManager.getBranch(storedUuid));
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTypeListViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTypeListViewer.java
index 09d3dbd34e8..cc71b65c3c8 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTypeListViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTypeListViewer.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -32,7 +33,7 @@ public abstract class XTypeListViewer extends XListViewer {
public BranchId resolveBranch(long branchUuid) {
try {
- return BranchManager.getBranch(branchUuid);
+ return TokenFactory.createBranch(branchUuid);
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
index 8ef6f787dcb..7a46f415ee3 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
@@ -21,7 +21,7 @@ import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.customize.XViewerCustomMenu;
-import org.eclipse.osee.framework.core.model.Branch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.help.ui.OseeHelpContext;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -156,7 +156,7 @@ public class BranchView extends GenericViewPart implements IBranchWidgetMenuList
mm.insertBefore(XViewer.MENU_GROUP_PRE, new SetAsFavoriteAction(xBranchWidget));
}
- public static void revealBranch(Branch branch) throws OseeCoreException {
+ public static void revealBranch(BranchId branch) throws OseeCoreException {
try {
BranchView branchView = (BranchView) AWorkbench.getActivePage().showView(VIEW_ID);
branchView.reveal(branch);
@@ -165,7 +165,7 @@ public class BranchView extends GenericViewPart implements IBranchWidgetMenuList
}
}
- private void reveal(Branch branch) {
+ private void reveal(BranchId branch) {
if (isInitialized()) {
xBranchWidget.reveal(branch);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
index a5b92616324..431da23b21a 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java
@@ -122,7 +122,7 @@ public class XBranchWidget extends GenericXWidget {
refresh();
}
- public void reveal(Branch branch) {
+ public void reveal(BranchId branch) {
branchXViewer.reveal(branch);
branchXViewer.setSelection(new StructuredSelection(branch), true);
refresh();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
index c3b52396e14..5297756d6b0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
@@ -29,6 +29,7 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.nebula.widgets.xviewer.customize.XViewerCustomMenu;
import org.eclipse.osee.framework.access.AccessControlManager;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.help.ui.OseeHelpContext;
@@ -336,7 +337,7 @@ public class HistoryView extends GenericViewPart implements IBranchEventListener
String branchUuidStr = memento.getString(BRANCH_ID);
if (Strings.isValid(branchUuidStr)) {
Long branchUuid = Long.valueOf(branchUuidStr);
- Artifact artifact = ArtifactQuery.getArtifactFromId(guid, BranchManager.getBranch(branchUuid));
+ Artifact artifact = ArtifactQuery.getArtifactFromId(guid,TokenFactory.createBranch(branchUuid));
openViewUpon(artifact, false);
}
} else {
diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
index c1bf6403a7a..1402b90055a 100644
--- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
+++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
@@ -22,7 +22,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -38,9 +37,9 @@ import org.eclipse.osee.ote.define.jobs.OutfileToArtifactJob;
public class ImportOutfileOperation {
private final URI[] fileSystemObjects;
- private final Branch selectedBranch;
+ private final BranchId selectedBranch;
- public ImportOutfileOperation(Branch selectedBranch, URI... fileSystemObjects) throws OseeCoreException {
+ public ImportOutfileOperation(BranchId selectedBranch, URI... fileSystemObjects) throws OseeCoreException {
checkForNull(selectedBranch);
checkForNull(fileSystemObjects);
checkForEmpty(fileSystemObjects);

Back to the top