diff options
396 files changed, 1501 insertions, 1442 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 06224a03269..ff21bee8f4b 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 @@ -16,6 +16,7 @@ import org.eclipse.osee.ats.api.IAtsConfigObject; import org.eclipse.osee.ats.api.commit.CommitStatus; import org.eclipse.osee.ats.api.commit.ICommitConfigItem; import org.eclipse.osee.ats.api.version.IAtsVersion; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchArchivedState; @@ -38,7 +39,7 @@ public interface IAtsBranchService { IOseeBranch getBranch(IAtsTeamWorkflow teamWf) throws OseeCoreException; - IOseeBranch getBranch(IAtsConfigObject configObject); + BranchId getBranch(IAtsConfigObject configObject); IOseeBranch getBranch(ICommitConfigItem configObject); @@ -64,21 +65,21 @@ public interface IAtsBranchService { Collection<ITransaction> getTransactionIds(IAtsTeamWorkflow teamWf, boolean forMergeBranches); - boolean isBranchesAllCommittedExcept(IAtsTeamWorkflow teamWf, IOseeBranch branchToExclude); + boolean isBranchesAllCommittedExcept(IAtsTeamWorkflow teamWf, BranchId branchToExclude); - Collection<IOseeBranch> getBranchesCommittedTo(IAtsTeamWorkflow teamWf); + Collection<BranchId> getBranchesCommittedTo(IAtsTeamWorkflow teamWf); - Collection<IOseeBranch> getBranchesLeftToCommit(IAtsTeamWorkflow teamWf); + Collection<BranchId> getBranchesLeftToCommit(IAtsTeamWorkflow teamWf); CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, ICommitConfigItem configArt); ICommitConfigItem getParentBranchConfigArtifactConfiguredToCommitTo(IAtsTeamWorkflow teamWf); - CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch, ICommitConfigItem configArt); + CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, BranchId destinationBranch, ICommitConfigItem configArt); IOseeBranch getWorkingBranchExcludeStates(IAtsTeamWorkflow teamWf, BranchState... negatedBranchStates); - CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch); + CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, BranchId destinationBranch); Collection<Object> getCommitTransactionsAndConfigItemsForTeamWf(IAtsTeamWorkflow teamWf); @@ -92,15 +93,15 @@ public interface IAtsBranchService { Collection<ITransaction> getCommitTransactionsToUnarchivedBaselineBranchs(IAtsTeamWorkflow teamWf); - BranchType getBranchType(IOseeBranch branch); + BranchType getBranchType(BranchId branch); - BranchState getBranchState(IOseeBranch branch); + BranchState getBranchState(BranchId branch); Collection<ITransaction> getCommittedArtifactTransactionIds(IAtsTeamWorkflow teamWf); - boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch); + boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId destinationBranch); - boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch workingBranch, IOseeBranch destinationBranch); + boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId workingBranch, BranchId destinationBranch); Result isCommitBranchAllowed(IAtsTeamWorkflow teamWf) throws OseeCoreException; @@ -110,21 +111,21 @@ public interface IAtsBranchService { boolean branchExists(long branchUuid); - BranchArchivedState getArchiveState(IOseeBranch branch); + BranchArchivedState getArchiveState(BranchId branch); - ITransaction getCommitTransactionRecord(IAtsTeamWorkflow teamWf, IOseeBranch branch); + ITransaction getCommitTransactionRecord(IAtsTeamWorkflow teamWf, BranchId branch); Date getTimeStamp(ITransaction committedToParentTransRecord); - Collection<IOseeBranch> getBranchesToCommitTo(IAtsTeamWorkflow teamWf) throws OseeCoreException; + Collection<BranchId> getBranchesToCommitTo(IAtsTeamWorkflow teamWf) throws OseeCoreException; - Collection<IOseeBranch> getBranchesInCommit(); + Collection<BranchId> getBranchesInCommit(); - boolean workingBranchCommittedToDestinationBranchParentPriorToDestinationBranchCreation(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch, Collection<ITransaction> commitTransactionIds) throws OseeCoreException; + boolean workingBranchCommittedToDestinationBranchParentPriorToDestinationBranchCreation(IAtsTeamWorkflow teamWf, BranchId destinationBranch, Collection<ITransaction> commitTransactionIds) throws OseeCoreException; - IOseeBranch getParentBranch(IOseeBranch branch); + BranchId getParentBranch(BranchId branch); - ITransaction getBaseTransaction(IOseeBranch branch); + ITransaction getBaseTransaction(BranchId branch); String getBranchName(IAtsTeamWorkflow teamWf); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java index 372d5229a99..d33439edd85 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java @@ -56,7 +56,7 @@ import org.eclipse.osee.ats.util.FavoritesManager; import org.eclipse.osee.ats.util.SubscribeManagerUI; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -247,7 +247,7 @@ public class PopulateDemoActions extends XNavigateItemAction { OseeLog.log(Activator.class, Level.INFO, "Creating SAW_Bld_2 branch off SAW_Bld_1"); } // Create SAW_Bld_2 branch off SAW_Bld_1 - IOseeBranch childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2); + BranchId childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2); DemoDbUtil.sleep(5000); // need to update the branch type; @@ -374,7 +374,7 @@ public class PopulateDemoActions extends XNavigateItemAction { } } - private void importRequirements(IOseeBranch branch, IArtifactType requirementType, String folderName, String filename) throws Exception { + private void importRequirements(BranchId branch, IArtifactType requirementType, String folderName, String filename) throws Exception { if (DEBUG) { OseeLog.logf(Activator.class, Level.INFO, "Importing \"%s\" requirements on branch \"%s\"", folderName, branch); @@ -407,7 +407,7 @@ public class PopulateDemoActions extends XNavigateItemAction { } } - private void demoDbTraceabilityTx(SkynetTransaction transaction, IOseeBranch branch) { + private void demoDbTraceabilityTx(SkynetTransaction transaction, BranchId branch) { try { Collection<Artifact> systemArts = DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SystemRequirementMSWord, "Robot", branch); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java index 557d13ec539..691822015c5 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java @@ -36,7 +36,7 @@ import org.eclipse.osee.ats.demo.api.DemoProgram; import org.eclipse.osee.ats.demo.api.DemoSubsystems; import org.eclipse.osee.ats.demo.api.DemoUsers; import org.eclipse.osee.framework.core.data.IArtifactToken; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.exception.OseeWrappedException; import org.eclipse.osee.framework.database.init.IDbInitializationTask; @@ -306,7 +306,7 @@ public class DemoDatabaseConfig implements IDbInitializationTask { return workPkg1; } - private void populateProgramBranch(IOseeBranch programBranch) throws OseeCoreException { + private void populateProgramBranch(BranchId programBranch) throws OseeCoreException { Artifact sawProduct = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Component, programBranch, "SAW Product Decomposition"); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java index 7b6de8235af..076b3cd757d 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java @@ -24,6 +24,7 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.config.ActionableItems; import org.eclipse.osee.ats.core.util.AtsUtilCore; import org.eclipse.osee.ats.demo.api.DemoArtifactTypes; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.IUserToken; @@ -83,10 +84,10 @@ public class DemoDbUtil { return getArtTypeRequirements(DEBUG, CoreArtifactTypes.SoftwareRequirement, str.name(), branch); } - public static Collection<Artifact> getArtTypeRequirements(boolean DEBUG, IArtifactType artifactType, String artifactNameStr, IOseeBranch branch) throws OseeCoreException { + public static Collection<Artifact> getArtTypeRequirements(boolean DEBUG, IArtifactType artifactType, String artifactNameStr, BranchId branch) throws OseeCoreException { if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, - "Getting \"" + artifactNameStr + "\" requirement(s) from Branch " + branch.getName()); + "Getting \"" + artifactNameStr + "\" requirement(s) from Branch " + branch.getId()); } Collection<Artifact> arts = ArtifactQuery.getArtifactListFromTypeAndName(artifactType, artifactNameStr, branch, QueryOption.CONTAINS_MATCH_OPTIONS); @@ -106,7 +107,7 @@ public class DemoDbUtil { }; public static String HAPTIC_CONSTRAINTS_REQ = "Haptic Constraints"; - public static Artifact getInterfaceInitializationSoftwareRequirement(boolean DEBUG, IOseeBranch branch) throws OseeCoreException { + public static Artifact getInterfaceInitializationSoftwareRequirement(boolean DEBUG, BranchId branch) throws OseeCoreException { if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "Getting \"" + INTERFACE_INITIALIZATION + "\" requirement."); } diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWebDatabaseConfig.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWebDatabaseConfig.java index 1ef572d22d5..471de7210ed 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWebDatabaseConfig.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWebDatabaseConfig.java @@ -13,7 +13,7 @@ package org.eclipse.osee.ats.client.demo.config; import org.eclipse.osee.ats.api.data.AtsArtifactToken; import org.eclipse.osee.ats.core.util.AtsUtilCore; import org.eclipse.osee.ats.demo.api.DemoArtifactToken; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.database.init.IDbInitializationTask; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -34,7 +34,7 @@ public class DemoWebDatabaseConfig implements IDbInitializationTask { public void run() throws OseeCoreException { TestUtil.setDemoDb(true); - IOseeBranch atsBranch = AtsUtilCore.getAtsBranch(); + BranchId atsBranch = AtsUtilCore.getAtsBranch(); SkynetTransaction transaction = TransactionManager.createTransaction(atsBranch, "Create ATS Folders"); Artifact headingArt = OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.HeadingFolder, atsBranch); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java index 5f0ac6c6b8b..ccc2e24d281 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java @@ -22,7 +22,7 @@ import org.eclipse.osee.ats.core.util.AtsUtilCore; import org.eclipse.osee.ats.demo.api.DemoActionableItems; import org.eclipse.osee.ats.demo.api.DemoWorkType; import org.eclipse.osee.framework.core.data.IAccessContextId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -48,7 +48,7 @@ public class AtsBranchAccessManagerTest { (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements); Assert.assertNotNull(teamArt); - IOseeBranch branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); + BranchId branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); Assert.assertNotNull(branch); Assert.assertTrue(mgr.isApplicable(branch)); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ShowMergeManagerActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ShowMergeManagerActionTest.java index 4aaca7120bd..114a0c3944e 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ShowMergeManagerActionTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/ShowMergeManagerActionTest.java @@ -12,7 +12,7 @@ package org.eclipse.osee.ats.client.integration.tests.ats.actions; import org.eclipse.osee.ats.actions.ShowMergeManagerAction; import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.util.Result; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.SevereLoggingMonitor; @@ -29,7 +29,7 @@ import org.junit.Test; @Ignore public class ShowMergeManagerActionTest extends AbstractAtsActionRunTest { - private static IOseeBranch createdBranch = null; + private static BranchId createdBranch = null; @After public void cleanup_closeMergeView() { diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java index c2d0aa12d22..7dad5e7ab6f 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java @@ -36,6 +36,7 @@ import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager; import org.eclipse.osee.ats.editor.SMAEditor; import org.eclipse.osee.ats.util.AtsBranchManager; import org.eclipse.osee.ats.util.AtsUtil; +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; @@ -119,7 +120,7 @@ public class AtsBranchConfigurationTest { OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Creating root branch"); } // Create SAW_Bld_2 branch off SAW_Bld_1 - IOseeBranch viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_VERSIONS); + BranchId viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_VERSIONS); TestUtil.sleep(2000); @@ -240,7 +241,7 @@ public class AtsBranchConfigurationTest { OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Creating root branch"); } // Create SAW_Bld_2 branch off SAW_Bld_1 - IOseeBranch viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_TEAM_DEFINITION); + BranchId viaTeamDefBranch = BranchManager.createTopLevelBranch(BRANCH_VIA_TEAM_DEFINITION); TestUtil.sleep(2000); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java index 1d3bad8704b..affba917b55 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java @@ -67,7 +67,7 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper; import org.eclipse.osee.ats.editor.SMAEditor; import org.eclipse.osee.ats.task.TaskEditor; import org.eclipse.osee.ats.world.WorldEditor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.QueryOption; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; import org.eclipse.osee.framework.core.exception.OseeWrappedException; @@ -485,7 +485,7 @@ public class AtsTestUtil { TaskEditor.closeAll(); if (teamWf != null) { - IOseeBranch workingBranch = teamWf.getWorkingBranch(); + BranchId workingBranch = teamWf.getWorkingBranch(); if (workingBranch != null) { BranchManager.deleteBranchAndPend(workingBranch); } diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/WordUpdateEndpointImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/WordUpdateEndpointImplTest.java index 90932de9de0..3cbb0950226 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/WordUpdateEndpointImplTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/WordUpdateEndpointImplTest.java @@ -22,6 +22,7 @@ import org.eclipse.osee.define.report.api.WordArtifactChange; import org.eclipse.osee.define.report.api.WordUpdateChange; import org.eclipse.osee.define.report.api.WordUpdateData; import org.eclipse.osee.define.report.api.WordUpdateEndpoint; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -46,7 +47,7 @@ import org.junit.Test; */ public class WordUpdateEndpointImplTest extends AbstractRestTest { private Artifact artReqt = null; - private IOseeBranch branch = null; + private BranchId branch = null; @AfterClass public static void cleanup() { @@ -127,8 +128,8 @@ public class WordUpdateEndpointImplTest extends AbstractRestTest { return change; } - private IOseeBranch getWorkingBranch() { - IOseeBranch branchReturn = null; + private BranchId getWorkingBranch() { + BranchId branchReturn = null; BranchFilter branchFilter = new BranchFilter(BranchType.WORKING); List<IOseeBranch> branches = BranchManager.getBranches(branchFilter); for (IOseeBranch branch : branches) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java index e82e8eaa632..23c5d0acdf0 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java @@ -59,7 +59,7 @@ import org.eclipse.osee.ats.core.config.ITeamDefinitionFactory; import org.eclipse.osee.ats.core.util.IAtsActionFactory; import org.eclipse.osee.ats.core.workflow.TeamWorkflowProviders; import org.eclipse.osee.framework.core.data.IArtifactToken; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.OseeStateException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -174,7 +174,7 @@ public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolv IArtifactMembersCache<SprintArtifact> getSprintItemsCache(); - Artifact checkArtifactFromId(long uuid, IOseeBranch atsBranch); + Artifact checkArtifactFromId(long uuid, BranchId atsBranch); @Override IAtsStoreService getStoreService(); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java index eb840572210..c9466b17979 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java @@ -23,7 +23,7 @@ import org.eclipse.osee.ats.core.client.internal.Activator; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.UuidIdentity; import org.eclipse.osee.framework.jdk.core.util.Collections; @@ -35,7 +35,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class ActionArtifact extends Artifact implements IAtsAction { - public ActionArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public ActionArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java index 611bd35ceff..bf0cbdb73a5 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java @@ -13,7 +13,7 @@ package org.eclipse.osee.ats.core.client.artifact; import org.eclipse.osee.ats.api.IAtsObject; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.UuidIdentity; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -23,7 +23,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public abstract class AbstractAtsArtifact extends Artifact implements IAtsObject { - public AbstractAtsArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public AbstractAtsArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java index 90c2296f803..ed8ed0f753d 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java @@ -24,7 +24,7 @@ import org.eclipse.osee.ats.core.client.task.TaskArtifact; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.util.AtsUtilCore; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -53,7 +53,7 @@ public class AtsArtifactFactory extends ArtifactFactory { } @Override - public Artifact getArtifactInstance(String guid, IOseeBranch branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { + public Artifact getArtifactInstance(String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { Artifact toReturn; if (artifactType.equals(AtsArtifactTypes.Task)) { toReturn = new TaskArtifact(guid, branch, artifactType); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/CollectorArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/CollectorArtifact.java index 3475c1f3d65..f87954d6e96 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/CollectorArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/CollectorArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.ats.core.client.artifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -25,7 +25,7 @@ public abstract class CollectorArtifact extends AbstractWorkflowArtifact impleme private final IRelationTypeSide membersRelationType; - public CollectorArtifact(String guid, IOseeBranch branch, IArtifactType artifactType, IRelationTypeSide membersRelationType) throws OseeCoreException { + public CollectorArtifact(String guid, BranchId branch, IArtifactType artifactType, IRelationTypeSide membersRelationType) throws OseeCoreException { super(guid, branch, artifactType); this.membersRelationType = membersRelationType; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/GoalArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/GoalArtifact.java index 98ec7fdf340..b3551fb945b 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/GoalArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/GoalArtifact.java @@ -18,7 +18,7 @@ import org.eclipse.osee.ats.core.client.internal.AtsClientService; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -27,7 +27,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class GoalArtifact extends CollectorArtifact implements IAtsGoal { - public GoalArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public GoalArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType, AtsRelationTypes.Goal_Member); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/SprintArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/SprintArtifact.java index aa8d6ed7a07..09626b09027 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/SprintArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/SprintArtifact.java @@ -18,7 +18,7 @@ import org.eclipse.osee.ats.core.client.internal.AtsClientService; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class SprintArtifact extends CollectorArtifact implements IAgileSprint { - public SprintArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public SprintArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType, AtsRelationTypes.AgileSprintToItem_AtsItem); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchUtil.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchUtil.java index 119edc7fa53..5c1341eb31b 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchUtil.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchUtil.java @@ -32,7 +32,7 @@ import org.eclipse.osee.ats.core.client.util.AtsChangeSet; import org.eclipse.osee.ats.core.client.workflow.stateitem.AtsStateItemCoreManager; import org.eclipse.osee.ats.core.client.workflow.stateitem.IAtsStateItemCore; import org.eclipse.osee.ats.core.users.AtsCoreUsers; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.exception.OseeWrappedException; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.util.Result; @@ -97,7 +97,7 @@ public class AtsBranchUtil { return new Result( "Committed branch already exists. Can not create another working branch once changes have been committed."); } - IOseeBranch parentBranch = AtsClientService.get().getBranchService().getConfiguredBranchForWorkflow(teamArt); + BranchId parentBranch = AtsClientService.get().getBranchService().getConfiguredBranchForWorkflow(teamArt); if (parentBranch == null) { return new Result( "Parent Branch can not be determined.\n\nPlease specify " + "parent branch through Version Artifact or Team Definition Artifact.\n\n" + "Contact your team lead to configure this."); @@ -126,16 +126,16 @@ public class AtsBranchUtil { * except in test cases or automated tools. Use createWorkingBranchWithPopups */ public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, boolean pend) throws OseeCoreException { - final IOseeBranch parentBranch = + final BranchId parentBranch = AtsClientService.get().getBranchService().getConfiguredBranchForWorkflow(teamArt); return createWorkingBranch_Create(teamArt, parentBranch, pend); } - public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final IOseeBranch parentBranch) throws OseeCoreException { + public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final BranchId parentBranch) throws OseeCoreException { return createWorkingBranch_Create(teamArt, parentBranch, false); } - public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final IOseeBranch parentBranch, boolean pend) throws OseeCoreException { + public static Job createWorkingBranch_Create(final TeamWorkFlowArtifact teamArt, final BranchId parentBranch, boolean pend) throws OseeCoreException { Conditions.checkNotNull(teamArt, "Parent Team Workflow"); Conditions.checkNotNull(parentBranch, "Parent Branch"); TransactionRecord parentTransactionId = TransactionManager.getHeadTransaction(parentBranch); @@ -190,7 +190,7 @@ public class AtsBranchUtil { } public static Result deleteWorkingBranch(TeamWorkFlowArtifact teamArt, boolean pend) throws OseeCoreException { - IOseeBranch branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); + BranchId branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); if (branch != null) { IStatus status = null; if (pend) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java index ad8c1f0f7cc..e05927d9724 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java @@ -20,6 +20,7 @@ import org.eclipse.osee.ats.core.client.internal.AtsClientService; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.util.AbstractAtsBranchService; import org.eclipse.osee.ats.core.workflow.ITeamWorkflowProvidersLazy; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchArchivedState; @@ -66,12 +67,12 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public BranchType getBranchType(IOseeBranch branch) { + public BranchType getBranchType(BranchId branch) { return BranchManager.getBranchType(branch); } @Override - public BranchState getBranchState(IOseeBranch branch) { + public BranchState getBranchState(BranchId branch) { return BranchManager.getState(branch); } @@ -90,14 +91,14 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { * have */ @Override - public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch workingBranch, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId workingBranch, BranchId destinationBranch) throws OseeCoreException { if (workingBranch == null) { return false; } return BranchManager.doesMergeBranchExist(workingBranch, destinationBranch); } - public boolean isMergeCompleted(TeamWorkFlowArtifact teamWf, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isMergeCompleted(TeamWorkFlowArtifact teamWf, BranchId destinationBranch) throws OseeCoreException { ConflictManagerExternal conflictManager = new ConflictManagerExternal(destinationBranch, AtsClientService.get().getBranchService().getWorkingBranch(teamWf)); return !conflictManager.remainingConflictsExist(); @@ -114,7 +115,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public BranchArchivedState getArchiveState(IOseeBranch branch) { + public BranchArchivedState getArchiveState(BranchId branch) { return BranchManager.getBranch(branch).getArchiveState(); } @@ -124,12 +125,12 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public IOseeBranch getParentBranch(IOseeBranch destinationBranch) { + public BranchId getParentBranch(BranchId destinationBranch) { return BranchManager.getBranch(destinationBranch).getParentBranch(); } @Override - public ITransaction getBaseTransaction(IOseeBranch destinationBranch) { + public ITransaction getBaseTransaction(BranchId destinationBranch) { return BranchManager.getBranch(destinationBranch).getBaseTransaction(); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java index ca21c4ee124..c7992521617 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java @@ -119,7 +119,7 @@ import org.eclipse.osee.ats.core.workflow.TeamWorkflowProviders; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -766,7 +766,7 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient { } @Override - public Artifact checkArtifactFromId(long uuid, IOseeBranch atsBranch) { + public Artifact checkArtifactFromId(long uuid, BranchId atsBranch) { return ArtifactQuery.checkArtifactFromId((int) uuid, AtsUtilCore.getAtsBranch(), DeletionFlag.EXCLUDE_DELETED); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java index a6b190ccf9c..d8290c6ade0 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java @@ -33,7 +33,7 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.ats.core.config.ActionableItems; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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; @@ -46,7 +46,7 @@ public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact im private ActionableItemManager actionableItemsDam; private Boolean standAlone = null; - public AbstractReviewArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public AbstractReviewArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); actionableItemsDam = new ActionableItemManager(this); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewArtifact.java index b77dcc672ed..21eef65cd5a 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.ats.core.client.review; import org.eclipse.osee.ats.api.review.IAtsDecisionReview; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact; @@ -23,7 +23,7 @@ public class DecisionReviewArtifact extends AbstractReviewArtifact implements IA public XDecisionOptions decisionOptions; - public DecisionReviewArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public DecisionReviewArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); decisionOptions = new XDecisionOptions(this); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewArtifact.java index ac4d22c7989..b9edf297e3f 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.ats.core.client.review; import org.eclipse.osee.ats.api.review.IAtsPeerToPeerReview; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact; @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact; */ public class PeerToPeerReviewArtifact extends AbstractReviewArtifact implements IATSStateMachineArtifact, IAtsPeerToPeerReview { - public PeerToPeerReviewArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public PeerToPeerReviewArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java index 05c800f8b53..3c1ac1a18ae 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskArtifact.java @@ -23,7 +23,7 @@ import org.eclipse.osee.ats.core.client.action.ActionArtifact; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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.Strings; @@ -34,7 +34,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact; */ public class TaskArtifact extends AbstractWorkflowArtifact implements IAtsTask, IATSStateMachineArtifact { - public TaskArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public TaskArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java index ceaa97ae235..ace31336ebc 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java @@ -38,6 +38,7 @@ import org.eclipse.osee.ats.core.client.task.TaskArtifact; import org.eclipse.osee.ats.core.client.util.AtsTaskCache; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.ats.core.util.AtsUtilCore; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.util.Result; @@ -61,7 +62,7 @@ public class TeamWorkFlowArtifact extends AbstractWorkflowArtifact implements IA private boolean creatingWorkingBranch = false; private boolean committingWorkingBranch = false; - public TeamWorkFlowArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public TeamWorkFlowArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); actionableItemsDam = new ActionableItemManager(this); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java index 8ac0bc36bc2..5b4ce9d3d68 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java @@ -56,7 +56,7 @@ import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility; import org.eclipse.osee.ats.core.workflow.transition.TransitionManager; import org.eclipse.osee.framework.access.AccessControlManager; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.services.CmAccessControl; @@ -94,7 +94,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple private AtsNote atsNote; private IAtsStateManager stateMgr; - public AbstractWorkflowArtifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public AbstractWorkflowArtifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java index 5a1ec5f3712..9d9e99a146a 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java @@ -29,6 +29,7 @@ import org.eclipse.osee.ats.api.version.IAtsVersionService; import org.eclipse.osee.ats.api.workflow.IAtsBranchService; import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; import org.eclipse.osee.ats.core.workflow.ITeamWorkflowProvidersLazy; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchState; @@ -47,7 +48,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { protected static Map<String, Long> idToWorkingBranchCacheUpdated = new HashMap<>(50); protected IAtsServices atsServices; private static final int SHORT_NAME_LIMIT = 35; - private static Set<IOseeBranch> branchesInCommit = new HashSet<>(); + private static Set<BranchId> branchesInCommit = new HashSet<>(); private ITeamWorkflowProvidersLazy teamWorkflowProvidersLazy; public AbstractAtsBranchService() { @@ -68,8 +69,8 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public Collection<IOseeBranch> getBranchesToCommitTo(IAtsTeamWorkflow teamWf) throws OseeCoreException { - Set<IOseeBranch> branches = new HashSet<>(); + public Collection<BranchId> getBranchesToCommitTo(IAtsTeamWorkflow teamWf) throws OseeCoreException { + Set<BranchId> branches = new HashSet<>(); for (ICommitConfigItem obj : getConfigArtifactsConfiguredToCommitTo(teamWf)) { if (isBranchValid(obj)) { branches.add(getBranch(obj)); @@ -79,7 +80,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } public ITransaction getCommitTransactionRecord(IAtsTeamWorkflow teamWf, ICommitConfigItem configArt) throws OseeCoreException { - IOseeBranch branch = getBranch(configArt); + BranchId branch = getBranch(configArt); return getCommitTransactionRecord(teamWf, branch); } @@ -134,13 +135,13 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch) { + public CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, BranchId destinationBranch) { CommitStatus commitStatus = getCommitStatus(teamWf, destinationBranch, null); return commitStatus; } @Override - public ITransaction getCommitTransactionRecord(IAtsTeamWorkflow teamWf, IOseeBranch branch) { + public ITransaction getCommitTransactionRecord(IAtsTeamWorkflow teamWf, BranchId branch) { if (branch == null) { return null; } @@ -186,9 +187,9 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public boolean isBranchesAllCommittedExcept(IAtsTeamWorkflow teamWf, IOseeBranch branchToExclude) { - Collection<IOseeBranch> committedTo = getBranchesCommittedTo(teamWf); - for (IOseeBranch destBranch : getBranchesToCommitTo(teamWf)) { + public boolean isBranchesAllCommittedExcept(IAtsTeamWorkflow teamWf, BranchId branchToExclude) { + Collection<BranchId> committedTo = getBranchesCommittedTo(teamWf); + for (BranchId destBranch : getBranchesToCommitTo(teamWf)) { if (!destBranch.equals(branchToExclude) && !committedTo.contains(destBranch) && !isNoCommitNeeded(teamWf, destBranch)) { return false; @@ -198,8 +199,8 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public Collection<IOseeBranch> getBranchesCommittedTo(IAtsTeamWorkflow teamWf) { - Set<IOseeBranch> branches = new HashSet<>(); + public Collection<BranchId> getBranchesCommittedTo(IAtsTeamWorkflow teamWf) { + Set<BranchId> branches = new HashSet<>(); for (ITransaction transId : getTransactionIds(teamWf, false)) { branches.add(transId.getBranch()); } @@ -207,10 +208,10 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public Collection<IOseeBranch> getBranchesLeftToCommit(IAtsTeamWorkflow teamWf) { - Set<IOseeBranch> branchesLeft = new HashSet<>(); - Collection<IOseeBranch> committedTo = getBranchesCommittedTo(teamWf); - for (IOseeBranch branchToCommit : getBranchesToCommitTo(teamWf)) { + public Collection<BranchId> getBranchesLeftToCommit(IAtsTeamWorkflow teamWf) { + Set<BranchId> branchesLeft = new HashSet<>(); + Collection<BranchId> committedTo = getBranchesCommittedTo(teamWf); + for (BranchId branchToCommit : getBranchesToCommitTo(teamWf)) { if (!committedTo.contains(branchToCommit) && !isNoCommitNeeded(teamWf, branchToCommit)) { branchesLeft.add(branchToCommit); } @@ -253,7 +254,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { Collection<ITransaction> transactionIds = new ArrayList<>(); for (ITransaction transactionId : committedTransactions) { // exclude working branches including branch states that are re-baselined - IOseeBranch branch = transactionId.getBranch(); + BranchId branch = transactionId.getBranch(); if (getBranchType(branch).isBaselineBranch() && getArchiveState(branch).isUnArchived()) { transactionIds.add(transactionId); } @@ -261,7 +262,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { return transactionIds; } - public boolean isNoCommitNeeded(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isNoCommitNeeded(IAtsTeamWorkflow teamWf, BranchId destinationBranch) throws OseeCoreException { return getCommitStatus(teamWf, destinationBranch) == CommitStatus.No_Commit_Needed; } @@ -270,8 +271,8 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { */ @Override public boolean isBranchesAllCommitted(IAtsTeamWorkflow teamWf) { - Collection<IOseeBranch> committedTo = getBranchesCommittedTo(teamWf); - for (IOseeBranch destBranch : getBranchesToCommitTo(teamWf)) { + Collection<BranchId> committedTo = getBranchesCommittedTo(teamWf); + for (BranchId destBranch : getBranchesToCommitTo(teamWf)) { if (!committedTo.contains(destBranch) && !isNoCommitNeeded(teamWf, destBranch)) { return false; } @@ -330,7 +331,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public boolean isWorkingBranchInWork(IAtsTeamWorkflow teamWf) throws OseeCoreException { - IOseeBranch branch = getWorkingBranch(teamWf); + BranchId branch = getWorkingBranch(teamWf); return branch != null && !getBranchState(branch).isCommitted(); } @@ -399,7 +400,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { // ... compare the branch of the tx commit to all the parent branches in configArtSet and do NOT add the tx // commit if it is already represented. for (ICommitConfigItem configArt : configArtSet) { - IOseeBranch configArtBranch = getBranch(configArt); + BranchId configArtBranch = getBranch(configArt); if (txRecord.isOnBranch(configArtBranch)) { isCommitAlreadyPresent = true; break; @@ -482,7 +483,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { if (!isBranchValid(targetedVersion)) { return new Result(false, "Parent Branch not configured for Version [" + targetedVersion + "]"); } - IOseeBranch baselineBranch = getBranch((IAtsConfigObject) targetedVersion); + BranchId baselineBranch = getBranch((IAtsConfigObject) targetedVersion); if (!getBranchType(baselineBranch).isBaselineBranch()) { return new Result(false, "Parent Branch must be of Baseline branch type. See Admin for configuration."); } @@ -498,7 +499,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { return new Result(false, "Parent Branch not configured for Team Definition [" + teamWf.getTeamDefinition() + "]"); } - IOseeBranch baselineBranch = getBranch((IAtsConfigObject) teamWf.getTeamDefinition()); + BranchId baselineBranch = getBranch((IAtsConfigObject) teamWf.getTeamDefinition()); if (!getBranchType(baselineBranch).isBaselineBranch()) { return new Result(false, "Parent Branch must be of Baseline branch type. See Admin for configuration."); } @@ -507,8 +508,8 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { } @Override - public CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch, ICommitConfigItem configArt) { - IOseeBranch workingBranch = getWorkingBranch(teamWf); + public CommitStatus getCommitStatus(IAtsTeamWorkflow teamWf, BranchId destinationBranch, ICommitConfigItem configArt) { + BranchId workingBranch = getWorkingBranch(teamWf); if (workingBranch != null) { if (getBranchState(workingBranch).isRebaselineInProgress()) { return CommitStatus.Rebaseline_In_Progress; @@ -562,7 +563,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public Collection<ITransaction> getTransactionIds(IAtsTeamWorkflow teamWf, boolean forMergeBranches) { if (forMergeBranches) { - IOseeBranch workingBranch = getWorkingBranch(teamWf); + BranchId workingBranch = getWorkingBranch(teamWf); // grab only the transaction that had merge conflicts Collection<ITransaction> transactionIds = new ArrayList<>(); for (ITransaction transactionId : getCommitTransactionsToUnarchivedBaselineBranchs(teamWf)) { @@ -580,18 +581,18 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { * Return true if merge branch exists in DB (whether archived or not) */ @Override - public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId destinationBranch) throws OseeCoreException { return isMergeBranchExists(teamWf, getWorkingBranch(teamWf), destinationBranch); } @Override - public Set<IOseeBranch> getBranchesInCommit() { + public Set<BranchId> getBranchesInCommit() { return branchesInCommit; } @Override - public boolean workingBranchCommittedToDestinationBranchParentPriorToDestinationBranchCreation(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch, Collection<ITransaction> commitTransactionIds) throws OseeCoreException { - IOseeBranch destinationBranchParent = getParentBranch(destinationBranch); + public boolean workingBranchCommittedToDestinationBranchParentPriorToDestinationBranchCreation(IAtsTeamWorkflow teamWf, BranchId destinationBranch, Collection<ITransaction> commitTransactionIds) throws OseeCoreException { + BranchId destinationBranchParent = getParentBranch(destinationBranch); if (getBranchType(destinationBranchParent) == BranchType.SYSTEM_ROOT) { return false; } 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 391e70dcece..42aa4f33f13 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 @@ -22,7 +22,7 @@ import org.eclipse.osee.ats.api.IAtsObject; import org.eclipse.osee.ats.api.IAtsServices; import org.eclipse.osee.ats.api.user.IAtsUser; import org.eclipse.osee.framework.core.data.ArtifactId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -43,7 +43,7 @@ public class AtsUtilCore { public static final String USER_CREATION_DISABLED = "UserCreationDisabled"; private static final Object lock = new Object(); - private volatile static IOseeBranch atsBranch; + private volatile static BranchId atsBranch; private volatile static String atsConfigName; private static Map<Long, String> uuidToGuidMap = new HashMap<>(50); private static Map<String, Long> guidToUuidMap = new HashMap<>(50); @@ -53,7 +53,7 @@ public class AtsUtilCore { return atsConfigName; } - public static IOseeBranch getAtsBranch() { + public static BranchId getAtsBranch() { synchronized (lock) { if (atsBranch == null) { // Preference store overrides all @@ -100,7 +100,7 @@ public class AtsUtilCore { return guids; } - public static void storeAtsBranch(IOseeBranch branch, String name) { + public static void storeAtsBranch(BranchId branch, String name) { AtsPreferencesService.get().put(ATS_BRANCH_UUID, String.valueOf(branch.getUuid())); AtsPreferencesService.get().put(ATS_BRANCH_NAME, name); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java index 1313c6d6494..b8188383615 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java @@ -29,7 +29,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.StreamingOutput; import org.eclipse.osee.ats.rest.IAtsServer; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.change.ChangeItem; import org.eclipse.osee.framework.core.model.change.ChangeType; @@ -153,10 +153,10 @@ public class ReportResource { private List<ChangeItem> getChanges(long branchUuid) { TransactionQuery transactionQuery2 = orcsApi.getQueryFactory().transactionQuery(); TransactionQuery transactionQuery3 = orcsApi.getQueryFactory().transactionQuery(); - IOseeBranch branchReadable = + BranchId branchReadable = orcsApi.getQueryFactory().branchQuery().andUuids(branchUuid).getResults().getExactlyOne(); - IOseeBranch parentBranch = atsServer.getBranchService().getParentBranch(branchReadable); + BranchId parentBranch = atsServer.getBranchService().getParentBranch(branchReadable); TransactionReadable startTx = transactionQuery2.andIsHead(branchReadable).getResults().getExactlyOne(); Integer start = startTx.getLocalId(); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java index 7bb709db67d..d3cb784a53c 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java @@ -21,6 +21,7 @@ import org.eclipse.osee.ats.api.IAtsServices; import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; import org.eclipse.osee.ats.core.util.AbstractAtsBranchService; import org.eclipse.osee.ats.core.workflow.ITeamWorkflowProvidersLazy; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchArchivedState; @@ -74,13 +75,13 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public BranchType getBranchType(IOseeBranch branch) { + public BranchType getBranchType(BranchId branch) { BranchReadable fullBranch = getBranchByUuid(branch.getUuid()); return fullBranch.getBranchType(); } @Override - public BranchState getBranchState(IOseeBranch branch) { + public BranchState getBranchState(BranchId branch) { BranchQuery query = orcsApi.getQueryFactory().branchQuery(); BranchReadable fullBranch = query.andUuids(branch.getUuid()).getResults().getExactlyOne(); return fullBranch.getBranchState(); @@ -90,7 +91,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { * Return true if merge branch exists in DB (whether archived or not) */ @Override - public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId destinationBranch) throws OseeCoreException { return isMergeBranchExists(teamWf, getWorkingBranch(teamWf), destinationBranch); } @@ -99,7 +100,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { * have */ @Override - public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, IOseeBranch workingBranch, IOseeBranch destinationBranch) throws OseeCoreException { + public boolean isMergeBranchExists(IAtsTeamWorkflow teamWf, BranchId workingBranch, BranchId destinationBranch) throws OseeCoreException { if (workingBranch == null) { return false; } @@ -120,7 +121,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public BranchArchivedState getArchiveState(IOseeBranch branch) { + public BranchArchivedState getArchiveState(BranchId branch) { BranchReadable fullBranch = getBranchByUuid(branch.getUuid()); return fullBranch.getArchiveState(); } @@ -149,14 +150,14 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { } @Override - public IOseeBranch getParentBranch(IOseeBranch branch) { + public BranchId getParentBranch(BranchId branch) { BranchQuery query = orcsApi.getQueryFactory().branchQuery(); BranchReadable fullBranch = query.andUuids(branch.getUuid()).getResults().getExactlyOne(); return getBranchByUuid(fullBranch.getParentBranch()); } @Override - public ITransaction getBaseTransaction(IOseeBranch branch) { + public ITransaction getBaseTransaction(BranchId branch) { TransactionQuery txQuery = orcsApi.getQueryFactory().transactionQuery(); return txQuery.andBranch(branch).andIs(TransactionDetailsType.Baselined).getResults().getExactlyOne(); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java index 9f6dc97e10d..cb3b2d0e5fb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java @@ -21,6 +21,7 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; 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.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.TokenFactory; @@ -120,7 +121,7 @@ public final class PortPairsOperation extends AbstractOperation { } IOseeBranch destinationBranch = destinationWorkflow.getWorkingBranchForceCacheUpdate(); - IOseeBranch portBranch = getPortBranchFromWorkflow(sourceWorkflow, destinationWorkflow); + BranchId portBranch = getPortBranchFromWorkflow(sourceWorkflow, destinationWorkflow); if (portBranch == null) { logf("Source workflow [%s] not ready for port to Workflow [%s].", sourceWorkflow, destinationWorkflow); return; @@ -139,7 +140,7 @@ public final class PortPairsOperation extends AbstractOperation { } } - private IOseeBranch getPortBranchFromWorkflow(TeamWorkFlowArtifact sourceWorkflow, TeamWorkFlowArtifact destinationWorkflow) throws OseeCoreException { + private BranchId getPortBranchFromWorkflow(TeamWorkFlowArtifact sourceWorkflow, TeamWorkFlowArtifact destinationWorkflow) throws OseeCoreException { if (!sourceWorkflow.isRelated(AtsRelationTypes.Port_To, destinationWorkflow)) { sourceWorkflow.addRelation(AtsRelationTypes.Port_To, destinationWorkflow); sourceWorkflow.persist("create port relation"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java index 48218871cd8..3385b5a9419 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java @@ -30,7 +30,7 @@ import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.framework.access.AccessControlManager; import org.eclipse.osee.framework.core.data.IAccessContextId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -86,7 +86,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, EventHand /** * True if not common branch and branch's associated artifact is a Team Workflow artifact */ - public boolean isApplicable(IOseeBranch objectBranch) { + public boolean isApplicable(BranchId objectBranch) { boolean result = false; try { if (!AtsUtilCore.getAtsBranch().equals(objectBranch)) { @@ -101,7 +101,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, EventHand return result; } - public Collection<IAccessContextId> getContextId(IOseeBranch branch) { + public Collection<IAccessContextId> getContextId(BranchId branch) { if (branchUuidToContextIdCache.containsKey(branch.getUuid())) { return branchUuidToContextIdCache.get(branch.getUuid()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java index 242fd6a3ade..c3d5e6c6546 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn; import org.eclipse.osee.ats.world.WorldXViewerFactory; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Collections; @@ -48,7 +48,7 @@ public abstract class AbstractBranchColumn extends XViewerAtsColumn implements I TeamWorkFlowArtifact teamArt = ((AbstractWorkflowArtifact) element).getParentTeamWorkflow(); if (teamArt != null) { try { - IOseeBranch workingBranch = null; + BranchId workingBranch = null; if (AtsClientService.get().getBranchService().isWorkingBranchInWork(teamArt)) { workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java index 7ca30b71589..0af85c8c401 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java @@ -29,7 +29,7 @@ import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.workdef.AtsWorkDefinitionSheetProviders; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.exception.OseeWrappedException; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.core.util.XResultData; @@ -101,7 +101,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask { } public static void createAtsFolders() throws OseeCoreException { - IOseeBranch atsBranch = AtsUtilCore.getAtsBranch(); + BranchId atsBranch = AtsUtilCore.getAtsBranch(); SkynetTransaction transaction = TransactionManager.createTransaction(atsBranch, "Create ATS Folders"); Artifact headingArt = OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.HeadingFolder, atsBranch); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMADetailsSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMADetailsSection.java index 2ffc03763b7..92155bb22e8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMADetailsSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMADetailsSection.java @@ -20,8 +20,8 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; 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.data.IAccessContextId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.services.CmAccessControl; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Lib; @@ -144,7 +144,7 @@ public class SMADetailsSection extends SectionPart { if (accessControl == null) { message = "AtsCmAccessControlService not found."; } else { - IOseeBranch workingBranch = null; + BranchId workingBranch = null; try { workingBranch = workflow.getWorkingBranch(); } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java index a50c033c62e..6e77f221312 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java @@ -19,7 +19,6 @@ import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact; 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.data.IOseeBranch; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.event.OseeEventManager; import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter; @@ -98,7 +97,7 @@ public class SMAEditorBranchEventManager implements IBranchEventListener { case Committed: if (awa instanceof TeamWorkFlowArtifact) { TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) awa; - IOseeBranch assocBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); + BranchId assocBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); if (branch.equals(assocBranch)) { Displays.ensureInDisplayThread(new Runnable() { @Override 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 d51f32f07c4..51b59ab9651 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 @@ -51,8 +51,7 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionManager; 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.IOseeBranch; -import org.eclipse.osee.framework.core.enums.BranchState; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.exception.BranchDoesNotExist; import org.eclipse.osee.framework.core.model.Branch; @@ -261,7 +260,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { } } - @SuppressWarnings({"unused", "unchecked"}) + @SuppressWarnings({"unused"}) private List<Collection<Integer>> getFromGuids() { List<String> guids = Arrays.asList("AD3zXUb9kkF08ltQPwQA", "AD3zWI5UrUmhDxwBekAA", "BPLQGf99g2qG_LoknEQA"); List<Artifact> artifacts = ArtifactQuery.getArtifactListFromIds(guids, AtsUtilCore.getAtsBranch()); @@ -743,18 +742,18 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { try { Branch workingBranch = (Branch) AtsClientService.get().getBranchService().getWorkingBranch(teamArt); if (workingBranch != null && workingBranch.getBranchType() != BranchType.BASELINE) { - if (workingBranch.getBranchState() != BranchState.COMMITTED) { - Collection<IOseeBranch> branchesCommittedTo = + if (!workingBranch.getBranchState().isCommitted()) { + Collection<BranchId> branchesCommittedTo = AtsClientService.get().getBranchService().getBranchesCommittedTo(teamArt); if (branchesCommittedTo.size() > 0) { results.log(artifact, "testAtsBranchManagerA", "Error: TeamWorkflow " + XResultDataUI.getHyperlink( teamArt) + " has committed branches but working branch [" + workingBranch.getUuid() + "] != COMMITTED"); } - } else if (workingBranch.getBranchState() == BranchState.COMMITTED && !workingBranch.getArchiveState().isArchived()) { - Collection<IOseeBranch> branchesLeftToCommit = + } else if (!workingBranch.getArchiveState().isArchived()) { + Collection<BranchId> branchesLeftToCommit = AtsClientService.get().getBranchService().getBranchesLeftToCommit(teamArt); - if (branchesLeftToCommit.size() == 0) { + if (branchesLeftToCommit.isEmpty()) { results.log(artifact, "testAtsBranchManagerA", "Error: TeamWorkflow " + XResultDataUI.getHyperlink( teamArt) + " has committed all branches but working branch [" + workingBranch.getUuid() + "] != ARCHIVED"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java index 317cddb07d7..a21254f164e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java @@ -15,7 +15,7 @@ import java.util.Collections; import org.eclipse.osee.ats.access.AtsBranchAccessManager; import org.eclipse.osee.ats.core.util.AtsUtilCore; import org.eclipse.osee.framework.core.data.IAccessContextId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.services.CmAccessControl; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -41,8 +41,8 @@ public class AtsCmAccessControl implements CmAccessControl { if (object instanceof Artifact && !((Artifact) object).isOnBranch(AtsUtilCore.getAtsBranch())) { result = atsBranchAccessManager.isApplicable(((Artifact) object).getBranch()); } - if (object instanceof IOseeBranch) { - result = atsBranchAccessManager.isApplicable((IOseeBranch) object); + if (object instanceof BranchId) { + result = atsBranchAccessManager.isApplicable((BranchId) object); } } return result; @@ -54,8 +54,8 @@ public class AtsCmAccessControl implements CmAccessControl { if (object instanceof Artifact && !((Artifact) object).isOnBranch(AtsUtilCore.getAtsBranch())) { return atsBranchAccessManager.getContextId(((Artifact) object).getBranch()); } - if (object instanceof IOseeBranch) { - return atsBranchAccessManager.getContextId((IOseeBranch) object); + if (object instanceof BranchId) { + return atsBranchAccessManager.getContextId((BranchId) object); } } return Collections.emptyList(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java index f1e4eb85666..8a7432ca623 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java @@ -37,7 +37,7 @@ import org.eclipse.osee.ats.util.AtsUtil; import org.eclipse.osee.ats.world.WorldEditor; import org.eclipse.osee.ats.world.WorldEditorSimpleProvider; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; @@ -200,12 +200,12 @@ public class AtsOseeCmService implements IOseeCmService { } @Override - public IOseeBranch getCmBranchToken() { + public BranchId getCmBranchToken() { return AtsUtilCore.getAtsBranch(); } @Override - public boolean isWorkFlowBranch(IOseeBranch branch) { + public boolean isWorkFlowBranch(BranchId branch) { boolean toReturn = false; Artifact art; try { 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 beb250d67dd..51944e0c843 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 @@ -24,7 +24,7 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.QueryOption; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -73,9 +73,9 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction { private IProgressMonitor monitor; private final String artifactName; private final XResultData rd = new XResultData(); - private final IOseeBranch branch; + private final BranchId branch; - public ActionToArtifactImpactJob(String artifactName, IOseeBranch branch) { + public ActionToArtifactImpactJob(String artifactName, BranchId branch) { super("Searching \"" + artifactName + "\"..."); this.artifactName = artifactName; this.branch = branch; @@ -117,7 +117,7 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction { processArts.addAll(srchArts); } int x = 1; - rd.log("Artifact Impact to Action for artifact(s) on branch \"" + branch.getName() + "\""); + rd.log("Artifact Impact to Action for artifact(s) on branch \"" + branch.getId() + "\""); HashCollection<Artifact, TransactionRecord> transactionMap = ChangeManager.getModifingTransactions(processArts); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java index cf2988346d4..f40496a8ea8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java @@ -47,6 +47,7 @@ import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.util.XVersionList; import org.eclipse.osee.ats.util.widgets.XAtsProgramComboWidget; import org.eclipse.osee.define.traceability.report.RequirementStatus; +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.CoreAttributeTypes; @@ -178,7 +179,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { scriptName.length() - ".java".length()); } - private void loadTestRunArtifacts(IOseeBranch scriptsBranch, IProgressMonitor monitor) throws OseeCoreException { + private void loadTestRunArtifacts(BranchId scriptsBranch, IProgressMonitor monitor) throws OseeCoreException { monitor.subTask("Loading Test Run Artifacts"); Collection<Artifact> testRuns = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestRun, scriptsBranch, DeletionFlag.EXCLUDE_DELETED); @@ -213,8 +214,8 @@ public class DetailedTestStatusBlam extends AbstractBlam { return; } - IOseeBranch reportBranch = variableMap.getBranch("Requirements Branch"); - IOseeBranch resultsBranch = variableMap.getBranch("Test Results Branch"); + BranchId reportBranch = variableMap.getBranch("Requirements Branch"); + BranchId resultsBranch = variableMap.getBranch("Test Results Branch"); versions = variableMap.getCollection(IAtsVersion.class, "Versions"); reqTaskMap = new CompositeKeyHashMap<>(); @@ -511,7 +512,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { } } - private HashCollection<String, Artifact> getTestProcedureTraceability(IOseeBranch testProcedureBranch, IProgressMonitor monitor) throws OseeCoreException { + private HashCollection<String, Artifact> getTestProcedureTraceability(BranchId testProcedureBranch, IProgressMonitor monitor) throws OseeCoreException { monitor.subTask("Gathering test procedures"); HashCollection<String, Artifact> requirementNameToTestProcedures = new HashCollection<>(); // Map Software Requirements from TestProcedure IOseeBranch to Requirements IOseeBranch diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java index 894b18b993a..44dc1d28554 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java @@ -53,6 +53,7 @@ import org.eclipse.osee.define.traceability.TraceUnitExtensionManager; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler; import org.eclipse.osee.define.traceability.TraceabilityProviderOperation; import org.eclipse.osee.define.traceability.report.RequirementStatus; +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.CoreAttributeTypes; @@ -196,7 +197,7 @@ public class DetailedTestStatusOld extends AbstractBlam { scriptPath.length() - ".java".length()); } - private void loadTestRunArtifacts(IOseeBranch scriptsBranch) throws OseeCoreException { + private void loadTestRunArtifacts(BranchId scriptsBranch) throws OseeCoreException { Collection<Artifact> testRuns = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestRun, scriptsBranch, DeletionFlag.EXCLUDE_DELETED); @@ -222,9 +223,9 @@ public class DetailedTestStatusOld extends AbstractBlam { return; } - IOseeBranch requirementsBranch = variableMap.getBranch("Requirements Branch"); - IOseeBranch scriptsBranch = variableMap.getBranch("Test Results Branch"); - IOseeBranch procedureBranch = variableMap.getBranch("Test Procedure Branch"); + BranchId requirementsBranch = variableMap.getBranch("Requirements Branch"); + BranchId scriptsBranch = variableMap.getBranch("Test Results Branch"); + BranchId procedureBranch = variableMap.getBranch("Test Procedure Branch"); File scriptDir = new File(variableMap.getString("Script Root Directory")); versions = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java index 1d9ef813fd6..65836e4b359 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java @@ -28,7 +28,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.IOperation; @@ -141,7 +141,7 @@ public final class ExportChangeReportOperation extends AbstractOperation { if (AtsClientService.get().getBranchService().isCommittedBranchExists(teamArt)) { operation = ChangeManager.comparedToPreviousTx(pickTransaction(workflow), changes); } else { - IOseeBranch workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); + BranchId workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); if (workingBranch != null && !BranchManager.getBranchType(workingBranch).isBaselineBranch()) { operation = ChangeManager.comparedToParent(workingBranch, changes); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/AtsTaskToChangedArtifactReferenceAttributeAdapter.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/AtsTaskToChangedArtifactReferenceAttributeAdapter.java index d2ecea84d13..d3e775b038c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/AtsTaskToChangedArtifactReferenceAttributeAdapter.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/AtsTaskToChangedArtifactReferenceAttributeAdapter.java @@ -18,8 +18,8 @@ import org.eclipse.osee.ats.api.data.AtsRelationTypes; import org.eclipse.osee.ats.core.client.task.TaskArtifact; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.internal.AtsClientService; +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.enums.BranchState; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -58,7 +58,7 @@ public class AtsTaskToChangedArtifactReferenceAttributeAdapter implements Attrib if (derivedArt != null && derivedArt instanceof TeamWorkFlowArtifact) { TeamWorkFlowArtifact derivedTeamWf = (TeamWorkFlowArtifact) derivedArt; // First, attempt to get from Working Branch if still exists - IOseeBranch workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(derivedTeamWf); + BranchId workingBranch = AtsClientService.get().getBranchService().getWorkingBranch(derivedTeamWf); if (workingBranch != null && branchIsInWork(workingBranch)) { retArt = ArtifactQuery.getArtifactFromId(uuid, workingBranch, DeletionFlag.INCLUDE_DELETED); } else { @@ -79,7 +79,7 @@ public class AtsTaskToChangedArtifactReferenceAttributeAdapter implements Attrib return retArt; } - private boolean branchIsInWork(IOseeBranch workingBranch) { + private boolean branchIsInWork(BranchId workingBranch) { BranchState state = BranchManager.getState(workingBranch); return (state.isCreated() || state.isModified()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitOperation.java index 55ac6ac31e0..658d4a299f8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitOperation.java @@ -27,7 +27,7 @@ import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager; import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.util.Result; import org.eclipse.osee.framework.jdk.core.type.MutableBoolean; @@ -43,11 +43,11 @@ import org.eclipse.osee.framework.ui.swt.Displays; public class AtsBranchCommitOperation extends AbstractOperation { private final boolean commitPopup; private final boolean overrideStateValidation; - private final IOseeBranch destinationBranch; + private final BranchId destinationBranch; private final boolean archiveWorkingBranch; private final TeamWorkFlowArtifact teamArt; - public AtsBranchCommitOperation(TeamWorkFlowArtifact teamArt, boolean commitPopup, boolean overrideStateValidation, IOseeBranch destinationBranch, boolean archiveWorkingBranch) { + public AtsBranchCommitOperation(TeamWorkFlowArtifact teamArt, boolean commitPopup, boolean overrideStateValidation, BranchId destinationBranch, boolean archiveWorkingBranch) { super("Commit Branch", Activator.PLUGIN_ID); this.teamArt = teamArt; this.commitPopup = commitPopup; @@ -58,7 +58,7 @@ public class AtsBranchCommitOperation extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - IOseeBranch workflowWorkingBranch = teamArt.getWorkingBranch(); + BranchId workflowWorkingBranch = teamArt.getWorkingBranch(); try { AtsClientService.get().getBranchService().getBranchesInCommit().add(workflowWorkingBranch); if (workflowWorkingBranch == null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java index 1a74eb703fd..c75bd32278c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java @@ -23,7 +23,7 @@ import org.eclipse.osee.ats.core.client.branch.AtsBranchUtil; import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.MergeBranch; @@ -110,7 +110,7 @@ public final class AtsBranchManager { } } - public static void showMergeManager(TeamWorkFlowArtifact teamArt, IOseeBranch destinationBranch) throws OseeCoreException { + public static void showMergeManager(TeamWorkFlowArtifact teamArt, BranchId destinationBranch) throws OseeCoreException { if (AtsClientService.get().getBranchService().isWorkingBranchInWork(teamArt)) { MergeView.openView((Branch) AtsClientService.get().getBranchService().getWorkingBranch(teamArt), (Branch) destinationBranch, @@ -148,7 +148,7 @@ public final class AtsBranchManager { public static void deleteWorkingBranch(TeamWorkFlowArtifact teamArt, boolean promptUser) { boolean isExecutionAllowed = !promptUser; try { - IOseeBranch branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); + BranchId branch = AtsClientService.get().getBranchService().getWorkingBranch(teamArt); if (promptUser) { StringBuilder message = new StringBuilder(); if (BranchManager.hasChanges(branch)) { @@ -256,13 +256,13 @@ public final class AtsBranchManager { /** * Grab the change report for the indicated branch */ - public static void showChangeReportForBranch(TeamWorkFlowArtifact teamArt, IOseeBranch destinationBranch) { + public static void showChangeReportForBranch(TeamWorkFlowArtifact teamArt, BranchId destinationBranch) { try { Collection<ITransaction> transactions = AtsClientService.get().getBranchService().getTransactionIds(teamArt, false); Collection<TransactionRecord> trs = Collections.castAll(transactions); for (TransactionRecord transactionId : trs) { - if (transactionId.getBranch() == destinationBranch) { + if (transactionId.isOnBranch(destinationBranch)) { ChangeUiUtil.open(transactionId); } } @@ -276,7 +276,7 @@ public final class AtsBranchManager { * @param overrideStateValidation if true, don't do checks to see if commit can be performed. This should only be * used for developmental testing or automation */ - public static IOperation commitWorkingBranch(final TeamWorkFlowArtifact teamArt, final boolean commitPopup, final boolean overrideStateValidation, IOseeBranch destinationBranch, boolean archiveWorkingBranch) throws OseeCoreException { + public static IOperation commitWorkingBranch(final TeamWorkFlowArtifact teamArt, final boolean commitPopup, final boolean overrideStateValidation, BranchId destinationBranch, boolean archiveWorkingBranch) throws OseeCoreException { if (AtsClientService.get().getBranchService().isBranchInCommit(teamArt)) { throw new OseeCoreException("Branch is currently being committed."); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java index 6b1bfbc95d3..a368c5e0f88 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java @@ -26,6 +26,7 @@ import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.util.AtsBranchManager; import org.eclipse.osee.framework.access.AccessControlData; 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.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.Branch; @@ -258,7 +259,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I private void refreshLockImage() { boolean noBranch = false, someAccessControlSet = false; - IOseeBranch branch = null; + BranchId branch = null; try { branch = teamArt.getWorkingBranch(); } catch (OseeCoreException ex) { @@ -284,7 +285,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I AWorkbench.popup("Can't set preference as System User = " + user); return; } - IOseeBranch branch = teamArt.getWorkingBranch(); + BranchId branch = teamArt.getWorkingBranch(); if (branch == null) { AWorkbench.popup("Working branch doesn't exist"); return; @@ -303,7 +304,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I private void toggleWorkingBranchLock() { try { - IOseeBranch branch = teamArt.getWorkingBranch(); + BranchId branch = teamArt.getWorkingBranch(); if (branch == null) { AWorkbench.popup("Working branch doesn't exist"); return; @@ -473,7 +474,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I @Override public void handleEvent(org.osgi.service.event.Event event) { - IOseeBranch branch = teamArt.getBranch(); + BranchId branch = teamArt.getBranch(); if (branch != null) { AccessControlEvent accessEvent = EventUtil.getTopicJson(event, AccessControlEvent.class); if (accessEvent.isForBranch(branch)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonFavorites.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonFavorites.java index 84e9e9067dd..eab044ea698 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonFavorites.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonFavorites.java @@ -15,7 +15,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osee.ats.AtsImage; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.User; @@ -62,7 +62,7 @@ public class XWorkingBranchButtonFavorites extends XWorkingBranchButtonAbstract AWorkbench.popup("Can't set preference as System User = " + user); return; } - IOseeBranch branch = getTeamArt().getWorkingBranch(); + BranchId branch = getTeamArt().getWorkingBranch(); if (branch == null) { AWorkbench.popup("Working branch doesn't exist"); return; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java index 79abb771145..e302b87b623 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java @@ -16,7 +16,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.framework.access.AccessControlData; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -62,7 +62,7 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple private void refreshLockImage(Button button) { boolean noBranch = false, someAccessControlSet = false; - IOseeBranch branch = null; + BranchId branch = null; try { branch = getTeamArt().getWorkingBranch(); } catch (OseeCoreException ex) { @@ -82,7 +82,7 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple private void toggleWorkingBranchLock(Button button) { try { - IOseeBranch branch = getTeamArt().getWorkingBranch(); + BranchId branch = getTeamArt().getWorkingBranch(); if (branch == null) { AWorkbench.popup("Working branch doesn't exist"); return; @@ -124,7 +124,7 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple @Override public void handleEvent(org.osgi.service.event.Event event) { - IOseeBranch branch = getTeamArt().getWorkingBranch(); + BranchId branch = getTeamArt().getWorkingBranch(); if (branch != null) { AccessControlEvent accessEvent = EventUtil.getTopicJson(event, AccessControlEvent.class); if (accessEvent.isForBranch(branch)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java index 147caadf85e..138a48a095d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java @@ -18,7 +18,7 @@ import java.util.Set; import java.util.logging.Level; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.MergeBranch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -51,7 +51,7 @@ public class XWorkingBranchDeleteMerge extends XWorkingBranchButtonAbstract { Branch workingBranch = BranchManager.getBranch(getTeamArt().getWorkingBranch()); if (isWorkingBranchCommitWithMergeInProgress()) { List<Branch> selectedBranches = new ArrayList<>(); - Collection<IOseeBranch> branchesAlreadyCommitted = + Collection<BranchId> branchesAlreadyCommitted = AtsClientService.get().getBranchService().getBranchesCommittedTo(getTeamArt()); List<MergeBranch> mergeBranches = BranchManager.getMergeBranches(workingBranch); @@ -69,7 +69,7 @@ public class XWorkingBranchDeleteMerge extends XWorkingBranchButtonAbstract { "Select the Destination branch(es) for which you want to Delete the Merge Branch", destinationMinusAlreadyCommitted); if (dialog.open() == 0) { - for (IOseeBranch branchToken : dialog.getChecked()) { + for (BranchId branchToken : dialog.getChecked()) { selectedBranches.add(BranchManager.getBranch(branchToken)); } } @@ -99,7 +99,7 @@ public class XWorkingBranchDeleteMerge extends XWorkingBranchButtonAbstract { try { if (isWorkingBranchCommitWithMergeInProgress()) { List<MergeBranch> mergeBranches = BranchManager.getMergeBranches(getWorkingBranch()); - Collection<IOseeBranch> committedBranches = + Collection<BranchId> committedBranches = AtsClientService.get().getBranchService().getBranchesCommittedTo(getTeamArt()); List<MergeBranch> remainingMergeBranches = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java index 93d75fa37cd..e5e2a93500c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.api.commit.ICommitConfigItem; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.util.AtsBranchManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.operation.IOperation; @@ -86,7 +86,7 @@ public class CommitXManager extends XViewer { public void handleDoubleClick() { try { Object firstSelectedArt = getSelectedArtifacts().iterator().next(); - IOseeBranch branch = null; + BranchId branch = null; String displayName = ""; ICommitConfigItem configArt = null; if (firstSelectedArt instanceof ICommitConfigItem) { @@ -133,7 +133,7 @@ public class CommitXManager extends XViewer { } } - private void handleCommittedWithMerge(IOseeBranch branch) throws OseeCoreException { + private void handleCommittedWithMerge(BranchId branch) throws OseeCoreException { MessageDialog dialog = new MessageDialog(Displays.getActiveShell(), "Select Report", null, "Both Change Report and Merge Manager exist.\n\nSelect to open.", MessageDialog.QUESTION, new String[] {"Show Change Report", "Show Merge Manager", "Cancel"}, 0); 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 2709a2f883a..80ae3b6117b 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 @@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.team.IAtsTeamDefinition; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -46,7 +46,7 @@ public class XCommitLabelProvider extends XViewerLabelProvider { @Override public Image getColumnImage(Object element, XViewerColumn xCol, int columnIndex) throws OseeCoreException { - IOseeBranch branch = null; + BranchId branch = null; if (element instanceof ICommitConfigItem) { ICommitConfigItem configArt = (ICommitConfigItem) element; branch = AtsClientService.get().getBranchService().getBranch(configArt); @@ -155,7 +155,7 @@ public class XCommitLabelProvider extends XViewerLabelProvider { } } - private String handleCommitDateColumn(IOseeBranch branch) throws OseeCoreException { + private String handleCommitDateColumn(BranchId branch) throws OseeCoreException { TransactionRecord transactionRecord = (TransactionRecord) AtsClientService.get().getBranchService().getCommitTransactionRecord( commitXManager.getXCommitViewer().getTeamArt(), branch); @@ -166,7 +166,7 @@ public class XCommitLabelProvider extends XViewerLabelProvider { return "Not Committed"; } - private String handleCommitCommentColumn(IOseeBranch branch) throws OseeCoreException { + private String handleCommitCommentColumn(BranchId branch) throws OseeCoreException { TransactionRecord transactionRecord = (TransactionRecord) AtsClientService.get().getBranchService().getCommitTransactionRecord( commitXManager.getXCommitViewer().getTeamArt(), branch); @@ -200,7 +200,7 @@ public class XCommitLabelProvider extends XViewerLabelProvider { return ""; } - private String handleActionColumn(IOseeBranch branch) throws OseeCoreException { + private String handleActionColumn(BranchId branch) throws OseeCoreException { CommitStatus commitStatus = AtsClientService.get().getBranchService().getCommitStatus( commitXManager.getXCommitViewer().getTeamArt(), branch); if (commitStatus == CommitStatus.Rebaseline_In_Progress) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java index 323c678001d..afbd323520d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java @@ -31,7 +31,7 @@ import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; import org.eclipse.osee.ats.util.AtsBranchManager; import org.eclipse.osee.ats.util.AtsUtil; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; @@ -158,7 +158,7 @@ public class XCommitManager extends GenericXWidget implements IArtifactWidget, I try { // commit all branches in order Map<Long, Branch> branchUuidToBranchMap = new HashMap<>(); - for (IOseeBranch destinationBranch : AtsClientService.get().getBranchService().getBranchesLeftToCommit( + for (BranchId destinationBranch : AtsClientService.get().getBranchService().getBranchesLeftToCommit( teamArt)) { branchUuidToBranchMap.put(destinationBranch.getUuid(), (Branch) destinationBranch); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsRuleDefinitionDslRenderer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsRuleDefinitionDslRenderer.java index 87d55532551..e31b9739e2c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsRuleDefinitionDslRenderer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsRuleDefinitionDslRenderer.java @@ -27,7 +27,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes; import org.eclipse.osee.ats.core.client.util.AtsUtilClient; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -141,7 +141,7 @@ public final class AtsRuleDefinitionDslRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { Artifact artifact = artifacts.iterator().next(); return new SaveAtsDslModelOperation(file, artifact); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsWorkDefinitionDslRenderer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsWorkDefinitionDslRenderer.java index a1687b386dc..384288ef75d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsWorkDefinitionDslRenderer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/editor/AtsWorkDefinitionDslRenderer.java @@ -27,7 +27,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes; import org.eclipse.osee.ats.core.client.util.AtsUtilClient; import org.eclipse.osee.ats.internal.Activator; import org.eclipse.osee.ats.internal.AtsClientService; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -141,7 +141,7 @@ public final class AtsWorkDefinitionDslRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { Artifact artifact = artifacts.iterator().next(); return new SaveAtsDslModelOperation(file, artifact); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java index c78e9a7b77d..880ee36aa9c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.eclipse.osee.ats.core.util.AtsUtilCore; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -32,9 +32,9 @@ public class GroupWorldSearchItem extends WorldUISearchItem { private Collection<Artifact> groups; private Collection<Artifact> selectedGroups; private String groupName; - private final IOseeBranch branch; + private final BranchId branch; - public GroupWorldSearchItem(String displayName, String groupName, IOseeBranch branch) { + public GroupWorldSearchItem(String displayName, String groupName, BranchId branch) { super(displayName, FrameworkImage.GROUP); this.groupName = groupName; this.branch = branch; @@ -47,7 +47,7 @@ public class GroupWorldSearchItem extends WorldUISearchItem { this.branch = group.getBranch(); } - public GroupWorldSearchItem(IOseeBranch branch) { + public GroupWorldSearchItem(BranchId branch) { this("Group Search", null, branch); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java index d9d0495af52..44f53bf619c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java @@ -15,7 +15,7 @@ import java.util.List; import org.eclipse.osee.ats.util.AtsEditor; import org.eclipse.osee.ats.world.IWorldEditorConsumer; import org.eclipse.osee.ats.world.WorldEditor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.util.Strings; /** @@ -25,7 +25,7 @@ public class MultipleIdSearchData implements IWorldEditorConsumer { private String enteredIds = ""; private List<String> ids = new ArrayList<>(); private boolean includeArtIds; - private IOseeBranch branch; + private BranchId branch; private String name; private WorldEditor worldEditor; private AtsEditor atsEditor; @@ -68,7 +68,7 @@ public class MultipleIdSearchData implements IWorldEditorConsumer { return ids; } - public IOseeBranch getBranchForIncludeArtIds() { + public BranchId getBranchForIncludeArtIds() { return branch; } @@ -98,7 +98,7 @@ public class MultipleIdSearchData implements IWorldEditorConsumer { this.includeArtIds = includeArtIds; } - public void setBranch(IOseeBranch branch) { + public void setBranch(BranchId branch) { this.branch = branch; } diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AbstractAddRequirementsBranch.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AbstractAddRequirementsBranch.java index 855a9b1a6ba..1b21822d47b 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AbstractAddRequirementsBranch.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AbstractAddRequirementsBranch.java @@ -11,6 +11,7 @@ package org.eclipse.osee.client.demo.internal; import org.eclipse.osee.client.demo.DemoSubsystems; +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.database.init.IDbInitializationTask; @@ -34,7 +35,7 @@ public abstract class AbstractAddRequirementsBranch implements IDbInitialization @Override public void run() throws OseeCoreException { - IOseeBranch requirementsBranch = BranchManager.createTopLevelBranch(branch); + BranchId requirementsBranch = BranchManager.createTopLevelBranch(branch); Artifact sawProduct = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Component, requirementsBranch, "SAW Product Decomposition"); diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java index 61242d9e764..2f12e2c4d17 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java @@ -20,8 +20,8 @@ import java.util.HashSet; import java.util.Set; import java.util.logging.Level; import org.eclipse.core.runtime.FileLocator; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -61,7 +61,7 @@ public class AddRequirementData implements IDbInitializationTask { public void run() throws OseeCoreException { try { // Import all requirements on SAW_Bld_1 Branch - IOseeBranch branch = SAW_Bld_1; + BranchId branch = SAW_Bld_1; //@formatter:off importRequirements(branch, CoreArtifactTypes.SoftwareRequirement, "Software Requirements", "support/SAW-SoftwareRequirements.xml"); @@ -79,7 +79,7 @@ public class AddRequirementData implements IDbInitializationTask { OseeLog.log(AddRequirementData.class, Level.INFO, "Creating SAW_Bld_2 branch off SAW_Bld_1"); } // Create SAW_Bld_2 branch off SAW_Bld_1 - IOseeBranch childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2); + BranchId childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2); sleep(5000); // need to update the branch type; @@ -91,7 +91,7 @@ public class AddRequirementData implements IDbInitializationTask { } } - private void importRequirements(IOseeBranch branch, IArtifactType requirementType, String folderName, String filename) throws Exception { + private void importRequirements(BranchId branch, IArtifactType requirementType, String folderName, String filename) throws Exception { if (DEBUG) { OseeLog.logf(AddRequirementData.class, Level.INFO, "Importing \"%s\" requirements on branch \"%s\"", folderName, branch); @@ -131,7 +131,7 @@ public class AddRequirementData implements IDbInitializationTask { } } - private void demoDbTraceabilityTx(SkynetTransaction transaction, IOseeBranch branch) throws Exception { + private void demoDbTraceabilityTx(SkynetTransaction transaction, BranchId branch) throws Exception { Collection<Artifact> systemArts = getArtTypeRequirements(DEBUG, CoreArtifactTypes.SystemRequirementMSWord, "Robot", branch); @@ -241,10 +241,10 @@ public class AddRequirementData implements IDbInitializationTask { } - private Collection<Artifact> getArtTypeRequirements(boolean DEBUG, IArtifactType artifactType, String artifactNameStr, IOseeBranch branch) throws OseeCoreException { + private Collection<Artifact> getArtTypeRequirements(boolean DEBUG, IArtifactType artifactType, String artifactNameStr, BranchId branch) throws OseeCoreException { if (DEBUG) { OseeLog.logf(AddRequirementData.class, Level.INFO, "Getting [%s] requirement(s) from Branch [%s]", - artifactNameStr, branch.getName()); + artifactNameStr, branch.getId()); } Collection<Artifact> arts = ArtifactQuery.getArtifactListFromTypeAndName(artifactType, artifactNameStr, branch, QueryOption.CONTAINS_MATCH_OPTIONS); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java index 0ae8f145bbf..1f60bcae7da 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java @@ -24,6 +24,7 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; import org.eclipse.osee.define.traceability.operations.ImportTraceUnitsOperation; +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.CoreArtifactTypes; @@ -88,7 +89,7 @@ public final class ImportTraceUnitsOperationTest { "Robot Interfaces", "Individual robot events", "Collaborative Robot"); private IOseeBranch branch; - private IOseeBranch importToBranch; + private BranchId importToBranch; private File testFile; @Before diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java index 302f9318317..c3a83519790 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java @@ -23,7 +23,7 @@ import java.util.List; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -67,7 +67,7 @@ public class ArtifactCacheQueryTest { private static final String[] ALL_STATIC_IDS = new String[] {STATIC_ID_AAA, STATIC_ID_BBB, STATIC_ID_CCC, STATIC_ID_DDD, STATIC_ID_EEE}; - private static final IOseeBranch branch = CoreBranches.COMMON; + private static final BranchId branch = CoreBranches.COMMON; @After public void tearDown() throws OseeCoreException { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java index bb146f1f814..7e5afa58e8f 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java @@ -30,7 +30,7 @@ import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.T import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -71,7 +71,7 @@ public class ArtifactLoaderTest { private static final int TOTAL_THREADS = 7; private static final int NUM_ARTIFACTS = 100; private static final String ATTRIBUTE_VALUE = "now is the time"; - private static final IOseeBranch branch = CoreBranches.COMMON; + private static final BranchId branch = CoreBranches.COMMON; @After public void tearDown() throws Exception { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactPurgeTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactPurgeTest.java index a3a8d96f044..0097aefb9ae 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactPurgeTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactPurgeTest.java @@ -41,7 +41,7 @@ import org.junit.Test; * equal.<br/> * <br/> * Test unit for {@link PurgeArtifacts} - * + * * @author Donald G. Dunne */ public class ArtifactPurgeTest { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java index c1ac9983bdb..a6ad18ed3f8 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java @@ -25,7 +25,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -33,7 +33,6 @@ import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.QueryOption; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; -import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.model.cache.BranchFilter; import org.eclipse.osee.framework.jdk.core.type.HashCollection; @@ -110,8 +109,7 @@ public class ArtifactQueryTest { public void testGetArtifactListFromType() throws OseeCoreException { // Should exist Set<Artifact> searchedArtifacts = new LinkedHashSet<>(); - List<IOseeBranch> branches = BranchManager.getBranches(new BranchFilter(BranchType.BASELINE)); - for (IOseeBranch branch : branches) { + for (BranchId branch : BranchManager.getBranches(new BranchFilter(BranchType.BASELINE))) { List<Artifact> results = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, branch, DeletionFlag.INCLUDE_DELETED); searchedArtifacts.addAll(results); @@ -180,7 +178,7 @@ public class ArtifactQueryTest { @Test public void testGetOrCreate() throws Exception { String guid = GUID.create(); - IOseeBranch branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); + BranchId branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); Artifact artifact1 = ArtifactQuery.getOrCreate(guid, CoreArtifactTypes.GeneralData, branch); Assert.assertNotNull(artifact1); Artifact artifact2 = ArtifactQuery.getOrCreate(guid, CoreArtifactTypes.GeneralData, branch); @@ -192,7 +190,7 @@ public class ArtifactQueryTest { @Test public void testLargeAttributeIndexing() throws Exception { String guid = GUID.create(); - IOseeBranch branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); + BranchId branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); Artifact artifact1 = ArtifactQuery.getOrCreate(guid, CoreArtifactTypes.GeneralData, branch); artifact1.setSoleAttributeFromString(CoreAttributeTypes.Name, longStr()); artifact1.persist(testInfo.getTestName()); @@ -207,7 +205,7 @@ public class ArtifactQueryTest { @Test public void testQueryById() throws OseeCoreException { - IOseeBranch branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); + BranchId branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); List<Integer> newIdsInOrder = new LinkedList<>(); Map<Integer, TransactionRecord> idToTxId = new HashMap<>(); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java index facf5b3b8e7..e62f045d34f 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java @@ -60,7 +60,7 @@ public class BranchEventTest { public TestInfo method = new TestInfo(); private IOseeBranch mainBranch; - private IOseeBranch topLevel; + private BranchId topLevel; private BranchEventListener branchEventListener; @@ -252,9 +252,9 @@ public class BranchEventTest { return workingBranch; } - private IOseeBranch testEvents__topLevelAdded() throws Exception { + private BranchId testEvents__topLevelAdded() throws Exception { branchEventListener.reset(); - IOseeBranch branch = BranchManager.createTopLevelBranch(mainBranch); + BranchId branch = BranchManager.createTopLevelBranch(mainBranch); Assert.assertNotNull(branch); verifyReceivedBranchStatesEvent(branchEventListener.getFirstResults(), BranchEventType.Added, mainBranch); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchPurgeTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchPurgeTest.java index b6b1a398229..94fc38e978b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchPurgeTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchPurgeTest.java @@ -20,6 +20,7 @@ import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.T import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; +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.CoreArtifactTypes; @@ -43,7 +44,7 @@ import org.junit.Test; * This test is intended to be run against a demo database. It tests the branch purge logic by counting the rows of the * version and txs tables, creating a branch, making changes and then purging the branch. If it works properly, all rows * should be equal. - * + * * @author Donald G. Dunne */ public class BranchPurgeTest { @@ -83,7 +84,7 @@ public class BranchPurgeTest { Map<String, Integer> initialRowCount = TestUtil.getTableRowCounts(TABLES); - IOseeBranch branch = BranchManager.createWorkingBranch(SAW_Bld_2, workingBranch); + BranchId branch = BranchManager.createWorkingBranch(SAW_Bld_2, workingBranch); Collection<Artifact> softArts = TestUtil.createSimpleArtifacts(CoreArtifactTypes.SoftwareRequirement, 10, method.getQualifiedTestName(), branch); Artifacts.persistInTransaction("Test purge branch", softArts); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java index 0bf5c11ebaa..c4257a563cf 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java @@ -23,6 +23,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.Asserts; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -365,7 +366,7 @@ public class BranchStateTest { if (workingBranch != null) { purgeBranchAndChildren(workingBranch); } - for (IOseeBranch branch : BranchManager.getBranchesByName(originalBranchName)) { + for (BranchId branch : BranchManager.getBranchesByName(originalBranchName)) { purgeBranchAndChildren(branch); } if (toDelete != null && toDelete.length > 0) { @@ -376,7 +377,7 @@ public class BranchStateTest { } } - private void purgeBranchAndChildren(IOseeBranch branch) throws OseeCoreException { + private void purgeBranchAndChildren(BranchId branch) throws OseeCoreException { for (Branch child : BranchManager.getBranch(branch).getChildBranches(true)) { BranchManager.purgeBranch(child); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java index bedf4710a78..2166e569ead 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java @@ -19,7 +19,7 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.ModificationType; @@ -54,7 +54,7 @@ public class ChangeDataTest { @Rule public TestInfo method = new TestInfo(); - private IOseeBranch workingBranch; + private BranchId workingBranch; private ChangeData theData; @Before diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java index a4c233dc466..ffe218741df 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java @@ -16,7 +16,7 @@ import java.util.Collections; import java.util.List; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBasicGuidArtifact1; @@ -50,7 +50,7 @@ public class FrameworkEventToRemoteEventListenerTest { @Rule public OseeLogMonitorRule monitorRule = new OseeLogMonitorRule(); - private static final IOseeBranch BRANCH = SAW_Bld_1; + private static final BranchId BRANCH = SAW_Bld_1; private static final String ARTIFACT_NAME_1 = FrameworkEventToRemoteEventListenerTest.class.getSimpleName() + ".Edit1"; private static final int newArtTx = 12345; @@ -124,7 +124,7 @@ public class FrameworkEventToRemoteEventListenerTest { return remoteEvent; } - private static Artifact createArtifact(IOseeBranch branch, String artifactName) throws OseeCoreException { + private static Artifact createArtifact(BranchId branch, String artifactName) throws OseeCoreException { Assert.assertNotNull(branch); Assert.assertNotNull(artifactName); Artifact artifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, branch, artifactName); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeTransactionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeTransactionTest.java index f3ed77e560c..e667afba55b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeTransactionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeTransactionTest.java @@ -21,7 +21,7 @@ import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.A import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.TestUtil; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.operation.IOperation; @@ -50,7 +50,7 @@ public class PurgeTransactionTest { @Rule public OseeLogMonitorRule monitorRule = new OseeLogMonitorRule(); - private static final IOseeBranch BRANCH = SAW_Bld_2; + private static final BranchId BRANCH = SAW_Bld_2; private static final String[] TABLES = new String[] {"osee_attribute", "osee_artifact", "osee_relation_link", "osee_tx_details", "osee_txs"}; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java index 10e067810a1..865d76a9745 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java @@ -20,7 +20,7 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeHousekeepingRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.operation.Operations; @@ -123,7 +123,7 @@ public class RelationDeletionTest { } - private Artifact createArtifact(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { + private Artifact createArtifact(IArtifactType artifactType, BranchId branch) throws OseeCoreException { Artifact newArtifact = ArtifactTypeManager.addArtifact(artifactType, branch); artifacts.add(newArtifact); return newArtifact; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java index 4ee4490ac30..06bd1709cea 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java @@ -20,7 +20,7 @@ import java.util.Set; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -56,7 +56,7 @@ public class RelationOrderingTest { @Rule public TestInfo method = new TestInfo(); - private static final IOseeBranch branch = CoreBranches.COMMON; + private static final BranchId branch = CoreBranches.COMMON; private Set<Artifact> itemsToDelete; private Artifact parent; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java index dcb0c84f1d4..05cbbf11f84 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java @@ -19,7 +19,7 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeHousekeepingRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -218,13 +218,13 @@ public final class SkynetTransactionTest { } private class WorkerThread extends Thread { - private final IOseeBranch branch; + private final BranchId branch; private final Object lock; private final Set<Artifact> data = new HashSet<>(); private Throwable ex; private final WorkerType workerType; - public WorkerThread(Object lock, IOseeBranch branch, WorkerType workerType) { + public WorkerThread(Object lock, BranchId branch, WorkerType workerType) { this.lock = lock; this.branch = branch; this.workerType = workerType; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java index f999310bb19..5374a1cbcfb 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java @@ -16,7 +16,7 @@ import java.util.HashSet; import java.util.Set; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IUserToken; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -105,7 +105,7 @@ public final class UserManagerTest { return user; } - private void createSampleDefaultGroups(IOseeBranch branch, String... names) throws OseeCoreException { + private void createSampleDefaultGroups(BranchId branch, String... names) throws OseeCoreException { for (String name : names) { //Create artifact Artifact groupArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.UserGroup, branch, name); @@ -121,7 +121,7 @@ public final class UserManagerTest { } } - private void deleteSampleDefaultGroups(IOseeBranch branch, String... artifactNames) throws OseeCoreException { + private void deleteSampleDefaultGroups(BranchId branch, String... artifactNames) throws OseeCoreException { Collection<Artifact> list = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.UserGroup, branch); for (Artifact artifact : list) { for (String artifactName : artifactNames) { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java index 8743ce238f8..725c58d3b06 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java @@ -19,7 +19,7 @@ import java.util.List; import org.eclipse.osee.client.integration.tests.integration.skynet.core.ConflictDeletionTest; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -115,11 +115,11 @@ public class ConflictTestManager { protected Object object; protected Object object2; protected Class<?> clas; - protected IOseeBranch branch; + protected BranchId branch; protected int rootArtifact; protected IArtifactType type; - protected ArtifactModification(Type itemToChange, Modification modificationToPerform, int rootArtifact, IOseeBranch branch, IArtifactType type, String name) throws OseeCoreException { + protected ArtifactModification(Type itemToChange, Modification modificationToPerform, int rootArtifact, BranchId branch, IArtifactType type, String name) throws OseeCoreException { if (!itemToChange.equals(Type.ARTIFACT)) { throw new OseeCoreException("This is the Artifact Constructor"); } @@ -292,7 +292,7 @@ public class ConflictTestManager { } } - protected static Artifact createArtifact(int rootArtifactId, IOseeBranch branch, IArtifactType type, String name) throws OseeCoreException { + protected static Artifact createArtifact(int rootArtifactId, BranchId branch, IArtifactType type, String name) throws OseeCoreException { Artifact rootArtifact = ArtifactQuery.getArtifactFromAttribute(CoreAttributeTypes.Name, FOLDER, branch); if (rootArtifactId > 0 && rootArtifactId < NUMBER_OF_ARTIFACTS) { if (branch.equals(destArtifacts[0].getBranch())) { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java index 47a139dd4d0..911f3194fa2 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockIArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.client.integration.tests.integration.skynet.core.utils; import java.util.Collections; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.RelationTypeSide; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.jdk.core.type.NamedIdentity; @@ -27,10 +27,10 @@ public class MockIArtifact extends NamedIdentity<String>implements IArtifact { private boolean wasGetFullArtifactCalled; private final int uniqueId; private final ArtifactType artifactType; - private final IOseeBranch branch; + private final BranchId branch; // MockObject do not change to use tokens - public MockIArtifact(int uniqueId, String name, String guid, IOseeBranch branch, ArtifactType artifactType) { + public MockIArtifact(int uniqueId, String name, String guid, BranchId branch, ArtifactType artifactType) { super(guid, name); this.uniqueId = uniqueId; this.branch = branch; @@ -57,7 +57,7 @@ public class MockIArtifact extends NamedIdentity<String>implements IArtifact { } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockLinker.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockLinker.java index 2ea83cece93..21e4d9543de 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockLinker.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/MockLinker.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.client.integration.tests.integration.skynet.core.utils; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.relation.RelationLink.ArtifactLinker; @@ -32,17 +32,17 @@ public class MockLinker implements ArtifactLinker { } @Override - public void updateCachedArtifact(int artId, IOseeBranch branch) { + public void updateCachedArtifact(int artId, BranchId branch) { // } @Override - public Artifact getArtifact(int ArtId, IOseeBranch branch) { + public Artifact getArtifact(int ArtId, BranchId branch) { return null; } @Override - public String getLazyArtifactName(int aArtifactId, IOseeBranch branch) { + public String getLazyArtifactName(int aArtifactId, BranchId branch) { return name; } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java index 736ce5bc0b5..8fc2c9b971d 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Random; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -50,7 +50,7 @@ public final class TestUtil { /** * Creates a simple artifact and adds it to the root artifact default hierarchical relation */ - public static Artifact createSimpleArtifact(IArtifactType artifactType, String name, IOseeBranch branch) throws OseeCoreException { + public static Artifact createSimpleArtifact(IArtifactType artifactType, String name, BranchId branch) throws OseeCoreException { Artifact softArt = ArtifactTypeManager.addArtifact(artifactType, branch); softArt.setName(name); if (softArt.isAttributeTypeValid(CoreAttributeTypes.Subsystem)) { @@ -61,7 +61,7 @@ public final class TestUtil { return softArt; } - public static Collection<Artifact> createSimpleArtifacts(IArtifactType artifactType, int numArts, String name, IOseeBranch branch) throws OseeCoreException { + public static Collection<Artifact> createSimpleArtifacts(IArtifactType artifactType, int numArts, String name, BranchId branch) throws OseeCoreException { List<Artifact> arts = new ArrayList<>(); for (int x = 1; x < numArts + 1; x++) { arts.add(createSimpleArtifact(artifactType, name + " " + x, branch)); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AbstractEditTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AbstractEditTest.java index 1f6482d4ebb..e57f658574d 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AbstractEditTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AbstractEditTest.java @@ -24,8 +24,8 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -63,13 +63,13 @@ public abstract class AbstractEditTest { public TestInfo method = new TestInfo(); private final String editFile; - private final IOseeBranch branch; + private final BranchId branch; private final IArtifactType artType; private final FileSystemRenderer renderer; private Artifact artifact; - protected AbstractEditTest(IOseeBranch branch, String editFile, IArtifactType artType, FileSystemRenderer renderer) { + protected AbstractEditTest(BranchId branch, String editFile, IArtifactType artType, FileSystemRenderer renderer) { this.branch = branch; this.editFile = editFile; this.artType = artType; @@ -91,7 +91,7 @@ public abstract class AbstractEditTest { } } - private Artifact createArtifact(IOseeBranch branch, IArtifactType artType, String artifactName) throws OseeCoreException { + private Artifact createArtifact(BranchId branch, IArtifactType artType, String artifactName) throws OseeCoreException { Assert.assertNotNull(branch); Assert.assertNotNull(artifactName); Artifact artifact = ArtifactTypeManager.addArtifact(artType, branch, artifactName); @@ -119,7 +119,7 @@ public abstract class AbstractEditTest { } private IFile openArtifactForEdit(FileSystemRenderer renderer, Artifact artifact) throws OseeCoreException { - IFile editFile = renderer.renderToFile(artifact, artifact.getBranch(), PresentationType.SPECIALIZED_EDIT); + IFile editFile = renderer.renderToFile(artifact, artifact.getBranchToken(), PresentationType.SPECIALIZED_EDIT); Assert.assertNotNull(editFile); return editFile; } @@ -155,7 +155,7 @@ public abstract class AbstractEditTest { Assert.assertNotNull(artifact); IFile renderedFileFromModifiedStorage = - renderer.renderToFile(artifact, artifact.getBranch(), PresentationType.SPECIALIZED_EDIT); + renderer.renderToFile(artifact, artifact.getBranchToken(), PresentationType.SPECIALIZED_EDIT); Assert.assertNotNull(renderedFileFromModifiedStorage); InputStream inputStream = null; try { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java index dc5365ec302..39ff589a64b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java @@ -18,7 +18,7 @@ import java.util.List; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -57,7 +57,7 @@ public class HtmlRendererTest { private final static String LEGACY_ID = "ABC-123,ABC-234"; private final static String PARAGRAPH_NUMBER = "1.2.3.4"; - private IOseeBranch rootBranch; + private BranchId rootBranch; private List<Artifact> theArtifacts = null; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java index 120d9f4953f..ed6bba8666e 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java @@ -41,7 +41,7 @@ import org.junit.Test; /** * Tests cross branch drag and drop. - * + * * @author Jeff C. Phillips * @author Megumi Telles */ diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java index 6a1ab5c2102..96bfdaef57c 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java @@ -18,7 +18,7 @@ import java.util.List; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -187,7 +187,7 @@ public class PreviewAndMultiPreviewTest { RendererManager.openInJob(Arrays.asList(art), PresentationType.PREVIEW); } - private Artifact createArtifact(IArtifactType type, IOseeBranch branch, String name) throws OseeCoreException { + private Artifact createArtifact(IArtifactType type, BranchId branch, String name) throws OseeCoreException { Artifact artifact = ArtifactTypeManager.addArtifact(type, branch, name); Assert.assertNotNull(artifact); testArtifacts.add(artifact); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java index 202acdbcbc0..9974c6634e8 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java @@ -15,7 +15,7 @@ import java.util.LinkedList; import java.util.List; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; -import org.eclipse.osee.framework.core.data.IOseeBranch; +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.exception.OseeDataStoreException; @@ -58,8 +58,8 @@ public class RelationIntegrityCheckTest { private final DoubleKeyHashMap<Integer, Integer, LocalRelationLink> map = new DoubleKeyHashMap<Integer, Integer, LocalRelationLink>(); - private IOseeBranch parentBranch; - private IOseeBranch workingBranch; + private BranchId parentBranch; + private BranchId workingBranch; @Before public void setUp() throws Exception { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java index 3d808172ac2..1fa04cb0170 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java @@ -23,7 +23,7 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -116,8 +116,8 @@ public final class ReplaceWithBaselineTest { private static enum ChangeItem { NEW, DELETED, MODIFIED, MOVED, INTRODUCED, RELATION_ORDER_ATTR }; //@formatter:on - private IOseeBranch workingBranch; - private IOseeBranch baselineBranch; + private BranchId workingBranch; + private BranchId baselineBranch; private final String testName; private final int expectedChangesLeft; @@ -308,7 +308,7 @@ public final class ReplaceWithBaselineTest { testData.setArtifactId(createNewArtifact(workingBranch, GUID.create()).getArtId()); break; case INTRODUCED: - IOseeBranch anotherBranch = BranchManager.createWorkingBranch(workingBranch, + BranchId anotherBranch = BranchManager.createWorkingBranch(workingBranch, "another working branch", UserManager.getUser(SystemUser.OseeSystem)); Artifact artifactToIntroduce = createNewArtifact(anotherBranch, "introduce artifact"); @@ -438,7 +438,7 @@ public final class ReplaceWithBaselineTest { } - private Artifact createNewArtifact(IOseeBranch branch, String name) throws Exception { + private Artifact createNewArtifact(BranchId branch, String name) throws Exception { Artifact artifact = ArtifactTypeManager.addArtifact(DOC, branch, name); artifact.persist(testName + name); return artifact; @@ -459,7 +459,7 @@ public final class ReplaceWithBaselineTest { Operations.executeWorkAndCheckStatus(new ReplaceAttributeWithBaselineOperation(attrChanges)); } - private List<Change> getBranchChanges(IOseeBranch branch) throws OseeCoreException { + private List<Change> getBranchChanges(BranchId branch) throws OseeCoreException { List<Change> changes = new ArrayList<>(); Operations.executeWorkAndCheckStatus(ChangeManager.comparedToParent(branch, changes), MONITOR); return changes; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java index 01cb990b60a..0e960208375 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java @@ -25,7 +25,7 @@ import org.eclipse.core.resources.IFolder; import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.core.operation.IOperation; @@ -60,7 +60,7 @@ public final class ViewWordChangeAndDiffTest { public OseeLogMonitorRule monitorRule = new OseeLogMonitorRule(); private IFolder renderFolder; - private IOseeBranch branch; + private BranchId branch; @Before public void setUp() throws Exception { @@ -138,7 +138,7 @@ public final class ViewWordChangeAndDiffTest { assertTrue("Single Native Diff test passed", true); } - private static Collection<Change> getChanges(IOseeBranch testBranch) throws OseeCoreException { + private static Collection<Change> getChanges(BranchId testBranch) throws OseeCoreException { Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.comparedToParent(testBranch, changes); Operations.executeWorkAndCheckStatus(operation); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java index e96af881be2..08c72df3e9c 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java @@ -22,7 +22,7 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; import org.eclipse.osee.client.test.framework.TestInfo; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; @@ -100,8 +100,8 @@ public class WordTemplateRendererTest { private static String SLAVE_RENDERER_OPTIONS = "{\"ElementType\" : \"Artifact\", \"OutliningOptions\" : [{\"Outlining\" : true, \"RecurseChildren\" : true, \"HeadingAttributeType\" : \"Name\", \"ArtifactName\" : \"srsProducer.objects\", \"OutlineNumber\" : \"\" }], \"AttributeOptions\" : [{\"AttrType\" : \"Partition\", \"Label\" : \"<w:r><w:t>Partition:</w:t></w:r>\", \"FormatPre\" : \">x<\", \"FormatPost\" : \"\"}, {\"AttrType\" : \"Development Assurance Level\", \"Label\" : \"<w:r><w:t>Development Assurance Level:</w:t></w:r>\", \"FormatPre\" : \">x<\", \"FormatPost\" : \"\"}, {\"AttrType\" : \"Word Template Content\", \"Label\" : \"\", \"FormatPre\" : \"\", \"FormatPost\" : \"\"}]}"; - private IOseeBranch rootBranch; - private IOseeBranch updateBranch; + private BranchId rootBranch; + private BranchId updateBranch; private Artifact docFolder; private Artifact swReqFolder; private Artifact templateFolder; @@ -198,7 +198,7 @@ public class WordTemplateRendererTest { @Test public void testBlankWordTemplateContent() { - IOseeBranch rootBr = BranchManager.createTopLevelBranch("Root Branch"); + BranchId rootBr = BranchManager.createTopLevelBranch("Root Branch"); SkynetTransaction tx = TransactionManager.createTransaction(rootBr, String.format("%s", method.getQualifiedTestName())); Artifact vol4 = ArtifactTypeManager.addArtifact(CoreArtifactTypes.HeadingMSWord, rootBr, "Volume 4"); @@ -622,7 +622,7 @@ public class WordTemplateRendererTest { } // Create the folder to store the templates - private void setupTemplates(Artifact folder, IOseeBranch branch) throws OseeCoreException { + private void setupTemplates(Artifact folder, BranchId branch) throws OseeCoreException { recurseTemplate = ArtifactTypeManager.addArtifact(CoreArtifactTypes.RendererTemplate, branch, "Recurse Template"); recurseTemplate.setSoleAttributeValue(CoreAttributeTypes.WholeWordContent, RECURSE_TEMPLATE_STRING); recurseTemplate.addAttributeFromString(CoreAttributeTypes.TemplateMatchCriteria, @@ -679,7 +679,7 @@ public class WordTemplateRendererTest { | |---- Ventilation */ //@formatter:on - private void setUpSWReq(Artifact swReqFolder, IOseeBranch branch) throws OseeCoreException { + private void setUpSWReq(Artifact swReqFolder, BranchId branch) throws OseeCoreException { Artifact crewReq = ArtifactTypeManager.addArtifact(CoreArtifactTypes.HeadingMSWord, branch, "Crew Station Requirements"); Artifact commReq = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, branch, @@ -728,7 +728,7 @@ public class WordTemplateRendererTest { |---- More Notes */ //@formatter:on - private void setUpDocFolder(Artifact docFolder, IOseeBranch branch) throws OseeCoreException { + private void setUpDocFolder(Artifact docFolder, BranchId branch) throws OseeCoreException { Artifact intro = ArtifactTypeManager.addArtifact(CoreArtifactTypes.HeadingMSWord, branch, "Introduction"); Artifact background = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SubsystemDesign, branch, "Background"); Artifact scope = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SubsystemDesign, branch, "Scope"); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java index 9b081ffcbb2..66bcdbd056a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java @@ -21,7 +21,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.ResultSet; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -60,7 +60,7 @@ public class DataRightsImporter extends AbstractBlam { @Override public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { - IOseeBranch branch = variableMap.getBranch("Branch"); + BranchId branch = variableMap.getBranch("Branch"); String xmlPath = variableMap.getString("Path to DataRights XML"); if (branch == null) { @@ -107,7 +107,7 @@ public class DataRightsImporter extends AbstractBlam { private final class DataRightsProcessor implements RowProcessor { - private final IOseeBranch branch; + private final BranchId branch; private boolean ignore; private int smeIndex; @@ -117,7 +117,7 @@ public class DataRightsImporter extends AbstractBlam { private boolean changesAvailable; private SkynetTransaction transaction; - public DataRightsProcessor(IOseeBranch branch) { + public DataRightsProcessor(BranchId branch) { super(); this.branch = branch; } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixDuplicateEnumeratedAttributes.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixDuplicateEnumeratedAttributes.java index 32b2305325b..bc32a058e35 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixDuplicateEnumeratedAttributes.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixDuplicateEnumeratedAttributes.java @@ -13,7 +13,7 @@ package org.eclipse.osee.define.blam.operation; import java.util.Arrays; import java.util.Collection; import org.eclipse.osee.define.blam.operation.FixAttributeOperation.Display; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.OperationLogger; @@ -50,7 +50,7 @@ public class FixDuplicateEnumeratedAttributes extends AbstractBlam { @Override public IOperation createOperation(VariableMap variableMap, OperationLogger logger) throws Exception { - IOseeBranch branch = variableMap.getBranch(SELECT_BRANCH_LABEL); + BranchId branch = variableMap.getBranch(SELECT_BRANCH_LABEL); boolean commitChangesBool = variableMap.getBoolean(COMMIT_CHANGES_LABEL); Branch fullBranch = BranchManager.getBranch(branch); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSubsystemToDesignTraceability.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSubsystemToDesignTraceability.java index 2d6c0b298e2..65ae9846c08 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSubsystemToDesignTraceability.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSubsystemToDesignTraceability.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -55,7 +55,7 @@ public class PublishSubsystemToDesignTraceability extends AbstractBlam { monitor.beginTask(getDescriptionUsage(), 100); List<Artifact> subsystems = variableMap.getArtifacts("Subsystem Root Artifacts"); - IOseeBranch branch = subsystems.get(0).getBranch(); + BranchId branch = subsystems.get(0).getBranch(); init(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java index 6160ae1bcc0..5137c61b298 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java @@ -20,7 +20,7 @@ import java.util.List; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -69,7 +69,7 @@ public class PublishSystemLevelSSDD extends AbstractBlam { public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { monitor.beginTask("Generating System Level SSDD", 100); - IOseeBranch branch = variableMap.getBranch("Branch"); + BranchId branch = variableMap.getBranch("Branch"); init(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java index c84a18256e8..27067c26a2a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishWithSpecifiedTemplate.java @@ -22,7 +22,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.ws.rs.core.MediaType; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -62,7 +62,7 @@ import org.json.JSONObject; */ public class PublishWithSpecifiedTemplate extends AbstractBlam { private List<Artifact> templates; - private IOseeBranch branch; + private BranchId branch; private XBranchSelectWidget branchWidget; private XCombo slaveWidget; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementReorderOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementReorderOperation.java index b2026fb6b4b..eaa40e72679 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementReorderOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementReorderOperation.java @@ -16,7 +16,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -38,7 +38,7 @@ public class RequirementReorderOperation extends AbstractBlam { @Override public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { List<Artifact> artifacts = variableMap.getArtifacts("artifacts"); - IOseeBranch branch = artifacts.get(0).getBranch(); + BranchId branch = artifacts.get(0).getBranch(); transaction = TransactionManager.createTransaction(branch, "Fix Requirement Ordering BLAM"); for (Artifact input : artifacts) { reorderChildren(input); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java index 9e631c80061..fc411feadc4 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java @@ -23,7 +23,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.define.traceability.ScriptTraceabilityOperation; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -92,7 +92,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { if (artifacts.isEmpty()) { throw new OseeArgumentException("must specify a set of artifacts"); } - IOseeBranch branch = artifacts.get(0).getBranch(); + BranchId branch = artifacts.get(0).getBranch(); init(); String scriptDir = variableMap.getString(SCRIPT_ROOT_DIR); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java index abe58a7f5db..5f5b7bac2df 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map.Entry; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -82,7 +82,7 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam { initLowLevelRequirements(variableMap.getArtifacts("Lower Level Requirements")); initAllocationComponents(variableMap.getArtifacts("Allocation Components")); - IOseeBranch branch = lowLevelReqs.get(0).getBranch(); + BranchId branch = lowLevelReqs.get(0).getBranch(); monitor.subTask("Loading Higher Level Requirements"); // bulk load to improve performance monitor.worked(1); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java index fea89f68240..53ee23a3bcf 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java @@ -20,7 +20,7 @@ import java.util.regex.Pattern; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.osee.define.internal.Activator; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -121,7 +121,7 @@ public class ExtractTestRelations { // link.persist(getClass().getSimpleName()); } - private Artifact getTestArtifact(IFile testArtifactFile, IOseeBranch branch) throws OseeCoreException { + private Artifact getTestArtifact(IFile testArtifactFile, BranchId branch) throws OseeCoreException { try { return ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.TestCase, testArtifactFile.getName(), branch); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java index 9e879bbe69c..957c1265cfa 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java @@ -22,7 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.data.RequirementData; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.DeletionFlag; @@ -38,7 +38,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; */ public class BranchTraceabilityOperation extends TraceabilityProviderOperation { - private final IOseeBranch branch; + private final BranchId branch; private final RequirementData requirementData; private HashCollection<Artifact, String> requirementToTestUnitsMap; private Map<String, Artifact> testUnits; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java index 20b71fb1fac..75533bad744 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -34,7 +34,7 @@ public final class HierarchyHandler { private static final Matcher subsystemMatcher = Pattern.compile("(\\w*)\\.ss").matcher(""); private final Map<String, Artifact> folderNameToArtifact = new HashMap<>(50); private final SkynetTransaction transaction; - private final IOseeBranch branch; + private final BranchId branch; private Artifact root; public HierarchyHandler(SkynetTransaction transaction) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java index b1bb3883a3d..1214deb95ab 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java @@ -25,7 +25,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.ui.plugin.util.DirectoryOrFileSelector; @@ -217,7 +217,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage { return directoryFileSelector.getSingleSelection(); } - public IOseeBranch getSelectedBranch() { + public BranchId getSelectedBranch() { return branchSelectComposite.getSelectedBranch(); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java index ad2544b3a24..69d15c45fb8 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java @@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; @@ -39,7 +39,7 @@ public class ImportTraceabilityWizard extends Wizard implements IImportWizard { @Override public boolean performFinish() { try { - IOseeBranch branch = mainPage.getSelectedBranch(); + BranchId branch = mainPage.getSelectedBranch(); File file = mainPage.getImportFile(); boolean isGitBased = mainPage.isGitBased(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java index be4f6c64a77..e7ed971c3b6 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java @@ -28,7 +28,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.data.RequirementData; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.operation.Operations; @@ -42,7 +42,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; * @author Roberto E. Escobar */ public class RequirementTraceabilityData { - private final IOseeBranch testProcedureBranch; + private final BranchId testProcedureBranch; private final TraceabilityProviderOperation traceabilityProvider; private RequirementData requirementData; private HashCollection<Artifact, String> requirementsToCodeUnits; @@ -52,7 +52,7 @@ public class RequirementTraceabilityData { private final Map<String, Artifact> testProcedures = new HashMap<>(); private File testProcedureFilter; - public RequirementTraceabilityData(IOseeBranch testProcedureBranch, TraceabilityProviderOperation traceabilityProvider) { + public RequirementTraceabilityData(BranchId testProcedureBranch, TraceabilityProviderOperation traceabilityProvider) { this.testProcedureBranch = testProcedureBranch; this.traceabilityProvider = traceabilityProvider; this.testProcedureFilter = null; @@ -91,7 +91,7 @@ public class RequirementTraceabilityData { return status; } - private void getTestProcedureTraceability(IOseeBranch testProcedureBranch) throws OseeCoreException { + private void getTestProcedureTraceability(BranchId testProcedureBranch) throws OseeCoreException { // Map Software Requirements from TestProcedure IOseeBranch to Requirements IOseeBranch Map<String, Artifact> testProcedureBranchReqsToReqsBranchMap = new HashMap<>(); for (Artifact tpRequirement : ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java index 8724b2f5ebd..053b2636568 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java @@ -29,7 +29,7 @@ import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandl import org.eclipse.osee.define.traceability.data.RequirementData; import org.eclipse.osee.define.traceability.data.TraceMark; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.CountingMap; import org.eclipse.osee.framework.jdk.core.type.HashCollection; @@ -89,11 +89,11 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { excelWriter = new ExcelXmlWriter(charBak.getWriter()); } - public ScriptTraceabilityOperation(File file, IOseeBranch branch, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased) throws IOException { + public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<TraceHandler> traceHandlers, boolean isGitBased) throws IOException { this(new RequirementData(branch), file, writeOutResults, traceHandlers, isGitBased); } - public ScriptTraceabilityOperation(File file, IOseeBranch branch, boolean writeOutResults, Collection<? extends IArtifactType> types, boolean withInheritance, Collection<TraceHandler> traceHandlers, boolean isGitBased) throws IOException { + public ScriptTraceabilityOperation(File file, BranchId branch, boolean writeOutResults, Collection<? extends IArtifactType> types, boolean withInheritance, Collection<TraceHandler> traceHandlers, boolean isGitBased) throws IOException { this(new RequirementData(branch, types, withInheritance), file, writeOutResults, traceHandlers, isGitBased); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/AddTraceMarksToTraceUnits.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/AddTraceMarksToTraceUnits.java index 3005cb54fb8..2043fd01ead 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/AddTraceMarksToTraceUnits.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/AddTraceMarksToTraceUnits.java @@ -22,7 +22,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.define.traceability.TestUnitTagger; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -107,7 +107,7 @@ public class AddTraceMarksToTraceUnits extends AbstractBlam { try { final URI source = getSourceURI(variableMap); final boolean isRecursionAllowed = variableMap.getBoolean("Include Sub-Folders"); - IOseeBranch requirementsBranch = variableMap.getBranch("Requirements Branch"); + BranchId requirementsBranch = variableMap.getBranch("Requirements Branch"); final int TOTAL_WORK = Integer.MAX_VALUE; monitor.beginTask(getName(), TOTAL_WORK); @@ -135,7 +135,7 @@ public class AddTraceMarksToTraceUnits extends AbstractBlam { } } - private void processFiles(List<File> files, IOseeBranch branch) throws OseeCoreException { + private void processFiles(List<File> files, BranchId branch) throws OseeCoreException { Matcher matcher = TestUnitTagger.ANNOTATION_PATTERN.matcher(""); for (File file : files) { String guid = null; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/BaseTraceDataCache.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/BaseTraceDataCache.java index eaa4e543e9b..1918b4aca95 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/BaseTraceDataCache.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/BaseTraceDataCache.java @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.osee.define.internal.Activator; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; /** @@ -25,10 +25,10 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public abstract class BaseTraceDataCache { private boolean isInitialized; - private final IOseeBranch branch; + private final BranchId branch; private final String traceType; - public BaseTraceDataCache(String traceType, IOseeBranch branch) { + public BaseTraceDataCache(String traceType, BranchId branch) { isInitialized = false; this.traceType = traceType; this.branch = branch; @@ -38,7 +38,7 @@ public abstract class BaseTraceDataCache { return isInitialized; } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java index fd24f2d2747..9a34da3343e 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java @@ -15,7 +15,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; @@ -27,7 +27,7 @@ public class CodeUnitData extends BaseTraceDataCache { private final Map<String, Artifact> codeUnitMap; - public CodeUnitData(IOseeBranch branch) { + public CodeUnitData(BranchId branch) { super("Code Unit Data", branch); this.codeUnitMap = new HashMap<>(); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java index 02e2f12d350..a0eccb0b8e9 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java @@ -20,7 +20,7 @@ import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.define.traceability.TraceabilityExtractor; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.jdk.core.type.Pair; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -38,13 +38,13 @@ public class RequirementData extends BaseTraceDataCache { private final Collection<? extends IArtifactType> types; private final boolean withInheritance; - public RequirementData(IOseeBranch branch, Collection<? extends IArtifactType> types, boolean withInheritance) { + public RequirementData(BranchId branch, Collection<? extends IArtifactType> types, boolean withInheritance) { super("Software Requirements Data", branch); this.types = types; this.withInheritance = withInheritance; } - public RequirementData(IOseeBranch branch) { + public RequirementData(BranchId branch) { super("Software Requirements Data", branch); types = Collections.singleton(CoreArtifactTypes.AbstractSoftwareRequirement); withInheritance = true; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java index a8c5702cb74..0a80e4d3530 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java @@ -18,7 +18,7 @@ import java.util.Set; import java.util.TreeSet; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; @@ -37,7 +37,7 @@ public class TestUnitData extends BaseTraceDataCache { private final HashMap<String, Artifact> testProcedureMap; private final HashMap<String, Artifact> testSupportMap; - public TestUnitData(IOseeBranch branch) { + public TestUnitData(BranchId branch) { super("Test Unit Data", branch); this.testCaseMap = new HashMap<>(); this.testProcedureMap = new HashMap<>(); 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 5023f0c8478..9813eadc9ae 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 @@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; 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.IOseeBranch; +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; @@ -316,7 +316,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { protected boolean validateSourceGroup() { boolean result = directoryFileSelector.validate(this); if (result) { - IOseeBranch branch = getSelectedBranch(); + BranchId branch = getSelectedBranch(); if (branch == null) { result = false; setErrorMessage("Please select a valid working branch"); @@ -350,7 +350,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { return toReturn; } - public IOseeBranch getSelectedBranch() { + public BranchId getSelectedBranch() { return isWidgetAccessible(branchSelectComposite) ? branchSelectComposite.getSelectedBranch() : null; } @@ -443,7 +443,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { super.saveWidgetValues(); IDialogSettings settings = getDialogSettings(); if (settings != null) { - IOseeBranch branch = getSelectedBranch(); + BranchId branch = getSelectedBranch(); if (branch != null) { try { settings.put(BRANCH_KEY, branch.getUuid()); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java index fee45ac2de0..a41e33f52f9 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitWizard.java @@ -15,7 +15,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.operations.ImportTraceUnitsOperation; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.logging.OseeLevel; @@ -38,7 +38,7 @@ public class ImportTraceUnitWizard extends Wizard implements IImportWizard { @Override public boolean performFinish() { try { - IOseeBranch importToBranch = page.getSelectedBranch(); + BranchId importToBranch = page.getSelectedBranch(); boolean isRecursive = page.isFolderRecursionAllowed(); boolean isPersistChanges = page.isArtifactPersistanceAllowed(); Iterable<URI> sources = page.getSourceURI(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java index 4d6b5f3545f..1571482dcdc 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java @@ -19,7 +19,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.osee.define.internal.Activator; import org.eclipse.osee.define.traceability.operations.FindTraceUnitFromResource; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.plugin.core.util.IExceptionableRunnable; import org.eclipse.osee.framework.plugin.core.util.Jobs; import org.eclipse.osee.framework.ui.skynet.branch.BranchSelectionDialog; @@ -49,7 +49,7 @@ public class FindTraceUnitJob extends Job { @Override public void done(IJobChangeEvent event) { FetchBranchJob fetcherJob = (FetchBranchJob) event.getJob(); - final IOseeBranch branch = fetcherJob.getSelectedBranch(); + final BranchId branch = fetcherJob.getSelectedBranch(); if (branch != null) { IExceptionableRunnable runnable = new IExceptionableRunnable() { @@ -67,7 +67,7 @@ public class FindTraceUnitJob extends Job { return Status.OK_STATUS; } private static final class FetchBranchJob extends UIJob { - private IOseeBranch branch; + private BranchId branch; public FetchBranchJob(String name) { super(name); @@ -79,7 +79,7 @@ public class FindTraceUnitJob extends Job { return Status.OK_STATUS; } - public IOseeBranch getSelectedBranch() { + public BranchId getSelectedBranch() { return branch; } } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java index ca17368d4eb..1e42a7691a5 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java @@ -26,7 +26,7 @@ import org.eclipse.osee.define.traceability.ITraceUnitResourceLocator; import org.eclipse.osee.define.traceability.ResourceIdentifier; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.HashCollection; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.GUID; @@ -95,7 +95,7 @@ public final class FindTraceUnitFromResource { } } - public static void search(IOseeBranch branch, IResource... resources) { + public static void search(BranchId branch, IResource... resources) { HashCollection<IArtifactType, ResourceIdentifier> typeAndIds = toIdentifiers(resources); if (!typeAndIds.isEmpty()) { Set<Artifact> artifacts = new HashSet<>(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java index c63889b1010..3304fd531bc 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java @@ -16,7 +16,7 @@ import java.util.HashSet; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.nebula.widgets.xviewer.Activator; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; * @author Roberto E. Escobar */ public class ImportTraceUnitsOperation extends AbstractOperation { - private final IOseeBranch importToBranch; + private final BranchId importToBranch; private final boolean isRecursive; private final boolean isPersistChanges; private final boolean fileWithMultiPaths; @@ -32,7 +32,7 @@ public class ImportTraceUnitsOperation extends AbstractOperation { private final Iterable<URI> sources; private final String[] traceTypeIds; - public ImportTraceUnitsOperation(String jobName, IOseeBranch importToBranch, Iterable<URI> sources, boolean isRecursive, boolean isPersistChanges, boolean fileWithMultiPaths, boolean addGuidToSourceFile, String... traceHandlerIds) { + public ImportTraceUnitsOperation(String jobName, BranchId importToBranch, Iterable<URI> sources, boolean isRecursive, boolean isPersistChanges, boolean fileWithMultiPaths, boolean addGuidToSourceFile, String... traceHandlerIds) { super("ImportTraceUnitsOperation", Activator.PLUGIN_ID); this.importToBranch = importToBranch; this.sources = sources; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java index 34f5ca190f1..69987e3ad2f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java @@ -29,7 +29,7 @@ import org.eclipse.nebula.widgets.xviewer.Activator; import org.eclipse.osee.define.traceability.HierarchyHandler; import org.eclipse.osee.define.traceability.TestUnitTagger; import org.eclipse.osee.define.utility.IResourceLocator; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -73,7 +73,7 @@ public class TraceResourceDropOperation extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { if (!resources.isEmpty()) { - IOseeBranch branch = requirement.getBranch(); + BranchId branch = requirement.getBranch(); SkynetTransaction transaction = null; if (persistChanges) { transaction = TransactionManager.createTransaction(branch, "TraceResourceDrop"); @@ -117,7 +117,7 @@ public class TraceResourceDropOperation extends AbstractOperation { TestUnitTagger tagger = TestUnitTagger.getInstance(); String tag = tagger.getSourceTag(fileUri); Artifact testUnitArtifact = null; - IOseeBranch branch = requirement.getBranch(); + BranchId branch = requirement.getBranch(); boolean tagSource = false; if (GUID.isValid(tag)) { try { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java index 7f6b5043533..53f710402d0 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitFromResourceOperation.java @@ -22,7 +22,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager; import org.eclipse.osee.define.traceability.TraceUnitExtensionManager.TraceHandler; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -64,7 +64,7 @@ public class TraceUnitFromResourceOperation { operation.execute(monitor); } - public static void importTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, IOseeBranch importToBranch, boolean addGuidToSourceFile, String... traceUnitHandlerIds) throws OseeCoreException { + public static void importTraceFromTestUnits(IProgressMonitor monitor, Iterable<URI> sources, boolean isRecursive, boolean isFileWithMultiplePaths, BranchId importToBranch, boolean addGuidToSourceFile, String... traceUnitHandlerIds) throws OseeCoreException { checkBranchArguments(importToBranch); ResourceToTraceUnit operation = @@ -112,7 +112,7 @@ public class TraceUnitFromResourceOperation { } } - private static void checkBranchArguments(IOseeBranch importToBranch) throws OseeCoreException { + private static void checkBranchArguments(BranchId importToBranch) throws OseeCoreException { if (importToBranch == null) { throw new OseeArgumentException("Branch to import into was null"); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java index 57d86c94027..8d47a287b3f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java @@ -34,7 +34,7 @@ import org.eclipse.osee.define.traceability.data.TestUnitData; import org.eclipse.osee.define.traceability.data.TraceMark; import org.eclipse.osee.define.traceability.data.TraceUnit; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -69,7 +69,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private TestUnitData testUnitData; private final boolean addGuidToSourceFile; - private final IOseeBranch importIntoBranch; + private final BranchId importIntoBranch; private SkynetTransaction transaction; private HierarchyHandler handler; @@ -77,7 +77,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private final HashCollection<String, String> unknownRelationError; private final Set<String> unRelatedUnits; - public TraceUnitToArtifactProcessor(IOseeBranch importIntoBranch, boolean addGuidToSourceFile) { + public TraceUnitToArtifactProcessor(BranchId importIntoBranch, boolean addGuidToSourceFile) { this.importIntoBranch = importIntoBranch; this.reportTraceNotFound = new HashCollection<>(false, HashSet.class); this.unknownRelationError = new HashCollection<>(false, HashSet.class); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java index c6bd6166ea5..107539db1a2 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java @@ -30,6 +30,7 @@ import org.eclipse.osee.disposition.model.DispoSet; import org.eclipse.osee.disposition.model.DispoSetData; import org.eclipse.osee.disposition.model.DispoSetDescriptorData; import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.jdk.core.type.Identifiable; import org.eclipse.osee.orcs.data.ArtifactReadable; @@ -122,7 +123,7 @@ public class DispoApiTest { @Test public void testGetDispoPrograms() { - List<IOseeBranch> programsSet = Collections.singletonList(mockBranch); + List<BranchId> programsSet = Collections.singletonList(mockBranch); when(storage.getDispoBranches()).thenAnswer(newAnswer(programsSet)); List<IOseeBranch> actual = dispoApi.getDispoPrograms(); assertEquals(programsSet.iterator().next(), actual.iterator().next()); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoProgramResourceTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoProgramResourceTest.java index 924b796dfe1..fe043f63c88 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoProgramResourceTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoProgramResourceTest.java @@ -62,7 +62,7 @@ public class DispoProgramResourceTest { assertEquals(Response.Status.NOT_FOUND.getStatusCode(), noProgramsResponse.getStatus()); assertEquals("[]", messageActual); - IOseeBranch branch = TokenFactory.createBranch(id1.getUuid()); + IOseeBranch branch = TokenFactory.createBranch(id1.getUuid(), "dispotestGetAll"); List<IOseeBranch> branchList = Collections.singletonList(branch); when(dispoApi.getDispoPrograms()).thenReturn(branchList); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java index f66bcb29f20..b4eb3f06caa 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java @@ -30,6 +30,7 @@ import org.eclipse.osee.disposition.rest.DispoConstants; import org.eclipse.osee.disposition.rest.internal.importer.coverage.CoverageUtil; import org.eclipse.osee.disposition.rest.util.DispoUtil; import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.TokenFactory; @@ -71,7 +72,7 @@ public class OrcsStorageImpl implements Storage { this.orcsApi = orcsApi; } - private IOseeBranch getAdminBranch() { + private BranchId getAdminBranch() { return CoreBranches.COMMON; } @@ -400,7 +401,7 @@ public class OrcsStorageImpl implements Storage { @Override public void updateDispoItem(ArtifactReadable author, DispoProgram program, String dispoItemId, DispoItem data) { - IOseeBranch branch = TokenFactory.createBranch(program.getUuid()); + BranchId branch = TokenFactory.createBranch(program.getUuid()); TransactionBuilder tx = getTxFactory().createTransaction(branch, author, "Update Dispo Item"); ArtifactReadable dispoItemArt = findDispoArtifact(program, dispoItemId, DispoConstants.DispoItem); updateSingleItem(author, program, dispoItemArt, data, tx, false); diff --git a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java index dc54c0da1b3..becebcf30da 100644 --- a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java +++ b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java @@ -8,7 +8,7 @@ package org.eclipse.osee.doors.connector.ui.handler; import java.util.HashSet; import java.util.Set; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +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.RelationOrderBaseTypes; @@ -41,7 +41,7 @@ public class DoorsCreator { * @param reqName : name of the artifact to be created * @param branch on which artifact is created */ - public void createCQRequirement(final String url, final String reqName, final IOseeBranch branch) { + public void createCQRequirement(final String url, final String reqName, final BranchId branch) { Artifact newArtifact = null; diff --git a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java index 7f5829dfd0c..185b1fc6f05 100644 --- a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java +++ b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java @@ -14,7 +14,7 @@ import java.util.Collection; import java.util.Collections; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IAccessContextId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.services.CmAccessControl; @@ -53,11 +53,11 @@ public class FrameworkAccessControl implements CmAccessControl { } private boolean isAssocitedArtifactValid(Object object) throws OseeCoreException { - IOseeBranch branch = null; + BranchId branch = null; if (object instanceof Artifact) { branch = ((Artifact) object).getBranch(); - } else if (object instanceof IOseeBranch) { - branch = (IOseeBranch) object; + } else if (object instanceof BranchId) { + branch = (BranchId) object; } if (branch != null) { return BranchManager.getAssociatedArtifact(branch) != null; diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessControlManager.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessControlManager.java index f442b029c5e..9ef22645dae 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessControlManager.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessControlManager.java @@ -16,7 +16,7 @@ import java.util.logging.Level; import org.eclipse.osee.framework.access.internal.AccessControlHelper; import org.eclipse.osee.framework.access.internal.AccessControlService; import org.eclipse.osee.framework.access.internal.data.ArtifactAccessObject; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.exception.OseeAuthenticationRequiredException; import org.eclipse.osee.framework.core.model.access.AccessDataQuery; @@ -134,8 +134,8 @@ public final class AccessControlManager { } public static PermissionEnum getPermission(User user, Object object) { - if (object instanceof IOseeBranch) { - return getService().getBranchPermission(user, (IOseeBranch) object); + if (object instanceof BranchId) { + return getService().getBranchPermission(user, (BranchId) object); } else if (object instanceof Artifact) { return getService().getArtifactPermission(user, (Artifact) object); } else { diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java index 3b8efde989e..02288a20839 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.access; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -29,8 +29,8 @@ public abstract class AccessObject { public static AccessObject getAccessObject(Object object) throws OseeCoreException { if (object instanceof Artifact) { return ArtifactAccessObject.getArtifactAccessObject((Artifact) object); - } else if (object instanceof IOseeBranch) { - return BranchAccessObject.getBranchAccessObject((IOseeBranch) object); + } else if (object instanceof BranchId) { + return BranchAccessObject.getBranchAccessObject((BranchId) object); } else { return null; } @@ -39,8 +39,8 @@ public abstract class AccessObject { public static AccessObject getAccessObjectFromCache(Object object) throws OseeCoreException { if (object instanceof Artifact) { return ArtifactAccessObject.getArtifactAccessObjectFromCache((Artifact) object); - } else if (object instanceof IOseeBranch) { - return BranchAccessObject.getBranchAccessObjectFromCache((IOseeBranch) object); + } else if (object instanceof BranchId) { + return BranchAccessObject.getBranchAccessObjectFromCache((BranchId) object); } else { return null; } 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 60abf959a5a..b7a885f29c2 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 @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.access.AccessControlData; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -400,7 +400,7 @@ public class AccessControlService implements IAccessControlService { return service; } - public PermissionEnum getBranchPermission(IBasicArtifact<?> subject, IOseeBranch branch) throws OseeCoreException { + public PermissionEnum getBranchPermission(IBasicArtifact<?> subject, BranchId branch) throws OseeCoreException { PermissionEnum userPermission = null; AccessObject accessObject = BranchAccessObject.getBranchAccessObjectFromCache(branch); @@ -767,7 +767,7 @@ public class AccessControlService implements IAccessControlService { } @Override - public void removePermissions(IOseeBranch branch) throws OseeCoreException { + public void removePermissions(BranchId branch) throws OseeCoreException { Branch theBranch = getBranchCache().get(branch); getJdbcClient().runPreparedUpdate(DELETE_ARTIFACT_ACL_FROM_BRANCH, theBranch.getUuid()); getJdbcClient().runPreparedUpdate(DELETE_BRANCH_ACL_FROM_BRANCH, theBranch.getUuid()); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java index f6c26ef3773..272a4cf0170 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.logging.Level; import org.eclipse.osee.framework.access.IAccessProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.model.access.AccessDataQuery; @@ -180,7 +180,7 @@ public final class AccessControlServiceProxy implements IAccessControlService { } @Override - public void removePermissions(IOseeBranch branch) throws OseeCoreException { + public void removePermissions(BranchId branch) throws OseeCoreException { checkInitialized(); getProxiedObject().removePermissions(branch); } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java index 56d1d3bc668..fce04ef3bf7 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.access.internal; import java.util.Collection; import java.util.logging.Level; import org.eclipse.osee.framework.access.IAccessProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.IBasicArtifact; @@ -93,10 +93,10 @@ public final class ObjectAccessProviderProxy implements IAccessProvider { new AccessDetail<IBasicArtifact<Artifact>>(artifact, userPermission, Scope.createLegacyScope(), reason)); } - private void setBranchAccessData(IBasicArtifact<?> userArtifact, IOseeBranch branch, AccessData accessData) throws OseeCoreException { + private void setBranchAccessData(IBasicArtifact<?> userArtifact, BranchId branch, AccessData accessData) throws OseeCoreException { String reason = "Legacy Branch Permission"; PermissionEnum userPermission = getAccessService().getBranchPermission(userArtifact, branch); - accessData.add(branch, new AccessDetail<IOseeBranch>(branch, userPermission, Scope.createLegacyScope(), reason)); + accessData.add(branch, new AccessDetail<BranchId>(branch, userPermission, Scope.createLegacyScope(), reason)); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/ArtifactAccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/ArtifactAccessObject.java index 96e284dd143..bc9a1386a7d 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/ArtifactAccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/ArtifactAccessObject.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.access.internal.data; import org.eclipse.osee.framework.access.AccessObject; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.DoubleKeyHashMap; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -64,11 +64,11 @@ public class ArtifactAccessObject extends AccessObject { public static ArtifactAccessObject getArtifactAccessObject(Artifact artifact) throws OseeCoreException { Integer artId = artifact.getArtId(); - IOseeBranch branchUuid = artifact.getBranch(); + BranchId branchUuid = artifact.getBranch(); return getArtifactAccessObject(artId, branchUuid); } - public static ArtifactAccessObject getArtifactAccessObject(Integer artId, IOseeBranch branch) throws OseeCoreException { + public static ArtifactAccessObject getArtifactAccessObject(Integer artId, BranchId branch) throws OseeCoreException { long branchUuid = branch.getUuid(); ArtifactAccessObject accessObject = cache.get(artId, branchUuid); @@ -83,7 +83,7 @@ public class ArtifactAccessObject extends AccessObject { return getArtifactAccessObjectFromCache(art.getArtId(), art.getBranch()); } - public static AccessObject getArtifactAccessObjectFromCache(Integer artId2, IOseeBranch branch) throws OseeCoreException { + public static AccessObject getArtifactAccessObjectFromCache(Integer artId2, BranchId branch) throws OseeCoreException { long branchUuid2 = branch.getUuid(); return cache.get(artId2, branchUuid2); } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java index d4002f90b0a..2e0629c5db2 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java @@ -14,7 +14,6 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.osee.framework.access.AccessObject; import org.eclipse.osee.framework.core.data.BranchId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.utility.ConnectionHandler; @@ -67,7 +66,7 @@ public class BranchAccessObject extends AccessObject { return branchAccessObject; } - public static BranchAccessObject getBranchAccessObjectFromCache(IOseeBranch branch) throws OseeCoreException { + public static BranchAccessObject getBranchAccessObjectFromCache(BranchId branch) throws OseeCoreException { return cache.get(branch.getUuid()); } 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 aaed33586af..2e60301cfe0 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 @@ -20,7 +20,7 @@ import org.eclipse.nebula.widgets.ganttchart.GanttChart; import org.eclipse.nebula.widgets.ganttchart.GanttComposite; import org.eclipse.nebula.widgets.ganttchart.GanttEvent; import org.eclipse.osee.branch.gantt.Activator; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -99,7 +99,7 @@ public class BranchVisualizationView extends ViewPart { private void storeSelectedBranch() { if (xBranchSelectWidget != null && !xBranchSelectWidget.getControl().isDisposed()) { - IOseeBranch selectedBranch = xBranchSelectWidget.getData(); + BranchId selectedBranch = xBranchSelectWidget.getData(); if (selectedBranch != null) { try { UserManager.getUser().setSetting(BRANCH_KEY, selectedBranch.getUuid()); @@ -146,7 +146,7 @@ public class BranchVisualizationView extends ViewPart { } } - private IOseeBranch getSelectedBranch() { + private BranchId getSelectedBranch() { return xBranchSelectWidget.getData(); } @@ -173,7 +173,7 @@ public class BranchVisualizationView extends ViewPart { // ganttChart.getSettings().getInitialZoomLevel() try { - IOseeBranch oseeBranch = getSelectedBranch(); + BranchId oseeBranch = getSelectedBranch(); Branch selectedBranch = null; if (oseeBranch != null) { selectedBranch = BranchManager.getBranch(oseeBranch); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java index a636e93b8e9..c7d21efd2df 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreterTest.java @@ -12,6 +12,7 @@ package org.eclipse.osee.framework.core.dsl.integration.internal; import java.util.Collection; import java.util.Iterator; +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; @@ -260,7 +261,12 @@ public class ArtifactMatchInterpreterTest { return new ArtifactProxy() { @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { + return getBranchToken(); + } + + @Override + public IOseeBranch getBranchToken() { return TokenFactory.createBranch(branchGuid, branchName); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java index 75a5cdb4f86..cece3e6dc47 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifact.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.type.NamedIdentity; /** * @author Jeff C. Phillips */ -public class MockArtifact extends NamedIdentity<String>implements IBasicArtifact<Object> { +public class MockArtifact extends NamedIdentity<String> implements IBasicArtifact<Object> { private final Branch branch; private final ArtifactType artifactType; diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifactProxy.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifactProxy.java index 1670f3528b0..d545b1d5266 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifactProxy.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockArtifactProxy.java @@ -12,13 +12,14 @@ package org.eclipse.osee.framework.core.dsl.integration.mocks; import java.util.Collection; import java.util.Collections; +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.dsl.integration.ArtifactDataProvider.ArtifactProxy; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.core.model.type.RelationType; -import org.eclipse.osee.framework.jdk.core.type.Identity; /** * @author Roberto E. Escobar @@ -79,18 +80,18 @@ public class MockArtifactProxy implements ArtifactProxy { } @Override - public IOseeBranch getBranch() { - return artifactObject.getBranch(); + public BranchId getBranch() { + return getBranchToken(); } @Override - public String getName() { - return artifactObject.getName(); + public IOseeBranch getBranchToken() { + return TokenFactory.createBranch(getBranchId(), getClass().getName()); } @Override - public boolean matches(Identity... identities) { - return artifactObject.matches(identities); + public String getName() { + return artifactObject.getName(); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParserTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParserTest.java index 9b49929d1ac..31bab99aafa 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParserTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParserTest.java @@ -46,24 +46,24 @@ public class OseeDslSegmentParserTest { @Test(expected = OseeArgumentException.class) public void testGetStartTagNullCheck1() throws OseeCoreException { - parser.getStartTag(null); + parser.getStartTag(null, null); } @Test(expected = OseeArgumentException.class) public void testGetStartTagNullCheck2() throws OseeCoreException { IBasicArtifact<?> artifact = new DefaultBasicArtifact(45, "abc", "name"); - parser.getStartTag(artifact); + parser.getStartTag(artifact, null); } @Test(expected = OseeArgumentException.class) public void testGetEndTagNullCheck1() throws OseeCoreException { - parser.getEndTag(null); + parser.getEndTag(null, null); } @Test(expected = OseeArgumentException.class) public void testGetEndTagNullCheck2() throws OseeCoreException { IBasicArtifact<?> artifact = new DefaultBasicArtifact(45, "abc", "name"); - parser.getEndTag(artifact); + parser.getEndTag(artifact, null); } @Test @@ -76,12 +76,12 @@ public class OseeDslSegmentParserTest { IBasicArtifact<?> artifact = new MockArtifact(artifactGuid, artifactName, branch, CoreArtifactTypes.Artifact, 45); - String actual = parser.getStartTag(artifact); + String actual = parser.getStartTag(artifact, branch); String expected = String.format("//@start_artifact branch/%d/artifact/%s/ (%s:%s)", branchUuid, artifactGuid, branchName, artifactName); Assert.assertEquals(expected, actual); - actual = parser.getEndTag(artifact); + actual = parser.getEndTag(artifact, branch); expected = String.format("//@end_artifact branch/%d/artifact/%s/ (%s:%s)", branchUuid, artifactGuid, branchName, artifactName); Assert.assertEquals(expected, actual); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java index dda52d8b861..736e6152fc8 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java @@ -13,6 +13,7 @@ package org.eclipse.osee.framework.core.dsl.integration; import java.util.Collection; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IAttributeType; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.core.model.type.RelationType; @@ -41,6 +42,8 @@ public interface ArtifactDataProvider { Collection<ArtifactProxy> getHierarchy(); IBasicArtifact<?> getObject(); + + IOseeBranch getBranchToken(); } boolean isApplicable(Object object); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java index 8054d30a1de..8f06818730b 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java @@ -114,7 +114,7 @@ public class ArtifactMatchInterpreter { input = proxy.getName(); break; case BRANCH_NAME: - input = proxy.getBranch().getName(); + input = proxy.getBranchToken().getName(); break; default: throw new OseeArgumentException("Invalid field [%s]", field); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java index ceb307a1b4b..02ee18dbd77 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java @@ -27,17 +27,16 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public class OseeDslSegmentParser { - public String getStartTag(IBasicArtifact<?> artifact) throws OseeCoreException { - return getSegmentTag("start", artifact); + public String getStartTag(IBasicArtifact<?> artifact, IOseeBranch branch) throws OseeCoreException { + return getSegmentTag("start", artifact, branch); } - public String getEndTag(IBasicArtifact<?> artifact) throws OseeCoreException { - return getSegmentTag("end", artifact); + public String getEndTag(IBasicArtifact<?> artifact, IOseeBranch branch) throws OseeCoreException { + return getSegmentTag("end", artifact, branch); } - private static String getSegmentTag(String tagPrefix, IBasicArtifact<?> artifact) throws OseeCoreException { + private static String getSegmentTag(String tagPrefix, IBasicArtifact<?> artifact, IOseeBranch branch) throws OseeCoreException { Conditions.checkNotNull(artifact, "artifact"); - IOseeBranch branch = artifact.getBranch(); Conditions.checkNotNull(branch, "branch"); return String.format("//@%s_artifact branch/%s/artifact/%s/ (%s:%s)", tagPrefix, branch.getUuid(), artifact.getGuid(), branch.getName(), artifact.getName()); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java index efad5ed922b..af888edcbf4 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/AbstractDslRenderer.java @@ -21,7 +21,7 @@ import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.dsl.ui.integration.internal.DslUiIntegrationConstants; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -88,7 +88,7 @@ public abstract class AbstractDslRenderer extends FileSystemRenderer { * Provides the update operation for the renderer. */ @Override - protected abstract IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType); + protected abstract IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType); /** * Provides the minimum match ranking for this renderer. diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java index b0b999d5267..4e2f2550a8e 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java @@ -14,10 +14,10 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.logging.Level; +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.dsl.integration.ArtifactDataProvider; -import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.core.model.type.RelationType; @@ -46,8 +46,8 @@ public final class ArtifactDataProviderImpl implements ArtifactDataProvider { if (object instanceof Artifact) { final Artifact artifact = (Artifact) object; proxy = new XArtifactProxy(artifact); - } else if (object instanceof IOseeBranch) { - IOseeBranch branch = (IOseeBranch) object; + } else if (object instanceof BranchId) { + BranchId branch = (BranchId) object; final Artifact artifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch); proxy = new XArtifactProxy(artifact); } @@ -111,11 +111,16 @@ public final class ArtifactDataProviderImpl implements ArtifactDataProvider { } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return self.getBranch(); } @Override + public IOseeBranch getBranchToken() { + return self.getBranchToken(); + } + + @Override public String getName() { return self.getName(); } 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 580c71097e0..5374a058590 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 @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.dsl.integration.util.OseeDslSegmentParser; import org.eclipse.osee.framework.core.dsl.integration.util.OseeDslSegmentParser.OseeDslSegment; @@ -54,7 +54,7 @@ public class OseeDslArtifactUpdateOperation extends AbstractOperation { double workPercentage = 0.80 * 1.0 / segments.size(); int workAmount = calculateWork(workPercentage); - Map<IOseeBranch, SkynetTransaction> transactionMap = new HashMap<>(); + Map<BranchId, SkynetTransaction> transactionMap = new HashMap<>(); for (OseeDslSegment segment : segments) { int startAt = segment.start(); int endAt = segment.end(); @@ -75,8 +75,8 @@ public class OseeDslArtifactUpdateOperation extends AbstractOperation { return Lib.fileToString(file); } - protected void addChanges(Map<IOseeBranch, SkynetTransaction> transactionMap, long branchId, String artifactGuid, String data) throws OseeCoreException { - IOseeBranch branch = TokenFactory.createBranch(branchId); + protected void addChanges(Map<BranchId, SkynetTransaction> transactionMap, long branchId, String artifactGuid, String data) throws OseeCoreException { + BranchId branch = TokenFactory.createBranch(branchId); SkynetTransaction transaction = transactionMap.get(branch); if (transaction == null) { transaction = TransactionManager.createTransaction(branch, "OseeDslArtifactUpdate"); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java index d85388b0685..d440c5355a1 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslRenderer.java @@ -15,8 +15,8 @@ import java.io.File; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.util.List; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.dsl.integration.util.OseeDslSegmentParser; import org.eclipse.osee.framework.core.dsl.ui.integration.AbstractDslRenderer; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; @@ -61,11 +61,11 @@ public final class OseeDslRenderer extends AbstractDslRenderer { data = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.UriGeneralStringData, ""); } else { StringBuilder builder = new StringBuilder(); - builder.append(parser.getStartTag(artifact)); + builder.append(parser.getStartTag(artifact, artifact.getBranchToken())); builder.append("\n"); builder.append(artifact.getSoleAttributeValueAsString(CoreAttributeTypes.GeneralStringData, "")); builder.append("\n"); - builder.append(parser.getEndTag(artifact)); + builder.append(parser.getEndTag(artifact, artifact.getBranchToken())); data = builder.toString(); } @@ -77,7 +77,7 @@ public final class OseeDslRenderer extends AbstractDslRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { IOperation op; Artifact artifact = artifacts.iterator().next(); if (artifact.isOfType(CoreArtifactTypes.OseeTypeDefinition)) { diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java index 7b6a2a1dc92..af0fd6b0398 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.core.model.access; +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.IOseeBranch; @@ -28,14 +29,14 @@ import org.junit.Test; /** * Test Case for {@link AccessDataQuery} - * + * * @author Jeff C. Phillips */ public class AccessDataQueryTest { @Test public void testBranch() throws OseeCoreException { - IOseeBranch branchToCheck = CoreBranches.SYSTEM_ROOT; + BranchId branchToCheck = CoreBranches.SYSTEM_ROOT; TestObject testObject = getTestData(); AccessData data = testObject.getAccessData(); @@ -130,11 +131,11 @@ public class AccessDataQueryTest { @Test public void testBranchMatchesAll() throws OseeCoreException { AccessData data = new AccessData(); - IOseeBranch common = CoreBranches.COMMON; - IOseeBranch branch = CoreBranches.SYSTEM_ROOT; + BranchId common = CoreBranches.COMMON; + BranchId branch = CoreBranches.SYSTEM_ROOT; - data.add(common, new AccessDetail<IOseeBranch>(common, PermissionEnum.READ, new Scope())); - data.add(branch, new AccessDetail<IOseeBranch>(branch, PermissionEnum.WRITE, new Scope())); + data.add(common, new AccessDetail<BranchId>(common, PermissionEnum.READ, new Scope())); + data.add(branch, new AccessDetail<BranchId>(branch, PermissionEnum.WRITE, new Scope())); AccessDataQuery query = new AccessDataQuery(data); @@ -185,7 +186,7 @@ public class AccessDataQueryTest { IBasicArtifact<?> artifactToCheck = new MockArtifact(GUID.create(), "Hello", branchToCheck, artifactType, 12); AccessData data = new AccessData(); - data.add(branchToCheck, new AccessDetail<IOseeBranch>(branchToCheck, PermissionEnum.WRITE, new Scope())); + data.add(branchToCheck, new AccessDetail<BranchId>(branchToCheck, PermissionEnum.WRITE, new Scope())); data.add(artifactToCheck, new AccessDetail<IBasicArtifact<?>>(artifactToCheck, PermissionEnum.WRITE, new Scope())); data.add(artifactToCheck, new AccessDetail<IArtifactType>(artifactType, PermissionEnum.WRITE, new Scope())); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java index 47f86fe420b..cffb9f9d799 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java @@ -16,7 +16,7 @@ import java.util.Collections; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -43,8 +43,8 @@ import org.junit.Test; */ public class AccessDataTest { - private IOseeBranch branchToCheck1; - private IOseeBranch branchToCheck2; + private BranchId branchToCheck1; + private BranchId branchToCheck2; private IArtifactType artifactType; private IAttributeType attributeType; private IAttributeType wordAttributeType; diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java index 9882c1d076d..9e4722d1a4e 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.internal.fields.ArtifactTypeAttributesField; import org.eclipse.osee.framework.core.model.mocks.MockDataFactory; @@ -53,7 +53,7 @@ public class ArtifactTypeAttributesFieldTest { @Test public void testGetSet() throws OseeCoreException { - Map<IOseeBranch, Collection<AttributeType>> input = new LinkedHashMap<>(); + Map<BranchId, Collection<AttributeType>> input = new LinkedHashMap<>(); ArtifactTypeAttributesField field = new ArtifactTypeAttributesField(input); Assert.assertEquals(false, field.isDirty()); @@ -73,33 +73,33 @@ public class ArtifactTypeAttributesFieldTest { field.clearDirty(); // Add to entry - Map<IOseeBranch, Collection<AttributeType>> values = map(br1, attr2, attr4); + Map<BranchId, Collection<AttributeType>> values = map(br1, attr2, attr4); map(values, br2, attr3, attr1); assertSetGet(field, values, values, true); field.clearDirty(); // Add to emptylist - assertSetGet(field, Collections.<IOseeBranch, Collection<AttributeType>> emptyMap(), - Collections.<IOseeBranch, Collection<AttributeType>> emptyMap(), true); + assertSetGet(field, Collections.<BranchId, Collection<AttributeType>> emptyMap(), + Collections.<BranchId, Collection<AttributeType>> emptyMap(), true); field.clearDirty(); } - private static Map<IOseeBranch, Collection<AttributeType>> map(IOseeBranch branch, AttributeType... attrs) { - Map<IOseeBranch, Collection<AttributeType>> map = new LinkedHashMap<>(); + private static Map<BranchId, Collection<AttributeType>> map(BranchId branch, AttributeType... attrs) { + Map<BranchId, Collection<AttributeType>> map = new LinkedHashMap<>(); map.put(branch, Arrays.asList(attrs)); return map; } - private static Map<IOseeBranch, Collection<AttributeType>> map(Map<IOseeBranch, Collection<AttributeType>> map, IOseeBranch branch, AttributeType... attrs) { + private static Map<BranchId, Collection<AttributeType>> map(Map<BranchId, Collection<AttributeType>> map, BranchId branch, AttributeType... attrs) { map.put(branch, Arrays.asList(attrs)); return map; } - private static void assertSetGet(ArtifactTypeAttributesField field, Map<IOseeBranch, Collection<AttributeType>> setValues, Map<IOseeBranch, Collection<AttributeType>> expected, boolean expectedDirty) throws OseeCoreException { + private static void assertSetGet(ArtifactTypeAttributesField field, Map<BranchId, Collection<AttributeType>> setValues, Map<BranchId, Collection<AttributeType>> expected, boolean expectedDirty) throws OseeCoreException { field.set(setValues); Assert.assertEquals(expectedDirty, field.isDirty()); - Map<IOseeBranch, Collection<AttributeType>> actual = field.get(); + Map<BranchId, Collection<AttributeType>> actual = field.get(); Assert.assertEquals(expected.size(), actual.size()); Assert.assertFalse(Compare.isDifferent(actual, expected)); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java index 3d5c43f140d..383c5293d50 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.type.NamedIdentity; /** * @author Jeff C. Phillips */ -public class MockArtifact extends NamedIdentity<String>implements IBasicArtifact<Object> { +public class MockArtifact extends NamedIdentity<String> implements IBasicArtifact<Object> { private final Branch branch; private final ArtifactType artifactType; diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockOseeTransactionDataAccessor.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockOseeTransactionDataAccessor.java index 3f9ea47d1d9..6cff0cb704f 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockOseeTransactionDataAccessor.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockOseeTransactionDataAccessor.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.model.mocks; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionVersion; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -61,7 +61,7 @@ public class MockOseeTransactionDataAccessor implements ITransactionDataAccessor } @Override - public TransactionRecord loadTransactionRecord(TransactionCache cache, IOseeBranch branch, TransactionVersion transactionType) throws OseeCoreException { + public TransactionRecord loadTransactionRecord(TransactionCache cache, BranchId branch, TransactionVersion transactionType) throws OseeCoreException { return null; } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java index 7da4c644dad..3f591853e74 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java @@ -18,7 +18,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -259,7 +259,7 @@ public class Branch extends AbstractOseeType implements WriteableBranch, IAdapta } @Override - public boolean isAncestorOf(IOseeBranch branch) throws OseeCoreException { + public boolean isAncestorOf(BranchId branch) throws OseeCoreException { return getChildBranches(true).contains(branch); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java index 3eef8f22f73..32c6728222c 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java @@ -11,6 +11,7 @@ package org.eclipse.osee.framework.core.model; import java.util.Collection; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; @@ -47,5 +48,5 @@ public interface BranchReadable extends IOseeBranch { Collection<? extends BranchReadable> getAncestors() throws OseeCoreException; - boolean isAncestorOf(IOseeBranch branch) throws OseeCoreException; + boolean isAncestorOf(BranchId branch) throws OseeCoreException; }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java index 9906b42d8a6..b6f9e3b0ba9 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.model; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -40,11 +40,11 @@ public final class MergeBranch extends Branch { return getFieldValue(BranchField.MERGE_BRANCH_DESTINATION); } - public void setSourceBranch(IOseeBranch branch) throws OseeCoreException { + public void setSourceBranch(BranchId branch) throws OseeCoreException { setField(BranchField.MERGE_BRANCH_SOURCE, branch); } - public void setDestinationBranch(IOseeBranch branch) throws OseeCoreException { + public void setDestinationBranch(BranchId branch) throws OseeCoreException { setField(BranchField.MERGE_BRANCH_DESTINATION, branch); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java index 9f92d04fecb..3c961fe3cc0 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java @@ -12,6 +12,7 @@ package org.eclipse.osee.framework.core.model; import java.util.Date; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.core.model.cache.BranchCache; @@ -23,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; /** * @author Jeff C. Phillips */ -public class TransactionRecord extends BaseIdentity<Integer>implements ITransaction, IAdaptable { +public class TransactionRecord extends BaseIdentity<Integer> implements ITransaction, IAdaptable { private static final int NON_EXISTING_BRANCH = -1; private final TransactionDetailsType txType; @@ -59,6 +60,10 @@ public class TransactionRecord extends BaseIdentity<Integer>implements ITransact return branchUuid; } + public final IOseeBranch getBranchToken() { + return getFullBranch(); + } + public Branch getFullBranch() { Conditions.checkNotNull(branchCache, "BranchCache was not set after construction"); return branchCache.getByUuid(getBranchId()); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java index 017a4b8e890..0872703d16b 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.model; import java.util.Date; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.core.model.cache.BranchCache; import org.eclipse.osee.framework.core.model.cache.IOseeTypeFactory; @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; */ public class TransactionRecordFactory implements IOseeTypeFactory { - public TransactionRecord create(int transactionNumber, IOseeBranch branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException { + public TransactionRecord create(int transactionNumber, BranchId branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException { return this.create(transactionNumber, branch.getUuid(), comment, timestamp, authorArtId, commitArtId, txType, null); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java index 4455508075d..68b46b769be 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java @@ -5,7 +5,7 @@ */ package org.eclipse.osee.framework.core.model; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; public class TypeUtil { @@ -13,8 +13,8 @@ public class TypeUtil { public static long getId(AbstractOseeType type) { if (type instanceof AbstractOseeIdType) { return ((AbstractOseeIdType) type).getId(); - } else if (type instanceof IOseeBranch) { - return ((IOseeBranch) type).getId(); + } else if (type instanceof BranchId) { + return ((BranchId) type).getId(); } throw new OseeArgumentException("Unsupported type"); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java index 04c8ae484b4..b8e0d83471e 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.core.model.access; import java.util.Collection; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; @@ -36,12 +36,12 @@ public class AccessDataQuery { return accessData.toString(); } - public void branchMatches(PermissionEnum permissionToMatch, IOseeBranch branchToMatch, PermissionStatus permissionStatus) throws OseeCoreException { + public void branchMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, PermissionStatus permissionStatus) throws OseeCoreException { Collection<AccessDetail<?>> branchAccessDetails = accessData.getAccess(branchToMatch); setTypePermissionStatus(permissionStatus, permissionToMatch, branchAccessDetails, branchToMatch); } - public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, IOseeBranch branchToMatch, IArtifactType artifactType, PermissionStatus permissionStatus) throws OseeCoreException { + public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, IArtifactType artifactType, PermissionStatus permissionStatus) throws OseeCoreException { branchMatches(permissionToMatch, branchToMatch, permissionStatus); if (permissionStatus.matched()) { Collection<AccessDetail<?>> branchAccessDetails = accessData.getAccess(branchToMatch); @@ -51,7 +51,7 @@ public class AccessDataQuery { public void artifactTypeMatches(PermissionEnum permissionToMatch, IBasicArtifact<?> artifact, PermissionStatus permissionStatus) throws OseeCoreException { IArtifactType typeToMatch = artifact.getArtifactType(); - IOseeBranch branchToMatch = artifact.getBranch(); + BranchId branchToMatch = artifact.getBranch(); branchArtifactTypeMatches(permissionToMatch, branchToMatch, typeToMatch, permissionStatus); if (permissionStatus.matched()) { Collection<AccessDetail<?>> artifactAccessDetails = accessData.getAccess(artifact); @@ -60,7 +60,7 @@ public class AccessDataQuery { } public void artifactMatches(PermissionEnum permissionToMatch, final IBasicArtifact<?> artifact, PermissionStatus permissionStatus) throws OseeCoreException { - IOseeBranch branchToMatch = artifact.getBranch(); + BranchId branchToMatch = artifact.getBranch(); branchMatches(permissionToMatch, branchToMatch, permissionStatus); if (permissionStatus.matched()) { Collection<AccessDetail<?>> mainList = accessData.getAccess(artifact); @@ -124,7 +124,7 @@ public class AccessDataQuery { } public void relationTypeMatches(PermissionEnum permissionToMatch, IBasicArtifact<?> artifact, IRelationTypeSide relationTypeSide, PermissionStatus permissionStatus) throws OseeCoreException { - IOseeBranch branchToMatch = artifact.getBranch(); + BranchId branchToMatch = artifact.getBranch(); branchMatches(permissionToMatch, branchToMatch, permissionStatus); if (permissionStatus.matched()) { Collection<AccessDetail<?>> relationAccessDetails = accessData.getAccess(artifact); @@ -139,8 +139,8 @@ public class AccessDataQuery { for (Object objectKey : accessData.keySet()) { if (objectKey instanceof IBasicArtifact<?>) { artifactMatches(permissionToMatch, (IBasicArtifact<?>) objectKey, permissionStatus); - } else if (objectKey instanceof IOseeBranch) { - branchMatches(permissionToMatch, (IOseeBranch) objectKey, permissionStatus); + } else if (objectKey instanceof BranchId) { + branchMatches(permissionToMatch, (BranchId) objectKey, permissionStatus); } if (!permissionStatus.matched()) { break; diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java index 531d7ce591d..86f9e538b16 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.core.model.access.exp; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; @@ -46,6 +46,6 @@ public class ArtifactAccessFilter implements IAccessFilter { @Override public boolean acceptToObject(Object object) { //Return false if the object to be checked is a branch. - return !(object instanceof IOseeBranch); + return !(object instanceof BranchId); } } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java index 393a0bbb897..7a101fa24d9 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.model.access.exp; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; @@ -35,7 +35,7 @@ public class AttributeTypeAccessFilter implements IAccessFilter { @Override public boolean acceptToObject(Object object) { //Return false if the object to be checked is a branch or artifact. - return !(object instanceof IOseeBranch) && !(object instanceof IBasicArtifact<?>); + return !(object instanceof BranchId) && !(object instanceof IBasicArtifact<?>); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java index 30c64c62bd8..fc179349a9b 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java @@ -14,7 +14,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.OseeCacheEnum; import org.eclipse.osee.framework.core.enums.TransactionVersion; import org.eclipse.osee.framework.core.model.Branch; @@ -36,7 +36,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> { this.txCache = txCache; } - public MergeBranch findMergeBranch(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException { + public MergeBranch findMergeBranch(BranchId sourceBranch, BranchId destinationBranch) throws OseeCoreException { Conditions.checkNotNull(sourceBranch, "source branch"); Conditions.checkNotNull(destinationBranch, "destination branch"); MergeBranch toReturn = null; @@ -53,7 +53,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> { return toReturn; } - public MergeBranch findFirstMergeBranch(Branch sourceBranch) throws OseeCoreException { + public MergeBranch findFirstMergeBranch(BranchId sourceBranch) throws OseeCoreException { Conditions.checkNotNull(sourceBranch, "source branch"); MergeBranch toReturn = null; for (Branch branch : getAll()) { @@ -68,7 +68,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> { return toReturn; } - public List<MergeBranch> findAllMergeBranches(Branch sourceBranch) throws OseeCoreException { + public List<MergeBranch> findAllMergeBranches(BranchId sourceBranch) throws OseeCoreException { Conditions.checkNotNull(sourceBranch, "source branch"); List<MergeBranch> toReturn = new ArrayList<>(); for (Branch branch : getAll()) { @@ -82,7 +82,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> { return toReturn; } - public synchronized <T extends IOseeBranch> List<T> getBranches(BranchFilter branchFilter) { + public synchronized <T extends BranchId> List<T> getBranches(BranchFilter branchFilter) { Collection<Branch> allBranches = getRawValues(); List<T> branches = new LinkedList<>(); for (Branch branch : allBranches) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java index 2145d9107fe..6de12ef1de2 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.model.cache; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionVersion; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -39,7 +39,7 @@ public interface ITransactionDataAccessor { * @param transactionType transaction type to load, can be {@link TransactionVersion#HEAD} or * {@link TransactionVersion#BASE} */ - public TransactionRecord loadTransactionRecord(TransactionCache cache, IOseeBranch branch, TransactionVersion transactionType) throws OseeCoreException; + public TransactionRecord loadTransactionRecord(TransactionCache cache, BranchId branch, TransactionVersion transactionType) throws OseeCoreException; public void load(TransactionCache transactionCache) throws OseeCoreException; diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java index a28d1b6b1de..82029cdb135 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java @@ -15,7 +15,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.AbstractOseeField; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -25,21 +25,21 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; /** * @author Roberto E. Escobar */ -public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOseeBranch, Collection<AttributeType>>> { +public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<BranchId, Collection<AttributeType>>> { - private final Map<IOseeBranch, Collection<AttributeType>> validityMap; + private final Map<BranchId, Collection<AttributeType>> validityMap; - public ArtifactTypeAttributesField(Map<IOseeBranch, Collection<AttributeType>> validityMap) { + public ArtifactTypeAttributesField(Map<BranchId, Collection<AttributeType>> validityMap) { super(); this.validityMap = validityMap; } @Override - public Map<IOseeBranch, Collection<AttributeType>> get() { - return new HashMap<IOseeBranch, Collection<AttributeType>>(validityMap); + public Map<BranchId, Collection<AttributeType>> get() { + return new HashMap<BranchId, Collection<AttributeType>>(validityMap); } - public void put(IOseeBranch branch, Collection<AttributeType> attributes) { + public void put(BranchId branch, Collection<AttributeType> attributes) { Collection<AttributeType> current = validityMap.get(branch); validityMap.put(branch, attributes); if (Compare.isDifferent(current, attributes)) { @@ -48,12 +48,12 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOs } @Override - public void set(Map<IOseeBranch, Collection<AttributeType>> attributeTypeMap) throws OseeCoreException { + public void set(Map<BranchId, Collection<AttributeType>> attributeTypeMap) throws OseeCoreException { Conditions.checkNotNull(attributeTypeMap, "attribute type map input"); boolean isDifferent = Compare.isDifferent(get(), attributeTypeMap); if (isDifferent) { validityMap.clear(); - for (Entry<IOseeBranch, Collection<AttributeType>> entry : attributeTypeMap.entrySet()) { + for (Entry<BranchId, Collection<AttributeType>> entry : attributeTypeMap.entrySet()) { // Ensure we are using a hash set - don't use putAll set(entry.getKey(), entry.getValue()); } @@ -61,7 +61,7 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOs isDirty |= isDifferent; } - private void set(IOseeBranch branch, Collection<AttributeType> attributeTypes) throws OseeCoreException { + private void set(BranchId branch, Collection<AttributeType> attributeTypes) throws OseeCoreException { Conditions.checkNotNull(branch, "branch"); Conditions.checkNotNull(attributeTypes, "attribute types list"); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java index 638505e1424..88c426b4530 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.AbstractOseeIdType; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.IOseeField; @@ -38,8 +38,8 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType { private final Set<ArtifactType> superTypes = new HashSet<>(); private final Set<ArtifactType> childTypes = new HashSet<>(); - private final Map<IOseeBranch, Collection<AttributeType>> attributes = - new HashMap<IOseeBranch, Collection<AttributeType>>(); + private final Map<BranchId, Collection<AttributeType>> attributes = + new HashMap<BranchId, Collection<AttributeType>>(); public ArtifactType(Long guid, String name, boolean isAbstract) { super(guid, name); @@ -99,12 +99,12 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType { } } - public void setAttributeTypes(Collection<AttributeType> attributeTypes, IOseeBranch branch) throws OseeCoreException { + public void setAttributeTypes(Collection<AttributeType> attributeTypes, BranchId branch) throws OseeCoreException { IOseeField<?> field = getField(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY); ((ArtifactTypeAttributesField) field).put(branch, attributeTypes); } - public void setAllAttributeTypes(Map<IOseeBranch, Collection<AttributeType>> attributeTypes) throws OseeCoreException { + public void setAllAttributeTypes(Map<BranchId, Collection<AttributeType>> attributeTypes) throws OseeCoreException { IOseeField<?> field = getField(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY); ((ArtifactTypeAttributesField) field).set(attributeTypes); } @@ -114,7 +114,7 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType { return attributes.contains(attributeType); } - public Map<IOseeBranch, Collection<AttributeType>> getLocalAttributeTypes() throws OseeCoreException { + public Map<BranchId, Collection<AttributeType>> getLocalAttributeTypes() throws OseeCoreException { return getFieldValue(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY); } @@ -126,7 +126,7 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType { } private static void getAttributeTypes(Set<IAttributeType> attributeTypes, ArtifactType artifactType, Branch branch) throws OseeCoreException { - Map<IOseeBranch, Collection<AttributeType>> validityMap = artifactType.getLocalAttributeTypes(); + Map<BranchId, Collection<AttributeType>> validityMap = artifactType.getLocalAttributeTypes(); Branch branchCursor = branch; do { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java index 972df437dc9..75ce035f941 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.core.services; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; import org.eclipse.osee.framework.core.model.access.AccessDataQuery; @@ -21,7 +21,7 @@ public interface IAccessControlService { boolean hasPermission(Object object, PermissionEnum permission) throws OseeCoreException; - void removePermissions(IOseeBranch branch) throws OseeCoreException; + void removePermissions(BranchId branch) throws OseeCoreException; AccessDataQuery getAccessData(IBasicArtifact<?> userArtifact, Collection<?> itemsToCheck) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HasBranch.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HasBranch.java index b2dda8d5593..2f2ea058da7 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HasBranch.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HasBranch.java @@ -15,12 +15,12 @@ package org.eclipse.osee.framework.core.data; */ public interface HasBranch { - default IOseeBranch getBranch() { - return TokenFactory.createBranch(getBranchId(), null); + default BranchId getBranch() { + return TokenFactory.createBranch(getBranchId()); } default Long getBranchId() { - return getBranch().getUuid(); + return getBranch().getId(); } default boolean isOnBranch(Long branchId) { @@ -32,6 +32,6 @@ public interface HasBranch { } default boolean isOnBranch(BranchId branch) { - return branch != null && getBranchId().equals(branch.getId()); + return getBranch().equals(branch); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IOseeBranch.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IOseeBranch.java index 90c41eaf701..f49f878cff8 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IOseeBranch.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IOseeBranch.java @@ -17,8 +17,6 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; * @author Ryan D. Brooks */ public interface IOseeBranch extends BranchId, Named { - - static final int SHORT_NAME_LIMIT = 35; default String getShortName() { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java index 551564a2eea..4285931699c 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java @@ -82,7 +82,7 @@ public final class TokenFactory { return new BranchToken(branchId, name); } - public static IOseeBranch createBranch(Long branchId) { + public static BranchId createBranch(Long branchId) { return new BranchToken(branchId, null); } diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java index ccf36f6844e..9a7c06c43e5 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java @@ -25,7 +25,7 @@ import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.Platform; import org.eclipse.osee.framework.core.client.OseeClientProperties; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -55,7 +55,7 @@ public class SkynetDbBranchDataImport implements IDbInitializationTask { public void run() throws OseeCoreException { if (OseeClientProperties.isOseeImportAllowed()) { // Clean up and delete all branches except Common - for (IOseeBranch branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, + for (BranchId branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE)) { if (!branch.equals(CoreBranches.COMMON)) { BranchManager.purgeBranch(branch); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/DataFactory.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/DataFactory.java index 2910d01d612..979a457f332 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/DataFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/DataFactory.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.mocks; import java.util.Random; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.skynet.core.types.IArtifact; @@ -38,11 +38,11 @@ public final class DataFactory { return createArtifact(uniqueId, name, guid, null, fromToken(CoreArtifactTypes.Artifact)); } - private static IArtifact createArtifact(int uniqueId, String name, String guid, IOseeBranch branch, ArtifactType artifactType) { + private static IArtifact createArtifact(int uniqueId, String name, String guid, BranchId branch, ArtifactType artifactType) { return new MockIArtifact(uniqueId, name, guid, branch, artifactType); } - public static IArtifact createArtifact(int uniqueId, String name, String guid, IOseeBranch branch) { + public static IArtifact createArtifact(int uniqueId, String name, String guid, BranchId branch) { return new MockIArtifact(uniqueId, name, guid, branch, fromToken(CoreArtifactTypes.Artifact)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java index 65051456f20..ab73c038489 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockIArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.mocks; import java.util.Collections; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.RelationTypeSide; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.jdk.core.type.NamedIdentity; @@ -27,10 +27,10 @@ public class MockIArtifact extends NamedIdentity<String>implements IArtifact { private boolean wasGetFullArtifactCalled; private final int uniqueId; private final ArtifactType artifactType; - private final IOseeBranch branch; + private final BranchId branch; // MockObject do not change to use tokens - public MockIArtifact(int uniqueId, String name, String guid, IOseeBranch branch, ArtifactType artifactType) { + public MockIArtifact(int uniqueId, String name, String guid, BranchId branch, ArtifactType artifactType) { super(guid, name); this.uniqueId = uniqueId; this.branch = branch; @@ -57,7 +57,7 @@ public class MockIArtifact extends NamedIdentity<String>implements IArtifact { } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockLinker.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockLinker.java index 2e53a0dc185..9a8a310ea44 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockLinker.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/mocks/MockLinker.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.mocks; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.relation.RelationLink.ArtifactLinker; @@ -32,17 +32,17 @@ public class MockLinker implements ArtifactLinker { } @Override - public void updateCachedArtifact(int artId, IOseeBranch branch) { + public void updateCachedArtifact(int artId, BranchId branch) { // } @Override - public Artifact getArtifact(int ArtId, IOseeBranch branch) { + public Artifact getArtifact(int ArtId, BranchId branch) { return null; } @Override - public String getLazyArtifactName(int aArtifactId, IOseeBranch branch) { + public String getLazyArtifactName(int aArtifactId, BranchId branch) { return name; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java index b6f33d87196..6c957b0e804 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Random; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.BranchState; @@ -293,7 +293,7 @@ public class RelationTypeSideSorterTest { private static final class MockArtifactWithRelations extends MockIArtifact { private final Map<IRelationType, List<? extends IArtifact>> relatedItemsMap; - public MockArtifactWithRelations(int uniqueId, String name, String guid, IOseeBranch branch, IArtifactType artifactType) { + public MockArtifactWithRelations(int uniqueId, String name, String guid, BranchId branch, IArtifactType artifactType) { super(uniqueId, name, guid, branch, DataFactory.fromToken(artifactType)); this.relatedItemsMap = new HashMap<>(); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java index 17d2a6e5d46..5a31fa623bf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/AccessPolicy.java @@ -14,7 +14,7 @@ import java.util.Collection; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.IBasicArtifact; @@ -26,13 +26,13 @@ public interface AccessPolicy { boolean isReadOnly(Artifact artifact); - void removePermissions(IOseeBranch branch) throws OseeCoreException; + void removePermissions(BranchId branch) throws OseeCoreException; - PermissionStatus hasBranchPermission(IOseeBranch branch, PermissionEnum permission, Level level) throws OseeCoreException; + PermissionStatus hasBranchPermission(BranchId branch, PermissionEnum permission, Level level) throws OseeCoreException; PermissionStatus hasAttributeTypePermission(Collection<? extends IBasicArtifact<?>> artifacts, IAttributeType attributeType, PermissionEnum permission, Level level) throws OseeCoreException; - PermissionStatus hasArtifactTypePermission(IOseeBranch branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException; + PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException; PermissionStatus hasArtifactPermission(Collection<? extends IBasicArtifact<?>> artifacts, PermissionEnum permission, Level level) throws OseeCoreException; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java index 07115865bf9..124e9862745 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java @@ -14,7 +14,7 @@ import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON; import java.util.HashMap; import java.util.Map; import org.eclipse.osee.framework.core.data.IArtifactToken; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -119,7 +119,7 @@ public class OseeGroup { return groupArtifact; } - private Artifact getOrCreateUserGroupsFolder(IOseeBranch branch) throws OseeCoreException { + private Artifact getOrCreateUserGroupsFolder(BranchId branch) throws OseeCoreException { String cacheKey = CoreArtifactTypes.Folder.getName() + "." + CoreArtifactTokens.UserGroups.getName(); Artifact usersGroupFolder = ArtifactCache.getByTextId(cacheKey, branch); if (usersGroupFolder == null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java index 84e40471625..21ef6930564 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core; import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -37,7 +37,7 @@ public final class OseeSystemArtifacts { COMMON); } - public static Artifact getDefaultHierarchyRootArtifact(IOseeBranch branch) throws OseeCoreException { + public static Artifact getDefaultHierarchyRootArtifact(BranchId branch) throws OseeCoreException { return ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.DefaultHierarchyRoot, branch); } @@ -54,20 +54,20 @@ public final class OseeSystemArtifacts { return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, true); } - public static Artifact getOrCreateArtifact(IArtifactToken artifactToken, IOseeBranch branch) throws OseeCoreException { + public static Artifact getOrCreateArtifact(IArtifactToken artifactToken, BranchId branch) throws OseeCoreException { return getOrCreateCachedArtifact(artifactToken.getArtifactType(), artifactToken.getName(), branch, artifactToken.getGuid(), artifactToken.getUuid(), true); } - public static Artifact getCachedArtifact(IArtifactType artifactType, String artifactName, IOseeBranch branch) throws OseeCoreException { + public static Artifact getCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch) throws OseeCoreException { return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, false); } - private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, IOseeBranch branch, String guid, boolean create) throws OseeCoreException { + private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, boolean create) throws OseeCoreException { return getOrCreateCachedArtifact(artifactType, artifactName, branch, guid, null, create); } - private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, IOseeBranch branch, String guid, Long uuid, boolean create) throws OseeCoreException { + private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, Long uuid, boolean create) throws OseeCoreException { Artifact artifact = ArtifactCache.getByTextId(artifactType.getName() + "." + artifactName, branch); if (artifact == null) { artifact = ArtifactQuery.checkArtifactFromTypeAndName(artifactType, artifactName, branch); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java index 679611e995d..c4b9d61e5c9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java @@ -16,7 +16,7 @@ import java.io.StringWriter; import java.util.Collection; import java.util.HashSet; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -35,7 +35,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; public class User extends Artifact { private PropertyStore userSettings; - public User(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public User(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(guid, branch, artifactType); } @@ -88,10 +88,10 @@ public class User extends Artifact { setSoleAttributeValue(CoreAttributeTypes.Active, active); } - public void toggleFavoriteBranch(IOseeBranch favoriteBranch) throws OseeCoreException { + public void toggleFavoriteBranch(BranchId favoriteBranch) throws OseeCoreException { Conditions.checkNotNull(favoriteBranch, "Branch"); HashSet<Long> branchUuids = new HashSet<>(); - for (IOseeBranch branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, + for (BranchId branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE)) { branchUuids.add(branch.getUuid()); } @@ -124,7 +124,7 @@ public class User extends Artifact { saveSettings(); } - public boolean isFavoriteBranch(IOseeBranch branch) throws OseeCoreException { + public boolean isFavoriteBranch(BranchId branch) throws OseeCoreException { Collection<String> attributes = getAttributesToStringList(CoreAttributeTypes.FavoriteBranch); for (String value : attributes) { try { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java index 9c473652acd..ad8d96f1459 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java @@ -26,6 +26,7 @@ import java.util.logging.Level; import java.util.regex.Pattern; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; @@ -100,7 +101,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, I new HashCollection<IAttributeType, Attribute<?>>(false, LinkedList.class, 12); private final Set<DefaultBasicUuidRelationReorder> relationOrderRecords = new HashSet<DefaultBasicUuidRelationReorder>(); - private final IOseeBranch branch; + private final BranchId branch; private int transactionId = TRANSACTION_SENTINEL; private int artId; private int gammaId; @@ -112,7 +113,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, I private boolean useBackingData; private IArtifactType artifactTypeToken; - public Artifact(String guid, IOseeBranch branch, IArtifactType artifactType) throws OseeCoreException { + public Artifact(String guid, BranchId branch, IArtifactType artifactType) throws OseeCoreException { super(GUID.checkOrCreate(guid), ""); this.artifactTypeToken = artifactType; objectEditState = EditState.NO_CHANGE; @@ -232,10 +233,14 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, I } @Override - public final IOseeBranch getBranch() { + public final BranchId getBranch() { return branch; } + public final IOseeBranch getBranchToken() { + return BranchManager.getBranch(branch); + } + public final Branch getFullBranch() throws OseeCoreException { return BranchManager.getBranch(branch); } @@ -1410,15 +1415,15 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, I /** * Creates a new artifact and duplicates all of its attribute data. */ - public final Artifact duplicate(IOseeBranch branch) throws OseeCoreException { + public final Artifact duplicate(BranchId branch) throws OseeCoreException { return duplicate(branch, new ArrayList<IAttributeType>()); } - public final Artifact duplicate(IOseeBranch branch, Collection<IAttributeType> excludeAttributeTypes) throws OseeCoreException { + public final Artifact duplicate(BranchId branch, Collection<IAttributeType> excludeAttributeTypes) throws OseeCoreException { return duplicate(branch, getArtifactType(), excludeAttributeTypes); } - public final Artifact duplicate(IOseeBranch branch, IArtifactType newType, Collection<IAttributeType> excludeAttributeTypes) throws OseeCoreException { + public final Artifact duplicate(BranchId branch, IArtifactType newType, Collection<IAttributeType> excludeAttributeTypes) throws OseeCoreException { Artifact newArtifact = ArtifactTypeManager.addArtifact(newType, branch); // we do this because attributes were added on creation to meet the // minimum attribute requirements @@ -1450,11 +1455,11 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, I * * @return the newly created artifact or this artifact if the destinationBranch is this artifact's branch */ - public final Artifact reflect(IOseeBranch destinationBranch) throws OseeCoreException { + public final Artifact reflect(BranchId destinationBranch) throws OseeCoreException { return new IntroduceArtifactOperation(destinationBranch).introduce(this); } - Artifact introduceShallowArtifact(IOseeBranch destinationBranch) throws OseeCoreException { + Artifact introduceShallowArtifact(BranchId destinationBranch) throws OseeCoreException { Artifact shallowArt = ArtifactTypeManager.getFactory(getArtifactType()).reflectExisitingArtifact(artId, getGuid(), getArtifactType(), gammaId, destinationBranch, modType); return shallowArt; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java index abebab2dcec..136e5a1bc21 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java @@ -16,7 +16,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact; import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact; import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation; @@ -59,7 +59,7 @@ public final class ArtifactCache { * * @param branch of which artifacts (all) will be de-cache'ed. */ - public static void deCache(IOseeBranch branch) { + public static void deCache(BranchId branch) { for (Artifact artifact : ACTIVE_CACHE.getAll()) { if (artifact.isOnBranch(branch)) { ACTIVE_CACHE.deCache(artifact); @@ -166,7 +166,7 @@ public final class ArtifactCache { return arts; } - public static Artifact getActive(Integer artId, IOseeBranch branch) { + public static Artifact getActive(Integer artId, BranchId branch) { return getActive(artId, branch.getUuid()); } @@ -178,7 +178,7 @@ public final class ArtifactCache { return ACTIVE_CACHE.getByGuid(artGuid, uuid); } - public static Artifact getActive(String artGuid, IOseeBranch branch) throws OseeCoreException { + public static Artifact getActive(String artGuid, BranchId branch) throws OseeCoreException { return getActive(artGuid, branch.getUuid()); } @@ -187,7 +187,7 @@ public final class ArtifactCache { * * @throws OseeStateException if more than one artifact stored. */ - public static Artifact getByTextId(String key, IOseeBranch branch) throws OseeCoreException { + public static Artifact getByTextId(String key, BranchId branch) throws OseeCoreException { Artifact artifact = ACTIVE_CACHE.getByText(key, BranchManager.getBranch(branch)); // decache if deleted if (artifact != null && artifact.isDeleted()) { @@ -196,13 +196,13 @@ public final class ArtifactCache { return artifact; } - public static Artifact deCacheByTextId(String key, IOseeBranch branch) throws OseeCoreException { + public static Artifact deCacheByTextId(String key, BranchId branch) throws OseeCoreException { Artifact artifact = ACTIVE_CACHE.getByText(key, BranchManager.getBranch(branch)); ACTIVE_CACHE.deCacheByText(key, branch, artifact); return artifact; } - public static Collection<Artifact> getListByTextId(String key, IOseeBranch branch) throws OseeCoreException { + public static Collection<Artifact> getListByTextId(String key, BranchId branch) throws OseeCoreException { List<Artifact> artifacts = new ArrayList<>(); Collection<Artifact> cached = ACTIVE_CACHE.getListByText(key, BranchManager.getBranch(branch)); // decache any deleted artifacts diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java index 8006a78a745..479348650a0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java @@ -15,7 +15,7 @@ import java.util.Set; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -32,7 +32,7 @@ public class ArtifactCacheQuery { * Return non-deleted artifacts stored in ArtifactCache. If queryIfNotFound, query artifacts and cacheByText results * before returning. */ - public static Set<Artifact> getArtifactsFromArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch, boolean queryIfNotFound) throws OseeCoreException { + public static Set<Artifact> getArtifactsFromArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, BranchId branch, boolean queryIfNotFound) throws OseeCoreException { Set<Artifact> artifacts = new HashSet<>(); // Retrieve cached artifacts first for (Artifact artifact : ArtifactCache.getListByTextId(text, branch)) { @@ -57,7 +57,7 @@ public class ArtifactCacheQuery { /** * Get artifact, query if not already found and cacheByText. */ - public static Artifact getSingletonArtifactByTextOrException(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch) throws OseeCoreException { + public static Artifact getSingletonArtifactByTextOrException(IArtifactType artifactType, IAttributeType attributeType, String text, BranchId branch) throws OseeCoreException { Set<Artifact> artifacts = getArtifactsFromArtifactByText(artifactType, attributeType, text, branch, true); // Exception on problems if (artifacts.isEmpty()) { @@ -72,7 +72,7 @@ public class ArtifactCacheQuery { /** * Return singleton artifact from ArtifactCache. If queryIfNotFound, perform query and cacheByText result. */ - public static Artifact getSingletonArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch, boolean queryIfNotFound) throws OseeCoreException { + public static Artifact getSingletonArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, BranchId branch, boolean queryIfNotFound) throws OseeCoreException { if (queryIfNotFound) { return getOrCreateSingletonArtifactHelper(artifactType, attributeType, text, branch, false); } else { @@ -87,7 +87,7 @@ public class ArtifactCacheQuery { /** * Return first artifact with attribute (multiples may exist) or create one if non exist */ - public static Artifact getOrCreateSingletonArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch) throws OseeCoreException { + public static Artifact getOrCreateSingletonArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, BranchId branch) throws OseeCoreException { return getOrCreateSingletonArtifactHelper(artifactType, attributeType, text, branch, true); } @@ -96,7 +96,7 @@ public class ArtifactCacheQuery { * * @param create will create artifact and add attribute value not found */ - private static Artifact getOrCreateSingletonArtifactHelper(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch, boolean create) throws OseeCoreException { + private static Artifact getOrCreateSingletonArtifactHelper(IArtifactType artifactType, IAttributeType attributeType, String text, BranchId branch, boolean create) throws OseeCoreException { Set<Artifact> artifacts = getArtifactsFromArtifactByText(artifactType, attributeType, text, branch, true); if (artifacts.isEmpty() && create) { Artifact artifact = ArtifactTypeManager.addArtifact(artifactType, branch); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java index 80b5f6e5e52..ae0593fbd7e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java @@ -15,7 +15,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.OseeData; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.type.ArtifactType; @@ -38,18 +38,18 @@ public abstract class ArtifactFactory { } } - public Artifact makeNewArtifact(IOseeBranch branch, IArtifactType artifactTypeToken, String guid) throws OseeCoreException { + public Artifact makeNewArtifact(BranchId branch, IArtifactType artifactTypeToken, String guid) throws OseeCoreException { return makeNewArtifact(branch, artifactTypeToken, null, guid); } /** * Used to create a new artifact (one that has never been saved into the datastore) */ - public Artifact makeNewArtifact(IOseeBranch branch, IArtifactType artifactTypeToken, String artifactName, String guid) throws OseeCoreException { + public Artifact makeNewArtifact(BranchId branch, IArtifactType artifactTypeToken, String artifactName, String guid) throws OseeCoreException { return makeNewArtifact(branch, artifactTypeToken, artifactName, guid, null); } - public Artifact makeNewArtifact(IOseeBranch branch, IArtifactType artifactTypeToken, String artifactName, String guid, Long uuid) { + public Artifact makeNewArtifact(BranchId branch, IArtifactType artifactTypeToken, String artifactName, String guid, Long uuid) { ArtifactType artifactType = ArtifactTypeManager.getType(artifactTypeToken); Conditions.checkExpressionFailOnTrue(artifactType.isAbstract(), "Cannot create an instance of abstract type [%s]", @@ -80,7 +80,7 @@ public abstract class ArtifactFactory { return uuid == null ? (int) ConnectionHandler.getNextSequence(OseeData.ART_ID_SEQ, true) : uuid.intValue(); } - public synchronized Artifact reflectExisitingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, IOseeBranch branch, ModificationType modificationType) throws OseeCoreException { + public synchronized Artifact reflectExisitingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, BranchId branch, ModificationType modificationType) throws OseeCoreException { Artifact toReturn = internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modificationType, false, Artifact.TRANSACTION_SENTINEL, true); ArtifactCache.cache(toReturn); @@ -90,7 +90,7 @@ public abstract class ArtifactFactory { /** * This method does not cache the artifact, ArtifactLoader will cache existing artifacts */ - private Artifact internalExistingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, IOseeBranch branch, ModificationType modType, boolean historical, int transactionId, boolean useBackingData) throws OseeCoreException { + private Artifact internalExistingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, BranchId branch, ModificationType modType, boolean historical, int transactionId, boolean useBackingData) throws OseeCoreException { Artifact artifact = getArtifactInstance(guid, branch, artifactType, true); artifact.setArtId(artId); @@ -102,7 +102,7 @@ public abstract class ArtifactFactory { /** * This method does not cache the artifact, ArtifactLoader will cache existing artifacts */ - public synchronized Artifact loadExisitingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, IOseeBranch branch, int transactionId, ModificationType modType, boolean historical) throws OseeCoreException { + public synchronized Artifact loadExisitingArtifact(int artId, String guid, IArtifactType artifactType, int gammaId, BranchId branch, int transactionId, ModificationType modType, boolean historical) throws OseeCoreException { return internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modType, historical, transactionId, false); } @@ -116,7 +116,7 @@ public abstract class ArtifactFactory { * @param branch branch on which this instance of this artifact will be associated * @param hrid */ - protected abstract Artifact getArtifactInstance(String guid, IOseeBranch branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException; + protected abstract Artifact getArtifactInstance(String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException; @Override public String toString() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactKey.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactKey.java index 5ad232cac63..f6d964e3f15 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactKey.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactKey.java @@ -10,13 +10,13 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.artifact; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.types.IArtifact; public final class ArtifactKey { private int artId; - private IOseeBranch branch; + private BranchId branch; public ArtifactKey(IArtifact artifact) { this.artId = artifact.getArtId(); @@ -33,7 +33,7 @@ public final class ArtifactKey { return this; } - public ArtifactKey setKey(int artId, IOseeBranch branch) { + public ArtifactKey setKey(int artId, BranchId branch) { this.artId = artId; this.branch = branch; return this; @@ -69,7 +69,7 @@ public final class ArtifactKey { return true; } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } }
\ No newline at end of file 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 89861e23a84..0ced616a7cd 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 @@ -22,7 +22,7 @@ import java.util.Set; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.LoadLevel; import org.eclipse.osee.framework.core.enums.ModificationType; @@ -62,7 +62,7 @@ public final class ArtifactLoader { return new LinkedList<Artifact>(artifacts); } - public static List<Artifact> loadArtifacts(Collection<Integer> artIds, IOseeBranch branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { + public static List<Artifact> loadArtifacts(Collection<Integer> artIds, BranchId branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { List<Pair<Integer, Long>> toLoad = new LinkedList<>(); Long branchUuid = branch.getUuid(); for (Integer artId : new HashSet<Integer>(artIds)) { @@ -72,7 +72,7 @@ public final class ArtifactLoader { return artifacts; } - public static List<Artifact> loadArtifacts(Collection<Integer> artIds, IOseeBranch branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> loadArtifacts(Collection<Integer> artIds, BranchId branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted) throws OseeCoreException { return loadArtifacts(artIds, branch, loadLevel, reload, allowDeleted, null); } @@ -305,7 +305,7 @@ public final class ArtifactLoader { */ private static Artifact retrieveShallowArtifact(JdbcStatement chStmt, LoadType reload, boolean historical) throws OseeCoreException { int artifactId = chStmt.getInt("art_id"); - IOseeBranch branch = BranchManager.getBranch(chStmt.getLong("branch_id")); + BranchId branch = BranchManager.getBranch(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/ArtifactPersistenceManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java index d76821916f6..65f624eff3b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java @@ -14,7 +14,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import org.eclipse.core.runtime.IStatus; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -83,7 +83,7 @@ public class ArtifactPersistenceManager { artIds.add(link.getBArtifactId()); } } - IOseeBranch branch = artifacts.iterator().next().getBranch(); + BranchId branch = artifacts.iterator().next().getBranch(); ArtifactQuery.getArtifactListFromIds(artIds, branch); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java index 6a0775704e7..80bb924a06d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java @@ -24,7 +24,7 @@ import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist; @@ -66,7 +66,7 @@ public class ArtifactTypeManager { return ServiceUtil.getOseeCacheService(); } - public static Collection<ArtifactType> getArtifactTypesFromAttributeType(IAttributeType attributeType, IOseeBranch branchToken) throws OseeCoreException { + public static Collection<ArtifactType> getArtifactTypesFromAttributeType(IAttributeType attributeType, BranchId branchToken) throws OseeCoreException { Branch branch = getCacheService().getBranchCache().get(branchToken); List<ArtifactType> artifactTypes = new ArrayList<>(); for (ArtifactType artifactType : getAllTypes()) { @@ -77,12 +77,12 @@ public class ArtifactTypeManager { return artifactTypes; } - public static Collection<ArtifactType> getValidArtifactTypes(IOseeBranch branch) throws OseeCoreException { + public static Collection<ArtifactType> getValidArtifactTypes(BranchId branch) throws OseeCoreException { // TODO Filter artifact types by branch return getAllTypes(); } - public static Collection<ArtifactType> getConcreteArtifactTypes(IOseeBranch branch) throws OseeCoreException { + public static Collection<ArtifactType> getConcreteArtifactTypes(BranchId branch) throws OseeCoreException { Collection<ArtifactType> types = getAllTypes(); Iterator<ArtifactType> iterator = types.iterator(); while (iterator.hasNext()) { @@ -147,29 +147,29 @@ public class ArtifactTypeManager { /** * Get a new instance of type artifactTypeName */ - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { + public static Artifact addArtifact(IArtifactType artifactType, BranchId branch) throws OseeCoreException { return getFactory(artifactType).makeNewArtifact(branch, artifactType, null, null); } /** * Get a new instance of type artifactTypeName and set it's name. */ - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch, String name) throws OseeCoreException { + public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name) throws OseeCoreException { Artifact artifact = addArtifact(artifactType, branch); artifact.setName(name); return artifact; } - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch, String name, String guid) throws OseeCoreException { + public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid) throws OseeCoreException { return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid); } - public static Artifact addArtifact(IArtifactType artifactType, IOseeBranch branch, String name, String guid, long uuid) { + public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid, long uuid) { Conditions.checkExpressionFailOnTrue(uuid <= 0L, "Invalid Uuid %d. Must be > 0", uuid); return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid, uuid); } - public static Artifact addArtifact(IArtifactToken artifactToken, IOseeBranch branch) throws OseeCoreException { + public static Artifact addArtifact(IArtifactToken artifactToken, BranchId branch) throws OseeCoreException { Conditions.checkExpressionFailOnTrue(artifactToken.getUuid() <= 0L, "Invalid Uuid %d. Must be > 0", artifactToken.getUuid()); return getFactory(artifactToken.getArtifactType()).makeNewArtifact(branch, artifactToken.getArtifactType(), @@ -201,7 +201,7 @@ public class ArtifactTypeManager { for (IArtifactType purgeArtifactType : purgeArtifactTypes) { // find all artifact of this type on all branches and make a unique list for type change (since it is not by branch) Set<Artifact> artifacts = new LinkedHashSet<>(); - for (IOseeBranch branch : BranchManager.getBranches(new BranchFilter())) { + for (BranchId branch : BranchManager.getBranches(new BranchFilter())) { artifacts.addAll(ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, branch, DeletionFlag.INCLUDE_DELETED)); } @@ -211,7 +211,7 @@ public class ArtifactTypeManager { artifactMap.put(artifact.getArtId(), artifact); } if (newArtifactType == null) { - HashSet<IOseeBranch> branches = new HashSet<>(); + HashSet<BranchId> branches = new HashSet<>(); for (Artifact artifact : artifacts) { branches.add(artifact.getBranch()); } 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 45c73f6fc7b..0fef9122f6e 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 @@ -194,7 +194,7 @@ public final class BranchManager { /** * returns the merge branch for this source destination pair from the cache or null if not found */ - public static MergeBranch getMergeBranch(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException { + public static MergeBranch getMergeBranch(BranchId sourceBranch, BranchId destinationBranch) throws OseeCoreException { MergeBranch mergeBranch = getCache().findMergeBranch(sourceBranch, destinationBranch); return mergeBranch; } @@ -202,15 +202,14 @@ public final class BranchManager { /** * returns the first merge branch for this source destination pair from the cache or null if not found */ - public static MergeBranch getFirstMergeBranch(Branch sourceBranch) throws OseeCoreException { - MergeBranch mergeBranch = getCache().findFirstMergeBranch(sourceBranch); - return mergeBranch; + public static MergeBranch getFirstMergeBranch(BranchId sourceBranch) throws OseeCoreException { + return getCache().findFirstMergeBranch(sourceBranch); } /** * returns a list tof all the merge branches for this source branch from the cache or null if not found */ - public static List<MergeBranch> getMergeBranches(Branch sourceBranch) throws OseeCoreException { + public static List<MergeBranch> getMergeBranches(BranchId sourceBranch) throws OseeCoreException { List<MergeBranch> mergeBranches = getCache().findAllMergeBranches(sourceBranch); return mergeBranches; } @@ -229,7 +228,7 @@ public final class BranchManager { /** * returns whether a merge branch exists for a source and dest branch pair */ - public static boolean doesMergeBranchExist(IOseeBranch sourceBranch, IOseeBranch destBranch) throws OseeCoreException { + public static boolean doesMergeBranchExist(BranchId sourceBranch, BranchId destBranch) throws OseeCoreException { return getMergeBranch(sourceBranch, destBranch) != null; } @@ -271,7 +270,7 @@ public final class BranchManager { return Operations.executeAsJob(operation, true); } - public static void purgeBranch(final IOseeBranch branch) throws OseeCoreException { + public static void purgeBranch(final BranchId branch) throws OseeCoreException { Operations.executeWorkAndCheckStatus(new PurgeBranchHttpRequestOperation(branch, false)); } @@ -299,11 +298,11 @@ public final class BranchManager { * Delete a branch from the system. (This operation will set the branch state to deleted. This operation is * undo-able) */ - public static Job deleteBranch(final IOseeBranch branch) { + public static Job deleteBranch(final BranchId branch) { return Operations.executeAsJob(new DeleteBranchOperation(branch), true); } - public static IStatus deleteBranchAndPend(final IOseeBranch branch) { + public static IStatus deleteBranchAndPend(final BranchId branch) { return Operations.executeWork(new DeleteBranchOperation(branch)); } @@ -312,9 +311,9 @@ public final class BranchManager { * * @throws OseeCoreException */ - public static Job deleteBranch(final List<? extends IOseeBranch> branches) { + public static Job deleteBranch(final List<? extends BranchId> branches) { List<IOperation> ops = new ArrayList<>(); - for (IOseeBranch branch : branches) { + for (BranchId branch : branches) { ops.add(new DeleteBranchOperation(branch)); } OperationBuilder builder = Operations.createBuilder("Deleting multiple branches..."); @@ -401,7 +400,7 @@ public final class BranchManager { public static Branch createWorkingBranch(TransactionRecord parentTransactionId, String childBranchName, Long childBranchUuid, Artifact associatedArtifact) throws OseeCoreException { Conditions.notNull(childBranchUuid, "childBranchUuid"); - String creationComment = String.format("New Branch from %s (%s)", parentTransactionId.getBranch().getName(), + String creationComment = String.format("New Branch from %s (%s)", parentTransactionId.getBranchToken().getName(), parentTransactionId.getId()); final String truncatedName = Strings.truncate(childBranchName, 195, true); @@ -414,7 +413,7 @@ public final class BranchManager { */ public static Branch createWorkingBranchFromTx(TransactionRecord parentTransactionId, String childBranchName, Artifact associatedArtifact) throws OseeCoreException { String creationComment = String.format("New branch, copy of %s from transaction %s", - parentTransactionId.getBranch().getName(), parentTransactionId.getId()); + parentTransactionId.getBranchToken().getName(), parentTransactionId.getId()); final String truncatedName = Strings.truncate(childBranchName, 195, true); @@ -427,7 +426,7 @@ public final class BranchManager { public static Branch createPortBranchFromTx(TransactionRecord parentTransactionId, String childBranchName, Artifact associatedArtifact) throws OseeCoreException { String creationComment = String.format("New port branch, copy of %s from transaction %s", - parentTransactionId.getBranch().getName(), parentTransactionId.getId()); + parentTransactionId.getBranchToken().getName(), parentTransactionId.getId()); final String truncatedName = Strings.truncate(childBranchName, 195, true); @@ -438,11 +437,11 @@ public final class BranchManager { return operation.getNewBranch(); } - public static Branch createWorkingBranch(IOseeBranch parentBranch, String childBranchName) throws OseeCoreException { + public static Branch createWorkingBranch(BranchId parentBranch, String childBranchName) throws OseeCoreException { return createWorkingBranch(parentBranch, childBranchName, UserManager.getUser(SystemUser.OseeSystem)); } - public static Branch createWorkingBranch(IOseeBranch parentBranch, String childBranchName, Artifact associatedArtifact) throws OseeCoreException { + public static Branch createWorkingBranch(BranchId parentBranch, String childBranchName, Artifact associatedArtifact) throws OseeCoreException { Conditions.checkNotNull(parentBranch, "Parent Branch"); Conditions.checkNotNull(childBranchName, "Child Branch Name"); Conditions.checkNotNull(associatedArtifact, "Associated Artifact"); @@ -450,11 +449,11 @@ public final class BranchManager { return createWorkingBranch(parentTransactionId, childBranchName, Lib.generateUuid(), associatedArtifact); } - public static IOseeBranch createWorkingBranch(IOseeBranch parentBranch, IOseeBranch childBranch) throws OseeCoreException { + public static BranchId createWorkingBranch(BranchId parentBranch, IOseeBranch childBranch) throws OseeCoreException { return createWorkingBranch(parentBranch, childBranch, UserManager.getUser(SystemUser.OseeSystem)); } - public static IOseeBranch createWorkingBranch(IOseeBranch parentBranch, IOseeBranch childBranch, Artifact associatedArtifact) throws OseeCoreException { + public static BranchId createWorkingBranch(BranchId parentBranch, IOseeBranch childBranch, Artifact associatedArtifact) throws OseeCoreException { TransactionRecord parentTransactionId = TransactionManager.getHeadTransaction(parentBranch); return createWorkingBranch(parentTransactionId, childBranch.getName(), childBranch.getUuid(), associatedArtifact); } @@ -462,11 +461,11 @@ public final class BranchManager { /** * Creates a new Branch based on the most recent transaction on the parent branch. */ - public static IOseeBranch createBaselineBranch(IOseeBranch parentBranch, IOseeBranch childBranch) throws OseeCoreException { + public static BranchId createBaselineBranch(BranchId parentBranch, IOseeBranch childBranch) throws OseeCoreException { return createBaselineBranch(parentBranch, childBranch, UserManager.getUser(SystemUser.OseeSystem)); } - public static IOseeBranch createBaselineBranch(IOseeBranch parentBranch, IOseeBranch childBranch, Artifact associatedArtifact) throws OseeCoreException { + public static BranchId createBaselineBranch(BranchId parentBranch, IOseeBranch childBranch, Artifact associatedArtifact) throws OseeCoreException { TransactionRecord parentTransactionId = TransactionManager.getHeadTransaction(parentBranch); String creationComment = String.format("Branch Creation for %s", childBranch.getName()); return createBranch(BranchType.BASELINE, parentTransactionId, childBranch.getName(), childBranch.getUuid(), @@ -485,11 +484,11 @@ public final class BranchManager { * * @param initializeArtifacts adds common artifacts needed by most normal root branches */ - public static IOseeBranch createTopLevelBranch(IOseeBranch branch) throws OseeCoreException { + public static BranchId createTopLevelBranch(IOseeBranch branch) throws OseeCoreException { return createBaselineBranch(CoreBranches.SYSTEM_ROOT, branch, null); } - public static IOseeBranch createTopLevelBranch(final String branchName) throws OseeCoreException { + public static BranchId createTopLevelBranch(final String branchName) throws OseeCoreException { return createTopLevelBranch(TokenFactory.createBranch(branchName)); } @@ -559,7 +558,7 @@ public final class BranchManager { return branch.getBaseTransaction() != TransactionManager.getHeadTransaction(branch); } - public static boolean isChangeManaged(IOseeBranch branch) throws OseeCoreException { + public static boolean isChangeManaged(BranchId branch) throws OseeCoreException { Integer associatedArtifactId = getAssociatedArtifactId(branch); return associatedArtifactId > 0 && !associatedArtifactId.equals(SystemUser.OseeSystem); } @@ -574,7 +573,7 @@ public final class BranchManager { return getBranch(branch).getAssociatedArtifactId(); } - public static Artifact getAssociatedArtifact(IOseeBranch branch) throws OseeCoreException { + public static Artifact getAssociatedArtifact(BranchId branch) throws OseeCoreException { Integer associatedArtifactId = getAssociatedArtifactId(branch); if (associatedArtifactId == null || associatedArtifactId == -1) { return UserManager.getUser(SystemUser.OseeSystem); @@ -591,7 +590,7 @@ public final class BranchManager { associatedArtifact = ArtifactQuery.getArtifactFromId(commitArtId, COMMON); } } else { - IOseeBranch sourceBranch = txDelta.getStartTx().getBranch(); + BranchId sourceBranch = txDelta.getStartTx().getBranch(); associatedArtifact = BranchManager.getAssociatedArtifact(sourceBranch); } return associatedArtifact; @@ -601,31 +600,31 @@ public final class BranchManager { getCache().invalidate(); } - public static Branch getParentBranch(IOseeBranch branch) { + public static Branch getParentBranch(BranchId branch) { return getBranch(branch).getParentBranch(); } - public static boolean isParentSystemRoot(IOseeBranch branch) { + public static boolean isParentSystemRoot(BranchId branch) { return CoreBranches.SYSTEM_ROOT.equals(getParentBranch(branch)); } - public static TransactionRecord getBaseTransaction(IOseeBranch branch) { + public static TransactionRecord getBaseTransaction(BranchId branch) { return getBranch(branch).getBaseTransaction(); } - public static BranchState getState(IOseeBranch branch) { + public static BranchState getState(BranchId branch) { return getBranch(branch).getBranchState(); } - public static boolean hasChanges(IOseeBranch branch) { + public static boolean hasChanges(BranchId branch) { return hasChanges(getBranch(branch)); } - public static BranchType getBranchType(IOseeBranch branch) { + public static BranchType getBranchType(BranchId branch) { return getBranch(branch).getBranchType(); } - public static boolean isEditable(IOseeBranch branch) { + public static boolean isEditable(BranchId branch) { Branch fullBranch = getBranch(branch); BranchState state = fullBranch.getBranchState(); return (state.isCreated() || state.isModified() || state.isRebaselineInProgress()) && fullBranch.getArchiveState().isUnArchived(); 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 38041c011d7..93b76898b42 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 @@ -24,7 +24,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; @@ -60,7 +60,7 @@ import org.eclipse.osee.jdbc.JdbcStatement; public class ChangeArtifactType { private final HashSet<IAttributeType> attributeTypes = new HashSet<>(); private final HashSet<IRelationType> relationTypes = new HashSet<>(); - private final HashMap<IOseeBranch, SkynetTransaction> txMap = new HashMap<>(); + private final HashMap<BranchId, SkynetTransaction> txMap = new HashMap<>(); private final Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); private final List<Artifact> modifiedArtifacts = new ArrayList<>(); private static final IStatus promptStatus = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 257, "", null); @@ -138,7 +138,7 @@ public class ChangeArtifactType { while (chStmt.next()) { int gammaId = chStmt.getInt("gamma_id"); long branchUuid = chStmt.getLong("branch_id"); - IOseeBranch branch = BranchManager.getBranch(branchUuid); + BranchId branch = BranchManager.getBranch(branchUuid); int artId = gammaToArtId.get(gammaId); Artifact artifact = ArtifactQuery.checkArtifactFromId(artId, branch, DeletionFlag.EXCLUDE_DELETED); if (artifact != null) { @@ -157,8 +157,8 @@ public class ChangeArtifactType { } } - private void addTransaction(Artifact artifact, HashMap<IOseeBranch, SkynetTransaction> txMap) throws OseeCoreException { - IOseeBranch branch = artifact.getBranch(); + private void addTransaction(Artifact artifact, HashMap<BranchId, SkynetTransaction> txMap) throws OseeCoreException { + BranchId branch = artifact.getBranch(); SkynetTransaction transaction = txMap.get(branch); if (transaction == null) { transaction = TransactionManager.createTransaction(branch, "Change Artifact Type"); @@ -276,7 +276,7 @@ public class ChangeArtifactType { BranchFilter branchFilter = new BranchFilter(BranchArchivedState.UNARCHIVED); branchFilter.setNegatedBranchStates(BranchState.PURGED, BranchState.DELETED); - for (IOseeBranch branch : BranchManager.getBranches(branchFilter)) { + for (BranchId branch : BranchManager.getBranches(branchFilter)) { branchJoin.add(branch.getUuid()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java index 5639ee0868f..39370efa785 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.artifact; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.model.Branch; @@ -30,9 +30,9 @@ import org.eclipse.osee.orcs.rest.model.BranchEndpoint; */ public class DeleteBranchOperation extends AbstractOperation { - private final IOseeBranch branch; + private final BranchId branch; - public DeleteBranchOperation(IOseeBranch branch) { + public DeleteBranchOperation(BranchId branch) { super("Delete Branch: " + branch, Activator.PLUGIN_ID); this.branch = branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java index 50ecf7bd41f..f7e68f0b52d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java @@ -15,7 +15,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist; @@ -35,11 +35,11 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationManager; */ public class IntroduceArtifactOperation { private final Artifact fosterParent; - private final IOseeBranch destinationBranch; + private final BranchId destinationBranch; private Collection<Artifact> sourceArtifacts; private List<Artifact> destinationArtifacts; - public IntroduceArtifactOperation(IOseeBranch destinationBranch) throws OseeCoreException { + public IntroduceArtifactOperation(BranchId destinationBranch) throws OseeCoreException { this(OseeSystemArtifacts.getDefaultHierarchyRootArtifact(destinationBranch)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java index a127146233b..84361e274f5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; */ public class UniversalGroup { - public static Collection<Artifact> getGroups(IOseeBranch branch) { + public static Collection<Artifact> getGroups(BranchId branch) { Collection<Artifact> artifacts = null; try { artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.UniversalGroup, branch); @@ -42,7 +42,7 @@ public class UniversalGroup { return artifacts; } - public static Collection<Artifact> getGroupsNotRoot(IOseeBranch branch) { + public static Collection<Artifact> getGroupsNotRoot(BranchId branch) { Collection<Artifact> groups = new HashSet<>(); for (Artifact group : UniversalGroup.getGroups(branch)) { if (!group.getName().equals("Root Artifact")) { @@ -52,7 +52,7 @@ public class UniversalGroup { return groups; } - public static Collection<Artifact> getGroups(String groupName, IOseeBranch branch) { + public static Collection<Artifact> getGroups(String groupName, BranchId branch) { try { return ArtifactQuery.getArtifactListFromTypeAndName(CoreArtifactTypes.UniversalGroup, groupName, branch); } catch (OseeCoreException ex) { @@ -61,7 +61,7 @@ public class UniversalGroup { return new ArrayList<Artifact>(); } - public static Artifact addGroup(String name, IOseeBranch branch, SkynetTransaction transaction) throws OseeCoreException { + public static Artifact addGroup(String name, BranchId branch, SkynetTransaction transaction) throws OseeCoreException { if (!getGroups(name, branch).isEmpty()) { throw new OseeArgumentException("Group Already Exists"); } @@ -76,7 +76,7 @@ public class UniversalGroup { return groupArt; } - public static Artifact getTopUniversalGroupArtifact(IOseeBranch branch) throws OseeCoreException { + public static Artifact getTopUniversalGroupArtifact(BranchId branch) throws OseeCoreException { return ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.UniversalGroupRoot, branch); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java index 719af9e4115..b6324cca225 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.CompositeKeyHashMap; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.OseeStateException; @@ -102,7 +102,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { return items; } - public void deCacheByText(String text, IOseeBranch branch, Artifact artifact) { + public void deCacheByText(String text, BranchId branch, Artifact artifact) { super.deCache(artifact); Set<Object> objects = keyedArtifactCache.get(text, branch.getUuid()); objects.remove(artifact); @@ -113,7 +113,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { * * @throws OseeStateException if more than one artifact stored. */ - public Artifact getByText(String text, IOseeBranch branch) throws OseeCoreException { + public Artifact getByText(String text, BranchId branch) throws OseeCoreException { Set<Object> objects = keyedArtifactCache.get(text, branch.getUuid()); if (objects != null) { if (objects.size() > 1) { @@ -126,7 +126,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { return null; } - public Collection<Artifact> getListByText(String text, IOseeBranch branch) { + public Collection<Artifact> getListByText(String text, BranchId branch) { Set<Object> objects = keyedArtifactCache.get(text, branch.getUuid()); if (objects == null) { return Collections.emptyList(); @@ -164,7 +164,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { public void deCache(Long uuid, Long branchUuid) { ArtifactKey artifactKey = uuidToArtifactKey.get(uuid); if (artifactKey != null) { - IOseeBranch branch = artifactKey.getBranch(); + BranchId branch = artifactKey.getBranch(); keyedArtifactCache.remove(uuid, branch); } String guid = uuidBranchUuidToGuid.get(uuid, branchUuid); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java index ed764deca89..eb5c81a6547 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.skynet.core.artifact.factory; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -30,7 +30,7 @@ public final class DefaultArtifactFactory extends ArtifactFactory { } @Override - public Artifact getArtifactInstance(String guid, IOseeBranch branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { + public Artifact getArtifactInstance(String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { return new Artifact(guid, branch, artifactType); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java index 821df7cd842..66a9bf25787 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.skynet.core.artifact.factory; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.User; @@ -28,7 +28,7 @@ public class UserArtifactFactory extends ArtifactFactory { } @Override - public Artifact getArtifactInstance(String guid, IOseeBranch branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { + public Artifact getArtifactInstance(String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) throws OseeCoreException { return new User(guid, branch, artifactType); } 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 00019209f48..68c3d327506 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 @@ -29,10 +29,10 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -75,7 +75,7 @@ public class ArtifactQuery { private static Map<String, Long> guidToUuid; private static Map<Long, String> uuidToGuid; - public static Artifact getArtifactFromToken(IArtifactToken artifactToken, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromToken(IArtifactToken artifactToken, BranchId branch) throws OseeCoreException { return getArtifactFromId(artifactToken.getGuid(), branch); } @@ -94,11 +94,11 @@ public class ArtifactQuery { * @return exactly one artifact by one its id - otherwise throw an exception * @throws ArtifactDoesNotExist if no artifacts are found */ - public static Artifact getArtifactFromId(int artId, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromId(int artId, BranchId branch) throws OseeCoreException { return getArtifactFromId(artId, branch, EXCLUDE_DELETED); } - public static Artifact getArtifactFromId(long artId, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromId(long artId, BranchId branch) throws OseeCoreException { return getArtifactFromId(new Long(artId).intValue(), branch, EXCLUDE_DELETED); } @@ -110,15 +110,15 @@ public class ArtifactQuery { * @return exactly one artifact by one its id - otherwise throw an exception * @throws ArtifactDoesNotExist if no artifacts are found */ - public static Artifact getArtifactFromId(int artId, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static Artifact getArtifactFromId(int artId, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return getOrCheckArtifactFromId(artId, branch, allowDeleted, QueryType.GET); } - - public static Artifact getArtifactFromId(Long artId, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + + public static Artifact getArtifactFromId(Long artId, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return getOrCheckArtifactFromId(artId.intValue(), branch, allowDeleted, QueryType.GET); } - private static Artifact getOrCheckArtifactFromId(int artId, IOseeBranch branch, DeletionFlag allowDeleted, QueryType queryType) throws OseeCoreException { + private static Artifact getOrCheckArtifactFromId(int artId, BranchId branch, DeletionFlag allowDeleted, QueryType queryType) throws OseeCoreException { Artifact artifact = ArtifactCache.getActive(artId, branch); if (artifact != null) { if (artifact.isDeleted() && allowDeleted == EXCLUDE_DELETED) { @@ -141,7 +141,7 @@ public class ArtifactQuery { * @param allowDeleted whether to return the artifact even if it has been deleted * @return one artifact by one its id if it exists, otherwise null */ - public static Artifact checkArtifactFromId(int artifactId, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static Artifact checkArtifactFromId(int artifactId, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return getOrCheckArtifactFromId(artifactId, branch, allowDeleted, QueryType.CHECK); } @@ -152,7 +152,7 @@ public class ArtifactQuery { * @param allowDeleted whether to return the artifact even if it has been deleted * @return one artifact by one its id if it exists, otherwise null */ - public static Artifact checkArtifactFromId(String guid, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static Artifact checkArtifactFromId(String guid, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return getOrCheckArtifactFromId(guid, branch, allowDeleted, QueryType.CHECK); } @@ -162,7 +162,7 @@ public class ArtifactQuery { * @param uuid of the desired artifact * @return one artifact by its guid if it exists, otherwise null */ - public static Artifact checkArtifactFromId(long uuid, IOseeBranch branch) throws OseeCoreException { + public static Artifact checkArtifactFromId(long uuid, BranchId branch) throws OseeCoreException { return getOrCheckArtifactFromId(new Long(uuid).intValue(), branch, EXCLUDE_DELETED, QueryType.CHECK); } @@ -174,7 +174,7 @@ public class ArtifactQuery { * @throws ArtifactDoesNotExist if no artifacts are found * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromId(String guid, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromId(String guid, BranchId branch) throws OseeCoreException { return getOrCheckArtifactFromId(guid, branch, EXCLUDE_DELETED, QueryType.GET); } @@ -187,11 +187,11 @@ public class ArtifactQuery { * @throws ArtifactDoesNotExist if no artifacts are found * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromId(String guid, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static Artifact getArtifactFromId(String guid, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return getOrCheckArtifactFromId(guid, branch, allowDeleted, QueryType.GET); } - private static Artifact getOrCheckArtifactFromId(String guid, IOseeBranch branch, DeletionFlag allowDeleted, QueryType queryType) throws OseeCoreException { + private static Artifact getOrCheckArtifactFromId(String guid, BranchId branch, DeletionFlag allowDeleted, QueryType queryType) throws OseeCoreException { Artifact artifact = ArtifactCache.getActive(guid, branch); if (artifact != null) { if (artifact.isDeleted() && allowDeleted == EXCLUDE_DELETED) { @@ -213,7 +213,7 @@ public class ArtifactQuery { * @throws ArtifactDoesNotExist if no artifacts are found * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromTypeAndName(IArtifactType artifactType, String artifactName, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static Artifact getArtifactFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException { return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch, options).getOrCheckArtifact(QueryType.GET); } @@ -224,7 +224,7 @@ public class ArtifactQuery { * @return exactly one artifact based on its type and name, otherwise null * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromTypeAndNameNoException(IArtifactType artifactType, String artifactName, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static Artifact getArtifactFromTypeAndNameNoException(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException { try { return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch, options).getOrCheckArtifact(QueryType.GET); @@ -234,12 +234,12 @@ public class ArtifactQuery { return null; } - public static List<Integer> selectArtifactIdsFromTypeAndName(IArtifactType artifactType, String artifactName, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static List<Integer> selectArtifactIdsFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException { return queryFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch, options).selectArtifacts(2); } - public static List<Integer> selectArtifactIdsFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static List<Integer> selectArtifactIdsFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, BranchId branch, QueryOption... options) throws OseeCoreException { return queryFromTypeAndAttribute(artifactType, attributeType, attributeValue, branch, options).selectArtifacts( 10000); } @@ -249,7 +249,7 @@ public class ArtifactQuery { * * @return one artifact based on its type and name if it exists, otherwise null */ - public static Artifact checkArtifactFromTypeAndName(IArtifactType artifactTypeToken, String artifactName, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static Artifact checkArtifactFromTypeAndName(IArtifactType artifactTypeToken, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException { return queryFromTypeAndAttribute(artifactTypeToken, CoreAttributeTypes.Name, artifactName, branch, options).getOrCheckArtifact(QueryType.CHECK); } @@ -259,7 +259,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromIds(Collection<Integer> artifactIds, IOseeBranch branch) throws OseeCoreException { + public static List<Artifact> getArtifactListFromIds(Collection<Integer> artifactIds, BranchId branch) throws OseeCoreException { return ArtifactLoader.loadArtifacts(artifactIds, branch, LoadLevel.ALL, INCLUDE_CACHE, INCLUDE_DELETED); } @@ -268,7 +268,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromIds(Collection<Integer> artifactIds, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromIds(Collection<Integer> artifactIds, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return ArtifactLoader.loadArtifacts(artifactIds, branch, LoadLevel.ALL, INCLUDE_CACHE, allowDeleted); } @@ -277,11 +277,11 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromIds(List<String> guids, IOseeBranch branch) throws OseeCoreException { + public static List<Artifact> getArtifactListFromIds(List<String> guids, BranchId branch) throws OseeCoreException { return new ArtifactQueryBuilder(guids, branch, ALL).getArtifacts(30, null); } - public static List<Artifact> getArtifactListFromIds(List<String> guids, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromIds(List<String> guids, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(guids, branch, allowDeleted, ALL).getArtifacts(30, null); } @@ -311,12 +311,12 @@ public class ArtifactQuery { QueryType.CHECK); } - public static List<Artifact> getArtifactListFromName(String artifactName, IOseeBranch branch, DeletionFlag allowDeleted, QueryOption... options) throws OseeCoreException { + public static List<Artifact> getArtifactListFromName(String artifactName, BranchId branch, DeletionFlag allowDeleted, QueryOption... options) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, allowDeleted, new AttributeCriteria(CoreAttributeTypes.Name, artifactName, options)).getArtifacts(30, null); } - public static List<Artifact> getArtifactListFromTypeAndName(IArtifactType artifactType, String artifactName, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypeAndName(IArtifactType artifactType, String artifactName, BranchId branch, QueryOption... options) throws OseeCoreException { return getArtifactListFromTypeAndAttribute(artifactType, CoreAttributeTypes.Name, artifactName, branch, options); } @@ -328,7 +328,7 @@ public class ArtifactQuery { * @throws ArtifactDoesNotExist if no artifacts are found * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, BranchId branch) throws OseeCoreException { return queryFromTypeAndAttribute(artifactType, attributeType, attributeValue, branch).getOrCheckArtifact( QueryType.GET); } @@ -341,7 +341,7 @@ public class ArtifactQuery { * @throws ArtifactDoesNotExist if no artifacts are found * @throws MultipleArtifactsExist if more than one artifact is found */ - public static Artifact getArtifactFromAttribute(IAttributeType attributeType, String attributeValue, IOseeBranch branch) throws OseeCoreException { + public static Artifact getArtifactFromAttribute(IAttributeType attributeType, String attributeValue, BranchId branch) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, new AttributeCriteria(attributeType, attributeValue)).getOrCheckArtifact(QueryType.GET); } @@ -355,60 +355,60 @@ public class ArtifactQuery { * @return * @throws OseeCoreException */ - public static List<Artifact> getArtifactListFromType(IArtifactType artifactTypeToken, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromType(IArtifactType artifactTypeToken, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(artifactTypeToken, branch, ALL, allowDeleted).getArtifacts(1000, null); } - public static List<Artifact> getArtifactListFromType(List<IArtifactType> artifactTypeTokens, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromType(List<IArtifactType> artifactTypeTokens, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(artifactTypeTokens, branch, ALL, allowDeleted).getArtifacts(1000, null); } - public static List<Artifact> getArtifactListFromType(IArtifactType artifactTypeToken, IOseeBranch branch) throws OseeCoreException { + public static List<Artifact> getArtifactListFromType(IArtifactType artifactTypeToken, BranchId branch) throws OseeCoreException { return getArtifactListFromType(artifactTypeToken, branch, EXCLUDE_DELETED); } - public static List<Artifact> getArtifactListFromBranch(IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromBranch(BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, allowDeleted).getArtifacts(10000, null); } - public static List<Integer> selectArtifactListFromType(IArtifactType artifactTypeToken, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Integer> selectArtifactListFromType(IArtifactType artifactTypeToken, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(artifactTypeToken, branch, ALL, allowDeleted).selectArtifacts(10000); } - public static List<Integer> selectArtifactListFromBranch(IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Integer> selectArtifactListFromBranch(BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, allowDeleted).selectArtifacts(10000); } - public static List<Artifact> getArtifactListFromBranch(IOseeBranch branch, LoadLevel loadLevel, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromBranch(BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(branch, loadLevel, allowDeleted).getArtifacts(10000, null); } - public static List<Artifact> reloadArtifactListFromBranch(IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> reloadArtifactListFromBranch(BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, allowDeleted).reloadArtifacts(10000); } /** * do not use this method if searching for a super type and its descendants, instead use getArtifactListFromTypeAnd */ - public static List<Artifact> getArtifactListFromTypes(Collection<? extends IArtifactType> artifactTypes, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypes(Collection<? extends IArtifactType> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(artifactTypes, branch, ALL, allowDeleted).getArtifacts(1000, null); } - public static List<Artifact> getArtifactListFromTypeWithInheritence(IArtifactType artifactType, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypeWithInheritence(IArtifactType artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { ArtifactType artifactTypeFull = ArtifactTypeManager.getType(artifactType); Collection<ArtifactType> artifactTypes = artifactTypeFull.getAllDescendantTypes(); artifactTypes.add(artifactTypeFull); return getArtifactListFromTypes(artifactTypes, branch, allowDeleted); } - public static int getArtifactCountFromTypeWithInheritence(IArtifactType artifactType, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static int getArtifactCountFromTypeWithInheritence(IArtifactType artifactType, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { ArtifactType artifactTypeFull = ArtifactTypeManager.getType(artifactType); Collection<ArtifactType> artifactTypes = artifactTypeFull.getAllDescendantTypes(); artifactTypes.add(artifactTypeFull); return getArtifactCountFromTypes(artifactTypes, branch, allowDeleted); } - public static int getArtifactCountFromTypes(Collection<? extends IArtifactType> artifactTypes, IOseeBranch branch, DeletionFlag allowDeleted) throws OseeCoreException { + public static int getArtifactCountFromTypes(Collection<? extends IArtifactType> artifactTypes, BranchId branch, DeletionFlag allowDeleted) throws OseeCoreException { return new ArtifactQueryBuilder(artifactTypes, branch, ALL, allowDeleted).countArtifacts(); } @@ -417,7 +417,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromTypeAnd(IArtifactType artifactType, IOseeBranch branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypeAnd(IArtifactType artifactType, BranchId branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException { return new ArtifactQueryBuilder(artifactType, branch, ALL, criteria).getArtifacts(artifactCountEstimate, null); } @@ -426,7 +426,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromCriteria(IOseeBranch branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException { + public static List<Artifact> getArtifactListFromCriteria(BranchId branch, int artifactCountEstimate, List<ArtifactSearchCriteria> criteria) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, criteria).getArtifacts(artifactCountEstimate, null); } @@ -435,7 +435,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromCriteria(IOseeBranch branch, int artifactCountEstimate, ArtifactSearchCriteria... criteria) throws OseeCoreException { + public static List<Artifact> getArtifactListFromCriteria(BranchId branch, int artifactCountEstimate, ArtifactSearchCriteria... criteria) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, criteria).getArtifacts(artifactCountEstimate, null); } @@ -454,7 +454,7 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromRelation(IRelationType relationType, RelationSide relationSide, IOseeBranch branch) throws OseeCoreException { + public static List<Artifact> getArtifactListFromRelation(IRelationType relationType, RelationSide relationSide, BranchId branch) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, new RelationCriteria(relationType, relationSide)).getArtifacts(1000, null); } @@ -464,12 +464,12 @@ public class ArtifactQuery { * * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, BranchId branch, QueryOption... options) throws OseeCoreException { return new ArtifactQueryBuilder(artifactType, branch, ALL, new AttributeCriteria(attributeType, attributeValue, options)).getArtifacts(100, null); } - public static List<Artifact> getArtifactListFromAttribute(IAttributeType attributeType, String attributeValue, IOseeBranch branch, QueryOption... options) throws OseeCoreException { + public static List<Artifact> getArtifactListFromAttribute(IAttributeType attributeType, String attributeValue, BranchId branch, QueryOption... options) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, new AttributeCriteria(attributeType, attributeValue, options)).getArtifacts(300, null); } @@ -477,22 +477,22 @@ public class ArtifactQuery { /** * Return all artifacts that have one or more attributes of given type regardless of the value */ - public static List<Artifact> getArtifactListFromAttributeType(IAttributeType attributeType, IOseeBranch branch) throws OseeCoreException { + public static List<Artifact> getArtifactListFromAttributeType(IAttributeType attributeType, BranchId branch) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, new AttributeCriteria(attributeType)).getArtifacts( 300, null); } - private static ArtifactQueryBuilder queryFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, IOseeBranch branch, QueryOption... options) { + private static ArtifactQueryBuilder queryFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, String attributeValue, BranchId branch, QueryOption... options) { return new ArtifactQueryBuilder(artifactType, branch, ALL, new AttributeCriteria(attributeType, attributeValue, options)); } - public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, Collection<String> attributeValues, IOseeBranch branch, int artifactCountEstimate) throws OseeCoreException { + public static List<Artifact> getArtifactListFromTypeAndAttribute(IArtifactType artifactType, IAttributeType attributeType, Collection<String> attributeValues, BranchId branch, int artifactCountEstimate) throws OseeCoreException { return new ArtifactQueryBuilder(artifactType, branch, ALL, new AttributeCriteria(attributeType, attributeValues)).getArtifacts(artifactCountEstimate, null); } - public static List<Artifact> getArtifactListFromAttributeValues(IAttributeType attributeType, Collection<String> attributeValues, IOseeBranch branch, int artifactCountEstimate) throws OseeCoreException { + public static List<Artifact> getArtifactListFromAttributeValues(IAttributeType attributeType, Collection<String> attributeValues, BranchId branch, int artifactCountEstimate) throws OseeCoreException { return new ArtifactQueryBuilder(branch, ALL, EXCLUDE_DELETED, new AttributeCriteria(attributeType, attributeValues)).getArtifacts(artifactCountEstimate, null); } @@ -522,7 +522,7 @@ public class ArtifactQuery { * @param allowDeleted <b>true</b> includes deleted artifacts in results; <b>false</b> omits deleted artifacts * @return a collection of the artifacts found or an empty collection if none are found */ - public static List<Artifact> getArtifactListFromAttributeKeywords(IOseeBranch branch, String queryString, boolean isMatchWordOrder, DeletionFlag deletionFlag, boolean isCaseSensitive, IAttributeType... attributeTypes) throws OseeCoreException { + public static List<Artifact> getArtifactListFromAttributeKeywords(BranchId branch, String queryString, boolean isMatchWordOrder, DeletionFlag deletionFlag, boolean isCaseSensitive, IAttributeType... attributeTypes) throws OseeCoreException { QueryBuilderArtifact queryBuilder = createQueryBuilder(branch); queryBuilder.includeDeleted(deletionFlag.areDeletedAllowed()); QueryOption matchCase = QueryOption.getCaseType(isCaseSensitive); @@ -570,7 +570,7 @@ public class ArtifactQuery { return queryBuilder.getMatches(); } - public static Artifact reloadArtifactFromId(int artId, IOseeBranch branch) throws OseeCoreException { + public static Artifact reloadArtifactFromId(int artId, BranchId branch) throws OseeCoreException { ArtifactQueryBuilder query = new ArtifactQueryBuilder(artId, branch, INCLUDE_DELETED, ALL); Artifact artifact = query.reloadArtifact(); OseeEventManager.kickLocalArtifactReloadEvent(query, Collections.singleton(artifact)); @@ -579,7 +579,7 @@ public class ArtifactQuery { public static Collection<? extends Artifact> reloadArtifacts(Collection<? extends Artifact> artifacts) throws OseeCoreException { Collection<Artifact> reloadedArts = new ArrayList<Artifact>(artifacts.size()); - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<IOseeBranch, Artifact>(); + HashCollection<BranchId, Artifact> branchMap = new HashCollection<BranchId, Artifact>(); if (artifacts.isEmpty()) { return artifacts; } @@ -588,7 +588,7 @@ public class ArtifactQuery { branchMap.put(artifact.getBranch(), artifact); } Set<Integer> artIds = new HashSet<>(); - for (Entry<IOseeBranch, Collection<Artifact>> entrySet : branchMap.entrySet()) { + for (Entry<BranchId, Collection<Artifact>> entrySet : branchMap.entrySet()) { for (Artifact artifact : entrySet.getValue()) { artIds.add(artifact.getArtId()); @@ -603,7 +603,7 @@ public class ArtifactQuery { return reloadedArts; } - public static Artifact getOrCreate(String guid, IArtifactType type, IOseeBranch branch) throws OseeCoreException { + public static Artifact getOrCreate(String guid, IArtifactType type, BranchId branch) throws OseeCoreException { Artifact artifact = null; try { artifact = ArtifactQuery.getArtifactFromId(guid, branch); @@ -620,7 +620,7 @@ public class ArtifactQuery { return artifact; } - public static QueryBuilderArtifact createQueryBuilder(IOseeBranch branch) throws OseeCoreException { + public static QueryBuilderArtifact createQueryBuilder(BranchId branch) throws OseeCoreException { OseeClient client = ServiceUtil.getOseeClient(); QueryBuilder builder = client.createQueryBuilder(branch); @@ -678,7 +678,7 @@ public class ArtifactQuery { SearchResult result = proxied.getSearchResult(RequestType.IDS); SearchParameters searchParameters = result.getSearchParameters(); - IOseeBranch branch = TokenFactory.createBranch(searchParameters.getBranchUuid()); + BranchId branch = TokenFactory.createBranch(searchParameters.getBranchUuid()); TransactionRecord tx = null; if (searchParameters.getFromTx() > 0) { @@ -705,7 +705,7 @@ public class ArtifactQuery { SearchResult result = proxied.getSearchResult(RequestType.MATCHES); SearchParameters searchParameters = result.getSearchParameters(); - IOseeBranch branch = TokenFactory.createBranch(searchParameters.getBranchUuid()); + BranchId branch = TokenFactory.createBranch(searchParameters.getBranchUuid()); TransactionRecord tx = null; if (searchParameters.getFromTx() > 0) { @@ -742,7 +742,7 @@ public class ArtifactQuery { } } - public static Long getUuidFromGuid(String guid, IOseeBranch branch) { + public static Long getUuidFromGuid(String guid, BranchId branch) { if (guidToUuid == null) { guidToUuid = new HashMap<>(200); } @@ -759,7 +759,7 @@ public class ArtifactQuery { return result; } - public static String getGuidFromUuid(long uuid, IOseeBranch branch) { + public static String getGuidFromUuid(long uuid, BranchId branch) { if (uuidToGuid == null) { uuidToGuid = new HashMap<>(200); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java index 4eb1b749f00..ca09e112d55 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java @@ -27,7 +27,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.LoadLevel; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -55,7 +55,7 @@ public class ArtifactQueryBuilder { private List<String> guids; private String guid; private final ArtifactSearchCriteria[] criteria; - private final IOseeBranch branch; + private final BranchId branch; private int artifactId; private Collection<Integer> artifactIds; private final Collection<? extends IArtifactType> artifactTypes; @@ -67,7 +67,7 @@ public class ArtifactQueryBuilder { /** * @param allowDeleted set whether deleted artifacts should be included in the resulting artifact list */ - public ArtifactQueryBuilder(int artId, IOseeBranch branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { + public ArtifactQueryBuilder(int artId, BranchId branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { this(null, artId, null, null, null, branch, null, allowDeleted, loadLevel); } @@ -77,17 +77,17 @@ public class ArtifactQueryBuilder { * @param artifactIds list of artifact ids * @param allowDeleted set whether deleted artifacts should be included in the resulting artifact list */ - public ArtifactQueryBuilder(Collection<Integer> artifactIds, IOseeBranch branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { + public ArtifactQueryBuilder(Collection<Integer> artifactIds, BranchId branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { this(artifactIds, 0, null, null, null, branch, null, allowDeleted, loadLevel); emptyCriteria = artifactIds.isEmpty(); } - public ArtifactQueryBuilder(List<String> guids, IOseeBranch branch, LoadLevel loadLevel) { + public ArtifactQueryBuilder(List<String> guids, BranchId branch, LoadLevel loadLevel) { this(null, 0, guids, null, null, branch, null, EXCLUDE_DELETED, loadLevel); emptyCriteria = guids.isEmpty(); } - public ArtifactQueryBuilder(List<String> guids, IOseeBranch branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { + public ArtifactQueryBuilder(List<String> guids, BranchId branch, DeletionFlag allowDeleted, LoadLevel loadLevel) { this(null, 0, guids, null, null, branch, null, allowDeleted, loadLevel); emptyCriteria = guids.isEmpty(); } @@ -106,45 +106,45 @@ public class ArtifactQueryBuilder { this(null, artifactId, null, null, null, transactionId.getBranch(), transactionId, allowDeleted, loadLevel); } - public ArtifactQueryBuilder(String guid, IOseeBranch branch, DeletionFlag allowDeleted, LoadLevel loadLevel) throws OseeCoreException { + public ArtifactQueryBuilder(String guid, BranchId branch, DeletionFlag allowDeleted, LoadLevel loadLevel) throws OseeCoreException { this(null, 0, null, ensureValid(guid), null, branch, null, allowDeleted, loadLevel); } - public ArtifactQueryBuilder(IArtifactType artifactType, IOseeBranch branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { + public ArtifactQueryBuilder(IArtifactType artifactType, BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { this(null, 0, null, null, Arrays.asList(artifactType), branch, null, allowDeleted, loadLevel); } - public ArtifactQueryBuilder(Collection<? extends IArtifactType> artifactTypes, IOseeBranch branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { + public ArtifactQueryBuilder(Collection<? extends IArtifactType> artifactTypes, BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { this(null, 0, null, null, artifactTypes, branch, null, allowDeleted, loadLevel); emptyCriteria = artifactTypes.isEmpty(); } - public ArtifactQueryBuilder(IOseeBranch branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { + public ArtifactQueryBuilder(BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted) { this(null, 0, null, null, null, branch, null, allowDeleted, loadLevel); } - public ArtifactQueryBuilder(IOseeBranch branch, LoadLevel loadLevel, DeletionFlag allowDeleted, ArtifactSearchCriteria... criteria) { + public ArtifactQueryBuilder(BranchId branch, LoadLevel loadLevel, DeletionFlag allowDeleted, ArtifactSearchCriteria... criteria) { this(null, 0, null, null, null, branch, null, allowDeleted, loadLevel, criteria); emptyCriteria = criteria.length == 0; } - public ArtifactQueryBuilder(IOseeBranch branch, LoadLevel loadLevel, List<ArtifactSearchCriteria> criteria) { + public ArtifactQueryBuilder(BranchId branch, LoadLevel loadLevel, List<ArtifactSearchCriteria> criteria) { this(null, 0, null, null, null, branch, null, EXCLUDE_DELETED, loadLevel, toArray(criteria)); emptyCriteria = criteria.isEmpty(); } - public ArtifactQueryBuilder(IArtifactType artifactType, IOseeBranch branch, LoadLevel loadLevel, ArtifactSearchCriteria... criteria) { + public ArtifactQueryBuilder(IArtifactType artifactType, BranchId branch, LoadLevel loadLevel, ArtifactSearchCriteria... criteria) { this(null, 0, null, null, Arrays.asList(artifactType), branch, null, EXCLUDE_DELETED, loadLevel, criteria); emptyCriteria = criteria.length == 0; } - public ArtifactQueryBuilder(IArtifactType artifactType, IOseeBranch branch, LoadLevel loadLevel, List<ArtifactSearchCriteria> criteria) { + public ArtifactQueryBuilder(IArtifactType artifactType, BranchId branch, LoadLevel loadLevel, List<ArtifactSearchCriteria> criteria) { this(null, 0, null, null, Arrays.asList(artifactType), branch, null, EXCLUDE_DELETED, loadLevel, toArray(criteria)); emptyCriteria = criteria.isEmpty(); } - private ArtifactQueryBuilder(Collection<Integer> artifactIds, int artifactId, List<String> guids, String guid, Collection<? extends IArtifactType> artifactTypes, IOseeBranch branch, TransactionRecord transactionId, DeletionFlag allowDeleted, LoadLevel loadLevel, ArtifactSearchCriteria... criteria) { + private ArtifactQueryBuilder(Collection<Integer> artifactIds, int artifactId, List<String> guids, String guid, Collection<? extends IArtifactType> artifactTypes, BranchId branch, TransactionRecord transactionId, DeletionFlag allowDeleted, LoadLevel loadLevel, ArtifactSearchCriteria... criteria) { this.artifactTypes = artifactTypes; this.branch = branch; this.criteria = criteria; @@ -360,9 +360,9 @@ public class ArtifactQueryBuilder { private final Set<Integer> localIds = new LinkedHashSet<>(); private DeletionFlag allowDeleted = EXCLUDE_DELETED; private int txId = -1; - private final IOseeBranch branch; + private final BranchId branch; - public LocalIdQueryBuilder(IOseeBranch branch) { + public LocalIdQueryBuilder(BranchId branch) { super(); this.branch = branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchRequest.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchRequest.java index 7c7f7cef092..fa81b6faeef 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchRequest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchRequest.java @@ -11,25 +11,25 @@ package org.eclipse.osee.framework.skynet.core.artifact.search; import org.eclipse.osee.framework.core.data.HasBranch; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; /** * @author Roberto E. Escobar */ public class SearchRequest implements HasBranch { - private final IOseeBranch branch; + private final BranchId branch; private final String rawSearch; private final SearchOptions options; - public SearchRequest(IOseeBranch branch, String rawSearch, SearchOptions options) { + public SearchRequest(BranchId branch, String rawSearch, SearchOptions options) { this.branch = branch; this.rawSearch = rawSearch; this.options = options != null ? options : new SearchOptions(); } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java index 2129e7e8e54..76a06c867d7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java @@ -17,7 +17,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.OseeEnumEntry; @@ -52,7 +52,7 @@ public class AttributeTypeManager { return getCacheService().getBranchCache(); } - public static Collection<IAttributeType> getValidAttributeTypes(IOseeBranch branchToken) throws OseeCoreException { + public static Collection<IAttributeType> getValidAttributeTypes(BranchId branchToken) throws OseeCoreException { Branch branch = getBranchCache().get(branchToken); Set<IAttributeType> attributeTypes = new HashSet<>(100); for (ArtifactType artifactType : ArtifactTypeManager.getAllTypes()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/BranchAttributeAdapter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/BranchAttributeAdapter.java index 8fb69ef4521..11a2aaea422 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/BranchAttributeAdapter.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/BranchAttributeAdapter.java @@ -12,21 +12,20 @@ package org.eclipse.osee.framework.skynet.core.attribute.service; import java.util.Collection; import java.util.Collections; +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.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.UuidIdentity; import org.eclipse.osee.framework.skynet.core.artifact.Attribute; -import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.attribute.AttributeAdapter; -public class BranchAttributeAdapter implements AttributeAdapter<IOseeBranch> { +public class BranchAttributeAdapter implements AttributeAdapter<BranchId> { @Override - public IOseeBranch adapt(Attribute<?> attribute, UuidIdentity identity) throws OseeCoreException { - Long uuid = identity.getUuid(); - return uuid > 0 ? BranchManager.getBranch(uuid) : null; + public BranchId adapt(Attribute<?> attribute, UuidIdentity identity) throws OseeCoreException { + return TokenFactory.createBranch(identity.getUuid()); } @Override diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChange.java index 6f2ffbdb785..932a20ded27 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChange.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.change; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -23,7 +23,7 @@ public final class ArtifactChange extends Change { private static LoadChangeType changeType = LoadChangeType.artifact; private static Class<ArtifactChangeWorker> worker = ArtifactChangeWorker.class; - public ArtifactChange(IOseeBranch branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { + public ArtifactChange(BranchId branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { super(branch, sourceGamma, artId, txDelta, modType, isHistorical, changeArtifact, artifactDelta); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactDelta.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactDelta.java index 3e2dd7a6d99..542ef6d6150 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactDelta.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactDelta.java @@ -66,7 +66,7 @@ public class ArtifactDelta { } public IOseeBranch getBranch() { - return getStartArtifact() != null ? getStartArtifact().getBranch() : getEndArtifact().getBranch(); + return getStartArtifact() != null ? getStartArtifact().getBranchToken() : getEndArtifact().getBranchToken(); } @Override diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChange.java index 84b234469ff..ff991c6cb14 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChange.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.change; import java.util.List; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist; import org.eclipse.osee.framework.core.model.TransactionDelta; @@ -38,7 +38,7 @@ public final class AttributeChange extends Change { private final AttributeType attributeType; private final ModificationType artModType; - public AttributeChange(IOseeBranch branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, String isValue, String wasValue, int attrId, AttributeType attributeType, ModificationType artModType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { + public AttributeChange(BranchId branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, String isValue, String wasValue, int attrId, AttributeType attributeType, ModificationType artModType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { super(branch, sourceGamma, artId, txDelta, modType, isHistorical, changeArtifact, artifactDelta); this.isValue = isValue; this.wasValue = wasValue; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/Change.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/Change.java index 9364cda1719..13658d3407b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/Change.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/Change.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.change; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.osee.framework.core.data.HasBranch; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.core.model.change.ChangeItem; @@ -31,12 +31,12 @@ public abstract class Change implements IAdaptable, Comparable<Change>, HasBranc private final TransactionDelta txDelta; private final ArtifactDelta artifactDelta; private final ModificationType modType; - private final IOseeBranch branch; + private final BranchId branch; private final boolean isHistorical; private final Artifact changeArtifact; private ChangeItem changeItem; - public Change(IOseeBranch branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { + public Change(BranchId branch, long sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta) { this.branch = branch; this.sourceGamma = sourceGamma; this.artId = artId; @@ -139,7 +139,7 @@ public abstract class Change implements IAdaptable, Comparable<Change>, HasBranc } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ErrorChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ErrorChange.java index b0a2fc4a61c..d85ed92d81c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ErrorChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ErrorChange.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.change; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.revision.LoadChangeType; /** @@ -22,7 +22,7 @@ public final class ErrorChange extends Change { private final String errorMessage; private final String name; - public ErrorChange(IOseeBranch branch, int artId, String exception) { + public ErrorChange(BranchId branch, int artId, String exception) { super(branch, 0, artId, null, null, false, null, null); this.errorMessage = String.format("%s %s", ERROR_STRING, exception); this.name = String.format("%s ArtID: %s BranchUuid: %s - %s", ERROR_STRING, getArtId(), diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChange.java index 7b0ff9d6f2f..9cb2dd75a1e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChange.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.skynet.core.change; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.core.model.type.RelationType; @@ -31,7 +31,7 @@ public final class RelationChange extends Change { private final String rationale; private final RelationType relationType; - public RelationChange(IOseeBranch branch, long sourceGamma, int aArtId, TransactionDelta txDelta, ModificationType modType, int bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta, Artifact endTxBArtifact) { + public RelationChange(BranchId branch, long sourceGamma, int aArtId, TransactionDelta txDelta, ModificationType modType, int bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical, Artifact changeArtifact, ArtifactDelta artifactDelta, Artifact endTxBArtifact) { super(branch, sourceGamma, aArtId, txDelta, modType, isHistorical, changeArtifact, artifactDelta); this.bArtId = bArtId; this.relLinkId = relLinkId; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java index 7c3c6eaa65c..14603a85921 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.eclipse.core.runtime.IStatus; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.exception.OseeWrappedException; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; @@ -41,7 +41,7 @@ public class CatchTrackedChanges implements CommitAction { */ @Override - public void runCommitAction(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException { + public void runCommitAction(BranchId sourceBranch, BranchId destinationBranch) throws OseeCoreException { Set<Artifact> changedArtifacts = new HashSet<>(); Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.compareTwoBranchesHead(sourceBranch, destinationBranch, changes); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CommitAction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CommitAction.java index 0549aec5fb8..85e015d89d0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CommitAction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CommitAction.java @@ -10,12 +10,12 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.commit.actions; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; /** * @author Theron Virgin */ public interface CommitAction { - public void runCommitAction(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException; + public void runCommitAction(BranchId sourceBranch, BranchId destinationBranch) throws OseeCoreException; }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java index d01aa5b0151..cac4b2c69de 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java @@ -14,7 +14,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ConflictStatus; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -32,7 +32,7 @@ public class ConflictManagerExternal { private final Branch sourceBranch; private List<Conflict> originalConflicts; - public ConflictManagerExternal(IOseeBranch destinationBranch, IOseeBranch sourceBranch) throws OseeCoreException { + public ConflictManagerExternal(BranchId destinationBranch, BranchId sourceBranch) throws OseeCoreException { this.destinationBranch = BranchManager.getBranch(destinationBranch); this.sourceBranch = BranchManager.getBranch(sourceBranch); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java index 18f3827c07e..6925bc68019 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.List; import java.util.logging.Level; import org.eclipse.core.runtime.Assert; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.logging.OseeLog; @@ -193,7 +193,7 @@ public final class OseeEventManager { return toReturn; } - public static List<IEventFilter> getEventFiltersForBranch(final IOseeBranch branch) { + public static List<IEventFilter> getEventFiltersForBranch(final BranchId branch) { try { List<IEventFilter> eventFilters = new ArrayList<>(2); eventFilters.add(new BranchUuidEventFilter(branch)); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java index 1f40194dff0..fedc33d1758 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java @@ -12,7 +12,6 @@ package org.eclipse.osee.framework.skynet.core.event.filter; import java.util.List; import org.eclipse.osee.framework.core.data.BranchId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact; import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation; @@ -21,12 +20,12 @@ import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation; */ public class BranchUuidEventFilter implements IEventFilter { - private final IOseeBranch branchToken; + private final BranchId branchToken; /** * Provide branch of events that should be passed through. All other branches will be ignored. */ - public BranchUuidEventFilter(IOseeBranch branchToken) { + public BranchUuidEventFilter(BranchId branchToken) { this.branchToken = branchToken; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java index ec0874a593e..505d1cd099d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.event.model; import java.util.ArrayList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact; public class AccessControlEvent implements FrameworkEvent, HasNetworkSender, HasEventType<AccessControlEventType> { @@ -72,7 +72,7 @@ public class AccessControlEvent implements FrameworkEvent, HasNetworkSender, Has this.eventType = eventType; } - public boolean isForBranch(IOseeBranch branch) { + public boolean isForBranch(BranchId branch) { for (DefaultBasicGuidArtifact guidArt : getArtifacts()) { if (guidArt.isOnBranch(branch)) { return true; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java index c17cc85bb1d..f2ae22b31e0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Set; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.BranchId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact; @@ -71,7 +70,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { return relationReorderRecords; } - public boolean isForBranch(IOseeBranch branch) { + public boolean isForBranch(BranchId branch) { return getBranch().equals(branch.getUuid()); } 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 6328681dd2a..7d1523f24e2 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 @@ -15,7 +15,7 @@ import static org.eclipse.osee.framework.core.enums.DeletionFlag.INCLUDE_DELETED import java.net.HttpURLConnection; import java.util.Map; import org.eclipse.osee.framework.core.client.server.HttpResponse; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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; @@ -44,7 +44,7 @@ public abstract class BaseArtifactLoopbackCmd implements IClientLoopbackCmd { } else { try { final Artifact artifact; - final IOseeBranch branch; + final BranchId branch; if (Strings.isValid(transactionIdStr)) { int transactionNumber = Integer.parseInt(transactionIdStr); TransactionRecord transactionId = TransactionManager.getTransactionId(transactionNumber); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java index 362f1eb5bab..b0614d1081e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java @@ -21,7 +21,7 @@ import java.util.logging.Level; 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.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.framework.core.model.Branch; @@ -130,7 +130,7 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation { return toReturn; } - private void handleResponse(Integer newTxId, IProgressMonitor monitor, IOseeBranch sourceBranch, Branch destinationBranch) throws OseeCoreException { + private void handleResponse(Integer newTxId, IProgressMonitor monitor, BranchId sourceBranch, Branch destinationBranch) throws OseeCoreException { TransactionRecord newTransaction = TransactionManager.getTransactionId(newTxId); AccessPolicy accessPolicy = ServiceUtil.getAccessPolicy(); accessPolicy.removePermissions(sourceBranch); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java index 42579c7223c..51071c8285f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.httpRequests; 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.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.StorageState; @@ -40,7 +40,7 @@ public final class PurgeBranchHttpRequestOperation extends AbstractOperation { private final Branch branch; private final boolean recursive; - public PurgeBranchHttpRequestOperation(IOseeBranch branch, boolean recursive) throws OseeCoreException { + public PurgeBranchHttpRequestOperation(BranchId branch, boolean recursive) throws OseeCoreException { super("Purge " + branch, Activator.PLUGIN_ID); this.branch = BranchManager.getBranch(branch); this.recursive = recursive; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java index 95899d47b97..bfca9b87315 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java @@ -16,7 +16,7 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.core.operation.AbstractOperation; @@ -35,7 +35,7 @@ import org.eclipse.osee.framework.skynet.core.internal.Activator; */ public class FilterArtifactTypesByAttributeTypes extends AbstractOperation { - private final IOseeBranch branch; + private final BranchId branch; private final Collection<IArtifactType> selectedArtifactTypes; private final RoughArtifactCollector collector; @@ -45,7 +45,7 @@ public class FilterArtifactTypesByAttributeTypes extends AbstractOperation { * @param selectedArtifactTypes ----> <b>MUTABLE</b> list of items {{@link #doWork(IProgressMonitor)} will operate * on. */ - public FilterArtifactTypesByAttributeTypes(IOseeBranch branch, RoughArtifactCollector collector, Collection<IArtifactType> selectedArtifactTypes) { + public FilterArtifactTypesByAttributeTypes(BranchId branch, RoughArtifactCollector collector, Collection<IArtifactType> selectedArtifactTypes) { super("Filter Artifact Types", Activator.PLUGIN_ID); this.branch = branch; this.selectedArtifactTypes = selectedArtifactTypes; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java index fa4e8f2f502..0af1fad0a5b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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; @@ -71,7 +71,7 @@ public class AttributeBasedArtifactResolver extends NewArtifactImportResolver { } @Override - public Artifact resolve(RoughArtifact roughArtifact, IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException { + public Artifact resolve(RoughArtifact roughArtifact, BranchId branch, Artifact realParent, Artifact root) throws OseeCoreException { Artifact realArtifact = null; RoughArtifact roughParent = roughArtifact.getRoughParent(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/DoorsBestFitArtifactResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/DoorsBestFitArtifactResolver.java index 0f058742d29..0132ada2e5b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/DoorsBestFitArtifactResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/DoorsBestFitArtifactResolver.java @@ -14,7 +14,7 @@ import java.util.Arrays; import java.util.List; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -35,7 +35,7 @@ public class DoorsBestFitArtifactResolver extends NewArtifactImportResolver { } @Override - public Artifact resolve(RoughArtifact roughArtifact, IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException { + public Artifact resolve(RoughArtifact roughArtifact, BranchId branch, Artifact realParent, Artifact root) throws OseeCoreException { Artifact realArtifact = null; if (roughArtifact.getGuid() != null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/GuidBasedArtifactResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/GuidBasedArtifactResolver.java index 7580aac8b8d..32785329dbb 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/GuidBasedArtifactResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/GuidBasedArtifactResolver.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.importing.resolvers; import java.util.List; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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; @@ -38,7 +38,7 @@ public class GuidBasedArtifactResolver extends NewArtifactImportResolver { } @Override - public Artifact resolve(RoughArtifact roughArtifact, IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException { + public Artifact resolve(RoughArtifact roughArtifact, BranchId branch, Artifact realParent, Artifact root) throws OseeCoreException { List<Artifact> descendants = root.getDescendants(); Artifact realArtifact = null; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/IArtifactImportResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/IArtifactImportResolver.java index a79c6e3c9d7..3e40869d95d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/IArtifactImportResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/IArtifactImportResolver.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.importing.resolvers; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact; @@ -22,5 +22,5 @@ import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact; */ public interface IArtifactImportResolver { - public Artifact resolve(RoughArtifact roughArtifact, IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException; + public Artifact resolve(RoughArtifact roughArtifact, BranchId branch, Artifact realParent, Artifact root) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java index d2e87ec74f6..3e3fd47095f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/NewArtifactImportResolver.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.importing.resolvers; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -41,7 +41,7 @@ public class NewArtifactImportResolver implements IArtifactImportResolver { } @Override - public Artifact resolve(final RoughArtifact roughArtifact, final IOseeBranch branch, Artifact realParent, Artifact root) throws OseeCoreException { + public Artifact resolve(final RoughArtifact roughArtifact, final BranchId branch, Artifact realParent, Artifact root) throws OseeCoreException { IArtifactType artifactType = getArtifactType(roughArtifact.getRoughArtifactKind()); OseeLog.logf(NewArtifactImportResolver.class, Level.INFO, "New artifact: [%s]. Attributes: [%s]", roughArtifact, diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java index a76e2769ff8..725520f2675 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java @@ -16,7 +16,7 @@ import java.util.logging.Level; import org.eclipse.osee.framework.core.client.OseeClientProperties; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.enums.RelationSide; @@ -72,7 +72,7 @@ public class AccessPolicyImpl implements AccessPolicy { } @Override - public void removePermissions(IOseeBranch branch) throws OseeCoreException { + public void removePermissions(BranchId branch) throws OseeCoreException { getAccessService().removePermissions(branch); } @@ -88,7 +88,7 @@ public class AccessPolicyImpl implements AccessPolicy { } @Override - public PermissionStatus hasBranchPermission(IOseeBranch branch, PermissionEnum permission, Level level) throws OseeCoreException { + public PermissionStatus hasBranchPermission(BranchId branch, PermissionEnum permission, Level level) throws OseeCoreException { User currentUser = getCurrentUser(); AccessDataQuery query = getAccessService().getAccessData(currentUser, java.util.Collections.singleton(branch)); PermissionStatus permissionStatus = null; @@ -159,7 +159,7 @@ public class AccessPolicyImpl implements AccessPolicy { } @Override - public PermissionStatus hasArtifactTypePermission(IOseeBranch branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException { + public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) throws OseeCoreException { User currentUser = getCurrentUser(); AccessDataQuery query = getAccessService().getAccessData(currentUser, java.util.Collections.singleton(branch)); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java index a33ecd4dbda..8223f77763f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java @@ -22,7 +22,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; import org.eclipse.emf.common.util.EList; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.dsl.OseeDslResource; import org.eclipse.osee.framework.core.dsl.OseeDslResourceUtil; @@ -147,7 +147,7 @@ public class DslToTypeLoader implements TypesLoader { private void handleXArtifactTypeCrossRef(TypeBuffer buffer, BranchCache branchCache, XArtifactType xArtifactType) throws OseeCoreException { ArtifactType targetArtifactType = buffer.getArtTypes().getByGuid(HexUtil.toLong(xArtifactType.getUuid())); translateSuperTypes(buffer, targetArtifactType, xArtifactType); - Map<IOseeBranch, Collection<AttributeType>> validAttributesPerBranch = + Map<BranchId, Collection<AttributeType>> validAttributesPerBranch = getOseeAttributes(buffer, branchCache, xArtifactType); targetArtifactType.setAllAttributeTypes(validAttributesPerBranch); } @@ -165,12 +165,12 @@ public class DslToTypeLoader implements TypesLoader { } } - private Map<IOseeBranch, Collection<AttributeType>> getOseeAttributes(TypeBuffer buffer, BranchCache branchCache, XArtifactType xArtifactType) throws OseeCoreException { - Map<IOseeBranch, Collection<AttributeType>> validAttributes = - new HashMap<IOseeBranch, Collection<AttributeType>>(); + private Map<BranchId, Collection<AttributeType>> getOseeAttributes(TypeBuffer buffer, BranchCache branchCache, XArtifactType xArtifactType) throws OseeCoreException { + Map<BranchId, Collection<AttributeType>> validAttributes = + new HashMap<BranchId, Collection<AttributeType>>(); for (XAttributeTypeRef xAttributeTypeRef : xArtifactType.getValidAttributeTypes()) { XAttributeType xAttributeType = xAttributeTypeRef.getValidAttributeType(); - IOseeBranch branch = getAttributeBranch(branchCache, xAttributeTypeRef); + BranchId branch = getAttributeBranch(branchCache, xAttributeTypeRef); Long attrUuid = HexUtil.toLong(xAttributeType.getUuid()); AttributeType oseeAttributeType = buffer.getAttrTypes().getByGuid(attrUuid); if (oseeAttributeType != null) { @@ -187,7 +187,7 @@ public class DslToTypeLoader implements TypesLoader { return validAttributes; } - private IOseeBranch getAttributeBranch(BranchCache branchCache, XAttributeTypeRef xAttributeTypeRef) throws OseeCoreException { + private BranchId getAttributeBranch(BranchCache branchCache, XAttributeTypeRef xAttributeTypeRef) throws OseeCoreException { String branchIdStr = xAttributeTypeRef.getBranchUuid(); if (branchIdStr == null) { return CoreBranches.SYSTEM_ROOT; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseTransactionRecordAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseTransactionRecordAccessor.java index fd81f797b4f..b09c6e010bd 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseTransactionRecordAccessor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseTransactionRecordAccessor.java @@ -2,7 +2,7 @@ package org.eclipse.osee.framework.skynet.core.internal.accessors; import java.util.Collection; import java.util.Date; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.core.enums.TransactionVersion; import org.eclipse.osee.framework.core.model.Branch; @@ -82,7 +82,7 @@ public class DatabaseTransactionRecordAccessor implements ITransactionDataAccess } @Override - public TransactionRecord loadTransactionRecord(TransactionCache cache, IOseeBranch branch, TransactionVersion transactionType) throws OseeCoreException { + public TransactionRecord loadTransactionRecord(TransactionCache cache, BranchId branch, TransactionVersion transactionType) throws OseeCoreException { ensureDependantCachePopulated(); TransactionRecord toReturn = null; switch (transactionType) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/ArtifactRemoteEventHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/ArtifactRemoteEventHandler.java index 33d588ba750..0aac8efb156 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/ArtifactRemoteEventHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/ArtifactRemoteEventHandler.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.skynet.core.internal.event.handlers; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +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.event.DefaultBasicGuidArtifact; @@ -184,7 +184,7 @@ public class ArtifactRemoteEventHandler implements EventHandlerRemote<RemotePers boolean bArtifactLoaded = bArtifact != null; if (aArtifactLoaded || bArtifactLoaded) { - IOseeBranch branch = TokenFactory.createBranch(guidArt.getArtA().getBranchId()); + BranchId branch = TokenFactory.createBranch(guidArt.getArtA().getBranchId()); RelationLink relation = RelationManager.getLoadedRelationById(guidArt.getRelationId(), guidArt.getArtAId(), guidArt.getArtBId(), branch); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java index 2d917b443bc..bbecc0f18cc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java @@ -18,7 +18,7 @@ import java.util.List; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; @@ -179,7 +179,7 @@ public class WordMlLinkHandler { return matchMap; } - private static List<Artifact> findArtifacts(TransactionRecord transactionId, IOseeBranch branch, boolean isHistorical, List<String> guidsFromLinks) throws OseeCoreException { + private static List<Artifact> findArtifacts(TransactionRecord transactionId, BranchId branch, boolean isHistorical, List<String> guidsFromLinks) throws OseeCoreException { List<Artifact> artifactsFromSearch; if (isHistorical) { artifactsFromSearch = diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java index 13f8f352fb4..e71880b7c0f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.RelationSide; @@ -51,7 +51,7 @@ public class RelationCache { return key.setKey(artifact); } - private ArtifactKey getKey(int artId, IOseeBranch branchUuid) { + private ArtifactKey getKey(int artId, BranchId branchUuid) { ArtifactKey key = THREAD_SHARED_KEY.get(); return key.setKey(artId, branchUuid); } @@ -116,12 +116,12 @@ public class RelationCache { return linksFound; } - private void findRelations(Collection<RelationLink> linksFound, int artId, IOseeBranch branchUuid, IRelationType relationType, RelationMatcher matcher) { + private void findRelations(Collection<RelationLink> linksFound, int artId, BranchId branchUuid, IRelationType relationType, RelationMatcher matcher) { List<RelationLink> sourceLink = relationsByType.get(getKey(artId, branchUuid), relationType); RelationFilterUtil.filter(sourceLink, linksFound, matcher); } - private void findRelations(Collection<RelationLink> linksFound, int artId, IOseeBranch branchUuid, RelationMatcher matcher) { + private void findRelations(Collection<RelationLink> linksFound, int artId, BranchId branchUuid, RelationMatcher matcher) { ArtifactKey artifactKey = getKey(artId, branchUuid); findRelations(linksFound, artifactKey, matcher); } @@ -138,7 +138,7 @@ public class RelationCache { /** * Find RelationById Related On ArtA or ArtB */ - public RelationLink getByRelIdOnArtifact(int relLinkId, int aArtifactId, int bArtifactId, IOseeBranch branch) { + public RelationLink getByRelIdOnArtifact(int relLinkId, int aArtifactId, int bArtifactId, BranchId branch) { RelationMatcher relIdMatcher = RelationFilterUtil.createFindFirstRelationLinkIdMatcher(relLinkId); List<RelationLink> links = new ArrayList<>(); findRelations(links, aArtifactId, branch, relIdMatcher); @@ -152,7 +152,7 @@ public class RelationCache { Set<RelationLink> itemsFound = new HashSet<>(); final int artifactId = artifact.getArtId(); - final IOseeBranch branchUuid = artifact.getBranch(); + final BranchId branchUuid = artifact.getBranch(); RelationMatcher artIdMatcher = new RelationMatcher() { @Override @@ -184,7 +184,7 @@ public class RelationCache { return size != 0 ? relations.iterator().next() : null; } - public RelationLink getLoadedRelation(IRelationType relationType, final int aArtifactId, final int bArtifactId, IOseeBranch branch) { + public RelationLink getLoadedRelation(IRelationType relationType, final int aArtifactId, final int bArtifactId, BranchId branch) { RelationMatcher bArtIdMatcher = RelationFilterUtil.createFindFirstRelatedArtIdMatcher(bArtifactId, RelationSide.SIDE_B); List<RelationLink> links = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java index 88f3cb0c4d2..834f64d6d53 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.relation; import static org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes.USER_DEFINED; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.HasBranch; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -40,11 +40,11 @@ public class RelationLink implements HasBranch { public static interface ArtifactLinker { - public void updateCachedArtifact(int artId, IOseeBranch branch); + public void updateCachedArtifact(int artId, BranchId branch); - public Artifact getArtifact(int ArtId, IOseeBranch branch) throws OseeCoreException; + public Artifact getArtifact(int ArtId, BranchId branch) throws OseeCoreException; - public String getLazyArtifactName(int aArtifactId, IOseeBranch branch); + public String getLazyArtifactName(int aArtifactId, BranchId branch); public void deleteFromRelationOrder(Artifact aArtifact, Artifact bArtifact, IRelationType relationType) throws OseeCoreException; } @@ -56,7 +56,7 @@ public class RelationLink implements HasBranch { private boolean dirty; private final int aArtifactId; private final int bArtifactId; - private final IOseeBranch branch; + private final BranchId branch; private ModificationType modificationType; private static final boolean SET_DIRTY = true; @@ -65,7 +65,7 @@ public class RelationLink implements HasBranch { private final ArtifactLinker artifactLinker; private boolean useBackingData; - public RelationLink(ArtifactLinker artifactLinker, int aArtifactId, int bArtifactId, IOseeBranch branch, RelationType relationType, int relationId, int gammaId, String rationale, ModificationType modificationType) { + public RelationLink(ArtifactLinker artifactLinker, int aArtifactId, int bArtifactId, BranchId branch, RelationType relationType, int relationId, int gammaId, String rationale, ModificationType modificationType) { this.artifactLinker = artifactLinker; this.relationType = relationType; this.relationId = relationId; @@ -323,7 +323,7 @@ public class RelationLink implements HasBranch { } @Override - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java index d97f8c9a523..73f0f71642a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; @@ -220,7 +220,7 @@ public class RelationManager { } if (relatedArtIds.size() > 0) { - IOseeBranch branch = artifacts.iterator().next().getBranch(); + BranchId branch = artifacts.iterator().next().getBranch(); newArtifacts = ArtifactQuery.getArtifactListFromIds(relatedArtIds, branch, allowDeleted); } newArtifactsToSearch.clear(); @@ -596,7 +596,7 @@ public class RelationManager { * @param relationId 0 or relationId if already created * @throws OseeCoreException */ - public static synchronized RelationLink getOrCreate(int aArtifactId, int bArtifactId, IOseeBranch branch, RelationType relationType, int relationId, int gammaId, String rationale, ModificationType modificationType) throws OseeCoreException { + public static synchronized RelationLink getOrCreate(int aArtifactId, int bArtifactId, BranchId branch, RelationType relationType, int relationId, int gammaId, String rationale, ModificationType modificationType) throws OseeCoreException { RelationLink relation = null; if (relationId != 0) { relation = getLoadedRelationById(relationId, aArtifactId, bArtifactId, branch); @@ -613,11 +613,11 @@ public class RelationManager { return relation; } - public static RelationLink getLoadedRelation(IRelationType relationType, int aArtifactId, int bArtifactId, IOseeBranch branch) { + public static RelationLink getLoadedRelation(IRelationType relationType, int aArtifactId, int bArtifactId, BranchId branch) { return relationCache.getLoadedRelation(relationType, aArtifactId, bArtifactId, branch); } - public static RelationLink getLoadedRelationById(int relLinkId, int aArtifactId, int bArtifactId, IOseeBranch branch) { + public static RelationLink getLoadedRelationById(int relLinkId, int aArtifactId, int bArtifactId, BranchId branch) { return relationCache.getByRelIdOnArtifact(relLinkId, aArtifactId, bArtifactId, branch); } @@ -632,12 +632,12 @@ public class RelationManager { private static final class RelationArtifactLinker implements ArtifactLinker { @Override - public Artifact getArtifact(int artifactId, IOseeBranch branch) throws OseeCoreException { + public Artifact getArtifact(int artifactId, BranchId branch) throws OseeCoreException { return ArtifactQuery.getArtifactFromId(artifactId, branch, DeletionFlag.INCLUDE_DELETED); } @Override - public String getLazyArtifactName(int artifactId, IOseeBranch branch) { + public String getLazyArtifactName(int artifactId, BranchId branch) { Artifact artifact = null; try { artifact = ArtifactCache.getActive(artifactId, branch); @@ -657,7 +657,7 @@ public class RelationManager { } @Override - public void updateCachedArtifact(int artId, IOseeBranch branch) { + public void updateCachedArtifact(int artId, BranchId branch) { try { ArtifactCache.updateCachedArtifact(artId, branch.getUuid()); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java index e76e360aef6..6ae117c0b5d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java @@ -14,7 +14,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.RelationSide; import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist; @@ -43,7 +43,7 @@ public class RelationTypeManager { return getCacheService().getArtifactTypeCache(); } - public static List<RelationType> getValidTypes(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { + public static List<RelationType> getValidTypes(IArtifactType artifactType, BranchId branch) throws OseeCoreException { Collection<RelationType> relationTypes = getAllTypes(); List<RelationType> validRelationTypes = new ArrayList<>(); for (RelationType relationType : relationTypes) { @@ -70,7 +70,7 @@ public class RelationTypeManager { /** * @return all the relation types that are valid for the given branch */ - public static Collection<RelationType> getValidTypes(IOseeBranch branch) throws OseeCoreException { + public static Collection<RelationType> getValidTypes(BranchId branch) throws OseeCoreException { return getAllTypes(); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java index 3cd850f922d..fc69e1e7dc3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java @@ -17,7 +17,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map.Entry; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; @@ -126,7 +126,7 @@ public class RelationOrderData { addOrderList(type, side, requestedSorterId, relativeSequence); relationOrderModType = RelationOrderModType.Absolute; } - IOseeBranch branch = getIArtifact().getBranch(); + BranchId branch = getIArtifact().getBranch(); DefaultBasicGuidArtifact guidArtifact = new DefaultBasicGuidArtifact(branch, getIArtifact().getArtifactType().getGuid(), getIArtifact().getGuid()); 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 31fa1a753fc..cde0f18f839 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 @@ -18,7 +18,7 @@ import java.util.List; import java.util.Set; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionDelta; @@ -85,7 +85,7 @@ public class ChangeDataLoader extends AbstractOperation { monitor.setTaskName("Compute artifact deltas"); double workAmount = 0.60 / changeItems.size(); - IOseeBranch startTxBranch = txDelta.getStartTx().getBranch(); + BranchId startTxBranch = txDelta.getStartTx().getBranch(); for (ChangeItem item : changeItems) { checkForCancelledStatus(monitor); Change change = computeChange(bulkLoaded, startTxBranch, item); @@ -108,7 +108,7 @@ public class ChangeDataLoader extends AbstractOperation { monitor.setTaskName("Compute artifact deltas"); double workAmount = 0.30 / changeItems.size(); - IOseeBranch startTxBranch = txDelta.getStartTx().getBranch(); + BranchId startTxBranch = txDelta.getStartTx().getBranch(); for (ChangeItem item : changeItems) { checkForCancelledStatus(monitor); Change change = computeChangeFromGamma(bulkLoaded, startTxBranch, item); @@ -117,7 +117,7 @@ public class ChangeDataLoader extends AbstractOperation { } } - private Change computeChangeFromGamma(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, IOseeBranch startTxBranch, ChangeItem item) { + private Change computeChangeFromGamma(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, BranchId startTxBranch, ChangeItem item) { Change change = null; try { int artId = item.getArtId(); @@ -157,7 +157,7 @@ public class ChangeDataLoader extends AbstractOperation { return change; } - private Change computeChange(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, IOseeBranch startTxBranch, ChangeItem item) { + private Change computeChange(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, BranchId startTxBranch, ChangeItem item) { Change change = null; try { int artId = item.getArtId(); @@ -182,7 +182,7 @@ public class ChangeDataLoader extends AbstractOperation { return change; } - private Change createChangeObject(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, ChangeItem item, TransactionDelta txDelta, IOseeBranch startTxBranch, ArtifactDelta artifactDelta) throws OseeCoreException { + private Change createChangeObject(CompositeKeyHashMap<TransactionRecord, Integer, Artifact> bulkLoaded, ChangeItem item, TransactionDelta txDelta, BranchId startTxBranch, ArtifactDelta artifactDelta) throws OseeCoreException { Change change = null; int itemId = item.getItemId(); 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 44b86fb1023..b916a874929 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 @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.skynet.core.revision; import java.util.ArrayList; import java.util.Collection; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -79,7 +79,7 @@ public final class ChangeManager { /** * Acquires artifact, relation and attribute changes from a source branch since its creation. */ - public static IOperation comparedToParent(IOseeBranch sourceBranch, Collection<Change> changes) throws OseeCoreException { + public static IOperation comparedToParent(BranchId sourceBranch, Collection<Change> changes) throws OseeCoreException { Branch branch = BranchManager.getBranch(sourceBranch); TransactionRecord startTx = TransactionManager.getHeadTransaction(branch); @@ -89,7 +89,7 @@ public final class ChangeManager { return new ChangeDataLoader(changes, txDelta); } - public static IOperation compareTwoBranchesHead(IOseeBranch sourceBranch, IOseeBranch destinationBranch, Collection<Change> changes) throws OseeCoreException { + public static IOperation compareTwoBranchesHead(BranchId sourceBranch, BranchId destinationBranch, Collection<Change> changes) throws OseeCoreException { TransactionRecord startTx = TransactionManager.getHeadTransaction(sourceBranch); TransactionRecord endTx = TransactionManager.getHeadTransaction(destinationBranch); return new ChangeDataLoader(changes, new TransactionDelta(startTx, endTx)); @@ -148,12 +148,12 @@ public final class ChangeManager { public static HashCollection<Artifact, Branch> getModifingBranches(Collection<Artifact> artifacts) throws OseeCoreException { ArtifactJoinQuery joinQuery = JoinUtility.createArtifactJoinQuery(); - CompositeKeyHashMap<Integer, IOseeBranch, Artifact> artifactMap = - new CompositeKeyHashMap<Integer, IOseeBranch, Artifact>(); + CompositeKeyHashMap<Integer, BranchId, Artifact> artifactMap = + new CompositeKeyHashMap<Integer, BranchId, Artifact>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact.getBranch(), artifact); // for each combination of artifact and all working branches in its hierarchy - for (IOseeBranch workingBranch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, + for (BranchId workingBranch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING)) { if (artifact.isOnBranch(BranchManager.getParentBranch(workingBranch))) { joinQuery.add(artifact.getArtId(), workingBranch.getUuid()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java index 5dd637b4d96..43ed65fe35d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java @@ -19,7 +19,7 @@ import java.util.Map.Entry; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.model.Branch; @@ -157,7 +157,7 @@ public final class RevisionChangeLoader { } monitor.subTask("Loading Artifacts from the Database"); - IOseeBranch branch = isHistorical ? transactionId.getBranch() : sourceBranch; + BranchId branch = isHistorical ? transactionId.getBranch() : sourceBranch; Collection<Change> changesLoaded = getChanges(branch, isHistorical, changeBuilders); changes.addAll(changesLoaded); @@ -165,7 +165,7 @@ public final class RevisionChangeLoader { monitor.done(); } - private CompositeKeyHashMap<TransactionRecord, Integer, Artifact> getBulkLoadedArtifacts(IOseeBranch branch, boolean isHistorical, List<ChangeBuilder> changeBuilders) throws OseeCoreException { + private CompositeKeyHashMap<TransactionRecord, Integer, Artifact> getBulkLoadedArtifacts(BranchId branch, boolean isHistorical, List<ChangeBuilder> changeBuilders) throws OseeCoreException { HashCollection<TransactionRecord, Integer> loadMap = new HashCollection<TransactionRecord, Integer>(false, HashSet.class); for (ChangeBuilder builder : changeBuilders) { @@ -195,7 +195,7 @@ public final class RevisionChangeLoader { return loadedMap; } - private Collection<Change> getChanges(IOseeBranch branch, boolean isHistorical, List<ChangeBuilder> changeBuilders) throws OseeCoreException { + private Collection<Change> getChanges(BranchId branch, boolean isHistorical, List<ChangeBuilder> changeBuilders) throws OseeCoreException { CompositeKeyHashMap<TransactionRecord, Integer, Artifact> loadedMap = getBulkLoadedArtifacts(branch, isHistorical, changeBuilders); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java index 8b52636c2a7..8948ebc7c69 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ModificationType; import org.eclipse.osee.framework.core.exception.OseeDataStoreException; import org.eclipse.osee.framework.core.model.Branch; @@ -161,7 +161,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer { private void loadAttributeWasValues(Branch sourceBranch, TransactionRecord transactionId, Set<Integer> artIds, IProgressMonitor monitor, Map<Integer, ChangeBuilder> attributesWasValueCache, boolean hasBranch) throws OseeCoreException, OseeDataStoreException { if (!artIds.isEmpty()) { long sqlParamter; // Will either be a branch uuid or transaction id - IOseeBranch wasValueBranch; + BranchId wasValueBranch; String sql; if (hasBranch) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java index 299505d6819..8a1591d10a6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.Set; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.ModificationType; @@ -63,7 +63,7 @@ import org.eclipse.osee.framework.skynet.core.utility.ConnectionHandler; * @author Ryan D. Brooks * @author Jeff C. Phillips */ -public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { +public final class SkynetTransaction extends TransactionOperation<BranchId> { private static final String ATTR_ID_SEQ = "SKYNET_ATTR_ID_SEQ"; private static final String REL_LINK_ID_SEQ = "SKYNET_REL_LINK_ID_SEQ"; @@ -81,7 +81,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { private int transactionId = -1; private TransactionRecord transaction; - protected SkynetTransaction(TxMonitor<IOseeBranch> txMonitor, IOseeBranch branch, String comment) { + protected SkynetTransaction(TxMonitor<BranchId> txMonitor, BranchId branch, String comment) { super(txMonitor, branch, comment); this.comment = comment; } @@ -109,7 +109,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { if (UserManager.duringMainUserCreation()) { return; } - IOseeBranch txBranch = getBranch(); + BranchId txBranch = getBranch(); if (!artifact.isOnBranch(txBranch)) { String msg = String.format("The artifact [%s] is on branch [%s] but this transaction is for branch [%s]", artifact.getGuid(), artifact.getBranch(), txBranch); @@ -142,7 +142,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { } } - private boolean isBranchWritable(IOseeBranch branch) throws OseeCoreException { + private boolean isBranchWritable(BranchId branch) throws OseeCoreException { boolean toReturn = true; if (!UserManager.duringMainUserCreation()) { toReturn = getAccess().hasBranchPermission(branch, PermissionEnum.WRITE, @@ -156,7 +156,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { return; } checkBranch(link); - IOseeBranch txBranch = getBranch(); + BranchId txBranch = getBranch(); if (!link.isOnBranch(txBranch)) { String msg = String.format("The relation link [%s] is on branch [%s] but this transaction is for branch [%s]", link.getId(), link.getBranch(), txBranch); @@ -199,7 +199,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { alreadyProcessedArtifacts.clear(); } - public IOseeBranch getBranch() { + public BranchId getBranch() { return getKey(); } @@ -315,7 +315,7 @@ public final class SkynetTransaction extends TransactionOperation<IOseeBranch> { ModificationType modificationType; RelationEventType relationEventType; // needed until persist undeleted modtypes and modified == rational only change - IOseeBranch branch = link.getBranch(); + BranchId branch = link.getBranch(); Artifact aArtifact = ArtifactQuery.checkArtifactFromId(link.getAArtifactId(), branch, INCLUDE_DELETED); Artifact bArtifact = ArtifactQuery.checkArtifactFromId(link.getBArtifactId(), branch, INCLUDE_DELETED); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java index 629199b54cc..409e200081c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.TxChange; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -57,14 +57,14 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<>(); private final Map<Integer, String> dataInsertOrder = new HashMap<>(); - private final IOseeBranch branch; + private final BranchId branch; private final TransactionRecord transactionRecord; private final Collection<BaseTransactionData> txDatas; private final Collection<Artifact> artifactReferences; private boolean executedWithException; - public StoreSkynetTransactionOperation(String name, IOseeBranch branch, TransactionRecord transactionRecord, Collection<BaseTransactionData> txDatas, Collection<Artifact> artifactReferences) { + public StoreSkynetTransactionOperation(String name, BranchId branch, TransactionRecord transactionRecord, Collection<BaseTransactionData> txDatas, Collection<Artifact> artifactReferences) { super(ConnectionHandler.getJdbcClient(), name, Activator.PLUGIN_ID); this.branch = branch; this.transactionRecord = transactionRecord; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java index 534f027c510..eda5cac2e33 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java @@ -17,7 +17,7 @@ import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.core.exception.TransactionDoesNotExist; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -69,9 +69,9 @@ public final class TransactionManager { private static final HashMap<Integer, List<TransactionRecord>> commitArtifactIdMap = new HashMap<Integer, List<TransactionRecord>>(); - private static final TxMonitorImpl<IOseeBranch> txMonitor = new TxMonitorImpl<>(new TxMonitorCache<>()); + private static final TxMonitorImpl<BranchId> txMonitor = new TxMonitorImpl<>(new TxMonitorCache<>()); - public static SkynetTransaction createTransaction(IOseeBranch branch, String comment) throws OseeCoreException { + public static SkynetTransaction createTransaction(BranchId branch, String comment) throws OseeCoreException { SkynetTransaction tx = new SkynetTransaction(txMonitor, branch, comment); txMonitor.createTx(branch, tx); return tx; @@ -107,7 +107,7 @@ public final class TransactionManager { return getCacheService().getBranchCache(); } - public static List<TransactionRecord> getTransactionsForBranch(IOseeBranch branch) throws OseeCoreException { + public static List<TransactionRecord> getTransactionsForBranch(BranchId branch) throws OseeCoreException { ArrayList<TransactionRecord> transactions = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); @@ -166,7 +166,7 @@ public final class TransactionManager { /** * @return the largest (most recent) transaction on the given branch */ - public static TransactionRecord getHeadTransaction(IOseeBranch branch) throws OseeCoreException { + public static TransactionRecord getHeadTransaction(BranchId branch) throws OseeCoreException { long branchUuid = branch.getUuid(); int transactionNumber = ConnectionHandler.runPreparedQueryFetchInt(-1, ServiceUtil.getSql(OseeSql.TX_GET_MAX_AS_LARGEST_TX), branchUuid); @@ -181,7 +181,7 @@ public final class TransactionManager { return (int) ConnectionHandler.getNextSequence(TRANSACTION_ID_SEQ, false); } - public static synchronized TransactionRecord internalCreateTransactionRecord(IOseeBranch branch, User userToBlame, String comment) throws OseeCoreException { + public static synchronized TransactionRecord internalCreateTransactionRecord(BranchId branch, User userToBlame, String comment) throws OseeCoreException { if (comment == null) { comment = ""; } @@ -200,7 +200,7 @@ public final class TransactionManager { transactionRecord.getBranchId(), transactionRecord.getTxType().getId()); } - public static TransactionRecord getTransactionAtDate(IOseeBranch branch, Date maxDateExclusive) throws OseeCoreException { + public static TransactionRecord getTransactionAtDate(BranchId branch, Date maxDateExclusive) throws OseeCoreException { Conditions.checkNotNull(branch, "branch"); Conditions.checkNotNull(maxDateExclusive, "max date exclusive"); long branchUuid = branch.getUuid(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java index 4b2dbf4f8a2..aa9d4d02d94 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.HashCollection; import org.eclipse.osee.framework.jdk.core.type.Named; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -219,8 +219,8 @@ public final class Artifacts { return sb.toString(); } - public static HashCollection<IOseeBranch, Artifact> getBranchArtifactMap(Collection<Artifact> artifacts) { - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<>(); + public static HashCollection<BranchId, Artifact> getBranchArtifactMap(Collection<Artifact> artifacts) { + HashCollection<BranchId, Artifact> branchMap = new HashCollection<>(); for (Artifact artifact : artifacts) { branchMap.put(artifact.getBranch(), artifact); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java index 66855dec8b7..0deb85d8d65 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.utility; import java.util.ArrayList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -64,7 +64,7 @@ public class CsvArtifact { /** * Creates a new un-persisted CsvArtifact */ - public static CsvArtifact generateCsvArtifact(String staticId, String artifactName, String csvData, IOseeBranch branch) throws OseeCoreException { + public static CsvArtifact generateCsvArtifact(String staticId, String artifactName, String csvData, BranchId branch) throws OseeCoreException { Artifact artifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.GeneralDocument, branch); artifact.setName(artifactName); artifact.setSoleAttributeValue(CoreAttributeTypes.Extension, "csv"); @@ -73,7 +73,7 @@ public class CsvArtifact { return new CsvArtifact(artifact); } - public static CsvArtifact getCsvArtifact(String staticId, IOseeBranch branch, boolean create) throws OseeCoreException { + public static CsvArtifact getCsvArtifact(String staticId, BranchId branch, boolean create) throws OseeCoreException { Artifact art = ArtifactCacheQuery.getSingletonArtifactByText(CoreArtifactTypes.GeneralDocument, CoreAttributeTypes.StaticId, staticId, branch, true); if (art != null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java index 04ce2d5bdae..7e543d680ed 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java @@ -15,7 +15,7 @@ import java.io.Reader; import java.io.StringReader; import java.util.ArrayList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -34,13 +34,13 @@ import org.xml.sax.helpers.XMLReaderFactory; public class ExcelXmlArtifact implements RowProcessor { private final XMLReader xmlReader; private final String staticId; - private final IOseeBranch branch; + private final BranchId branch; private final ExcelSaxHandler excelHandler; private final List<Worksheet> workbook = new ArrayList<>(); private Worksheet currentWorksheet = null; private boolean initialized = false; - public ExcelXmlArtifact(boolean firstRowIsHeader, String staticId, IOseeBranch branch) throws SAXException { + public ExcelXmlArtifact(boolean firstRowIsHeader, String staticId, BranchId branch) throws SAXException { excelHandler = new ExcelSaxHandler(this, firstRowIsHeader, true); xmlReader = XMLReaderFactory.createXMLReader(); xmlReader.setContentHandler(excelHandler); diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/OpenBranchGraph.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/OpenBranchGraph.java index b5b45b80790..8711b7f0853 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/OpenBranchGraph.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/OpenBranchGraph.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.branch.graph; import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.ui.branch.graph.core.BranchGraphEditor; import org.eclipse.osee.framework.ui.branch.graph.core.BranchGraphEditorInput; @@ -38,7 +38,7 @@ public class OpenBranchGraph extends CommandHandler { @Override public Object executeWithException(ExecutionEvent event, IStructuredSelection selection) throws OseeCoreException { try { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(selection); + List<Branch> branches = Handlers.getBranchesFromStructuredSelection(selection); if (!branches.isEmpty()) { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor( new BranchGraphEditorInput(branches.iterator().next()), BranchGraphEditor.EDITOR_ID); diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java index 943771cfcf2..1fdbeae26c4 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java @@ -11,6 +11,7 @@ package org.eclipse.osee.framework.ui.branch.graph.core; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -67,7 +68,7 @@ public class BranchGraphEditorInput implements IEditorInput { return transactionId; } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/operation/LoadGraphOperation.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/operation/LoadGraphOperation.java index 10b0c6fea37..b5589be1a89 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/operation/LoadGraphOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/operation/LoadGraphOperation.java @@ -14,7 +14,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.gef.GraphicalViewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -36,7 +36,7 @@ import org.eclipse.ui.IWorkbenchWindow; */ public class LoadGraphOperation implements IExceptionableRunnable { - private IOseeBranch resource; + private BranchId resource; private final GraphicalViewer viewer; private final BranchGraphEditor editor; private GraphCache graph; @@ -52,7 +52,7 @@ public class LoadGraphOperation implements IExceptionableRunnable { this.editor = editor; } - public LoadGraphOperation(IWorkbenchPart part, GraphicalViewer viewer, BranchGraphEditor editor, IOseeBranch resource) { + public LoadGraphOperation(IWorkbenchPart part, GraphicalViewer viewer, BranchGraphEditor editor, BranchId resource) { this(part, viewer, editor); this.resource = resource; } 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 dd38e1a6238..600bb435597 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 @@ -22,7 +22,7 @@ import java.util.logging.Level; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.URIConverter; import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.jdk.core.util.io.StringOutputStream; @@ -63,7 +63,7 @@ public class ArtifactURIHandler extends URIHandlerImpl { private <T> T createStream(URI uri, BiFunction<Artifact, Long, T> function) { String[] segments = uri.segments(); - IOseeBranch branch = BranchManager.getBranch(Long.parseLong(segments[0])); + BranchId branch = BranchManager.getBranch(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.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java index ec6a9d738f4..9c21f0c4a9d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java @@ -17,7 +17,7 @@ import java.util.List; import java.util.logging.Level; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.PermissionEnum; @@ -58,7 +58,7 @@ public class ArtifactPromptChangeTest { private static class MockAccessPolicyHandler implements AccessPolicy { @Override - public PermissionStatus hasArtifactTypePermission(IOseeBranch branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) { + public PermissionStatus hasArtifactTypePermission(BranchId branch, Collection<? extends IArtifactType> artifactTypes, PermissionEnum permission, Level level) { return new PermissionStatus(); } @@ -68,7 +68,7 @@ public class ArtifactPromptChangeTest { } @Override - public PermissionStatus hasBranchPermission(IOseeBranch branch, PermissionEnum permission, Level level) { + public PermissionStatus hasBranchPermission(BranchId branch, PermissionEnum permission, Level level) { return new PermissionStatus(); } @@ -88,7 +88,7 @@ public class ArtifactPromptChangeTest { } @Override - public void removePermissions(IOseeBranch branch) { + public void removePermissions(BranchId branch) { // } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java index 2f7ab63e0a1..9dd63861eea 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java @@ -15,7 +15,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; import org.eclipse.osee.framework.core.enums.RelationSide; import org.eclipse.osee.framework.core.enums.RelationTypeMultiplicity; @@ -218,7 +218,7 @@ public class RelationOrderRendererTest { } @Override - public List<String> resolveAsOseeLinks(IOseeBranch branch, List<String> artifactGuids) { + public List<String> resolveAsOseeLinks(BranchId branch, List<String> artifactGuids) { List<String> values = new ArrayList<>(); for (String guid : artifactGuids) { values.add(guid); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java index 5195570c5f5..780d16b41a5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java @@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.window.Window; import org.eclipse.osee.framework.access.AccessControlManager; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Collections; import org.eclipse.osee.framework.jdk.core.util.Conditions; @@ -346,7 +346,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { public IStatus runInUIThread(IProgressMonitor monitor) { IStatus status = Status.OK_STATUS; try { - IOseeBranch branch = branchProvider.getBranch(monitor); + BranchId branch = branchProvider.getBranch(monitor); if (branch == null) { status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Branch not selected"); } else { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDragDropSupport.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDragDropSupport.java index e7ed4e7a42a..5e5a6bac685 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDragDropSupport.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDragDropSupport.java @@ -18,7 +18,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.jface.window.Window; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.RelationSide; @@ -189,7 +189,7 @@ public class ArtifactDragDropSupport { public static Artifact getArtifactFromWorkspaceFile(String location, Shell shell) throws OseeCoreException { Artifact artifact = null; - IOseeBranch branch = BranchSelectionDialog.getBranchFromUser(); + BranchId branch = BranchSelectionDialog.getBranchFromUser(); if (branch != null) { try { artifact = ArtifactQuery.getArtifactFromAttribute(CoreAttributeTypes.ContentUrl, location, branch); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/MassEditDirtyArtifactOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/MassEditDirtyArtifactOperation.java index 33e9c739e3e..b947e5486f8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/MassEditDirtyArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/MassEditDirtyArtifactOperation.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.artifact; import java.util.Collection; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.HashCollection; @@ -42,8 +42,8 @@ public class MassEditDirtyArtifactOperation extends AbstractOperation implements AWorkbench.popup("No Dirty Artifacts Found"); return; } - HashCollection<IOseeBranch, Artifact> branchMap = Artifacts.getBranchArtifactMap(artifacts); - for (IOseeBranch branch : branchMap.keySet()) { + HashCollection<BranchId, Artifact> branchMap = Artifacts.getBranchArtifactMap(artifacts); + for (BranchId branch : branchMap.keySet()) { MassArtifactEditor.editArtifacts(String.format("Dirty Artifacts for Branch [%s]", branch), branchMap.getValues(branch)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java index 94ea8c8d600..e994f9d240b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java @@ -17,7 +17,7 @@ import java.util.Map.Entry; import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.OperationLogger; @@ -99,7 +99,7 @@ public class AttributeCheckOperation extends AbstractOperation { @SuppressWarnings("unchecked") private void compareAllChildrenWithPopularValue(List<Artifact> allDescendants, String popularValue, Artifact folder, IProgressMonitor monitor) throws OseeCoreException { if (!allDescendants.isEmpty()) { - IOseeBranch tempBranch = allDescendants.get(0).getBranch(); + BranchId tempBranch = allDescendants.get(0).getBranch(); Branch branch = BranchManager.getBranch(tempBranch); SkynetTransaction transaction = TransactionManager.createTransaction(branch, "Attribute Check Blam"); if (!branch.getBranchType().isWorkingBranch()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java index cdcfb23755d..348a9b19ade 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java @@ -14,7 +14,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -60,7 +60,7 @@ public class DeleteMultipleAttributesBlam extends AbstractBlam { @Override public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { boolean keepOldest = "Oldest".equals(variableMap.getRadioSelection(ATTRIBUTE_TO_KEEP)); - IOseeBranch branch = variableMap.getBranch(SELECT_BRANCH_LABEL); + BranchId branch = variableMap.getBranch(SELECT_BRANCH_LABEL); if (branch == null) { log("ERROR: A branch must be selected!"); return; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/RelationOrderRepairBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/RelationOrderRepairBlam.java index 8ceb83ef417..0de045d3828 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/RelationOrderRepairBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/RelationOrderRepairBlam.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; import org.eclipse.osee.framework.core.enums.RelationSide; import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist; @@ -66,7 +66,7 @@ public class RelationOrderRepairBlam extends AbstractBlam { return; } recurse = variableMap.getBoolean("Recurse Over Hierarchy"); - IOseeBranch branch = getBranch(inputArtifacts); + BranchId branch = getBranch(inputArtifacts); transaction = TransactionManager.createTransaction(branch, getName()); for (Artifact art : inputArtifacts) { resetRelationOrder(art); @@ -74,7 +74,7 @@ public class RelationOrderRepairBlam extends AbstractBlam { transaction.execute(); } - private IOseeBranch getBranch(List<Artifact> arts) throws OseeArgumentException { + private BranchId getBranch(List<Artifact> arts) throws OseeArgumentException { Artifact firstArt = arts.get(0); for (Artifact art : arts) { if (!firstArt.isOnSameBranch(art)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java index a92542a7936..57bd2342375 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceArtifactWithBaselineOperation.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.blam.operation; import java.util.Collection; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.framework.core.client.ClientSessionManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.operation.AbstractOperation; @@ -54,7 +54,7 @@ public class ReplaceArtifactWithBaselineOperation extends AbstractOperation { TransactionEndpoint txBuilder = client.getTransactionEndpoint(); Artifact firstArtifact = artifacts.iterator().next(); TransactionRecord txRecord = firstArtifact.getFullBranch().getBaseTransaction(); - IOseeBranch branch = firstArtifact.getBranch(); + BranchId branch = firstArtifact.getBranch(); for (Artifact artifact : artifacts) { monitor.subTask("Reverting: " + artifact.getName()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java index a14f283d134..0eeee1ff84e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java @@ -15,7 +15,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.core.operation.OperationLogger; import org.eclipse.osee.framework.jdk.core.util.GUID; @@ -34,7 +34,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.IXWidgetInputAddable; public class StringGuidsToArtifactListOperation extends AbstractOperation { private final String rawGuidsData; - private final IOseeBranch branch; + private final BranchId branch; private final IXWidgetInputAddable widget; public final static String splitRegex = "\\s+"; @@ -47,7 +47,7 @@ public class StringGuidsToArtifactListOperation extends AbstractOperation { * @param branch on which the artifacts live on * @param widget accepting input by implementing <code>IXWidgetInputAddable</code> interface */ - public StringGuidsToArtifactListOperation(OperationLogger logger, String guidData, IOseeBranch branch, IXWidgetInputAddable widget) { + public StringGuidsToArtifactListOperation(OperationLogger logger, String guidData, BranchId branch, IXWidgetInputAddable widget) { super(taskName, Activator.PLUGIN_ID, logger); this.rawGuidsData = guidData; this.branch = branch; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchSelectionDialog.java index ed38d7acb48..92f451fc5c9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchSelectionDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/BranchSelectionDialog.java @@ -18,6 +18,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.window.Window; import org.eclipse.nebula.widgets.xviewer.XViewer; +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.OseeCoreException; @@ -48,18 +49,18 @@ import org.eclipse.swt.widgets.TreeItem; public class BranchSelectionDialog extends MessageDialog implements IBranchWidgetMenuListener { private IOseeBranch selected; - private IOseeBranch defaultSelected; - private static IOseeBranch lastSelectedBranch; + private BranchId defaultSelected; + private static BranchId lastSelectedBranch; private XBranchWidget branchWidget; private boolean allowOnlyWorkingBranches; - private final Collection<? extends IOseeBranch> branches; + private final Collection<? extends BranchId> branches; public BranchSelectionDialog(String title, boolean allowOnlyWorkingBranches) { this(title, null); this.allowOnlyWorkingBranches = allowOnlyWorkingBranches; } - public BranchSelectionDialog(String title, Collection<? extends IOseeBranch> branches) { + public BranchSelectionDialog(String title, Collection<? extends BranchId> branches) { super(Displays.getActiveShell(), title, null, null, MessageDialog.NONE, new String[] {"Ok", "Cancel"}, 0); allowOnlyWorkingBranches = false; selected = null; @@ -67,7 +68,7 @@ public class BranchSelectionDialog extends MessageDialog implements IBranchWidge setShellStyle(getShellStyle() | SWT.RESIZE); } - public void setDefaultSelection(IOseeBranch branch) { + public void setDefaultSelection(BranchId branch) { defaultSelected = branch; } @@ -85,7 +86,7 @@ public class BranchSelectionDialog extends MessageDialog implements IBranchWidge branchWidget.addBranchSelectedListener(new BranchSelectedListener() { @Override - public void onBranchSelected(IOseeBranch branch) { + public void onBranchSelected(BranchId branch) { getButton(IDialogConstants.OK_ID).setEnabled(true); storeSelectedBranch(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInput.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInput.java index 7c88dd2e788..a37359b1e57 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInput.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeReportEditorInput.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.change; import java.util.logging.Level; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -28,7 +28,7 @@ import org.eclipse.ui.IPersistableElement; public class ChangeReportEditorInput implements IEditorInput, IPersistableElement { private final ChangeUiData changeData; - private IOseeBranch branch; + private BranchId branch; private boolean transactionTabActive = false; private boolean notLoaded = false; @@ -36,7 +36,7 @@ public class ChangeReportEditorInput implements IEditorInput, IPersistableElemen this(changeData, null); } - public ChangeReportEditorInput(ChangeUiData changeData, IOseeBranch branch) { + public ChangeReportEditorInput(ChangeUiData changeData, BranchId branch) { this.changeData = changeData; this.branch = branch; } @@ -122,7 +122,7 @@ public class ChangeReportEditorInput implements IEditorInput, IPersistableElemen ChangeReportEditorInputFactory.saveState(memento, this); } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branch; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java index e63a473d82b..7dd2fe0daf4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java @@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionDelta; @@ -33,11 +33,11 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.progress.UIJob; public final class ChangeUiUtil { - public static void open(IOseeBranch branch) throws OseeCoreException { + public static void open(BranchId branch) throws OseeCoreException { open(branch, false); } - public static void open(IOseeBranch branch, boolean showTransactionTab) throws OseeCoreException { + public static void open(BranchId branch, boolean showTransactionTab) throws OseeCoreException { Branch heavyBranch = BranchManager.getBranch(branch); Conditions.checkNotNull(branch, "Branch"); if (heavyBranch.getBranchType() == BranchType.BASELINE) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiOtherBranchDialogProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiOtherBranchDialogProvider.java index a0f5499a643..2c4ec6f618b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiOtherBranchDialogProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiOtherBranchDialogProvider.java @@ -16,6 +16,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.window.Window; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.plugin.core.util.Jobs; @@ -36,14 +37,14 @@ public final class UiOtherBranchDialogProvider implements IBranchProvider { @Override public IOseeBranch getBranch(IProgressMonitor monitor) throws OseeCoreException { final IOseeBranch[] selectedBranch = new IOseeBranch[1]; - final Collection<? extends IOseeBranch> selectable = BranchManager.getBaselineBranches(); + final Collection<? extends BranchId> selectable = BranchManager.getBaselineBranches(); selectable.remove(uiData.getTxDelta().getStartTx().getBranch()); IStatus status = executeInUiThread(selectable, selectedBranch); monitor.setCanceled(status.getSeverity() == IStatus.CANCEL); return selectedBranch[0]; } - private IStatus executeInUiThread(final Collection<? extends IOseeBranch> selectable, final IOseeBranch[] selectedBranch) throws OseeCoreException { + private IStatus executeInUiThread(final Collection<? extends BranchId> selectable, final BranchId[] selectedBranch) throws OseeCoreException { IStatus status = null; Display display = AWorkbench.getDisplay(); if (display.getThread().equals(Thread.currentThread())) { @@ -65,7 +66,7 @@ public final class UiOtherBranchDialogProvider implements IBranchProvider { return status; } - private IStatus getUserSelection(Collection<? extends IOseeBranch> selectable, IOseeBranch[] selectedBranch) { + private IStatus getUserSelection(Collection<? extends BranchId> selectable, BranchId[] selectedBranch) { IStatus status = Status.OK_STATUS; BranchSelectionDialog dialog = new BranchSelectionDialog("Select branch to compare against", selectable); int result = dialog.open(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java index 875e4cd0f7f..1517e82dcc2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.window.Window; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -42,7 +43,7 @@ public final class UiSelectBetweenDeltasBranchProvider implements IBranchProvide if (txDelta.areOnTheSameBranch()) { selectedBranch[0] = txDelta.getStartTx().getFullBranch(); } else { - final Collection<IOseeBranch> selectable = new ArrayList<>(); + final Collection<BranchId> selectable = new ArrayList<>(); selectable.add(uiData.getTxDelta().getStartTx().getFullBranch()); selectable.add(uiData.getTxDelta().getEndTx().getFullBranch()); IStatus status = executeInUiThread(selectable, selectedBranch); @@ -51,7 +52,7 @@ public final class UiSelectBetweenDeltasBranchProvider implements IBranchProvide return selectedBranch[0]; } - private IStatus executeInUiThread(final Collection<IOseeBranch> selectable, final IOseeBranch[] selectedBranch) throws OseeCoreException { + private IStatus executeInUiThread(final Collection<BranchId> selectable, final BranchId[] selectedBranch) throws OseeCoreException { IStatus status = null; Display display = AWorkbench.getDisplay(); if (display.getThread().equals(Thread.currentThread())) { @@ -73,7 +74,7 @@ public final class UiSelectBetweenDeltasBranchProvider implements IBranchProvide return status; } - private IStatus getUserSelection(Collection<IOseeBranch> selectable, IOseeBranch[] selectedBranch) { + private IStatus getUserSelection(Collection<BranchId> selectable, BranchId[] selectedBranch) { IStatus status = Status.OK_STATUS; BranchSelectionDialog dialog = new BranchSelectionDialog("Select branch to compare against", selectable); int result = dialog.open(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/actions/ShowChangeReportSinceAction.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/actions/ShowChangeReportSinceAction.java index 476d6fb0d35..256eae92729 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/actions/ShowChangeReportSinceAction.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/actions/ShowChangeReportSinceAction.java @@ -15,7 +15,7 @@ import java.util.List; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager; import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; @@ -30,9 +30,9 @@ import org.eclipse.osee.framework.ui.swt.ImageManager; public class ShowChangeReportSinceAction extends Action { private final ITransactionRecordSelectionProvider selectionProvider; - private final IOseeBranch branch; + private final BranchId branch; - public ShowChangeReportSinceAction(IOseeBranch branch, ITransactionRecordSelectionProvider selectionProvider) { + public ShowChangeReportSinceAction(BranchId branch, ITransactionRecordSelectionProvider selectionProvider) { super("Show Change Report Since"); this.branch = branch; this.selectionProvider = selectionProvider; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/operations/LoadCompareBranchToBranch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/operations/LoadCompareBranchToBranch.java index 81e486a15db..546e5a4a399 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/operations/LoadCompareBranchToBranch.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/operations/LoadCompareBranchToBranch.java @@ -11,7 +11,7 @@ package org.eclipse.osee.framework.ui.skynet.change.operations; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -38,7 +38,7 @@ public class LoadCompareBranchToBranch extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { Branch startBranch = uiData.getTxDelta().getStartTx().getFullBranch(); - IOseeBranch otherBranch = branchProvider.getBranch(monitor); + BranchId otherBranch = branchProvider.getBranch(monitor); checkForCancelledStatus(monitor); Conditions.checkNotNull(otherBranch, "other branch to compare to"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java index c1a1b9a63b6..3bde7e2052b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/BaseToHeadHandler.java @@ -39,7 +39,7 @@ public final class BaseToHeadHandler implements IChangeReportUiHandler { public String getName(TransactionDelta txDelta) { String branchName; try { - branchName = txDelta.getEndTx().getBranch().getShortName(BRANCH_NAME_LEN); + branchName = txDelta.getEndTx().getBranchToken().getShortName(BRANCH_NAME_LEN); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); branchName = "Unknown"; @@ -63,7 +63,7 @@ public final class BaseToHeadHandler implements IChangeReportUiHandler { NumberFormat formatter = NumberFormat.getInstance(); return String.format( "Shows all changes made to [<b>%s</b>] from when it was created (transaction <b>%s</b>) until it was last modified (transaction <b>%s</b>).", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), AXml.textToXml(formatter.format(txDelta.getStartTx().getId())), AXml.textToXml(formatter.format(txDelta.getEndTx().getId()))); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java index 0c3376518a1..41a2b60b5a9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstOtherHandler.java @@ -38,7 +38,7 @@ public final class CurrentsAgainstOtherHandler implements IChangeReportUiHandler public String getName(TransactionDelta txDelta) { String branchName; try { - branchName = txDelta.getStartTx().getBranch().getShortName(BRANCH_NAME_LEN); + branchName = txDelta.getStartTx().getBranchToken().getShortName(BRANCH_NAME_LEN); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); branchName = "Unknown"; @@ -69,12 +69,12 @@ public final class CurrentsAgainstOtherHandler implements IChangeReportUiHandler if (changeUiData.isMergeBranchValid()) { data = String.format( "Shows all changes made to [<b>%s</b>], including changes found in the merge branch compared to branch [<b>%s</b>].", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), - AXml.textToXml(txDelta.getEndTx().getBranch().getName())); + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), + AXml.textToXml(txDelta.getEndTx().getBranchToken().getName())); } else { data = String.format("Shows all changes made to [<b>%s</b>] compared to branch [<b>%s</b>].", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), - AXml.textToXml(txDelta.getEndTx().getBranch().getName())); + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), + AXml.textToXml(txDelta.getEndTx().getBranchToken().getName())); } return data; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java index 3603bb350f6..5e89af74c55 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/CurrentsAgainstParentHandler.java @@ -38,7 +38,7 @@ public final class CurrentsAgainstParentHandler implements IChangeReportUiHandle public String getName(TransactionDelta txDelta) { String branchName; try { - branchName = txDelta.getStartTx().getBranch().getShortName(BRANCH_NAME_LEN); + branchName = txDelta.getStartTx().getBranchToken().getShortName(BRANCH_NAME_LEN); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); branchName = "Unknown"; @@ -69,12 +69,12 @@ public final class CurrentsAgainstParentHandler implements IChangeReportUiHandle if (changeUiData.isMergeBranchValid()) { data = String.format( "Shows all changes made to [<b>%s</b>], including changes found in the merge branch compared to%s branch [<b>%s</b>].", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), " its parent", - AXml.textToXml(txDelta.getEndTx().getBranch().getName())); + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), " its parent", + AXml.textToXml(txDelta.getEndTx().getBranchToken().getName())); } else { data = String.format("Shows all changes made to [<b>%s</b>] compared to%s branch [<b>%s</b>].", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), " its parent", - AXml.textToXml(txDelta.getEndTx().getBranch().getName())); + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), " its parent", + AXml.textToXml(txDelta.getEndTx().getBranchToken().getName())); } return data; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java index b7a4f42d705..99c4dee3c5b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java @@ -39,7 +39,7 @@ public final class SpecificTxsHandler implements IChangeReportUiHandler { public String getName(TransactionDelta txDelta) { String branchName; try { - branchName = txDelta.getEndTx().getBranch().getShortName(BRANCH_NAME_LEN); + branchName = txDelta.getEndTx().getBranchToken().getShortName(BRANCH_NAME_LEN); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); branchName = "Unknown"; @@ -68,7 +68,7 @@ public final class SpecificTxsHandler implements IChangeReportUiHandler { TransactionDelta txDelta = changeUiData.getTxDelta(); NumberFormat formatter = NumberFormat.getInstance(); return String.format("Shows changes made to [<b>%s</b>] between transactions [<b>%s</b>] and [<b>%s</b>].", - AXml.textToXml(txDelta.getStartTx().getBranch().getName()), + AXml.textToXml(txDelta.getStartTx().getBranchToken().getName()), AXml.textToXml(formatter.format(txDelta.getStartTx().getId())), AXml.textToXml(formatter.format(txDelta.getEndTx().getId()))); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java index 7646a3b4dbb..b4c978641b6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/BranchTransactionPage.java @@ -24,7 +24,7 @@ import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.nebula.widgets.xviewer.XViewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.core.operation.OperationBuilder; import org.eclipse.osee.framework.core.operation.Operations; @@ -69,12 +69,12 @@ import org.eclipse.ui.progress.UIJob; public class BranchTransactionPage extends FormPage implements IBranchWidgetMenuListener, ITransactionEventListener, ITransactionRecordSelectionProvider { private XBranchWidget xBranchWidget; - private final IOseeBranch branch; + private final BranchId branch; private final AtomicBoolean refreshNeeded = new AtomicBoolean(false); private final AtomicBoolean processEvents = new AtomicBoolean(false); private BranchTransactionUiData branchTransactionData; - public BranchTransactionPage(ChangeReportEditor editor, IOseeBranch branch) { + public BranchTransactionPage(ChangeReportEditor editor, BranchId branch) { super(editor, "transaction", "Transactions"); this.branch = branch; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java index fb6be8c17df..5ddebad90d0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.change.view; import java.util.List; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; @@ -166,14 +166,14 @@ public class ChangeReportEditor extends FormEditor implements IChangeReportView @Override public void handleBranchEvent(Sender sender, final BranchEvent branchEvent) { ChangeUiData changeUiData = getEditorInput().getChangeData(); - IOseeBranch[] branches = new IOseeBranch[2]; + BranchId[] branches = new BranchId[2]; try { branches[0] = changeUiData.getTxDelta().getStartTx().getBranch(); branches[1] = changeUiData.getTxDelta().getEndTx().getBranch(); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, "Error obtaining change report branches for branch event", ex); } - for (IOseeBranch branch : branches) { + for (BranchId branch : branches) { if (branch != null && branch.equals(branchEvent.getSourceBranch())) { switch (branchEvent.getEventType()) { case Deleting: diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/cm/IOseeCmService.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/cm/IOseeCmService.java index 73e7b709580..245fb0ca932 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/cm/IOseeCmService.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/cm/IOseeCmService.java @@ -14,7 +14,7 @@ import java.util.Collection; import java.util.Date; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.ui.swt.KeyedImage; @@ -34,7 +34,7 @@ public interface IOseeCmService { boolean isCmAdmin(); - public IOseeBranch getCmBranchToken(); + public BranchId getCmBranchToken(); void openArtifact(Artifact artifact, OseeCmEditor oseeCmEditor); @@ -62,7 +62,7 @@ public interface IOseeCmService { IArtifactType getPcrTaskArtifactType(); - boolean isWorkFlowBranch(IOseeBranch branch); + boolean isWorkFlowBranch(BranchId branch); void commitBranch(Artifact art, Branch branch, boolean isArchiveSource); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/AccessControlHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/AccessControlHandler.java index 0ce613307a4..fbf1c278fad 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/AccessControlHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/AccessControlHandler.java @@ -14,7 +14,7 @@ import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -37,7 +37,7 @@ public class AccessControlHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); List<Artifact> artifacts = Handlers.getArtifactsFromStructuredSelection(structuredSelection); boolean hasArtifacts = artifacts.size() == 1; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/BranchTransactionHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/BranchTransactionHandler.java index 6129687ece6..5099cf2b54e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/BranchTransactionHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/BranchTransactionHandler.java @@ -13,8 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; -import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.ui.plugin.util.CommandHandler; @@ -34,7 +33,7 @@ public class BranchTransactionHandler extends CommandHandler { if (selection.size() == 1) { Object selectedObject = selection.getFirstElement(); - if (selectedObject instanceof Branch) { + if (selectedObject instanceof BranchId) { enabled = true; } } else { @@ -50,7 +49,7 @@ public class BranchTransactionHandler extends CommandHandler { try { if (selection.size() == 1) { Object selectedObject = selection.getFirstElement(); - ChangeUiUtil.open((IOseeBranch) selectedObject, true); + ChangeUiUtil.open((BranchId) selectedObject, true); } } catch (Exception 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/commandHandlers/ChangeReportHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/ChangeReportHandler.java index 6f70a809c2e..200d8a3fb71 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/ChangeReportHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/ChangeReportHandler.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.core.model.TransactionRecord; import org.eclipse.osee.framework.logging.OseeLevel; @@ -37,7 +37,7 @@ public class ChangeReportHandler extends CommandHandler { if (selectedObject instanceof TransactionRecord) { enabled = ((TransactionRecord) selectedObject).getTxType() != TransactionDetailsType.Baselined; - } else if (selectedObject instanceof IOseeBranch) { + } else if (selectedObject instanceof BranchId) { enabled = true; } } else if (selection.size() == 2) { @@ -72,8 +72,8 @@ public class ChangeReportHandler extends CommandHandler { Object selectedObject = selection.getFirstElement(); if (selectedObject instanceof TransactionRecord) { ChangeUiUtil.open((TransactionRecord) selectedObject); - } else if (selectedObject instanceof IOseeBranch) { - ChangeUiUtil.open((IOseeBranch) selectedObject); + } else if (selectedObject instanceof BranchId) { + ChangeUiUtil.open((BranchId) selectedObject); } } } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java index 5817d4dd6c6..2412a7c8fd8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java @@ -20,7 +20,6 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.core.data.IOseeBranch; -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.Artifact; import org.eclipse.osee.framework.ui.skynet.internal.ServiceUtil; @@ -54,7 +53,7 @@ public class CopyHandler extends AbstractHandler { Object object = iterator.next(); if (object instanceof IAdaptable) { - selectionObject = ((IAdaptable) object).getAdapter(Branch.class); + selectionObject = ((IAdaptable) object).getAdapter(IOseeBranch.class); if (selectionObject == null) { selectionObject = ((IAdaptable) object).getAdapter(Artifact.class); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java index 158a2d4d952..d3f94a1747e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java @@ -24,7 +24,7 @@ import org.eclipse.search.ui.text.Match; /** * This is a utility class for OSEE handlers - * + * * @author Jeff C. Phillips */ public class Handlers { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/OpenArtifactExplorerHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/OpenArtifactExplorerHandler.java index 67cab270128..2ed788eaf2f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/OpenArtifactExplorerHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/OpenArtifactExplorerHandler.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers; import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.Branch; @@ -45,7 +45,7 @@ public class OpenArtifactExplorerHandler extends CommandHandler { @Override public Object executeWithException(ExecutionEvent event, IStructuredSelection selection) { - List<? extends IOseeBranch> branches = getSelectedBranches(selection); + List<? extends BranchId> branches = getSelectedBranches(selection); if (!branches.isEmpty()) { ArtifactExplorer.exploreBranch(branches.iterator().next()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/PasteHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/PasteHandler.java index 84a66e9dee5..0e034d0c527 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/PasteHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/PasteHandler.java @@ -17,7 +17,7 @@ import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.ui.skynet.artifact.ArtifactNameConflictHandler; @@ -51,7 +51,7 @@ public class PasteHandler extends AbstractHandler { Object object = iterator.next(); if (object instanceof IAdaptable) { - selectionObject = ((IAdaptable) object).getAdapter(Branch.class); + selectionObject = ((IAdaptable) object).getAdapter(IOseeBranch.class); if (selectionObject == null) { selectionObject = ((IAdaptable) object).getAdapter(Artifact.class); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java index ffd735ffe50..2fdd61c578a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java @@ -16,7 +16,7 @@ import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -34,7 +34,7 @@ public class ArchiveBranchHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return !branches.isEmpty() && AccessControlManager.isOseeAdmin(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java index c756a2780aa..909bcc462c2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java @@ -17,7 +17,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.Branch; @@ -64,7 +64,7 @@ public class BranchCreationHandler extends CommandHandler { IExceptionableRunnable runnable = new IExceptionableRunnable() { @Override public IStatus run(IProgressMonitor monitor) throws Exception { - IOseeBranch branch = parentTransactionId.getBranch(); + BranchId branch = parentTransactionId.getBranch(); if (branch.equals(CoreBranches.SYSTEM_ROOT)) { BranchManager.createTopLevelBranch(dialog.getEntry()); } else { @@ -93,10 +93,10 @@ public class BranchCreationHandler extends CommandHandler { } Object object = structuredSelection.getFirstElement(); - IOseeBranch branch = null; + BranchId branch = null; - if (object instanceof IOseeBranch) { - branch = (IOseeBranch) object; + if (object instanceof BranchId) { + branch = (BranchId) object; } else if (object instanceof TransactionRecord) { branch = ((TransactionRecord) object).getBranch(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java index a9a1fc34e56..6129f17ee91 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java @@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -98,13 +98,13 @@ public abstract class GeneralBranchHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return !branches.isEmpty() && (AccessControlManager.isOseeAdmin() || canEnableBranches(branches)); } - private boolean canEnableBranches(List<? extends IOseeBranch> branches) { + private boolean canEnableBranches(List<? extends BranchId> branches) { boolean canBeDeleted = true; - for (IOseeBranch branch : branches) { + for (BranchId branch : branches) { if (!isEnableAllowed(BranchManager.getBranch(branch))) { canBeDeleted = false; break; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java index a121b83d485..cddb06ae44b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java @@ -14,7 +14,7 @@ import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -64,7 +64,7 @@ public class OpenAssociatedArtifactHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return branches.size() == 1; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java index ed9c21e7680..7b773496caa 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java @@ -16,7 +16,7 @@ import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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.Artifact; @@ -54,7 +54,7 @@ public class SetAssociatedBranchArtifactHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return branches.size() == 1 && AccessControlManager.isOseeAdmin(); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java index b74e53ed3ae..4835dc882f8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java @@ -18,7 +18,7 @@ import org.eclipse.core.commands.Command; import org.eclipse.jface.action.IContributionItem; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.UserManager; @@ -48,10 +48,10 @@ public class ToggleFavoriteBranchContributionItem extends CompoundContributionPr if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection(); - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); if (!branches.isEmpty()) { - IOseeBranch selectedBranch = branches.iterator().next(); + BranchId selectedBranch = branches.iterator().next(); if (selectedBranch != null) { try { String commandId = ToggleFavoriteBranchHandler.COMMAND_ID; @@ -73,7 +73,7 @@ public class ToggleFavoriteBranchContributionItem extends CompoundContributionPr return contributionItems.toArray(new IContributionItem[0]); } - private CommandContributionItem createCommand(String label, IOseeBranch branch, String commandId) { + private CommandContributionItem createCommand(String label, BranchId branch, String commandId) { CommandContributionItem contributionItem; contributionItem = new CommandContributionItem( diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java index 92f4e6f99d1..9121cbce771 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers.branch; import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.UserManager; @@ -43,7 +43,7 @@ public class ToggleFavoriteBranchHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return branches.size() == 1; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java index a0be1d9f8b5..814e2150bc9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java @@ -21,7 +21,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -123,11 +123,11 @@ public abstract class CommitHandler extends CommandHandler { branch) && !branch.getArchiveState().isArchived(); } protected class CommitJob extends Job { - private final IOseeBranch sourceBranch; - private final IOseeBranch destinationBranch; + private final BranchId sourceBranch; + private final BranchId destinationBranch; private final boolean archiveSourceBranch; - public CommitJob(IOseeBranch sourceBranch, IOseeBranch destinationBranch, boolean archiveSourceBranch) { + public CommitJob(BranchId sourceBranch, BranchId destinationBranch, boolean archiveSourceBranch) { super("Commit Branch"); this.destinationBranch = destinationBranch; this.sourceBranch = sourceBranch; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java index 41ca85f45fd..34ff35250cd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java @@ -17,6 +17,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window; 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.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -77,7 +78,7 @@ public class CommitIntoHandler extends CommitHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) { - List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); + List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); return branches.size() == 1; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeManagerHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeManagerHandler.java index b0a164d74d3..7adc33309d6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeManagerHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeManagerHandler.java @@ -14,7 +14,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers.merge; import java.util.List; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; @@ -57,7 +57,7 @@ public class MergeManagerHandler extends CommandHandler { List<Branch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection); if (!branches.isEmpty()) { - IOseeBranch selectedBranch = branches.iterator().next(); + BranchId selectedBranch = branches.iterator().next(); try { if (selectedBranch != null && !ConflictManagerInternal.getDestinationBranchesMerged( selectedBranch.getUuid()).isEmpty()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java index 58db8d011d5..843c53f8e3b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java @@ -17,6 +17,7 @@ import java.util.HashSet; 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.enums.TxChange; import org.eclipse.osee.framework.core.model.type.AttributeType; @@ -122,7 +123,7 @@ public class RepeatEnumerationAttributeValues extends DatabaseHealthOperation { return "Deletes the repeat attribute values using a transaction directly on the branch"; } - private Set<AttrData> getRepeatEnumeratedAttrs(IProgressMonitor monitor, IOseeBranch branch) throws OseeCoreException { + private Set<AttrData> getRepeatEnumeratedAttrs(IProgressMonitor monitor, BranchId branch) throws OseeCoreException { Set<AttrData> attrData = new HashSet<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java index ed073434abe..394c2e50dd3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java @@ -23,6 +23,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; 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.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts; @@ -77,7 +78,7 @@ public class ArtifactSelectionDialog extends SelectionStatusDialog { branchSelect.setSelection(branch); } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branchSelect.getData(); } @@ -245,7 +246,7 @@ public class ArtifactSelectionDialog extends SelectionStatusDialog { @SuppressWarnings("unchecked") private void refreshItems() { - IOseeBranch branch = getBranch(); + BranchId branch = getBranch(); if (branch != null) { List<Object> data = (List<Object>) treeViewer.getInput(); data.clear(); @@ -254,7 +255,7 @@ public class ArtifactSelectionDialog extends SelectionStatusDialog { } } - private Artifact getBaseArtifact(IOseeBranch branch) { + private Artifact getBaseArtifact(BranchId branch) { Artifact toReturn = null; try { toReturn = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch); 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 6771c652f8b..fd623270a1b 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 @@ -29,6 +29,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; 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.model.Branch; import org.eclipse.osee.framework.core.operation.IOperation; @@ -130,7 +131,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor public static void explore(Collection<Artifact> artifacts, IWorkbenchPage page) { Artifact sampleArtifact = null; - IOseeBranch inputBranch = null; + BranchId inputBranch = null; if (artifacts != null && !artifacts.isEmpty()) { sampleArtifact = artifacts.iterator().next(); inputBranch = sampleArtifact.getBranch(); @@ -166,7 +167,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor @Override public void handleEvent(Event event) { try { - IOseeBranch selectedBranch = branchSelect.getData(); + BranchId selectedBranch = branchSelect.getData(); if (selectedBranch != null) { branch = BranchManager.getBranch(selectedBranch); dragAndDropWorker.updateBranch(selectedBranch); @@ -277,7 +278,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor /** * Reveal an artifact in the viewer and select it. */ - public static void exploreBranch(IOseeBranch branch) { + public static void exploreBranch(BranchId branch) { if (branch != null) { IWorkbenchPage page = AWorkbench.getActivePage(); ArtifactExplorerUtil.findView(branch, page); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java index f17b2ec45ab..451a0129575 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java @@ -19,7 +19,7 @@ import org.apache.commons.io.FilenameUtils; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; @@ -64,9 +64,9 @@ public class ArtifactExplorerDragAndDrop extends SkynetDragAndDrop { private final TreeViewer treeViewer; private final IViewPart viewPart; - private IOseeBranch selectedBranch; + private BranchId selectedBranch; - public ArtifactExplorerDragAndDrop(TreeViewer treeViewer, String viewId, IViewPart viewPart, IOseeBranch selectedBranch) { + public ArtifactExplorerDragAndDrop(TreeViewer treeViewer, String viewId, IViewPart viewPart, BranchId selectedBranch) { this(treeViewer, viewId, viewPart); this.selectedBranch = selectedBranch; } @@ -78,7 +78,7 @@ public class ArtifactExplorerDragAndDrop extends SkynetDragAndDrop { this.viewPart = viewPart; } - public void updateBranch(IOseeBranch branch) { + public void updateBranch(BranchId branch) { selectedBranch = branch; } @@ -119,7 +119,7 @@ public class ArtifactExplorerDragAndDrop extends SkynetDragAndDrop { AccessPolicy policy = ServiceUtil.getAccessPolicy(); Artifact[] artifactsBeingDropped = toBeDropped.getArtifacts(); List<Artifact> artsOnSameBranchAsDestination = new LinkedList<>(); - IOseeBranch destinationBranch = dropTarget.getBranch(); + BranchId destinationBranch = dropTarget.getBranch(); for (Artifact art : artifactsBeingDropped) { if (art.isOnBranch(destinationBranch)) { artsOnSameBranchAsDestination.add(art); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerUtil.java index 6bf076c1b6e..6825469d0f9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerUtil.java @@ -19,7 +19,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; @@ -48,7 +48,7 @@ public class ArtifactExplorerUtil { // Utility Class } - protected static ArtifactExplorer findView(IOseeBranch inputBranch, IWorkbenchPage page) { + protected static ArtifactExplorer findView(BranchId inputBranch, IWorkbenchPage page) { for (IViewReference view : page.getViewReferences()) { if (view.getId().equals(ArtifactExplorer.VIEW_ID)) { if (view.getView(false) != null && inputBranch.equals( diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java index 66dbe35020f..d326bb115ee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java @@ -21,9 +21,9 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; import org.eclipse.osee.framework.access.AccessControlManager; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; @@ -506,7 +506,7 @@ public class ArtifactExplorerMenu { @Override public void widgetSelected(SelectionEvent ev) { - IOseeBranch branch = BranchSelectionDialog.getBranchFromUser(); + BranchId branch = BranchSelectionDialog.getBranchFromUser(); if (branch != null) { for (Artifact artifact : getSelection().toList()) { try { 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 59ca570d1bd..26569093efb 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 @@ -19,7 +19,7 @@ import java.util.Set; 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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.RelationOrderBaseTypes; @@ -50,9 +50,9 @@ public class GroupExplorerDragAndDrop extends SkynetDragAndDrop { private final TreeViewer treeViewer; private final String viewId; private boolean isCtrlPressed = false; - private IOseeBranch branch; + private BranchId branch; - public GroupExplorerDragAndDrop(TreeViewer treeViewer, String viewId, IOseeBranch branch) { + public GroupExplorerDragAndDrop(TreeViewer treeViewer, String viewId, BranchId branch) { super(treeViewer.getTree(), viewId); this.treeViewer = treeViewer; this.viewId = viewId; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactSelectPanel.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactSelectPanel.java index 598e2f63895..9c17530131d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactSelectPanel.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactSelectPanel.java @@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.ArrayContentProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.ui.skynet.ArtifactLabelProvider; @@ -55,7 +55,7 @@ public class ArtifactSelectPanel extends AbstractItemSelectPanel<Artifact> { dialog.setMessage(message); dialog.setImage(ImageManager.getImage(FrameworkImage.ARTIFACT_EXPLORER)); dialog.setValidator(new SingleSelectionStatusValidator()); - IOseeBranch branch = lastSelected != null ? lastSelected.getBranch() : COMMON; + BranchId branch = lastSelected != null ? lastSelected.getBranch() : COMMON; dialog.setInput(branch); if (lastSelected != null) { dialog.setInitialSelections(new Object[] {lastSelected}); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java index de9f7255702..2260f1a47bc 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.relation.explorer; import java.util.ArrayList; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -54,7 +54,7 @@ public class RelationExplorerWindow { private final ArrayList<Artifact> validArtifacts; private final ArrayList<String> urls; private final ArrayList<String> names; - private IOseeBranch branch; + private BranchId branch; // Private arrays for invalid drops private final ArrayList<String> invalidName; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java index f4b4261f5a1..87a255d2521 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java @@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.type.ArtifactType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; @@ -58,7 +58,7 @@ public class RelationTableViewer { public ArrayList<ArtifactType> fullDescriptorList; - public RelationTableViewer(Table validTable, Table invalidTable, IOseeBranch branch) { + public RelationTableViewer(Table validTable, Table invalidTable, BranchId branch) { try { fullDescriptorList = new ArrayList<>(ArtifactTypeManager.getValidArtifactTypes(branch)); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java index ff2397cc8a1..27de43c1e62 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java @@ -12,7 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.render; import java.util.ArrayList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; @@ -30,7 +30,7 @@ public class ArtifactGuidToWordML { this.linkBuilder = linkBuilder; } - public List<String> resolveAsOseeLinks(IOseeBranch branch, List<String> artifactGuids) throws OseeCoreException { + public List<String> resolveAsOseeLinks(BranchId branch, List<String> artifactGuids) throws OseeCoreException { List<String> mlLinks = new ArrayList<>(); for (String guid : artifactGuids) { Long uuidFromGuid = ArtifactQuery.getUuidFromGuid(guid, branch); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java index 92e63de5eb1..2fb0eaa5ac1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/FileSystemRenderer.java @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.List; import java.util.logging.Level; import org.eclipse.core.resources.IFile; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -56,9 +57,9 @@ public abstract class FileSystemRenderer extends DefaultArtifactRenderer { IOseeBranch initialBranch = null; for (Artifact artifact : artifacts) { if (initialBranch == null) { - initialBranch = artifact.getBranch(); + initialBranch = artifact.getBranchToken(); } else { - if (artifact.getBranch() != initialBranch) { + if (!artifact.isOnBranch(initialBranch)) { throw new IllegalArgumentException("All of the artifacts must be on the same branch to be mass edited"); } } @@ -129,5 +130,5 @@ public abstract class FileSystemRenderer extends DefaultArtifactRenderer { } } - protected abstract IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) throws OseeCoreException; + protected abstract IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java index c3214f56cbb..7ea27cd48da 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java @@ -19,6 +19,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.jface.resource.ImageDescriptor; +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.enums.CoreAttributeTypes; @@ -113,7 +114,7 @@ public class HTMLRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { return new FileToAttributeUpdateOperation(file, artifacts.get(0), CoreAttributeTypes.PlainTextContent); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java index 558535b4445..8ecfc7c68c8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java @@ -27,7 +27,7 @@ import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.core.operation.Operations; @@ -188,7 +188,7 @@ public class JavaRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) throws OseeCoreException { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) throws OseeCoreException { throw new UnsupportedOperationException(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/NativeRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/NativeRenderer.java index 682ce1cfd70..f12ab4c08da 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/NativeRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/NativeRenderer.java @@ -19,7 +19,7 @@ import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -104,7 +104,7 @@ public class NativeRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { return new FileToAttributeUpdateOperation(file, artifacts.get(0), CoreAttributeTypes.NativeContent); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/OpenOfficeWriterRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/OpenOfficeWriterRenderer.java index e065592ab27..0a090e2a4f8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/OpenOfficeWriterRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/OpenOfficeWriterRenderer.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.render; import java.io.File; import java.io.InputStream; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.types.IArtifact; @@ -50,7 +50,7 @@ public class OpenOfficeWriterRenderer extends FileSystemRenderer implements ITem } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { throw new UnsupportedOperationException(); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/PlainTextRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/PlainTextRenderer.java index a94fd16d87d..55571469a5b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/PlainTextRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/PlainTextRenderer.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; @@ -76,7 +76,7 @@ public class PlainTextRenderer extends FileSystemRenderer { if (presentationType == PresentationType.DIFF && WordUtil.containsWordAnnotations(content)) { throw new OseeStateException( "Trying to diff the [%s] artifact on the [%s] branch, which has tracked changes turned on. All tracked changes must be removed before the artifacts can be compared.", - artifact.getName(), artifact.getBranch().getName()); + artifact.getName(), artifact.getBranchToken().getName()); } stream = Streams.convertStringToInputStream(content, "UTF-8"); } @@ -112,7 +112,7 @@ public class PlainTextRenderer extends FileSystemRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { return new FileToAttributeUpdateOperation(file, artifacts.get(0), CoreAttributeTypes.PlainTextContent); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RelationOrderRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RelationOrderRenderer.java index 2ec3f19ccdf..f83278aeeed 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RelationOrderRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RelationOrderRenderer.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.render; import java.util.List; import java.util.Map.Entry; import java.util.logging.Level; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.RelationSide; import org.eclipse.osee.framework.core.model.cache.AbstractOseeCache; import org.eclipse.osee.framework.core.model.type.RelationType; @@ -72,7 +72,7 @@ public class RelationOrderRenderer { } - public void toWordML(Producer producer, IOseeBranch branch, RelationOrderData relationOrderData) { + public void toWordML(Producer producer, BranchId branch, RelationOrderData relationOrderData) { WordMLProducer writer = (WordMLProducer) producer; try { writer.startTable(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java index a5c3dabff69..46e3de8426f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java @@ -20,7 +20,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.define.report.api.WordArtifactChange; import org.eclipse.osee.define.report.api.WordUpdateChange; import org.eclipse.osee.define.report.api.WordUpdateData; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.core.operation.AbstractOperation; import org.eclipse.osee.framework.jdk.core.util.Lib; @@ -43,10 +43,10 @@ import org.eclipse.osee.framework.ui.skynet.preferences.MsWordPreferencePage; public class UpdateArtifactOperation extends AbstractOperation { private final File workingFile; private final List<Artifact> artifacts; - private final IOseeBranch branch; + private final BranchId branch; private final boolean threeWayMerge; - public UpdateArtifactOperation(File workingFile, List<Artifact> artifacts, IOseeBranch branch, boolean threeWayMerge) { + public UpdateArtifactOperation(File workingFile, List<Artifact> artifacts, BranchId branch, boolean threeWayMerge) { super("Update Artifact", Activator.PLUGIN_ID); this.workingFile = workingFile; this.artifacts = artifacts; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java index 584cd15b9fa..13ffb7c24e2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java @@ -30,7 +30,7 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.osee.define.report.api.DataRightInput; import org.eclipse.osee.define.report.api.DataRightResult; import org.eclipse.osee.define.report.api.PageOrientation; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; @@ -101,7 +101,7 @@ public class WholeWordRenderer extends WordRenderer { if (presentationType == PresentationType.DIFF && WordUtil.containsWordAnnotations(content)) { throw new OseeStateException( "Trying to diff the [%s] artifact on the [%s] branch, which has tracked changes turned on. All tracked changes must be removed before the artifacts can be compared.", - artifact.getName(), artifact.getBranch().getName()); + artifact.getName(), artifact.getBranchToken().getName()); } Set<String> unknownGuids = new HashSet<>(); @@ -128,7 +128,7 @@ public class WholeWordRenderer extends WordRenderer { } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { return new FileToAttributeUpdateOperation(file, artifacts.get(0), CoreAttributeTypes.WholeWordContent); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java index ff866213c79..3c247b0cdea 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java @@ -28,7 +28,7 @@ import javax.xml.stream.XMLStreamWriter; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.osee.define.report.api.ReportConstants; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.operation.IOperation; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -267,7 +267,7 @@ public class WordTemplateRenderer extends WordRenderer implements ITemplateRende } @Override - protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) { + protected IOperation getUpdateOperation(File file, List<Artifact> artifacts, BranchId branch, PresentationType presentationType) { return new UpdateArtifactOperation(file, artifacts, branch, false); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordExtractorData.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordExtractorData.java index ff4ce86e8d6..0559d952714 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordExtractorData.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordExtractorData.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.ui.skynet.render.artifactElement; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -47,7 +47,7 @@ public class WordExtractorData { return parent; } - public Artifact getArtifact(IOseeBranch branch) throws OseeCoreException { + public Artifact getArtifact(BranchId branch) throws OseeCoreException { if (artifact == null && Strings.isValid(getGuid())) { artifact = ArtifactQuery.getArtifactFromId(getGuid(), branch, DeletionFlag.INCLUDE_DELETED); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java index 1182bcf3bb9..ca0ca9add56 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java @@ -20,6 +20,7 @@ import java.util.regex.Pattern; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; +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.exception.OperationTimedoutException; @@ -63,7 +64,7 @@ public abstract class AbstractWordCompare implements IComparator { return renderer; } - protected IVbaDiffGenerator createGenerator(List<Artifact> artifacts, IOseeBranch branch, PresentationType presentationType) throws OseeCoreException { + protected IVbaDiffGenerator createGenerator(List<Artifact> artifacts, BranchId branch, PresentationType presentationType) throws OseeCoreException { boolean show = !getRenderer().getBooleanOption(IRenderer.NO_DISPLAY); boolean executeVbScript = System.getProperty("os.name").contains("Windows"); boolean skipErrors = !getRenderer().getBooleanOption(IRenderer.SKIP_ERRORS); @@ -80,7 +81,7 @@ public abstract class AbstractWordCompare implements IComparator { if (artifact == null) { artifact = artifactDelta.getEndArtifact(); } - IOseeBranch branch = artifact.getBranch(); + IOseeBranch branch = artifact.getBranchToken(); IVbaDiffGenerator diffGenerator = createGenerator(Collections.singletonList(artifact), branch, presentationType); @@ -103,7 +104,7 @@ public abstract class AbstractWordCompare implements IComparator { @Override public void compare(CompareDataCollector collector, Artifact baseVersion, Artifact newerVersion, IFile baseFile, IFile newerFile, PresentationType presentationType, String pathPrefix) throws OseeCoreException { - IOseeBranch branch = (baseVersion != null ? baseVersion : newerVersion).getBranch(); + IOseeBranch branch = (baseVersion != null ? baseVersion : newerVersion).getBranchToken(); String resultPath = getDiffPath(baseVersion, newerVersion, presentationType, pathPrefix); String vbsPath = RenderingUtil.getRenderPath(renderer, branch, presentationType, null, "compareDocs", ".vbs"); @@ -128,7 +129,7 @@ public abstract class AbstractWordCompare implements IComparator { Artifact artifact = baseVersion != null ? baseVersion : newerVersion; List<Artifact> artifacts = Collections.singletonList(artifact); String diffPath = - RenderingUtil.getRenderPath(renderer, artifacts, artifact.getBranch(), presentationType, prefix, ".xml"); + RenderingUtil.getRenderPath(renderer, artifacts, artifact.getBranchToken(), presentationType, prefix, ".xml"); return diffPath; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/WordTemplateCompare.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/WordTemplateCompare.java index 0473eed68f5..3ec2ea5dca9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/WordTemplateCompare.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/WordTemplateCompare.java @@ -53,7 +53,7 @@ public class WordTemplateCompare extends AbstractWordCompare { if (artifact == null) { artifact = artifactDelta1.getEndArtifact(); } - IOseeBranch branch = artifact.getBranch(); + IOseeBranch branch = artifact.getBranchToken(); List<Artifact> artifacts = Collections.emptyList(); IVbaDiffGenerator diffGenerator = createGenerator(artifacts, branch, presentationType); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java index 9ab53db0152..adeea596b71 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java @@ -21,7 +21,7 @@ import java.util.Set; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionDelta; @@ -126,7 +126,7 @@ public final class WordTemplateFileDiffer { for (Change change : changes) { changeIds.add(change.getArtId()); } - IOseeBranch endBranch = txDelta.getEndTx().getBranch(); + BranchId endBranch = txDelta.getEndTx().getBranch(); // loop through all artifacts that are on the IS branch for (Artifact art : endArtifacts) { Integer artId = art.getArtId(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java index bf97ee3f28c..3d06d8d6560 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java @@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.PermissionEnum; import org.eclipse.osee.framework.core.model.type.RelationType; import org.eclipse.osee.framework.help.ui.OseeHelpContext; @@ -152,15 +152,15 @@ public class ArtifactSearchPage extends DialogPage implements ISearchPage, IRepl @Override public void handleEvent(Event event) { - IOseeBranch branch = branchSelect.getSelection(); + BranchId branch = branchSelect.getSelection(); if (!isBranchReadable(branch)) { AWorkbench.popup(String.format("Read Access Denied for branch [%s]", branch)); } } } - private IOseeBranch getSelectedBranch() { - IOseeBranch branch = branchSelect.getData(); + private BranchId getSelectedBranch() { + BranchId branch = branchSelect.getData(); if (branch == null) { branch = BranchManager.getLastBranch(); } @@ -538,7 +538,7 @@ public class ArtifactSearchPage extends DialogPage implements ISearchPage, IRepl } } - private static boolean isBranchReadable(IOseeBranch branch) { + private static boolean isBranchReadable(BranchId branch) { boolean read = false; if (branch != null) { read = AccessControlService.getAccessService().hasPermission(branch, PermissionEnum.READ); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java index 6345aaa331e..a33fb96958b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AttributeFindReplaceDialog.java @@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -63,7 +63,7 @@ public class AttributeFindReplaceDialog extends Dialog { private ComboViewer cmbAttributeDescriptors; private Text txtFindRegEx; private Text txtReplaceStr; - private IOseeBranch branch; + private BranchId branch; private final List<Artifact> artifacts; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java index ebbbc127215..f9ffe1470d4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.search; import java.util.Collection; import java.util.LinkedList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; @@ -26,10 +26,10 @@ import org.eclipse.osee.framework.ui.skynet.search.filter.FilterModelList; */ public class FilterArtifactSearchQuery extends AbstractLegacyArtifactSearchQuery { private final FilterModelList filterList; - private final IOseeBranch branch; + private final BranchId branch; private String criteriaLabel = ""; - public FilterArtifactSearchQuery(FilterModelList filterList, IOseeBranch branch) { + public FilterArtifactSearchQuery(FilterModelList filterList, BranchId branch) { this.filterList = filterList; this.branch = branch; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java index 78ff43d3016..edb0858cf84 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -28,10 +28,10 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.QueryBuilderArtifa */ final class IdArtifactSearch extends AbstractLegacyArtifactSearchQuery { private final String searchString; - private final IOseeBranch branchToSearch; + private final BranchId branchToSearch; private final DeletionFlag allowDeleted; - IdArtifactSearch(String searchString, IOseeBranch branchToSearch, DeletionFlag allowDeleted) { + IdArtifactSearch(String searchString, BranchId branchToSearch, DeletionFlag allowDeleted) { super(); this.searchString = searchString; this.branchToSearch = branchToSearch; 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 146411e0305..26eb16a316f 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 @@ -21,6 +21,7 @@ import java.util.LinkedList; import java.util.List; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; +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; @@ -98,7 +99,7 @@ public class QuickSearchView extends GenericViewPart { if (DbConnectionExceptionComposite.dbConnectionIsOk() && memento != null) { if (Widgets.isAccessible(attrSearchComposite)) { memento.putString(LAST_QUERY_KEY_ID, attrSearchComposite.getQuery()); - IOseeBranch branch = branchSelect.getData(); + BranchId branch = branchSelect.getData(); if (branch != null) { memento.putString(LAST_BRANCH_UUID, String.valueOf(branch.getUuid())); } @@ -264,7 +265,7 @@ public class QuickSearchView extends GenericViewPart { public void handleEvent(Event event) { if (Widgets.isAccessible(branchLabel) && branchSelect != null) { branchLabel.setText(""); - final IOseeBranch branch = branchSelect.getData(); + final BranchId branch = branchSelect.getData(); if (branch == null) { branchLabel.setText("Error: Must Select a Branch"); } else if (!AccessControlService.getAccessService().hasPermission(branch, PermissionEnum.READ)) { @@ -300,7 +301,7 @@ public class QuickSearchView extends GenericViewPart { public void handleEvent(Event event) { if (Widgets.isAccessible(branchLabel) && branchSelect != null) { branchLabel.setText(""); - final IOseeBranch branch = branchSelect.getData(); + final BranchId branch = branchSelect.getData(); if (branch == null) { branchLabel.setText("Error: Must Select a Branch"); } else if (!AccessControlService.getAccessService().hasPermission(branch, PermissionEnum.READ)) { 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 8db291cc4b6..ae27e0f3ad3 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 @@ -10,6 +10,7 @@ *******************************************************************************/ 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; @@ -19,7 +20,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; /** * Branch Selection with branch uuid storage as String - * + * * @author Donald G. Dunne */ public class XBranchSelectByWidgetDam extends XBranchSelectWidget implements IAttributeWidget { @@ -48,7 +49,7 @@ public class XBranchSelectByWidgetDam extends XBranchSelectWidget implements IAt @Override public void saveToArtifact() throws OseeCoreException { - IOseeBranch selection = getSelection(); + BranchId selection = getSelection(); if (selection == null) { artifact.deleteAttributes(attributeType); } else { @@ -66,7 +67,7 @@ public class XBranchSelectByWidgetDam extends XBranchSelectWidget implements IAt if (isEditable()) { try { Long storedUuid = getStoredUuid(); - IOseeBranch widgetInput = getSelection(); + BranchId widgetInput = getSelection(); Long widgetUuid = widgetInput == null ? 0L : widgetInput.getUuid(); if (!storedUuid.equals(widgetUuid)) { return new Result(true, getAttributeType() + " is dirty"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java index 6b6a277e738..5057aecd092 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.List; 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.jdk.core.util.Strings; import org.eclipse.osee.framework.ui.skynet.branch.BranchSelectComposite; @@ -110,7 +111,7 @@ public class XBranchSelectWidget extends GenericXWidget implements Listener { } @Override - public IOseeBranch getData() { + public BranchId getData() { return getSelection(); } 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 41111a136e8..1c7b21701ca 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 @@ -10,6 +10,7 @@ *******************************************************************************/ 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; @@ -20,7 +21,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; /** * Branch Selection with branch uuid storage as String - * + * * @author Donald G. Dunne */ public class XBranchSelectWidgetDam extends XBranchSelectWidget implements IAttributeWidget { @@ -54,7 +55,7 @@ public class XBranchSelectWidgetDam extends XBranchSelectWidget implements IAttr @Override public void saveToArtifact() throws OseeCoreException { - IOseeBranch selection = getSelection(); + BranchId selection = getSelection(); if (selection == null) { artifact.deleteAttributes(attributeType); } else { @@ -72,7 +73,7 @@ public class XBranchSelectWidgetDam extends XBranchSelectWidget implements IAttr if (isEditable()) { try { Long storedUuid = getStoredUuid(); - IOseeBranch widgetInput = getSelection(); + BranchId widgetInput = getSelection(); Long widgetUuid = widgetInput == null ? 0L : widgetInput.getUuid(); if (!storedUuid.equals(widgetUuid)) { return new Result(true, getAttributeType() + " is dirty"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java index 8766d9c6569..941755e2eed 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java @@ -18,7 +18,7 @@ import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.operation.ClientLogger; import org.eclipse.osee.framework.core.operation.Operations; import org.eclipse.osee.framework.jdk.core.util.Collections; @@ -115,7 +115,7 @@ public class XListDropViewer extends XListViewer implements IXWidgetInputAddable try { TextTransfer transfer = TextTransfer.getInstance(); String data = (String) cb.getContents(transfer); - IOseeBranch branch = BranchSelectionDialog.getBranchFromUser(); + BranchId branch = BranchSelectionDialog.getBranchFromUser(); Operations.executeAsJob(new StringGuidsToArtifactListOperation(new ClientLogger(Activator.class), data, branch, XListDropViewer.this), true); } finally { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java index d3f8d25c48e..d21ac616d1f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java @@ -135,7 +135,7 @@ public abstract class XSelectFromDialog<T> extends XText { } } - public void setSelectableItems(Collection<T> input) { + public void setSelectableItems(Collection<? extends T> input) { this.input.clear(); this.input.addAll(input); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java index 9fc88d82be6..de566e55411 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java @@ -12,6 +12,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets; import java.util.Collections; import java.util.List; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -25,7 +26,7 @@ import org.eclipse.swt.widgets.Composite; /** * @author Roberto E. Escobar */ -public class XSelectFromMultiChoiceBranch extends XSelectFromDialog<IOseeBranch> { +public class XSelectFromMultiChoiceBranch extends XSelectFromDialog<BranchId> { public XSelectFromMultiChoiceBranch(String displayLabel) { super(displayLabel); 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 aa6f0f55ac3..09d3dbd34e8 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 @@ -12,7 +12,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.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; @@ -30,7 +30,7 @@ public abstract class XTypeListViewer extends XListViewer { setSorter(new ViewerSorter()); } - public IOseeBranch resolveBranch(long branchUuid) { + public BranchId resolveBranch(long branchUuid) { try { return BranchManager.getBranch(branchUuid); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java index 67f9fcd6181..5305d7d1a4c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.ui.plugin.util.IShellCloseEvent; import org.eclipse.osee.framework.ui.skynet.branch.BranchSelectComposite; @@ -158,7 +158,7 @@ public class EntryDialogWithBranchSelect extends MessageDialog { this.entryText = entry; } - public IOseeBranch getBranch() { + public BranchId getBranch() { return branchSelect.getSelectedBranch(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java index 4a00363ef76..94d43894855 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java @@ -16,7 +16,7 @@ import java.util.HashSet; import java.util.Set; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.util.Result; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; @@ -32,34 +32,34 @@ import org.eclipse.swt.widgets.Control; */ public class FilteredCheckboxBranchDialog extends FilteredCheckboxTreeDialog { - private Collection<? extends IOseeBranch> selectable; + private Collection<? extends BranchId> selectable; - public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable) { + public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends BranchId> selectable) { this(title, message, selectable, new ArrayTreeContentProvider(), new BranchLabelProvider()); } - public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable, ILabelProvider labelProvider) { + public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends BranchId> selectable, ILabelProvider labelProvider) { this(title, message, selectable, new ArrayTreeContentProvider(), labelProvider); } - public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable, ITreeContentProvider contentProvider, ILabelProvider labelProvider) { + public FilteredCheckboxBranchDialog(String title, String message, Collection<? extends BranchId> selectable, ITreeContentProvider contentProvider, ILabelProvider labelProvider) { super(title, message, contentProvider, labelProvider, new BranchNameSorter()); this.selectable = selectable; } - public FilteredCheckboxBranchDialog(String title, Collection<? extends IOseeBranch> selectable) { + public FilteredCheckboxBranchDialog(String title, Collection<? extends BranchId> selectable) { this(title, title, selectable, new BranchLabelProvider()); } @SuppressWarnings("unchecked") @Override - public Collection<IOseeBranch> getChecked() { + public Collection<BranchId> getChecked() { if (super.getTreeViewer() == null) { return Collections.emptyList(); } - Set<IOseeBranch> checked = new HashSet<>(); + Set<BranchId> checked = new HashSet<>(); for (Object obj : getResult()) { - checked.add((IOseeBranch) obj); + checked.add((BranchId) obj); } return checked; } @@ -80,11 +80,11 @@ public class FilteredCheckboxBranchDialog extends FilteredCheckboxTreeDialog { return super.isComplete(); } - public Collection<? extends IOseeBranch> getSelectable() { + public Collection<? extends BranchId> getSelectable() { return selectable; } - public void setSelectable(Collection<IOseeBranch> selectable) { + public void setSelectable(Collection<BranchId> selectable) { this.selectable = selectable; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeBranchDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeBranchDialog.java index 48de69c9dee..fc250a8ab22 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeBranchDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeBranchDialog.java @@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.widgets.dialog; import java.util.Collection; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.util.Result; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; @@ -29,22 +29,22 @@ import org.eclipse.swt.widgets.Control; */ public class FilteredTreeBranchDialog extends FilteredTreeDialog { - private Collection<? extends IOseeBranch> selectable; + private Collection<? extends BranchId> selectable; - public FilteredTreeBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable, ILabelProvider labelProvider) { + public FilteredTreeBranchDialog(String title, String message, Collection<? extends BranchId> selectable, ILabelProvider labelProvider) { this(title, message, selectable, new ArrayTreeContentProvider(), labelProvider); } - public FilteredTreeBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable, ITreeContentProvider contentProvider, ILabelProvider labelProvider) { + public FilteredTreeBranchDialog(String title, String message, Collection<? extends BranchId> selectable, ITreeContentProvider contentProvider, ILabelProvider labelProvider) { super(title, message, contentProvider, labelProvider, new BranchNameSorter()); this.selectable = selectable; } - public FilteredTreeBranchDialog(String title, Collection<? extends IOseeBranch> selectable) { + public FilteredTreeBranchDialog(String title, Collection<? extends BranchId> selectable) { this(title, title, selectable, new BranchLabelProvider()); } - public FilteredTreeBranchDialog(String title, String message, Collection<? extends IOseeBranch> selectable) { + public FilteredTreeBranchDialog(String title, String message, Collection<? extends BranchId> selectable) { this(title, message, selectable, new BranchLabelProvider()); } @@ -64,7 +64,7 @@ public class FilteredTreeBranchDialog extends FilteredTreeDialog { return super.isComplete(); } - public void setSelectable(Collection<IOseeBranch> selectable) { + public void setSelectable(Collection<BranchId> selectable) { this.selectable = selectable; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java index 225cb775869..68e4f7962a3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java @@ -23,7 +23,7 @@ import java.util.logging.Level; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.osee.framework.access.AccessControlManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.Branch; @@ -119,7 +119,7 @@ public class XBranchContentProvider implements ITreeContentProvider { branchTypes.add(BranchType.WORKING); } - Set<IOseeBranch> branchesToReturn = new HashSet<>(); + Set<BranchId> branchesToReturn = new HashSet<>(); if (showOnlyWorkingBranches) { branchesToReturn.addAll(BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING)); } @@ -131,7 +131,7 @@ public class XBranchContentProvider implements ITreeContentProvider { BranchFilter filter = new BranchFilter(branchState, branchTypes.toArray(new BranchType[branchTypes.size()])); - for (IOseeBranch branch : BranchManager.getBranches(filter)) { + for (BranchId branch : BranchManager.getBranches(filter)) { if (BranchManager.isParentSystemRoot(branch)) { branchesToReturn.add(branch); } @@ -153,7 +153,7 @@ public class XBranchContentProvider implements ITreeContentProvider { return null; } - private Collection<Object> getTransactions(IOseeBranch branch) throws OseeCoreException { + private Collection<Object> getTransactions(BranchId branch) throws OseeCoreException { if (!showTransactions) { return Collections.emptyList(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java index c250774eb4b..8f3c7d88609 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java @@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.nebula.widgets.xviewer.XViewerCells; import org.eclipse.nebula.widgets.xviewer.XViewerColumn; import org.eclipse.nebula.widgets.xviewer.XViewerLabelProvider; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.framework.core.model.Branch; @@ -208,9 +208,9 @@ public class XBranchLabelProvider extends XViewerLabelProvider { @Override public Image getColumnImage(Object element, XViewerColumn xCol, int columnIndex) { if (xCol.equals(BranchXViewerFactory.associatedArtifact)) { - if (element instanceof IOseeBranch) { + if (element instanceof BranchId) { try { - Artifact associatedArtifact = BranchManager.getAssociatedArtifact((IOseeBranch) element); + Artifact associatedArtifact = BranchManager.getAssociatedArtifact((BranchId) element); if (!associatedArtifact.equals(SystemUser.OseeSystem)) { return ArtifactImageManager.getImage(associatedArtifact); } 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 6dc81f43a5c..a5b92616324 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 @@ -23,6 +23,7 @@ import org.eclipse.jface.action.ActionContributionItem; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; +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.core.model.TransactionRecord; @@ -69,7 +70,7 @@ public class XBranchWidget extends GenericXWidget { private final boolean filterRealTime; private final boolean searchRealTime; private ToolBar toolBar; - private final IOseeBranch selectedBranch; + private final BranchId selectedBranch; private final List<BranchSelectedListener> branchSelectedListeners; private BranchXViewerFactory branchXViewerFactory; private final IBranchWidgetMenuListener menuListener; @@ -78,7 +79,7 @@ public class XBranchWidget extends GenericXWidget { this(false, false, null, menuListener); } - public XBranchWidget(boolean filterRealTime, boolean searchRealTime, IOseeBranch selectedBranch, IBranchWidgetMenuListener menuListener) { + public XBranchWidget(boolean filterRealTime, boolean searchRealTime, BranchId selectedBranch, IBranchWidgetMenuListener menuListener) { super(VIEW_ID); this.filterRealTime = filterRealTime; this.searchRealTime = searchRealTime; @@ -356,7 +357,7 @@ public class XBranchWidget extends GenericXWidget { public interface BranchSelectedListener { - public void onBranchSelected(IOseeBranch branch); + public void onBranchSelected(BranchId branch); } public interface IBranchWidgetMenuListener { public void updateMenuActionsForTable(MenuManager mm); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/actions/SetAsFavoriteAction.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/actions/SetAsFavoriteAction.java index 1ef618e0bb1..f7a9716ac68 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/actions/SetAsFavoriteAction.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/actions/SetAsFavoriteAction.java @@ -15,6 +15,7 @@ import java.util.logging.Level; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -60,7 +61,7 @@ public class SetAsFavoriteAction extends Action { } if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Toggle Branch Favorites", "Toggle Branch Favorites for " + branches.size() + " branch(s)")) { - for (IOseeBranch branch : branches) { + for (BranchId branch : branches) { user.toggleFavoriteBranch(branch); } user.persist("Toggle Branch Favorites"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java index 0bc0bec7245..1c220b3f836 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java @@ -24,7 +24,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.ActionContributionItem; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -161,7 +161,7 @@ public class XHistoryWidget extends GenericXWidget { if (dialog.open() == 0) { String guid = dialog.getEntry(); Conditions.checkNotNullOrEmpty(guid, "GUID"); - IOseeBranch branch = dialog.getBranch(); + BranchId branch = dialog.getBranch(); Conditions.checkNotNull(branch, "Branch"); Artifact art = ArtifactQuery.getArtifactFromId(guid, branch, DeletionFlag.EXCLUDE_DELETED); if (art != null) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java index 52be6275dba..bd37be1bf71 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java @@ -20,7 +20,6 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; 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.core.model.MergeBranch; import org.eclipse.osee.framework.core.model.TransactionRecord; @@ -334,7 +333,7 @@ public class MergeView extends GenericViewPart implements IBranchEventListener, private boolean conflictInvovlesArtifact(Artifact artifact, Conflict conflict) { if (artifact.getArtId() == conflict.getArtId()) { - IOseeBranch branch = artifact.getBranch(); + BranchId branch = artifact.getBranch(); return branch.equals(conflict.getSourceBranch()) || branch.equals(conflict.getDestBranch()); } return false; @@ -373,7 +372,7 @@ public class MergeView extends GenericViewPart implements IBranchEventListener, } for (Artifact artifact : modifiedArts) { try { - IOseeBranch branch = artifact.getBranch(); + BranchId branch = artifact.getBranch(); if (showConflicts) { Conflict[] conflicts = getConflicts(); for (Conflict conflict : conflicts) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java index 8c0c9133a15..7ae51000c27 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java @@ -26,7 +26,7 @@ import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.ConflictStatus; import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; @@ -414,7 +414,7 @@ public class MergeXWidget extends GenericXWidget { } } - private void refreshAssociatedArtifactItem(IOseeBranch sourceBranch) { + private void refreshAssociatedArtifactItem(BranchId sourceBranch) { try { IArtifact branchAssociatedArtifact = BranchManager.getAssociatedArtifact(sourceBranch); if (branchAssociatedArtifact != null) { diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AbstractOrcsStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AbstractOrcsStorage.java index cb8b3147b64..7f4aab423c4 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AbstractOrcsStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AbstractOrcsStorage.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.account.admin.internal; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.logger.Log; @@ -30,7 +30,7 @@ public abstract class AbstractOrcsStorage { private Log logger; private OrcsApi orcsApi; - private IOseeBranch storageBranch; + private BranchId storageBranch; private AccountFactory factory; public void setLogger(Log logger) { @@ -55,7 +55,7 @@ public abstract class AbstractOrcsStorage { storageBranch = null; } - private IOseeBranch getBranch() { + private BranchId getBranch() { return storageBranch; } diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorage.java index 385a2517b46..8f1799763e6 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorage.java @@ -24,7 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.Map; import org.eclipse.osee.framework.core.data.ArtifactId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.SystemUser; @@ -52,9 +52,9 @@ public class ClientStorage { private final Log logger; private final GsonBuilder builder; private final OrcsApi orcsApi; - private final IOseeBranch storageBranch; + private final BranchId storageBranch; - public ClientStorage(Log logger, GsonBuilder builder, OrcsApi orcsApi, IOseeBranch storageBranch) { + public ClientStorage(Log logger, GsonBuilder builder, OrcsApi orcsApi, BranchId storageBranch) { super(); this.logger = logger; this.builder = builder; @@ -62,7 +62,7 @@ public class ClientStorage { this.storageBranch = storageBranch; } - private IOseeBranch getBranch() { + private BranchId getBranch() { return storageBranch; } diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java index 2aee26f0157..0eb05163ab5 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java @@ -18,7 +18,7 @@ import java.io.InputStream; import java.net.URL; import java.util.concurrent.Callable; import java.util.concurrent.FutureTask; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.jdk.core.type.LazyObject; import org.eclipse.osee.logger.Log; @@ -49,7 +49,7 @@ public class ClientStorageProvider extends LazyObject<ClientStorage> { @Override public ClientStorage call() throws Exception { GsonBuilder builder = new GsonBuilder(); - IOseeBranch storageBranch = CoreBranches.COMMON; + BranchId storageBranch = CoreBranches.COMMON; ClientStorage clientStorage = new ClientStorage(logger, builder, orcsApi, storageBranch); if (!clientStorage.typesExist()) { diff --git a/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java b/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java index 33016a8abcd..213b31eff2a 100644 --- a/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java +++ b/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java @@ -20,7 +20,7 @@ import org.eclipse.osee.authorization.admin.AuthorizationData; import org.eclipse.osee.authorization.admin.AuthorizationProvider; import org.eclipse.osee.authorization.admin.AuthorizationRequest; import org.eclipse.osee.authorization.admin.AuthorizationUser; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.jdk.core.type.ResultSet; @@ -62,7 +62,7 @@ public class OseeAuthorizationProvider implements AuthorizationProvider, Authori return this; } - private IOseeBranch getAdminBranch() { + private BranchId getAdminBranch() { return CoreBranches.COMMON; } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java index 46452d7e13d..7d22bfba373 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java @@ -21,7 +21,7 @@ import java.util.Collections; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -154,7 +154,7 @@ public class ArtifactFactoryTest { when(source.getAttributes(CoreAttributeTypes.Annotation)).thenAnswer(new ReturnAttribute(attribute)); when(attribute.getOrcsData()).thenReturn(attributeData); - when(artifactTypeCache.isValidAttributeType(eq(artifactType), any(IOseeBranch.class), + when(artifactTypeCache.isValidAttributeType(eq(artifactType), any(BranchId.class), eq(CoreAttributeTypes.Annotation))).thenReturn(true); ArgumentCaptor<Artifact> implCapture = ArgumentCaptor.forClass(Artifact.class); @@ -195,7 +195,7 @@ public class ArtifactFactoryTest { when(source.getExistingAttributeTypes()).thenAnswer(new ReturnExistingTypes(types)); when(source.getAttributes(CoreAttributeTypes.Annotation)).thenAnswer(new ReturnAttribute(attribute)); when(attribute.getOrcsData()).thenReturn(attributeData); - when(artifactTypeCache.isValidAttributeType(eq(artifactType), any(IOseeBranch.class), + when(artifactTypeCache.isValidAttributeType(eq(artifactType), any(BranchId.class), eq(CoreAttributeTypes.Annotation))).thenReturn(true); ArgumentCaptor<Artifact> implCapture = ArgumentCaptor.forClass(Artifact.class); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImplTest.java index 0f6af03bc79..5c60e38df4a 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImplTest.java @@ -21,8 +21,9 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.Collection; import java.util.List; +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.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.logger.Log; import org.eclipse.osee.orcs.OrcsSession; @@ -55,7 +56,6 @@ public class GraphDataImplTest { // @formatter:off @Mock private Log logger; - @Mock private Branch branch; @Mock private ArtifactFactory artifactFactory; @Mock private AttributeFactory attributeFactory; @Mock private RelationFactory relationFactory; @@ -86,6 +86,7 @@ public class GraphDataImplTest { @Mock private Relation relation3; @Mock private OrcsSession session; + private final BranchId branch = TokenFactory.createBranch(0L); // @formatter:on @@ -96,7 +97,7 @@ public class GraphDataImplTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - graph = new GraphDataImpl(session, branch.getUuid(), TRANSACTION_ID); + graph = new GraphDataImpl(session, branch.getId(), TRANSACTION_ID); } @Test diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java index 6477081f2ab..3529fe5c6b8 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java @@ -16,7 +16,7 @@ import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; import java.util.Arrays; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.LoadLevel; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -54,7 +54,7 @@ public class RelationNodeLoaderImplTest { @Mock private Artifact artifact; // @formatter:on - private static final IOseeBranch BRANCH = CoreBranches.COMMON; + private static final BranchId BRANCH = CoreBranches.COMMON; private static final int TRANSACTION_ID = 231214214; private static final Collection<Integer> ids = Arrays.asList(4, 5, 6, 7); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImplTest.java index b75c28fa890..ff06801d5de 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImplTest.java @@ -42,7 +42,7 @@ import java.util.List; import org.eclipse.osee.executor.admin.CancellableCallable; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.data.TokenFactory; @@ -91,7 +91,7 @@ public class TransactionBuilderImplTest { @Mock private QueryBuilder builder; @Mock private QueryModule query; - @Mock private IOseeBranch branch; + @Mock private BranchId branch; @Mock private ArtifactReadable expectedAuthor; @Mock private ArtifactReadable expectedDestination; @@ -107,7 +107,7 @@ public class TransactionBuilderImplTest { @Mock private TxData txData; // @formatter:on - private final IOseeBranch expectedBranch = CoreBranches.COMMON; + private final BranchId expectedBranch = CoreBranches.COMMON; private final Long BRANCH_ID = expectedBranch.getUuid(); private TransactionBuilderImpl factory; private String guid; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImplTest.java index 12636b7f967..f85f78d746d 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImplTest.java @@ -14,7 +14,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -54,7 +54,7 @@ public class TransactionFactoryImplTest { @Mock private TxData txData; // @formatter:on - private final IOseeBranch expectedBranch = CoreBranches.COMMON; + private final BranchId expectedBranch = CoreBranches.COMMON; private TransactionFactoryImpl factory; @Before diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxCallableFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxCallableFactoryTest.java index 2be71cd6d2c..1651e243b3f 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxCallableFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxCallableFactoryTest.java @@ -21,7 +21,7 @@ import static org.mockito.Mockito.when; import java.util.Collection; import java.util.Collections; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.logger.Log; @@ -65,7 +65,7 @@ public class TxCallableFactoryTest { @Mock private RelationManager relationManager; @Mock private TxDataLoader loader; - @Mock private IOseeBranch branch; + @Mock private BranchId branch; @Mock private GraphData graph; @Mock private TxDataStore txDataStore; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java index 1678826a4ba..00c759ca4e2 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java @@ -33,7 +33,7 @@ import java.util.Iterator; import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +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.CoreBranches; @@ -91,11 +91,11 @@ public class OrcsTypesTest { static long BRANCH_A_UUID = 3458234234L; static long BRANCH_B_UUID = 9993245332L; - private static final IOseeBranch BRANCH_A = TokenFactory.createBranch(BRANCH_A_UUID, "Branch A"); - private static final IOseeBranch BRANCH_B = TokenFactory.createBranch(BRANCH_B_UUID, "Branch B"); - private static final IOseeBranch BRANCH_C = TokenFactory.createBranch("Branch C"); - private static final IOseeBranch BRANCH_D = TokenFactory.createBranch("Branch D"); - private static final IOseeBranch BRANCH_E = TokenFactory.createBranch("Branch E"); + private static final BranchId BRANCH_A = TokenFactory.createBranch(BRANCH_A_UUID, "Branch A"); + private static final BranchId BRANCH_B = TokenFactory.createBranch(BRANCH_B_UUID, "Branch B"); + private static final BranchId BRANCH_C = TokenFactory.createBranch("Branch C"); + private static final BranchId BRANCH_D = TokenFactory.createBranch("Branch D"); + private static final BranchId BRANCH_E = TokenFactory.createBranch("Branch E"); @Mock private Log logger; @Mock private OrcsTypesDataStore dataStore; @@ -105,7 +105,7 @@ public class OrcsTypesTest { private OrcsTypes orcsTypes; private List<InputSupplier<? extends InputStream>> resources; - private Multimap<IOseeBranch, IOseeBranch> branchHierachies; + private Multimap<BranchId, BranchId> branchHierachies; private OrcsTypesModule module; @Before @@ -138,12 +138,12 @@ public class OrcsTypesTest { branchHierachies.putAll(BRANCH_D, Arrays.asList(BRANCH_D, BRANCH_A, CoreBranches.SYSTEM_ROOT)); branchHierachies.putAll(BRANCH_E, Arrays.asList(BRANCH_E, BRANCH_B, CoreBranches.SYSTEM_ROOT)); - when(hierarchyProvider.getParentHierarchy(any(IOseeBranch.class))).thenAnswer( - new Answer<Iterable<? extends IOseeBranch>>() { + when(hierarchyProvider.getParentHierarchy(any(BranchId.class))).thenAnswer( + new Answer<Iterable<? extends BranchId>>() { @Override - public Iterable<? extends IOseeBranch> answer(InvocationOnMock invocation) throws Throwable { - IOseeBranch branchToGet = (IOseeBranch) invocation.getArguments()[0]; + public Iterable<? extends BranchId> answer(InvocationOnMock invocation) throws Throwable { + BranchId branchToGet = (BranchId) invocation.getArguments()[0]; return branchHierachies.get(branchToGet); } }); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java index 934a9b6f06f..dd610940950 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java @@ -13,7 +13,7 @@ package org.eclipse.osee.orcs.core.ds; import java.net.URI; import java.util.List; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.change.ChangeItem; @@ -41,22 +41,22 @@ public interface BranchDataStore { Callable<List<ChangeItem>> compareBranch(OrcsSession session, TransactionReadable sourceTx, TransactionReadable destinationTx); - Callable<URI> exportBranch(OrcsSession session, OrcsTypes orcsTypes, List<IOseeBranch> branches, PropertyStore options, String exportName); + Callable<URI> exportBranch(OrcsSession session, OrcsTypes orcsTypes, List<? extends BranchId> branches, PropertyStore options, String exportName); - Callable<URI> importBranch(OrcsSession session, OrcsTypes orcsTypes, URI fileToImport, List<IOseeBranch> branches, PropertyStore options); + Callable<URI> importBranch(OrcsSession session, OrcsTypes orcsTypes, URI fileToImport, List<? extends BranchId> branches, PropertyStore options); Callable<URI> checkBranchExchangeIntegrity(OrcsSession session, URI fileToCheck); - Callable<Void> changeBranchState(OrcsSession session, IOseeBranch branch, BranchState branchState); + Callable<Void> changeBranchState(OrcsSession session, BranchId branch, BranchState branchState); - Callable<Void> changeBranchType(OrcsSession session, IOseeBranch branch, BranchType branchType); + Callable<Void> changeBranchType(OrcsSession session, BranchId branch, BranchType branchType); - Callable<Void> changeBranchName(OrcsSession session, IOseeBranch branch, String branchName); + Callable<Void> changeBranchName(OrcsSession session, BranchId branch, String branchName); - Callable<Void> changeBranchAssociatedArtId(OrcsSession session, IOseeBranch branch, int assocArtId); + Callable<Void> changeBranchAssociatedArtId(OrcsSession session, BranchId branch, int assocArtId); - Callable<Void> archiveUnArchiveBranch(OrcsSession session, IOseeBranch branch, ArchiveOperation op); + Callable<Void> archiveUnArchiveBranch(OrcsSession session, BranchId branch, ArchiveOperation op); - Callable<Void> deleteBranch(OrcsSession session, IOseeBranch branch); + Callable<Void> deleteBranch(OrcsSession session, BranchId branch); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchAncestorOf.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchAncestorOf.java index 5cb6193cdc3..73e040f97c7 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchAncestorOf.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchAncestorOf.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.core.ds.criteria; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.orcs.core.ds.Criteria; @@ -21,14 +21,14 @@ import org.eclipse.osee.orcs.core.ds.Options; */ public class CriteriaBranchAncestorOf extends Criteria implements BranchCriteria { - private final IOseeBranch child; + private final BranchId child; - public CriteriaBranchAncestorOf(IOseeBranch child) { + public CriteriaBranchAncestorOf(BranchId child) { super(); this.child = child; } - public IOseeBranch getChild() { + public BranchId getChild() { return child; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchChildOf.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchChildOf.java index 42c93014829..77ea543830c 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchChildOf.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaBranchChildOf.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.core.ds.criteria; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.orcs.core.ds.Criteria; @@ -21,14 +21,14 @@ import org.eclipse.osee.orcs.core.ds.Options; */ public class CriteriaBranchChildOf extends Criteria implements BranchCriteria { - private final IOseeBranch parent; + private final BranchId parent; - public CriteriaBranchChildOf(IOseeBranch parent) { + public CriteriaBranchChildOf(BranchId parent) { super(); this.parent = parent; } - public IOseeBranch getParent() { + public BranchId getParent() { return parent; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java index a0506eead53..4272e9ace29 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java @@ -18,7 +18,7 @@ import java.util.concurrent.FutureTask; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import org.eclipse.osee.executor.admin.ExecutorAdmin; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreBranches; import org.eclipse.osee.framework.core.enums.SystemUser; import org.eclipse.osee.framework.jdk.core.type.LazyObject; @@ -121,19 +121,19 @@ public class OrcsApiImpl implements OrcsApi { BranchHierarchyProvider hierarchyProvider = new BranchHierarchyProvider() { - private final ThreadLocal<Iterable<? extends IOseeBranch>> cache = - new ThreadLocal<Iterable<? extends IOseeBranch>>(); + private final ThreadLocal<Iterable<? extends BranchId>> cache = + new ThreadLocal<Iterable<? extends BranchId>>(); @Override - public Iterable<? extends IOseeBranch> getParentHierarchy(IOseeBranch branch) throws OseeCoreException { - Iterable<? extends IOseeBranch> toReturn = cache.get(); + public Iterable<? extends BranchId> getParentHierarchy(BranchId branch) throws OseeCoreException { + Iterable<? extends BranchId> toReturn = cache.get(); if (toReturn == null) { - Set<IOseeBranch> branches = Sets.newLinkedHashSet(); + Set<BranchId> branches = Sets.newLinkedHashSet(); BranchQuery branchQuery = getQueryFactory().branchQuery(); branchQuery.andIsAncestorOf(branch); branches.add(branch); - for (IOseeBranch parent : branchQuery.getResults()) { + for (BranchId parent : branchQuery.getResults()) { if (!branches.add(parent)) { logger.error("Cycle detected with branch: [%s]", parent); return Collections.emptyList(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java index 50b952bb351..697bcb809bc 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java @@ -13,6 +13,7 @@ package org.eclipse.osee.orcs.core.internal; import java.net.URI; import java.util.List; import java.util.concurrent.Callable; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchState; @@ -67,22 +68,22 @@ public class OrcsBranchImpl implements OrcsBranch { } @Override - public Callable<Void> archiveUnarchiveBranch(IOseeBranch branch, ArchiveOperation archiveOp) { + public Callable<Void> archiveUnarchiveBranch(BranchId branch, ArchiveOperation archiveOp) { return branchStore.archiveUnArchiveBranch(session, branch, archiveOp); } @Override - public Callable<Void> deleteBranch(IOseeBranch branch) { + public Callable<Void> deleteBranch(BranchId branch) { return branchStore.deleteBranch(session, branch); } @Override - public Callable<List<IOseeBranch>> purgeBranch(IOseeBranch branch, boolean recurse) { + public Callable<List<BranchId>> purgeBranch(BranchId branch, boolean recurse) { return new PurgeBranchCallable(logger, session, branchStore, branch, recurse, queryFactory); } @Override - public Callable<TransactionReadable> commitBranch(ArtifactReadable committer, IOseeBranch source, IOseeBranch destination) { + public Callable<TransactionReadable> commitBranch(ArtifactReadable committer, BranchId source, BranchId destination) { return new CommitBranchCallable(logger, session, branchStore, queryFactory, committer, source, destination); } @@ -92,7 +93,7 @@ public class OrcsBranchImpl implements OrcsBranch { } @Override - public Callable<List<ChangeItem>> compareBranch(IOseeBranch branch) throws OseeCoreException { + public Callable<List<ChangeItem>> compareBranch(BranchId branch) throws OseeCoreException { int baseTransaction = queryFactory.branchQuery().andIds(branch).getResults().getExactlyOne().getBaseTransaction(); TransactionReadable fromTx = queryFactory.transactionQuery().andTxId(baseTransaction).getResults().getExactlyOne(); @@ -101,38 +102,38 @@ public class OrcsBranchImpl implements OrcsBranch { } @Override - public Callable<Void> changeBranchState(IOseeBranch branch, BranchState branchState) { + public Callable<Void> changeBranchState(BranchId branch, BranchState branchState) { return branchStore.changeBranchState(session, branch, branchState); } @Override - public Callable<Void> changeBranchType(IOseeBranch branch, BranchType branchType) { + public Callable<Void> changeBranchType(BranchId branch, BranchType branchType) { return branchStore.changeBranchType(session, branch, branchType); } @Override - public Callable<Void> changeBranchName(IOseeBranch branch, String branchName) { + public Callable<Void> changeBranchName(BranchId branch, String branchName) { return branchStore.changeBranchName(session, branch, branchName); } @Override - public Callable<Void> associateBranchToArtifact(IOseeBranch branch, ArtifactReadable associatedArtifact) { + public Callable<Void> associateBranchToArtifact(BranchId branch, ArtifactReadable associatedArtifact) { Conditions.checkNotNull(associatedArtifact, "associatedArtifact"); return branchStore.changeBranchAssociatedArtId(session, branch, associatedArtifact.getLocalId()); } @Override - public Callable<Void> unassociateBranch(IOseeBranch branch) { + public Callable<Void> unassociateBranch(BranchId branch) { return branchStore.changeBranchAssociatedArtId(session, branch, -1); } @Override - public Callable<URI> exportBranch(List<IOseeBranch> branches, PropertyStore options, String exportName) { + public Callable<URI> exportBranch(List<? extends BranchId> branches, PropertyStore options, String exportName) { return branchStore.exportBranch(session, orcsTypes, branches, options, exportName); } @Override - public Callable<URI> importBranch(URI fileToImport, List<IOseeBranch> branches, PropertyStore options) { + public Callable<URI> importBranch(URI fileToImport, List<? extends BranchId> branches, PropertyStore options) { return branchStore.importBranch(session, orcsTypes, fileToImport, branches, options); } @@ -148,7 +149,7 @@ public class OrcsBranchImpl implements OrcsBranch { } @Override - public Callable<BranchReadable> createBaselineBranch(IOseeBranch branch, ArtifactReadable author, IOseeBranch parent, ArtifactReadable associatedArtifact) throws OseeCoreException { + public Callable<BranchReadable> createBaselineBranch(IOseeBranch branch, ArtifactReadable author, BranchId parent, ArtifactReadable associatedArtifact) throws OseeCoreException { CreateBranchData branchData = branchDataFactory.createBaselineBranchData(branch, author, parent, associatedArtifact); return createBranch(branchData); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/BranchDataFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/BranchDataFactory.java index 15e3781467c..07deb4f03ba 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/BranchDataFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/BranchDataFactory.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.core.internal.branch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchType; @@ -41,7 +42,7 @@ public class BranchDataFactory { null, false); } - public CreateBranchData createBaselineBranchData(IOseeBranch branch, ArtifactReadable author, IOseeBranch parent, ArtifactReadable associatedArtifact) throws OseeCoreException { + public CreateBranchData createBaselineBranchData(IOseeBranch branch, ArtifactReadable author, BranchId parent, ArtifactReadable associatedArtifact) throws OseeCoreException { TransactionQuery txQuery = queryFactory.transactionQuery(); TransactionReadable fromTx = txQuery.andIsHead(parent).getResults().getExactlyOne(); String creationComment = String.format("Branch Creation for %s", branch.getName()); @@ -82,7 +83,7 @@ public class BranchDataFactory { true); } - private CreateBranchData createBranchData(IOseeBranch branch, IOseeBranch parent, BranchType branchType, String creationComment, TransactionReadable sysRootHeadTx, ArtifactReadable author, ArtifactReadable associatedArtifact, boolean bCopyTx) { + private CreateBranchData createBranchData(IOseeBranch branch, BranchId parent, BranchType branchType, String creationComment, TransactionReadable sysRootHeadTx, ArtifactReadable author, ArtifactReadable associatedArtifact, boolean bCopyTx) { CreateBranchData createData = new CreateBranchData(); createData.setUuid(branch.getUuid()); createData.setName(branch.getName()); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/CommitBranchCallable.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/CommitBranchCallable.java index 237b21ab549..6b3c8c73d7b 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/CommitBranchCallable.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/CommitBranchCallable.java @@ -11,7 +11,7 @@ package org.eclipse.osee.orcs.core.internal.branch; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.logger.Log; import org.eclipse.osee.orcs.OrcsSession; @@ -24,11 +24,11 @@ import org.eclipse.osee.orcs.search.QueryFactory; public class CommitBranchCallable extends AbstractBranchCallable<TransactionReadable> { private final ArtifactReadable committer; - private final IOseeBranch source; - private final IOseeBranch destination; + private final BranchId source; + private final BranchId destination; private final QueryFactory queryFactory; - public CommitBranchCallable(Log logger, OrcsSession session, BranchDataStore branchStore, QueryFactory queryFactory, ArtifactReadable committer, IOseeBranch source, IOseeBranch destination) { + public CommitBranchCallable(Log logger, OrcsSession session, BranchDataStore branchStore, QueryFactory queryFactory, ArtifactReadable committer, BranchId source, BranchId destination) { super(logger, session, branchStore); this.committer = committer; this.source = source; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java index 9a07f60c906..834ddbefd78 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java @@ -13,7 +13,7 @@ package org.eclipse.osee.orcs.core.internal.branch; import java.util.LinkedList; import java.util.List; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.ResultSet; @@ -28,13 +28,13 @@ import org.eclipse.osee.orcs.search.QueryFactory; /** * @author Roberto E. Escobar */ -public class PurgeBranchCallable extends AbstractBranchCallable<List<IOseeBranch>> { +public class PurgeBranchCallable extends AbstractBranchCallable<List<BranchId>> { - private final IOseeBranch branchToken; + private final BranchId branchToken; private final boolean isRecursive; private final QueryFactory queryFactory; - public PurgeBranchCallable(Log logger, OrcsSession session, BranchDataStore branchStore, IOseeBranch branchToken, boolean isRecursive, QueryFactory queryFactory) { + public PurgeBranchCallable(Log logger, OrcsSession session, BranchDataStore branchStore, BranchId branchToken, boolean isRecursive, QueryFactory queryFactory) { super(logger, session, branchStore); this.branchToken = branchToken; this.isRecursive = isRecursive; @@ -42,7 +42,7 @@ public class PurgeBranchCallable extends AbstractBranchCallable<List<IOseeBranch } @Override - protected List<IOseeBranch> innerCall() throws Exception { + protected List<BranchId> innerCall() throws Exception { Conditions.checkNotNull(branchToken, "branchToPurge"); BranchQuery branchQuery = queryFactory.branchQuery(); @@ -53,7 +53,7 @@ public class PurgeBranchCallable extends AbstractBranchCallable<List<IOseeBranch ResultSet<BranchReadable> branches = branchQuery.getResults(); - List<IOseeBranch> purged = new LinkedList<>(); + List<BranchId> purged = new LinkedList<>(); List<BranchReadable> orderedBranches = BranchUtil.orderByParentReadable(queryFactory, branches); for (BranchReadable aBranch : orderedBranches) { checkForCancelled(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java index 95190bc7e35..839cf25b8b5 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java @@ -19,7 +19,7 @@ import org.eclipse.osee.console.admin.Console; import org.eclipse.osee.console.admin.ConsoleCommand; import org.eclipse.osee.console.admin.ConsoleParameters; import org.eclipse.osee.executor.admin.CancellableCallable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; @@ -106,8 +106,8 @@ public final class BranchExportCommand implements ConsoleCommand { this.orcsApi = orcsApi; } - private List<IOseeBranch> getBranchesToExport() throws OseeCoreException { - List<IOseeBranch> branches = new LinkedList<>(); + private List<BranchId> getBranchesToExport() throws OseeCoreException { + List<BranchId> branches = new LinkedList<>(); BranchQuery branchQuery = orcsApi.getQueryFactory().branchQuery(); if (includeBranchIds.isEmpty()) { ResultSet<BranchReadable> branchReadables = null; @@ -142,7 +142,7 @@ public final class BranchExportCommand implements ConsoleCommand { @Override public URI call() throws Exception { Conditions.checkNotNullOrEmpty(exportFileName, "exportFileName"); - List<IOseeBranch> branches = getBranchesToExport(); + List<BranchId> branches = getBranchesToExport(); console.writeln("Exporting: [%s] branches", branches.size()); Callable<URI> callable = orcsBranch.exportBranch(branches, options, exportFileName); return callable.call(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java index b8a480590ef..b7f3fed089b 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java @@ -19,7 +19,7 @@ import org.eclipse.osee.console.admin.Console; import org.eclipse.osee.console.admin.ConsoleCommand; import org.eclipse.osee.console.admin.ConsoleParameters; import org.eclipse.osee.executor.admin.CancellableCallable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; import org.eclipse.osee.orcs.ExportOptions; @@ -104,9 +104,9 @@ public final class BranchImportCommand implements ConsoleCommand { throw new OseeArgumentException("Files to import were not specified"); } - List<IOseeBranch> branches = new LinkedList<>(); + List<BranchId> branches = new LinkedList<>(); for (String branchUuidString : branchUuids) { - IOseeBranch branch = branchQuery.andUuids(Long.valueOf(branchUuidString)).getResults().getExactlyOne(); + BranchId branch = branchQuery.andUuids(Long.valueOf(branchUuidString)).getResults().getExactlyOne(); branches.add(branch); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java index dc598e27f45..d29b783a6b4 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java @@ -22,6 +22,7 @@ import org.eclipse.osee.console.admin.Console; import org.eclipse.osee.console.admin.ConsoleCommand; import org.eclipse.osee.console.admin.ConsoleParameters; import org.eclipse.osee.executor.admin.CancellableCallable; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; @@ -111,7 +112,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { unArchived, unDeleted, baseline, runPurge); } - private static class PurgeBranchCallable extends CancellableCallable<List<IOseeBranch>> { + private static class PurgeBranchCallable extends CancellableCallable<List<BranchId>> { private final Console console; private final OrcsBranch orcsBranch; @@ -211,26 +212,27 @@ public final class BranchPurgeCommand implements ConsoleCommand { } @Override - public List<IOseeBranch> call() throws Exception { + public List<BranchId> call() throws Exception { Collection<BranchReadable> branchesToPurge = getBranchesToPurge(); Conditions.checkNotNull(branchesToPurge, "branchesToPurge"); if (branchesToPurge.isEmpty()) { console.writeln("no branches matched specified criteria"); } else { - List<BranchReadable> orderedBranches = BranchUtil.orderByParentReadable(queryFactory, branchesToPurge); + List<? extends IOseeBranch> orderedBranches = + BranchUtil.orderByParentReadable(queryFactory, branchesToPurge); for (IOseeBranch toPurge : orderedBranches) { console.writeln("Branch [%s] guid [%s] will be purged!", toPurge.getName(), toPurge.getGuid()); } - List<IOseeBranch> purged = new LinkedList<>(); + List<BranchId> purged = new LinkedList<>(); if (runPurge) { int size = orderedBranches.size(); int count = 0; - for (IOseeBranch aBranch : orderedBranches) { + for (BranchId aBranch : orderedBranches) { console.writeln("Purging Branch [%s of %s]: [%s]", ++count, size, aBranch); - Callable<List<IOseeBranch>> callable = orcsBranch.purgeBranch(aBranch, false); + Callable<List<BranchId>> callable = orcsBranch.purgeBranch(aBranch, false); purged.addAll(callable.call()); } } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java index 7616a238685..c078bf8e315 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java @@ -22,7 +22,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.data.TokenFactory; @@ -486,7 +486,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { @Override public Void caseOsBranchChildOfClause(OsBranchChildOfClause object) { Long id = resolver.resolveSingle(Long.class, object.getId()); - IOseeBranch branch = asBranch(id); + BranchId branch = asBranch(id); getBranchQuery().andIsChildOf(branch); return null; } @@ -494,7 +494,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { @Override public Void caseOsBranchParentOfClause(OsBranchParentOfClause object) { Long id = resolver.resolveSingle(Long.class, object.getId()); - IOseeBranch branch = asBranch(id); + BranchId branch = asBranch(id); getBranchQuery().andIsAncestorOf(branch); return null; } @@ -700,7 +700,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } ////////////////////////////// Functions; - private IOseeBranch asBranch(Long typeId) { + private BranchId asBranch(Long typeId) { return TokenFactory.createBranch(typeId); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java index 55368561e45..b8beb94b259 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java @@ -15,6 +15,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import org.eclipse.osee.executor.admin.CancellableCallable; +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.LoadLevel; @@ -103,7 +104,7 @@ public class BranchCallableQueryFactory { }; } - private abstract class BranchBuilder<T extends IOseeBranch> extends LoadDataHandlerAdapter { + private abstract class BranchBuilder<T extends BranchId> extends LoadDataHandlerAdapter { private Map<Long, T> branchMap; private List<T> results; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCriteriaFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCriteriaFactory.java index a0ae1587b4e..e99c0f79820 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCriteriaFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCriteriaFactory.java @@ -1,7 +1,7 @@ package org.eclipse.osee.orcs.core.internal.search; import java.util.Collection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -42,11 +42,11 @@ public class BranchCriteriaFactory { return new CriteriaBranchName(value, isPattern); } - public Criteria createBranchChildOfCriteria(IOseeBranch parent) { + public Criteria createBranchChildOfCriteria(BranchId parent) { return new CriteriaBranchChildOf(parent); } - public Criteria createBranchAncestorOfCriteria(IOseeBranch child) { + public Criteria createBranchAncestorOfCriteria(BranchId child) { return new CriteriaBranchAncestorOf(child); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java index f064e482fe9..f4d97599db1 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java @@ -21,7 +21,6 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.eclipse.osee.framework.core.data.BranchId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -154,13 +153,13 @@ public class BranchQueryBuilderImpl<T> implements BranchQueryBuilder<T> { } @Override - public T andIsChildOf(IOseeBranch parent) throws OseeCoreException { + public T andIsChildOf(BranchId parent) throws OseeCoreException { Criteria criteria = criteriaFactory.createBranchChildOfCriteria(parent); return addAndCheck(getQueryData(), criteria); } @Override - public T andIsAncestorOf(IOseeBranch child) throws OseeCoreException { + public T andIsAncestorOf(BranchId child) throws OseeCoreException { Criteria criteria = criteriaFactory.createBranchAncestorOfCriteria(child); return addAndCheck(getQueryData(), criteria); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryImpl.java index 5d4a069ba66..8d599283237 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryImpl.java @@ -22,7 +22,7 @@ import org.eclipse.osee.orcs.search.BranchQuery; /** * @author Roberto E. Escobar */ -public class BranchQueryImpl extends BranchQueryBuilderImpl<BranchQuery>implements BranchQuery { +public class BranchQueryImpl extends BranchQueryBuilderImpl<BranchQuery> implements BranchQuery { private final BranchCallableQueryFactory queryFactory; private final OrcsSession session; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java index 2ba7fa9ef7e..a4b0e53b745 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java @@ -14,7 +14,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.orcs.OrcsSession; @@ -74,7 +74,7 @@ public class QueryFactoryImpl implements QueryFactory { } @Override - public QueryBuilder fromBranch(IOseeBranch branch) throws OseeCoreException { + public QueryBuilder fromBranch(BranchId branch) throws OseeCoreException { Conditions.checkNotNull(branch, "branch"); return fromBranch(branch.getUuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java index 101a01073c5..5801fca0d82 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java @@ -17,7 +17,7 @@ import java.util.Collection; import java.util.LinkedHashSet; import java.util.Set; import org.eclipse.osee.framework.core.data.ArtifactId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.core.ds.Criteria; @@ -98,14 +98,14 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { } @Override - public T andBranch(IOseeBranch... ids) throws OseeCoreException { + public T andBranch(BranchId... ids) throws OseeCoreException { return andBranch(Arrays.asList(ids)); } @Override - public T andBranch(Collection<? extends IOseeBranch> ids) throws OseeCoreException { + public T andBranch(Collection<? extends BranchId> ids) throws OseeCoreException { Set<Long> values = new LinkedHashSet<>(); - for (IOseeBranch value : ids) { + for (BranchId value : ids) { values.add(value.getUuid()); } Criteria criteria = criteriaFactory.newTxBranchIdCriteria(values); @@ -184,7 +184,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { } @Override - public T andIsHead(IOseeBranch branch) throws OseeCoreException { + public T andIsHead(BranchId branch) throws OseeCoreException { return andIsHead(branch.getUuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java index e47da727e1d..79e1ecc6887 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.data.AttributeId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; @@ -110,7 +110,7 @@ public class TransactionBuilderImpl implements TransactionBuilder { } @Override - public ArtifactId copyArtifact(IOseeBranch fromBranch, ArtifactId artifactId) throws OseeCoreException { + public ArtifactId copyArtifact(BranchId fromBranch, ArtifactId artifactId) throws OseeCoreException { return copyArtifact(fromBranch.getUuid(), artifactId); } @@ -124,7 +124,7 @@ public class TransactionBuilderImpl implements TransactionBuilder { } @Override - public ArtifactId copyArtifact(IOseeBranch fromBranch, ArtifactId artifactId, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException { + public ArtifactId copyArtifact(BranchId fromBranch, ArtifactId artifactId, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException { return copyArtifact(fromBranch.getUuid(), artifactId, attributesToDuplicate); } @@ -133,7 +133,7 @@ public class TransactionBuilderImpl implements TransactionBuilder { } @Override - public ArtifactId introduceArtifact(IOseeBranch fromBranch, ArtifactId sourceArtifact) throws OseeCoreException { + public ArtifactId introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException { checkAreOnDifferentBranches(txData, fromBranch.getUuid()); ArtifactReadable source = getArtifactReadable(txData.getSession(), query, fromBranch.getUuid(), sourceArtifact); Conditions.checkNotNull(source, "Source Artifact"); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java index c1b10d1d51d..06f71386ba8 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Set; import java.util.concurrent.Callable; import org.eclipse.osee.executor.admin.CancellableCallable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.data.TokenFactory; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -67,12 +67,12 @@ public class TransactionFactoryImpl implements TransactionFactory { @Override public TransactionBuilder createTransaction(Long branchId, ArtifactReadable userArtifact, String comment) throws OseeCoreException { - IOseeBranch branch = TokenFactory.createBranch(branchId); + BranchId branch = TokenFactory.createBranch(branchId); return createTransaction(branch, userArtifact, comment); } @Override - public TransactionBuilder createTransaction(IOseeBranch branch, ArtifactReadable author, String comment) throws OseeCoreException { + public TransactionBuilder createTransaction(BranchId branch, ArtifactReadable author, String comment) throws OseeCoreException { Conditions.checkNotNull(branch, "branch"); Conditions.checkNotNull(author, "author"); Conditions.checkNotNullOrEmpty(comment, "comment"); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/BranchHierarchyProvider.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/BranchHierarchyProvider.java index 8536e6af145..0e2bc92f1d4 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/BranchHierarchyProvider.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/BranchHierarchyProvider.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.core.internal.types; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; /** @@ -18,6 +18,6 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; */ public interface BranchHierarchyProvider { - Iterable<? extends IOseeBranch> getParentHierarchy(IOseeBranch branch) throws OseeCoreException; + Iterable<? extends BranchId> getParentHierarchy(BranchId branch) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java index 58572e893b0..b7cf6f7f80a 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypeIndex.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Set; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.dsl.oseeDsl.XArtifactType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.core.internal.types.BranchHierarchyProvider; @@ -42,7 +42,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti metaData.setSuperTypes(superTypes); } - public void put(IArtifactType type, Map<IOseeBranch, Collection<IAttributeType>> attributes) { + public void put(IArtifactType type, Map<BranchId, Collection<IAttributeType>> attributes) { ArtifactTypeMetaData metaData = getOrCreateData(type); metaData.setAttributeTypes(attributes); } @@ -56,7 +56,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti return metaData; } - public Map<IOseeBranch, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artifactType) { + public Map<BranchId, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artifactType) { ArtifactTypeMetaData metaData = tokenToTypeData.get(artifactType); return metaData.attributeTypes; } @@ -101,19 +101,19 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti return result; } - public Collection<IAttributeType> getAttributeTypes(IArtifactType artType, IOseeBranch branch) throws OseeCoreException { + public Collection<IAttributeType> getAttributeTypes(IArtifactType artType, BranchId branch) throws OseeCoreException { Set<IAttributeType> attributeTypes = Sets.newLinkedHashSet(); getAttributeTypes(attributeTypes, artType, branch); return attributeTypes; } - private void getAttributeTypes(Set<IAttributeType> attributeTypes, IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { + private void getAttributeTypes(Set<IAttributeType> attributeTypes, IArtifactType artifactType, BranchId branch) throws OseeCoreException { ArtifactTypeMetaData metaData = tokenToTypeData.get(artifactType); if (metaData != null) { - Map<IOseeBranch, Collection<IAttributeType>> validityMap = metaData.getAttributeTypes(); + Map<BranchId, Collection<IAttributeType>> validityMap = metaData.getAttributeTypes(); - Iterable<? extends IOseeBranch> branches = hierarchyProvider.getParentHierarchy(branch); - for (IOseeBranch parent : branches) { + Iterable<? extends BranchId> branches = hierarchyProvider.getParentHierarchy(branch); + for (BranchId parent : branches) { Collection<IAttributeType> items = validityMap.get(parent); if (items != null) { attributeTypes.addAll(items); @@ -129,7 +129,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti private final IArtifactType type; private Set<IArtifactType> superTypes; private final Set<IArtifactType> descendantTypes; - private Map<IOseeBranch, Collection<IAttributeType>> attributeTypes; + private Map<BranchId, Collection<IAttributeType>> attributeTypes; public ArtifactTypeMetaData(IArtifactType type) { super(); @@ -156,7 +156,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti } } - public void setAttributeTypes(Map<IOseeBranch, Collection<IAttributeType>> attributes) { + public void setAttributeTypes(Map<BranchId, Collection<IAttributeType>> attributes) { this.attributeTypes = attributes; } @@ -168,7 +168,7 @@ public class ArtifactTypeIndex extends TokenTypeIndex<Long, IArtifactType, XArti return descendantTypes; } - public Map<IOseeBranch, Collection<IAttributeType>> getAttributeTypes() { + public Map<BranchId, Collection<IAttributeType>> getAttributeTypes() { return attributeTypes; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java index 9c8aa9c30e9..085b4e30f65 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/ArtifactTypesImpl.java @@ -16,7 +16,7 @@ import java.util.LinkedHashSet; import java.util.Map; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.dsl.oseeDsl.XArtifactType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Conditions; @@ -100,13 +100,13 @@ public class ArtifactTypesImpl implements ArtifactTypes { } @Override - public boolean isValidAttributeType(IArtifactType artType, IOseeBranch branch, IAttributeType attributeType) throws OseeCoreException { + public boolean isValidAttributeType(IArtifactType artType, BranchId branch, IAttributeType attributeType) throws OseeCoreException { Collection<IAttributeType> attributes = getAttributeTypes(artType, branch); return attributes.contains(attributeType); } @Override - public Collection<IAttributeType> getAttributeTypes(IArtifactType artType, IOseeBranch branch) throws OseeCoreException { + public Collection<IAttributeType> getAttributeTypes(IArtifactType artType, BranchId branch) throws OseeCoreException { Conditions.checkNotNull(artType, "artifactType"); Conditions.checkNotNull(branch, "branch"); return getArtifactTypesIndex().getAttributeTypes(artType, branch); @@ -128,7 +128,7 @@ public class ArtifactTypesImpl implements ArtifactTypes { } @Override - public Map<IOseeBranch, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artType) throws OseeCoreException { + public Map<BranchId, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artType) throws OseeCoreException { return getArtifactTypesIndex().getAllAttributeTypes(artType); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java index aabb24e61e4..2cb67699a60 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java @@ -23,7 +23,7 @@ import java.util.Set; import org.eclipse.emf.common.util.EList; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +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.dsl.OseeDslResource; @@ -147,11 +147,11 @@ public class OrcsTypesIndexer { } private void indexAttributes(ArtifactTypeIndex artifactTypeIndex, AttributeTypeIndex attributeTypeIndex, XArtifactType dslType) throws OseeCoreException { - Map<IOseeBranch, Collection<IAttributeType>> validAttributes = - new HashMap<IOseeBranch, Collection<IAttributeType>>(); + Map<BranchId, Collection<IAttributeType>> validAttributes = + new HashMap<BranchId, Collection<IAttributeType>>(); for (XAttributeTypeRef xAttributeTypeRef : dslType.getValidAttributeTypes()) { XAttributeType xAttributeType = xAttributeTypeRef.getValidAttributeType(); - IOseeBranch branch = getAttributeBranch(xAttributeTypeRef); + BranchId branch = getAttributeBranch(xAttributeTypeRef); IAttributeType attributeType = attributeTypeIndex.getTokenByDslType(xAttributeType); if (attributeType != null) { @@ -231,8 +231,8 @@ public class OrcsTypesIndexer { return new EnumTypeImpl(uuid, dslType.getName(), entries); } - private IOseeBranch getAttributeBranch(XAttributeTypeRef xAttributeTypeRef) { - IOseeBranch branchToken = CoreBranches.SYSTEM_ROOT; + private BranchId getAttributeBranch(XAttributeTypeRef xAttributeTypeRef) { + BranchId branchToken = CoreBranches.SYSTEM_ROOT; if (Strings.isValid(xAttributeTypeRef.getBranchUuid())) { Long branchId = Long.valueOf(xAttributeTypeRef.getBranchUuid()); if (branchId > 0) { diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/BranchQuerySqlContextFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/BranchQuerySqlContextFactoryImplTest.java index ab081bb00b6..5a417c1e820 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/BranchQuerySqlContextFactoryImplTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/engines/BranchQuerySqlContextFactoryImplTest.java @@ -23,7 +23,7 @@ import static org.mockito.Mockito.when; import java.util.Arrays; import java.util.Iterator; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -481,11 +481,11 @@ public class BranchQuerySqlContextFactoryImplTest { assertEquals(4, iterator.next()); } - private static Criteria ancestorOf(IOseeBranch child) { + private static Criteria ancestorOf(BranchId child) { return new CriteriaBranchAncestorOf(child); } - private static Criteria childOf(IOseeBranch parent) { + private static Criteria childOf(BranchId parent) { return new CriteriaBranchChildOf(parent); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchModule.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchModule.java index 50fe9422289..34a14eb4aeb 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchModule.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchModule.java @@ -14,7 +14,7 @@ import java.net.URI; import java.util.List; import java.util.concurrent.Callable; import org.eclipse.osee.executor.admin.ExecutorAdmin; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.core.model.change.ChangeItem; @@ -105,7 +105,7 @@ public class BranchModule { } @Override - public Callable<URI> exportBranch(OrcsSession session, OrcsTypes orcsTypes, List<IOseeBranch> branches, PropertyStore options, String exportName) { + public Callable<URI> exportBranch(OrcsSession session, OrcsTypes orcsTypes, List<? extends BranchId> branches, PropertyStore options, String exportName) { ExportItemFactory factory = new ExportItemFactory(logger, preferences, jdbcClient, resourceManager, orcsTypes); return new ExportBranchDatabaseCallable(session, factory, joinFactory, preferences, executorAdmin, branches, @@ -113,7 +113,7 @@ public class BranchModule { } @Override - public Callable<URI> importBranch(OrcsSession session, OrcsTypes orcsTypes, URI fileToImport, List<IOseeBranch> branches, PropertyStore options) { + public Callable<URI> importBranch(OrcsSession session, OrcsTypes orcsTypes, URI fileToImport, List<? extends BranchId> branches, PropertyStore options) { ImportBranchDatabaseCallable callable = new ImportBranchDatabaseCallable(logger, session, jdbcClient, preferences, resourceManager, idManager, orcsTypes, fileToImport, branches, options); return callable; @@ -126,32 +126,32 @@ public class BranchModule { } @Override - public Callable<Void> changeBranchState(OrcsSession session, IOseeBranch branch, BranchState branchState) { + public Callable<Void> changeBranchState(OrcsSession session, BranchId branch, BranchState branchState) { return ChangeBranchFieldCallable.newBranchState(logger, session, jdbcClient, branch, branchState); } @Override - public Callable<Void> changeBranchType(OrcsSession session, IOseeBranch branch, BranchType branchType) { + public Callable<Void> changeBranchType(OrcsSession session, BranchId branch, BranchType branchType) { return ChangeBranchFieldCallable.newBranchType(logger, session, jdbcClient, branch, branchType); } @Override - public Callable<Void> changeBranchName(OrcsSession session, IOseeBranch branch, String branchName) { + public Callable<Void> changeBranchName(OrcsSession session, BranchId branch, String branchName) { return ChangeBranchFieldCallable.newBranchName(logger, session, jdbcClient, branch, branchName); } @Override - public Callable<Void> changeBranchAssociatedArtId(OrcsSession session, IOseeBranch branch, int assocArtId) { + public Callable<Void> changeBranchAssociatedArtId(OrcsSession session, BranchId branch, int assocArtId) { return ChangeBranchFieldCallable.newAssocArtId(logger, session, jdbcClient, branch, assocArtId); } @Override - public Callable<Void> archiveUnArchiveBranch(OrcsSession session, IOseeBranch branch, ArchiveOperation op) { + public Callable<Void> archiveUnArchiveBranch(OrcsSession session, BranchId branch, ArchiveOperation op) { return new ArchiveUnarchiveBranchCallable(logger, session, jdbcClient, branch, op); } @Override - public Callable<Void> deleteBranch(OrcsSession session, IOseeBranch branch) { + public Callable<Void> deleteBranch(OrcsSession session, BranchId branch) { AbstractDatastoreTxCallable<?> deleteBranch = (AbstractDatastoreTxCallable<?>) changeBranchState(session, branch, BranchState.DELETED); AbstractDatastoreTxCallable<?> archiveBranch = diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ArchiveUnarchiveBranchCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ArchiveUnarchiveBranchCallable.java index ddbcee64d8a..0e5e48e104d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ArchiveUnarchiveBranchCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ArchiveUnarchiveBranchCallable.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.orcs.db.internal.callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.jdbc.JdbcClient; @@ -29,10 +29,10 @@ public class ArchiveUnarchiveBranchCallable extends AbstractDatastoreTxCallable< private static final String DELETE_ADDRESSING = "delete from %s where branch_id = ?"; private static final String UPDATE_BRANCH = "UPDATE osee_branch SET archived = ? WHERE branch_id = ?"; - private final IOseeBranch branch; + private final BranchId branch; private final ArchiveOperation op; - public ArchiveUnarchiveBranchCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, ArchiveOperation op) { + public ArchiveUnarchiveBranchCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, ArchiveOperation op) { super(logger, session, jdbcClient); this.branch = branch; this.op = op; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ChangeBranchFieldCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ChangeBranchFieldCallable.java index 8584c913488..a73e5a4b39e 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ChangeBranchFieldCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ChangeBranchFieldCallable.java @@ -11,7 +11,7 @@ package org.eclipse.osee.orcs.db.internal.callable; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -28,11 +28,11 @@ public class ChangeBranchFieldCallable extends AbstractDatastoreTxCallable<Void> private static final String UPDATE_BRANCH_FIELD = "UPDATE osee_branch SET %s = ? WHERE branch_id = ?"; - private final IOseeBranch branch; + private final BranchId branch; private final String field; private final Object value; - private ChangeBranchFieldCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, String field, Object value) { + private ChangeBranchFieldCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, String field, Object value) { super(logger, session, jdbcClient); this.branch = branch; this.field = field; @@ -49,22 +49,22 @@ public class ChangeBranchFieldCallable extends AbstractDatastoreTxCallable<Void> return null; } - public static Callable<Void> newBranchState(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, BranchState branchState) { + public static Callable<Void> newBranchState(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, BranchState branchState) { Conditions.checkNotNull(branchState, "branchState"); return new ChangeBranchFieldCallable(logger, session, jdbcClient, branch, "branch_state", branchState.getValue()); } - public static Callable<Void> newBranchType(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, BranchType branchType) { + public static Callable<Void> newBranchType(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, BranchType branchType) { Conditions.checkNotNull(branchType, "branchType"); return new ChangeBranchFieldCallable(logger, session, jdbcClient, branch, "branch_type", branchType.getValue()); } - public static Callable<Void> newBranchName(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, String branchName) { + public static Callable<Void> newBranchName(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, String branchName) { Conditions.checkNotNullOrEmpty(branchName, "branchName"); return new ChangeBranchFieldCallable(logger, session, jdbcClient, branch, "branch_name", branchName); } - public static Callable<Void> newAssocArtId(Log logger, OrcsSession session, JdbcClient jdbcClient, IOseeBranch branch, int associatedArtId) { + public static Callable<Void> newAssocArtId(Log logger, OrcsSession session, JdbcClient jdbcClient, BranchId branch, int associatedArtId) { return new ChangeBranchFieldCallable(logger, session, jdbcClient, branch, "associated_art_id", associatedArtId); } } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java index def9a2657eb..312bd3ac4ff 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java @@ -19,7 +19,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Future; import org.eclipse.osee.executor.admin.ExecutionCallbackAdapter; import org.eclipse.osee.executor.admin.ExecutorAdmin; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; import org.eclipse.osee.framework.jdk.core.util.Conditions; @@ -48,12 +48,12 @@ public class ExportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> private final SqlJoinFactory joinFactory; private final SystemPreferences preferences; private final ExecutorAdmin executorAdmin; - private final List<IOseeBranch> branches; + private final List<? extends BranchId> branches; private final PropertyStore options; private String exportName; - public ExportBranchDatabaseCallable(OrcsSession session, ExportItemFactory factory, SqlJoinFactory joinFactory, SystemPreferences preferences, ExecutorAdmin executorAdmin, List<IOseeBranch> branches, PropertyStore options, String exportName) { + public ExportBranchDatabaseCallable(OrcsSession session, ExportItemFactory factory, SqlJoinFactory joinFactory, SystemPreferences preferences, ExecutorAdmin executorAdmin, List<? extends BranchId> branches, PropertyStore options, String exportName) { super(factory.getLogger(), session, factory.getDbService()); this.joinFactory = joinFactory; this.factory = factory; @@ -110,7 +110,7 @@ public class ExportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> private void doWork() throws Exception { ExportImportJoinQuery joinQuery = joinFactory.createExportImportJoinQuery(); - for (IOseeBranch branch : branches) { + for (BranchId branch : branches) { long branchUuid = branch.getUuid(); joinQuery.add(branchUuid, -1L); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ImportBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ImportBranchDatabaseCallable.java index 51d29bce8bc..5d3ff2ef55f 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ImportBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ImportBranchDatabaseCallable.java @@ -20,7 +20,7 @@ import java.sql.Timestamp; import java.util.Collection; import java.util.Date; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; 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; @@ -70,7 +70,7 @@ public class ImportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> private final SavePointManager savePointManager; private final URI exchangeFile; - private final List<IOseeBranch> selectedBranches; + private final List<? extends BranchId> selectedBranches; private final PropertyStore options; private ExchangeTransformer exchangeTransformer; @@ -81,7 +81,7 @@ public class ImportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> private ExchangeDataProcessor exchangeDataProcessor; private long[] branchesToImport; - public ImportBranchDatabaseCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, SystemPreferences preferences, IResourceManager resourceManager, IdentityLocator identityService, OrcsTypes orcsTypes, URI exchangeFile, List<IOseeBranch> selectedBranches, PropertyStore options) { + public ImportBranchDatabaseCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, SystemPreferences preferences, IResourceManager resourceManager, IdentityLocator identityService, OrcsTypes orcsTypes, URI exchangeFile, List<? extends BranchId> selectedBranches, PropertyStore options) { super(logger, session, jdbcClient); this.preferences = preferences; this.resourceManager = resourceManager; @@ -117,7 +117,7 @@ public class ImportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> branchesToImport = new long[selectedBranches.size()]; int index = 0; - for (IOseeBranch branch : selectedBranches) { + for (BranchId branch : selectedBranches) { branchesToImport[index++] = branch.getUuid(); } diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java index 712fee7af08..d0fb4af44dd 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/OseeClient.java @@ -14,7 +14,7 @@ import java.io.Writer; import java.util.Properties; import javax.ws.rs.core.MediaType; import org.eclipse.osee.define.report.api.WordUpdateEndpoint; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.orcs.rest.model.BranchEndpoint; import org.eclipse.osee.orcs.rest.model.DatastoreEndpoint; import org.eclipse.osee.orcs.rest.model.IdeClientEndpoint; @@ -31,7 +31,7 @@ public interface OseeClient { String OSEE_APPLICATION_SERVER = org.eclipse.osee.framework.core.data.OseeClient.OSEE_APPLICATION_SERVER; - QueryBuilder createQueryBuilder(IOseeBranch branch); + QueryBuilder createQueryBuilder(BranchId branch); void executeScript(String script, Properties properties, boolean debug, MediaType media, Writer writer); diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java index 3ec81a1cbcb..e54e3c4fb79 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java @@ -22,7 +22,7 @@ import javax.ws.rs.core.Form; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriBuilder; import org.eclipse.osee.define.report.api.WordUpdateEndpoint; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -92,25 +92,25 @@ public class OseeClientImpl implements OseeClient, QueryExecutor { } @Override - public QueryBuilder createQueryBuilder(IOseeBranch branch) { + public QueryBuilder createQueryBuilder(BranchId branch) { QueryOptions options = new QueryOptions(); List<Predicate> predicates = new ArrayList<>(); return new QueryBuilderImpl(branch, predicates, options, predicateFactory, this); } @Override - public int getCount(IOseeBranch branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { + public int getCount(BranchId branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { SearchResponse result = performSearch(RequestType.COUNT, branch, predicates, options); return result.getTotal(); } @Override - public SearchResult getResults(RequestType request, IOseeBranch branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { + public SearchResult getResults(RequestType request, BranchId branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { SearchResponse result = performSearch(request, branch, predicates, options); return result; } - private SearchResponse performSearch(RequestType requestType, IOseeBranch branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { + private SearchResponse performSearch(RequestType requestType, BranchId branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException { Conditions.checkNotNull(requestType, "RequestType"); int fromTx = 0; if (options.isHistorical()) { diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java index d8deaf5d048..c0066951e39 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java @@ -18,7 +18,7 @@ import java.util.List; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; @@ -35,12 +35,12 @@ import org.eclipse.osee.orcs.rest.model.search.artifact.SearchResult; public class QueryBuilderImpl implements QueryBuilder { private final PredicateFactory predicateFactory; - private final IOseeBranch branch; + private final BranchId branch; private final QueryOptions options; private final List<Predicate> predicates; private final QueryExecutor executor; - public QueryBuilderImpl(IOseeBranch branch, List<Predicate> predicates, QueryOptions options, PredicateFactory predicateFactory, QueryExecutor executor) { + public QueryBuilderImpl(BranchId branch, List<Predicate> predicates, QueryOptions options, PredicateFactory predicateFactory, QueryExecutor executor) { this.branch = branch; this.predicates = predicates; this.options = options; diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutor.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutor.java index c525e4ac2cb..66d6f91dc1f 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutor.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryExecutor.java @@ -11,7 +11,7 @@ package org.eclipse.osee.orcs.rest.client.internal.search; import java.util.List; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.rest.model.search.artifact.Predicate; import org.eclipse.osee.orcs.rest.model.search.artifact.RequestType; @@ -22,7 +22,7 @@ import org.eclipse.osee.orcs.rest.model.search.artifact.SearchResult; */ public interface QueryExecutor { - int getCount(IOseeBranch branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException; + int getCount(BranchId branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException; - SearchResult getResults(RequestType request, IOseeBranch branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException; + SearchResult getResults(RequestType request, BranchId branch, List<Predicate> predicates, QueryOptions options) throws OseeCoreException; }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java index a670a15f7df..e06752e0c8f 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java @@ -37,6 +37,7 @@ import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import org.eclipse.osee.activity.api.ActivityLog; +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; @@ -859,13 +860,13 @@ public class BranchEndpointImpl implements BranchEndpoint { Long ancestorOf = options.getIsAncestorOf(); if (ancestorOf > 0) { - IOseeBranch ancestorOfToken = TokenFactory.createBranch(ancestorOf); + BranchId ancestorOfToken = TokenFactory.createBranch(ancestorOf); query.andIsAncestorOf(ancestorOfToken); } Long childOf = options.getIsChildOf(); if (childOf > 0) { - IOseeBranch childOfToken = TokenFactory.createBranch(ancestorOf); + BranchId childOfToken = TokenFactory.createBranch(ancestorOf); query.andIsAncestorOf(childOfToken); } return query.getResults(); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsCollectorWriter.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsCollectorWriter.java index 5f7a579f402..e74177d36ff 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsCollectorWriter.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsCollectorWriter.java @@ -18,7 +18,7 @@ import java.util.Map; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.enums.CoreBranches; @@ -50,7 +50,7 @@ public class OrcsCollectorWriter { private final OrcsApi orcsApi; private Map<Long, ArtifactId> uuidToArtifact; private TransactionBuilder transaction; - private IOseeBranch branch; + private BranchId branch; private ArtifactReadable user; private final XResultData results; @@ -345,7 +345,7 @@ public class OrcsCollectorWriter { return date; } - private IOseeBranch getBranch() { + private BranchId getBranch() { if (branch == null) { branch = orcsApi.getQueryFactory().branchQuery().andUuids( collector.getBranch().getUuid()).getResults().getAtMostOneOrNull(); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java index 136725d624f..01708d167b9 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchQueryTest.java @@ -13,8 +13,8 @@ package org.eclipse.osee.orcs.api; import static org.eclipse.osee.framework.core.enums.BranchState.CREATED; import static org.eclipse.osee.framework.core.enums.BranchState.MODIFIED; import static org.eclipse.osee.framework.core.enums.BranchType.BASELINE; -import static org.eclipse.osee.framework.core.enums.BranchType.SYSTEM_ROOT; import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON; +import static org.eclipse.osee.framework.core.enums.CoreBranches.SYSTEM_ROOT; import static org.eclipse.osee.framework.core.enums.DemoBranches.CIS_Bld_1; import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1; import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2; @@ -22,6 +22,7 @@ import static org.eclipse.osee.orcs.OrcsIntegrationRule.integrationRule; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.util.Iterator; +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.BranchState; @@ -60,8 +61,6 @@ public class OrcsBranchQueryTest { private QueryFactory factory; - private static IOseeBranch SYS_ROOT = CoreBranches.SYSTEM_ROOT; - @Before public void setup() { factory = orcsApi.getQueryFactory(); @@ -83,7 +82,7 @@ public class OrcsBranchQueryTest { BranchReadable branch5 = iterator.next(); // actual, IOseeBranch, BranchType, BranchState, isArchived, parentId, baseTx, sourceTx, assocArtId - assertBranch(branch1, SYS_ROOT, SYSTEM_ROOT, MODIFIED, false, -1, 1, 1, -1); + assertBranch(branch1, SYSTEM_ROOT, BranchType.SYSTEM_ROOT, MODIFIED, false, -1, 1, 1, -1); assertBranch(branch2, SAW_Bld_1, BASELINE, MODIFIED, false, 1, 15, 3, -1); assertBranch(branch3, CIS_Bld_1, BASELINE, MODIFIED, false, 1, 17, 3, -1); assertBranch(branch4, SAW_Bld_2, BASELINE, CREATED, false, 3, 23, 22, 9); @@ -93,7 +92,7 @@ public class OrcsBranchQueryTest { @Test public void testGetByType() throws OseeCoreException { BranchQuery query = factory.branchQuery(); - query.andIsOfType(SYSTEM_ROOT); + query.andIsOfType(BranchType.SYSTEM_ROOT); assertEquals(1, query.getCount()); assertEquals(CoreBranches.SYSTEM_ROOT, query.getResults().getExactlyOne()); @@ -178,7 +177,7 @@ public class OrcsBranchQueryTest { assertEquals(1, query.getCount()); query = factory.branchQuery(); - query.andIsChildOf(SYS_ROOT); + query.andIsChildOf(SYSTEM_ROOT); ResultSet<BranchReadable> results = query.getResults(); assertEquals(4, results.size()); @@ -209,7 +208,7 @@ public class OrcsBranchQueryTest { BranchReadable branch1 = iterator.next(); BranchReadable branch2 = iterator.next(); - assertEquals(SYS_ROOT, branch1); + assertEquals(SYSTEM_ROOT, branch1); assertEquals(SAW_Bld_1, branch2); query = factory.branchQuery(); @@ -222,7 +221,7 @@ public class OrcsBranchQueryTest { iterator = results.iterator(); branch1 = iterator.next(); - assertEquals(SYS_ROOT, branch1); + assertEquals(SYSTEM_ROOT, branch1); } @Test @@ -277,7 +276,7 @@ public class OrcsBranchQueryTest { public void testGetWithMultipleConditions1() throws Exception { IOseeBranch child = TokenFactory.createBranch(testName.getMethodName()); - IOseeBranch actual = createBranch(SAW_Bld_2, child); + BranchId actual = createBranch(SAW_Bld_2, child); BranchQuery query = factory.branchQuery(); query.andIsOfType(BranchType.WORKING).andIsChildOf(SAW_Bld_1).andStateIs(BranchState.CREATED); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java index 46dd9ca0da5..a1c57004ee9 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsBranchTest.java @@ -18,6 +18,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.data.TokenFactory; @@ -243,7 +244,7 @@ public class OrcsBranchTest { assertEquals(assocArtId, branch.getAssociatedArtifactId()); } - private BranchReadable getBranch(IOseeBranch branch) { + private BranchReadable getBranch(BranchId branch) { return query.branchQuery().andIds(branch).getResults().getExactlyOne(); } diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java index 64a57483c3d..af9e0d8e513 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsPortingTest.java @@ -15,6 +15,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import org.eclipse.osee.framework.core.data.ArtifactId; +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.CoreArtifactTypes; @@ -76,10 +77,10 @@ public class OrcsPortingTest { setupAssociatedArtifact(assocArtifactGuid); TransactionReadable mainBranchTx = createBaselineBranchAndArtifacts(artifactGuid); - IOseeBranch branch = TokenFactory.createBranch(mainBranchTx.getBranchId()); + IOseeBranch branch = TokenFactory.createBranch(mainBranchTx.getBranchId(), "testCreateBranch"); TransactionReadable transactionToCopy = createWorkingBranchChanges(branch, artifactGuid); - IOseeBranch copyTxBranch = createCopyFromTransactionBranch(transactionToCopy, assocArtifactGuid); + BranchId copyTxBranch = createCopyFromTransactionBranch(transactionToCopy, assocArtifactGuid); TransactionReadable finalTx = commitToDestinationBranch(copyTxBranch); // now check to make sure everything is as expected @@ -119,7 +120,7 @@ public class OrcsPortingTest { TransactionReadable mainBranchTx = createBaselineBranchAndArtifacts(artifactGuid); TransactionReadable differentBranchTx = createBaselineBranchAndArtifacts(differentGuid); - IOseeBranch copyTxBranch = createCopyFromTransactionBranch(mainBranchTx, assocArtifactGuid); + BranchId copyTxBranch = createCopyFromTransactionBranch(mainBranchTx, assocArtifactGuid); assertNotNull(copyTxBranch); // There should only be one Port Branch per associated artifact. Expecting an exception @@ -189,7 +190,7 @@ public class OrcsPortingTest { return transactionToCopy; } - private IOseeBranch createCopyFromTransactionBranch(TransactionReadable transactionToCopy, String assocArtifactGuid) throws Exception { + private BranchId createCopyFromTransactionBranch(TransactionReadable transactionToCopy, String assocArtifactGuid) throws Exception { // create the branch with the copied transaction IOseeBranch branch = TokenFactory.createBranch(branchString); @@ -203,7 +204,7 @@ public class OrcsPortingTest { return branchApi.createPortBranch(branch, author, transactionToCopy, readableReq).call(); } - private TransactionReadable commitToDestinationBranch(IOseeBranch copyTxBranch) throws Exception { + private TransactionReadable commitToDestinationBranch(BranchId copyTxBranch) throws Exception { IOseeBranch destinationBranch = TokenFactory.createBranch("IndepToBranch"); branchApi.createTopLevelBranch(destinationBranch, author).call(); return branchApi.commitBranch(author, copyTxBranch, destinationBranch).call(); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java index 41b6000174f..572e3e6f89f 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java @@ -19,7 +19,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import com.google.common.collect.Ordering; import java.util.Arrays; -import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Set; @@ -209,40 +208,41 @@ public class OrcsQueryTest { assertEquals("User Groups".length(), loc1.getEndPosition()); } } - + @Test public void testQueryMultipleArtifactType() throws OseeCoreException { QueryBuilder builder = factory.fromBranch(COMMON_ID); builder.andIsOfType(CoreArtifactTypes.AccessControlModel, CoreArtifactTypes.GlobalPreferences); - + assertEquals(2, builder.getCount()); ResultSet<ArtifactReadable> artifacts = builder.getResults(); assertEquals(2, artifacts.size()); - + checkContainsTypes(artifacts, CoreArtifactTypes.AccessControlModel, CoreArtifactTypes.GlobalPreferences); Iterator<ArtifactReadable> iterator = sort(artifacts); assertEquals("Framework Access Model", iterator.next().getName()); assertEquals("Global Preferences", iterator.next().getName()); } - + @Test public void testQueryMultipleAttributeExistsType() throws OseeCoreException { QueryBuilder builder = factory.fromBranch(COMMON_ID); - List<IAttributeType> attributeTypes = Arrays.asList(CoreAttributeTypes.AccessContextId, CoreAttributeTypes.Dictionary); + List<IAttributeType> attributeTypes = + Arrays.asList(CoreAttributeTypes.AccessContextId, CoreAttributeTypes.Dictionary); builder.andExists(attributeTypes); - + assertEquals(0, builder.getCount()); ResultSet<ArtifactReadable> artifacts = builder.getResults(); assertEquals(0, artifacts.size()); } - + @Test public void testQueryMultipleAttributeNotExistsType() throws OseeCoreException { QueryBuilder builder = factory.fromBranch(COMMON_ID); List<IAttributeType> attributeTypes = Arrays.asList(CoreAttributeTypes.ContentUrl, CoreAttributeTypes.Name); builder.andNotExists(attributeTypes); - + assertEquals(26, builder.getCount()); ResultSet<ArtifactReadable> artifacts = builder.getResults(); assertEquals(26, artifacts.size()); @@ -270,11 +270,11 @@ public class OrcsQueryTest { assertEquals("Word Edit Template", iterator.next().getName()); assertEquals("Word Edit Template", iterator.next().getName()); assertEquals("XViewer Global Customization", iterator.next().getName()); - + assertEquals("org.eclipse.osee.client.demo.OseeTypes_ClientDemo", iterator.next().getName()); assertEquals("org.eclipse.osee.coverage.OseeTypes_Coverage", iterator.next().getName()); assertEquals("org.eclipse.osee.framework.skynet.core.OseeTypes_Framework", iterator.next().getName()); - assertEquals("org.eclipse.osee.ote.define.OseeTypesOTE", iterator.next().getName()); + assertEquals("org.eclipse.osee.ote.define.OseeTypesOTE", iterator.next().getName()); } @Test diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsBranch.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsBranch.java index 728d395fe4f..b4fde9eafa2 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsBranch.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsBranch.java @@ -13,6 +13,7 @@ package org.eclipse.osee.orcs; import java.net.URI; import java.util.List; import java.util.concurrent.Callable; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.core.enums.BranchState; @@ -48,7 +49,7 @@ public interface OrcsBranch { Callable<BranchReadable> createTopLevelBranch(IOseeBranch branch, ArtifactReadable author) throws OseeCoreException; - Callable<BranchReadable> createBaselineBranch(IOseeBranch branch, ArtifactReadable author, IOseeBranch parent, ArtifactReadable associatedArtifact) throws OseeCoreException; + Callable<BranchReadable> createBaselineBranch(IOseeBranch branch, ArtifactReadable author, BranchId parent, ArtifactReadable associatedArtifact) throws OseeCoreException; Callable<BranchReadable> createWorkingBranch(IOseeBranch branch, ArtifactReadable author, IOseeBranch parent, ArtifactReadable associatedArtifact) throws OseeCoreException; @@ -58,35 +59,35 @@ public interface OrcsBranch { ///////////////////////////////////////////////////////////////////////// - Callable<Void> changeBranchState(IOseeBranch branch, BranchState branchState); + Callable<Void> changeBranchState(BranchId branch, BranchState branchState); - Callable<Void> changeBranchType(IOseeBranch branch, BranchType branchType); + Callable<Void> changeBranchType(BranchId branch, BranchType branchType); - Callable<Void> changeBranchName(IOseeBranch branch, String name); + Callable<Void> changeBranchName(BranchId branch, String name); - Callable<Void> associateBranchToArtifact(IOseeBranch branch, ArtifactReadable associatedArtifact); + Callable<Void> associateBranchToArtifact(BranchId branch, ArtifactReadable associatedArtifact); - Callable<Void> unassociateBranch(IOseeBranch branch); + Callable<Void> unassociateBranch(BranchId branch); - Callable<Void> deleteBranch(IOseeBranch branch); + Callable<Void> deleteBranch(BranchId branch); ///////////////////////////////////////////////////////////////////////// Callable<BranchReadable> createBranch(CreateBranchData branchData); - Callable<Void> archiveUnarchiveBranch(IOseeBranch branch, ArchiveOperation archiveOp); + Callable<Void> archiveUnarchiveBranch(BranchId branch, ArchiveOperation archiveOp); - Callable<List<IOseeBranch>> purgeBranch(IOseeBranch branch, boolean recurse); + Callable<List<BranchId>> purgeBranch(BranchId branch, boolean recurse); - Callable<TransactionReadable> commitBranch(ArtifactReadable committer, IOseeBranch source, IOseeBranch destination); + Callable<TransactionReadable> commitBranch(ArtifactReadable committer, BranchId source, BranchId destination); Callable<List<ChangeItem>> compareBranch(TransactionReadable sourceTx, TransactionReadable destinationTx); - Callable<List<ChangeItem>> compareBranch(IOseeBranch branch) throws OseeCoreException; + Callable<List<ChangeItem>> compareBranch(BranchId branch) throws OseeCoreException; - Callable<URI> exportBranch(List<IOseeBranch> branches, PropertyStore options, String exportName); + Callable<URI> exportBranch(List<? extends BranchId> branches, PropertyStore options, String exportName); - Callable<URI> importBranch(URI fileToImport, List<IOseeBranch> branches, PropertyStore options); + Callable<URI> importBranch(URI fileToImport, List<? extends BranchId> branches, PropertyStore options); Callable<URI> checkBranchExchangeIntegrity(URI fileToCheck); diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java index b551ac9da13..a2acb0046c2 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactTypes.java @@ -14,7 +14,7 @@ import java.util.Collection; import java.util.Map; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; /** @@ -28,14 +28,14 @@ public interface ArtifactTypes extends IdentityCollection<Long, IArtifactType> { Collection<? extends IArtifactType> getAllDescendantTypes(IArtifactType artType) throws OseeCoreException; - boolean isValidAttributeType(IArtifactType artType, IOseeBranch branch, IAttributeType attributeType) throws OseeCoreException; + boolean isValidAttributeType(IArtifactType artType, BranchId branch, IAttributeType attributeType) throws OseeCoreException; - Collection<IAttributeType> getAttributeTypes(IArtifactType artType, IOseeBranch branch) throws OseeCoreException; + Collection<IAttributeType> getAttributeTypes(IArtifactType artType, BranchId branch) throws OseeCoreException; boolean isAbstract(IArtifactType artType) throws OseeCoreException; boolean inheritsFrom(IArtifactType artType, IArtifactType... otherTypes) throws OseeCoreException; - Map<IOseeBranch, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artType) throws OseeCoreException; + Map<BranchId, Collection<IAttributeType>> getAllAttributeTypes(IArtifactType artType) throws OseeCoreException; }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQueryBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQueryBuilder.java index 500faf7fc8f..ac270e510fc 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQueryBuilder.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/BranchQueryBuilder.java @@ -12,7 +12,6 @@ package org.eclipse.osee.orcs.search; import java.util.Collection; import org.eclipse.osee.framework.core.data.BranchId; -import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -55,9 +54,9 @@ public interface BranchQueryBuilder<T> { T andNamePattern(String pattern) throws OseeCoreException; - T andIsChildOf(IOseeBranch branch) throws OseeCoreException; + T andIsChildOf(BranchId branch) throws OseeCoreException; - T andIsAncestorOf(IOseeBranch branch) throws OseeCoreException; + T andIsAncestorOf(BranchId branch) throws OseeCoreException; T andIsMergeFor(Long sourceUuid, Long destUuid); diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java index d1fc3c6560c..50664d53a28 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/QueryFactory.java @@ -12,7 +12,7 @@ package org.eclipse.osee.orcs.search; import java.util.Collection; import org.eclipse.osee.framework.core.data.IArtifactType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.data.ArtifactReadable; @@ -22,7 +22,7 @@ import org.eclipse.osee.orcs.data.ArtifactReadable; */ public interface QueryFactory { - QueryBuilder fromBranch(IOseeBranch branch) throws OseeCoreException; + QueryBuilder fromBranch(BranchId branch) throws OseeCoreException; QueryBuilder fromBranch(Long branchId) throws OseeCoreException; diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/TxQueryBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/TxQueryBuilder.java index 3086cd20553..55a70356728 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/TxQueryBuilder.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/TxQueryBuilder.java @@ -13,7 +13,7 @@ package org.eclipse.osee.orcs.search; import java.sql.Timestamp; import java.util.Collection; import org.eclipse.osee.framework.core.data.ArtifactId; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.TransactionDetailsType; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -39,9 +39,9 @@ public interface TxQueryBuilder<T> { T andIs(Collection<TransactionDetailsType> types) throws OseeCoreException; - T andBranch(IOseeBranch... ids) throws OseeCoreException; + T andBranch(BranchId... ids) throws OseeCoreException; - T andBranch(Collection<? extends IOseeBranch> ids) throws OseeCoreException; + T andBranch(Collection<? extends BranchId> ids) throws OseeCoreException; T andBranchIds(long... id) throws OseeCoreException; @@ -67,7 +67,7 @@ public interface TxQueryBuilder<T> { T andIsHead(long branchUuid) throws OseeCoreException; - T andIsHead(IOseeBranch branch) throws OseeCoreException; + T andIsHead(BranchId branch) throws OseeCoreException; T andIsPriorTx(int txId) throws OseeCoreException; } diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java index db97b47bc49..87e65c0923d 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java @@ -17,7 +17,7 @@ import org.eclipse.osee.framework.core.data.AttributeId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IRelationSorterId; import org.eclipse.osee.framework.core.data.IRelationType; import org.eclipse.osee.framework.core.data.IRelationTypeSide; @@ -62,11 +62,11 @@ public interface TransactionBuilder { ArtifactId copyArtifact(ArtifactReadable sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException; - ArtifactId copyArtifact(IOseeBranch fromBranch, ArtifactId sourceArtifact) throws OseeCoreException; + ArtifactId copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException; - ArtifactId copyArtifact(IOseeBranch fromBranch, ArtifactId sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException; + ArtifactId copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException; - ArtifactId introduceArtifact(IOseeBranch fromBranch, ArtifactId sourceArtifact) throws OseeCoreException; + ArtifactId introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException; ArtifactId replaceWithVersion(ArtifactReadable sourceArtifact, ArtifactReadable destination) throws OseeCoreException; diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionFactory.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionFactory.java index 2aba2391084..ee1035f1b30 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionFactory.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionFactory.java @@ -12,7 +12,7 @@ package org.eclipse.osee.orcs.transaction; import java.util.Collection; import java.util.concurrent.Callable; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.ITransaction; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.ResultSet; @@ -24,7 +24,7 @@ import org.eclipse.osee.orcs.data.TransactionReadable; */ public interface TransactionFactory { - TransactionBuilder createTransaction(IOseeBranch branch, ArtifactReadable userArtifact, String comment) throws OseeCoreException; + TransactionBuilder createTransaction(BranchId branch, ArtifactReadable userArtifact, String comment) throws OseeCoreException; TransactionBuilder createTransaction(Long branchId, ArtifactReadable userArtifact, String comment) throws OseeCoreException; diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java index 5a7b2333512..3b497272286 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java @@ -16,7 +16,7 @@ import java.net.URI; import java.util.Date; import java.util.List; import org.eclipse.osee.framework.core.data.IAttributeType; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist; @@ -61,7 +61,7 @@ public class ArtifactTestRunOperator implements TestRunOperator { } } - public static ArtifactTestRunOperator getNewArtifactWithOperator(IOseeBranch branch) throws OseeCoreException { + public static ArtifactTestRunOperator getNewArtifactWithOperator(BranchId branch) throws OseeCoreException { return new ArtifactTestRunOperator(TEST_RUN_ARTIFACT_FETCHER.getNewArtifact(branch)); } diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java index daa1c390744..6e44fa7cbbb 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java @@ -16,9 +16,9 @@ import java.util.HashSet; import java.util.Map; 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.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; @@ -43,21 +43,21 @@ public class OteArtifactFetcher<T extends Artifact> { * Creates a new Artifact in the specified branch */ @SuppressWarnings("unchecked") - public T getNewArtifact(IOseeBranch branch) throws OseeCoreException { + public T getNewArtifact(BranchId branch) throws OseeCoreException { checkForNull(branch); return (T) ArtifactTypeManager.addArtifact(oteArtifactType, branch); } /** * Retrieves a unique artifact matching input parameter - * + * * @param typeName Attribute type name * @param value attribute value to match * @param branch to search in * @return the unique artifact */ @SuppressWarnings("unchecked") - public T searchForUniqueArtifactMatching(IAttributeType attributeType, String attributeValue, IOseeBranch branch) throws OseeCoreException { + public T searchForUniqueArtifactMatching(IAttributeType attributeType, String attributeValue, BranchId branch) throws OseeCoreException { Conditions.checkNotNull(attributeType, "attributeType"); Conditions.checkNotNull(attributeValue, "attributeValue"); Conditions.checkNotNull(branch, "branch"); @@ -66,12 +66,12 @@ public class OteArtifactFetcher<T extends Artifact> { /** * Returns all artifact instances found in branch matching the type <b>T</b> - * + * * @param branch to search in * @return artifact instances */ @SuppressWarnings("unchecked") - public Set<T> getAllArtifacts(IOseeBranch branch) throws OseeArgumentException { + public Set<T> getAllArtifacts(BranchId branch) throws OseeArgumentException { checkForNull(branch); Set<T> toReturn = new HashSet<>(); try { @@ -80,8 +80,8 @@ public class OteArtifactFetcher<T extends Artifact> { toReturn.add((T) artifact); } } catch (OseeCoreException ex) { - OseeLog.logf(OteDefinePlugin.class, Level.WARNING, ex, "Search for all artifacts failed [%s, %s]", - oteArtifactType.getName(), branch.getName()); + OseeLog.logf(OteDefinePlugin.class, Level.WARNING, ex, "Search for all artifacts failed [%s] on branch [%s]", + oteArtifactType.getName(), branch.getId()); } return toReturn; } @@ -89,7 +89,7 @@ public class OteArtifactFetcher<T extends Artifact> { /** * Returns all artifact instances found in branch matching the type <b>T</b> Results are indexed by artifact * descriptive name. - * + * * @param branch to search in * @return artifact instances indexed by descriptive name */ diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/OutfileToArtifactJob.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/OutfileToArtifactJob.java index 118bc1f417d..6fe27c72bae 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/OutfileToArtifactJob.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/OutfileToArtifactJob.java @@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.ote.define.OteDefinePlugin; import org.eclipse.osee.ote.define.operations.LinkTestRunToTestScriptOperation; @@ -30,9 +30,9 @@ public class OutfileToArtifactJob extends Job { private final URI[] filesToImport; private Artifact[] results; private URI[] filesWithErrors; - private final IOseeBranch branch; + private final BranchId branch; - public OutfileToArtifactJob(IOseeBranch branch, URI... filesToImport) { + public OutfileToArtifactJob(BranchId branch, URI... filesToImport) { super(JOB_NAME); setUser(true); setPriority(Job.LONG); 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 08eceaa66e2..c1bf6403a7a 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 @@ -20,6 +20,7 @@ import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; 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; @@ -120,7 +121,7 @@ public class ImportOutfileOperation { Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>(); for (Object object : items) { Artifact testRun = (Artifact) object; - IOseeBranch branch = testRun.getBranch(); + IOseeBranch branch = testRun.getBranchToken(); List<Artifact> artList = branchMap.get(branch); if (artList == null) { artList = new ArrayList<>(); @@ -131,7 +132,7 @@ public class ImportOutfileOperation { return branchMap; } - public static void commitTestRunTx(IProgressMonitor monitor, String commitComment, IOseeBranch branch, Artifact... artifacts) throws OseeCoreException { + public static void commitTestRunTx(IProgressMonitor monitor, String commitComment, BranchId branch, Artifact... artifacts) throws OseeCoreException { monitor.setTaskName("Persist Test Runs"); Date uploadDate = new Date(); for (Artifact artifact : artifacts) { diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java index 411ce734475..38162437d9c 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java @@ -18,7 +18,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.Callable; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.model.Branch; @@ -38,12 +38,12 @@ import org.eclipse.osee.ote.define.utilities.OutfileParserExtensionManager; * @author Roberto E. Escobar */ public class OutfileToArtifactOperation { - private final IOseeBranch branch; + private final BranchId branch; private final List<URI> filesToImport; private final List<Artifact> results; private final List<URI> filesWithErrors; - public OutfileToArtifactOperation(IOseeBranch branch, URI... filesToImport) { + public OutfileToArtifactOperation(BranchId branch, URI... filesToImport) { this.branch = branch; this.filesToImport = Arrays.asList(filesToImport); this.results = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java index 6e6a82f4634..45886de5c43 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java @@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.TitleAreaDialog; import org.eclipse.jface.window.Window; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TestRunStorageKey; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -78,7 +78,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener { return toReturn; } - public IOseeBranch getSelection() { + public BranchId getSelection() { return branchSelectComposite.getSelectedBranch(); } @@ -125,7 +125,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener { } try { - IOseeBranch branch = getSelection(); + BranchId branch = getSelection(); if (branch != null) { String lastBranchSelected = Long.toString(branch.getUuid()); @@ -152,8 +152,8 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener { } } - public static IOseeBranch getBranchFromUser() throws OseeCoreException { - IOseeBranch toReturn = null; + public static BranchId getBranchFromUser() throws OseeCoreException { + BranchId toReturn = null; BranchComboDialog branchSelection = new BranchComboDialog(AWorkbench.getActiveShell()); int result = branchSelection.open(); if (result == Window.OK) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java index 9ce3a6a2860..74d82a21648 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; import org.eclipse.osee.framework.ui.swt.Displays; @@ -33,9 +33,9 @@ import org.eclipse.swt.widgets.Shell; public class ImportOutfileUIOperation { private final URI[] fileSystemObjects; - private final IOseeBranch selectedBranch; + private final BranchId selectedBranch; - public ImportOutfileUIOperation(IOseeBranch selectedBranch, URI... fileSystemObjects) { + public ImportOutfileUIOperation(BranchId selectedBranch, URI... fileSystemObjects) { this.fileSystemObjects = fileSystemObjects; this.selectedBranch = selectedBranch; } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java index df3f7d1c6a3..0dd2c6a61aa 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java @@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TestRunStorageKey; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLog; @@ -264,7 +264,7 @@ public class OutfileImportPage extends WizardDataTransferPage { @Override protected boolean validateDestinationGroup() { boolean toReturn = super.validateDestinationGroup(); - IOseeBranch branch = branchSelect.getData(); + BranchId branch = branchSelect.getData(); if (branch == null) { setMessage(null); setErrorMessage("Please select a working branch. Cannot import into a null branch."); @@ -303,7 +303,7 @@ public class OutfileImportPage extends WizardDataTransferPage { branchUuids = new String[0]; } - IOseeBranch branch = branchSelect.getData(); + BranchId branch = branchSelect.getData(); try { if (branch != null) { String lastBranchSelected = Long.toString(branch.getUuid()); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java index 03de0e352d3..4b2079df7f3 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java @@ -151,7 +151,7 @@ class CommitJobDialog extends UIJob { CommitColumnEnum column = CommitColumnEnum.values()[columnIndex - DUMMY_COLUMNS]; switch (column) { case Branch: - toReturn = artifact.getBranch().getName(); + toReturn = artifact.getBranchToken().getName(); break; case Id: try { @@ -165,7 +165,8 @@ class CommitJobDialog extends UIJob { break; case Outfile: try { - toReturn = new ArtifactTestRunOperator(artifact).getOutfileAttribute().getDisplayableString(); + toReturn = + new ArtifactTestRunOperator(artifact).getOutfileAttribute().getDisplayableString(); } catch (Exception ex) { OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Error getting Outfile", ex); } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java index 8ab91c6faab..4b95c321d13 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java @@ -82,7 +82,8 @@ public class CommitTestRunJob extends Job { for (IOseeBranch branch : commitMap.keySet()) { monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName())); List<Artifact> artList = commitMap.get(branch); - ImportOutfileOperation.commitTestRunTx(monitor, comment, branch, artList.toArray(new Artifact[artList.size()])); + ImportOutfileOperation.commitTestRunTx(monitor, comment, branch, + artList.toArray(new Artifact[artList.size()])); committedList.addAll(artList); } return committedList.toArray(new Artifact[committedList.size()]); @@ -92,7 +93,7 @@ public class CommitTestRunJob extends Job { Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>(); for (Object object : items) { Artifact testRun = (Artifact) object; - IOseeBranch branch = testRun.getBranch(); + IOseeBranch branch = testRun.getBranchToken(); List<Artifact> artList = branchMap.get(branch); if (artList == null) { artList = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java index 1588c098684..62e7bacf256 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java @@ -11,7 +11,7 @@ package org.eclipse.osee.ote.ui.define.panels; import org.eclipse.osee.framework.core.client.ClientSessionManager; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.skynet.core.event.OseeEventManager; import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener; @@ -139,7 +139,7 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce } } - public IOseeBranch getSelectedBranch() { + public BranchId getSelectedBranch() { return branchSelectComposite.getSelectedBranch(); } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java index bf089e2ed40..cf59ffb32af 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java @@ -27,7 +27,7 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.util.LocalSelectionTransfer; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeSelection; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -181,7 +181,7 @@ public class DragDropHandler { } private void handleResourceDrops(URI[] iFiles) throws OseeCoreException { - IOseeBranch branch = BranchComboDialog.getBranchFromUser(); + BranchId branch = BranchComboDialog.getBranchFromUser(); if (branch != null) { OutfileToArtifactJob artifactJob = new OutfileToArtifactJob(branch, iFiles); artifactJob.addJobChangeListener(new JobChangeAdapter() { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java index 94d90b879d9..463727571b7 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.nebula.widgets.xviewer.XViewer; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -41,7 +42,7 @@ public class XViewerDataManager { private final XViewer xViewer; private final List<DataItem> commitableItems; private final List<DataItem> uncommitableItems; - private final Map<IOseeBranch, DataItem> branchMap; + private final Map<BranchId, DataItem> branchMap; private final List<DataItem> backingData; private final Collection<IDataChangedListener> listeners; private boolean isInitialized; @@ -129,7 +130,7 @@ public class XViewerDataManager { } private DataItem getBranchItem(Artifact artifact) { - IOseeBranch branch = artifact.getBranch(); + IOseeBranch branch = artifact.getBranchToken(); DataItem toReturn = branchMap.get(branch); if (toReturn == null) { toReturn = new BranchItem(branch, null); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java index 77aca1a2b59..e2c91e1854c 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java @@ -10,7 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.ote.ui.define.views; -import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TestRunStorageKey; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.jdk.core.type.IPropertyStore; @@ -48,7 +48,7 @@ public class TestRunArtifactOptions implements IPropertyStoreBasedControl { propertyStore.put(TestRunStorageKey.STORAGE_ENABLED, this.panel.isBranchSelectEnabled()); propertyStore.put(TestRunStorageKey.BRANCH_IDS, this.panel.getBranchIds()); - IOseeBranch branch = this.panel.getSelectedBranch(); + BranchId branch = this.panel.getSelectedBranch(); long branchUuid = -1; if (branch != null) { branchUuid = branch.getUuid(); |