Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-06-22 20:17:28 -0400
committerAngel Avila2017-07-20 21:14:53 -0400
commit13353e9a2ef7c0907e1549e1c330681bdbbc304e (patch)
tree5bf93575ca09c973c69002ef1a6c5f44ba6d6926
parent4ee9a855026cc776563f9654644e15e0de8890d0 (diff)
downloadorg.eclipse.osee-13353e9a2ef7c0907e1549e1c330681bdbbc304e.tar.gz
org.eclipse.osee-13353e9a2ef7c0907e1549e1c330681bdbbc304e.tar.xz
org.eclipse.osee-13353e9a2ef7c0907e1549e1c330681bdbbc304e.zip
refactor: Remove redundant ArtifactQuery.getArtifactFromToken methods
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWebDatabaseConfig.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/TeamResourceTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfeEditorAddSupportingArtifactsTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/SubscribeUtilityTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/AtsWorkDefinitionImporter.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/MergeManagerTest.java12
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeArtifactsTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java2
18 files changed, 29 insertions, 37 deletions
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 ea4a0ea6a5..da1e477bf4 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
@@ -269,7 +269,7 @@ public class DemoDatabaseConfig implements IDbInitializationTask {
TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Create Work Packages");
Artifact codeTeamArt =
- ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Code, AtsClientService.get().getAtsBranch());
+ ArtifactQuery.getArtifactFromId(DemoArtifactToken.SAW_Code, AtsClientService.get().getAtsBranch());
Artifact workPkg1 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_01, "ASDHFA443");
workPkg1.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
@@ -288,7 +288,7 @@ public class DemoDatabaseConfig implements IDbInitializationTask {
workPkg3.persist(transaction);
Artifact testTeamArt =
- ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Test_AI, AtsClientService.get().getAtsBranch());
+ ArtifactQuery.getArtifactFromId(DemoArtifactToken.SAW_Test_AI, AtsClientService.get().getAtsBranch());
Artifact workPkg11 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0A, "AHESSH3");
workPkg11.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
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 482cfaed0e..6e8417f7de 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
@@ -45,7 +45,7 @@ public class DemoWebDatabaseConfig implements IDbInitializationTask {
oseeWebArt.addRelation(CoreRelationTypes.Universal_Grouping__Members, demoProgramsArt);
oseeWebArt.persist(transaction);
- Artifact sawTeam = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Bld_1, atsBranch);
+ Artifact sawTeam = ArtifactQuery.getArtifactFromId(DemoArtifactToken.SAW_Bld_1, atsBranch);
sawTeam.addRelation(CoreRelationTypes.SupportingInfo_SupportedBy, demoProgramsArt);
sawTeam.persist(transaction);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/TeamResourceTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/TeamResourceTest.java
index 4870c704bd..e3bd5bb993 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/TeamResourceTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/TeamResourceTest.java
@@ -67,6 +67,6 @@ public class TeamResourceTest extends AbstractConfigurationRestTest {
}
private Artifact getSawSwTeamDef() {
- return ArtifactQuery.getArtifactFromToken(DemoTeam.SAW_SW.getTeamDefToken(), AtsClientService.get().getAtsBranch());
+ return ArtifactQuery.getArtifactFromId(DemoTeam.SAW_SW.getTeamDefToken(), AtsClientService.get().getAtsBranch());
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfeEditorAddSupportingArtifactsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfeEditorAddSupportingArtifactsTest.java
index 90830df525..d19e41b492 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfeEditorAddSupportingArtifactsTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/WfeEditorAddSupportingArtifactsTest.java
@@ -41,7 +41,7 @@ public class WfeEditorAddSupportingArtifactsTest {
TeamWorkFlowArtifact teamWf = AtsTestUtil.getTeamWf();
Artifact rootArt =
- ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.DefaultHierarchyRoot, AtsClientService.get().getAtsBranch());
+ ArtifactQuery.getArtifactFromId(CoreArtifactTokens.DefaultHierarchyRoot, AtsClientService.get().getAtsBranch());
Artifact firstArt = null, secondArt = null;
for (Artifact child : rootArt.getChildren()) {
if (firstArt == null) {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/SubscribeUtilityTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/SubscribeUtilityTest.java
index 49247b4220..5e12174253 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/SubscribeUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/SubscribeUtilityTest.java
@@ -49,8 +49,8 @@ public class SubscribeUtilityTest {
alexUserArt.getRelatedArtifactsCount(CoreRelationTypes.Users_Artifact));
// Subscribe to 2 team definitions
- Artifact cisCodeTeam = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.CIS_Code, AtsClientService.get().getAtsBranch());
- Artifact cisSwTeam = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.CIS_SW, AtsClientService.get().getAtsBranch());
+ Artifact cisCodeTeam = ArtifactQuery.getArtifactFromId(DemoArtifactToken.CIS_Code, AtsClientService.get().getAtsBranch());
+ Artifact cisSwTeam = ArtifactQuery.getArtifactFromId(DemoArtifactToken.CIS_SW, AtsClientService.get().getAtsBranch());
SubscribeUtility.setSubcriptionsAndPersist(alexUserArt, CoreRelationTypes.Users_Artifact,
Arrays.asList(cisCodeTeam, cisSwTeam), AtsArtifactTypes.TeamDefinition, getClass().getSimpleName());
@@ -60,7 +60,7 @@ public class SubscribeUtilityTest {
Assert.assertFalse("User artifact changes should be persisted", alexUserArt.isDirty());
// Remove one, add another
- Artifact cisTestTeam = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.CIS_Test, AtsClientService.get().getAtsBranch());
+ Artifact cisTestTeam = ArtifactQuery.getArtifactFromId(DemoArtifactToken.CIS_Test, AtsClientService.get().getAtsBranch());
SubscribeUtility.setSubcriptionsAndPersist(alexUserArt, CoreRelationTypes.Users_Artifact,
Arrays.asList(cisCodeTeam, cisTestTeam), AtsArtifactTypes.TeamDefinition, getClass().getSimpleName());
@@ -79,7 +79,7 @@ public class SubscribeUtilityTest {
}
private static Artifact getAlexUserArtifact() throws OseeCoreException {
- return ArtifactQuery.getArtifactFromToken(DemoUsers.Alex_Kay, AtsClientService.get().getAtsBranch());
+ return ArtifactQuery.getArtifactFromId(DemoUsers.Alex_Kay, AtsClientService.get().getAtsBranch());
}
}
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 280a47e051..fe8a030c66 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
@@ -366,7 +366,7 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
@Override
public String getConfigValue(String key) {
String result = null;
- Artifact atsConfig = ArtifactQuery.getArtifactFromToken(AtsArtifactToken.AtsConfig, getAtsBranch());
+ Artifact atsConfig = ArtifactQuery.getArtifactFromId(AtsArtifactToken.AtsConfig, getAtsBranch());
if (atsConfig != null) {
for (Object obj : atsConfig.getAttributeValues(CoreAttributeTypes.GeneralStringData)) {
String str = (String) obj;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java
index b0bef16d01..d19ba02b95 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java
@@ -145,7 +145,7 @@ public class AtsUtilClient {
public static Artifact getFromToken(ArtifactToken token) {
Artifact toReturn = null;
try {
- toReturn = ArtifactQuery.getArtifactFromToken(token, AtsClientService.get().getAtsBranch());
+ toReturn = ArtifactQuery.getArtifactFromId(token, AtsClientService.get().getAtsBranch());
} catch (OseeCoreException ex) {
// Do Nothing;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java
index 7642348110..f66e9aac7b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java
@@ -45,7 +45,7 @@ public class AtsConfig2DataExample extends AbstractAtsConfig2Data {
@Override
public void performPostConfig(IAtsChangeSet changes, AbstractAtsConfig2Data data) {
- Artifact dtsSoftware = ArtifactQuery.getArtifactFromToken(Software_Team, AtsClientService.get().getAtsBranch());
+ Artifact dtsSoftware = ArtifactQuery.getArtifactFromId(Software_Team, AtsClientService.get().getAtsBranch());
dtsSoftware.addAttribute(AtsAttributeTypes.RelatedTaskWorkDefinition, "WorkDef_Task_AtsConfig2Example");
changes.add(dtsSoftware);
}
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 8748fb5577..73f459876b 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
@@ -58,7 +58,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask {
// load top team into cache
Artifact topTeamDefArt =
- ArtifactQuery.getArtifactFromToken(AtsArtifactToken.TopTeamDefinition, AtsClientService.get().getAtsBranch());
+ ArtifactQuery.getArtifactFromId(AtsArtifactToken.TopTeamDefinition, AtsClientService.get().getAtsBranch());
IAtsTeamDefinition teamDef = AtsClientService.get().getConfigItem(topTeamDefArt);
IAtsChangeSet changes = AtsClientService.get().createChangeSet("Set Top Team Work Definition");
changes.setSoleAttributeValue(teamDef, AtsAttributeTypes.WorkflowDefinition,
@@ -67,7 +67,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask {
// load top ai into cache
Artifact topAiArt =
- ArtifactQuery.getArtifactFromToken(AtsArtifactToken.TopActionableItem, AtsClientService.get().getAtsBranch());
+ ArtifactQuery.getArtifactFromId(AtsArtifactToken.TopActionableItem, AtsClientService.get().getAtsBranch());
IAtsActionableItem aia = AtsClientService.get().getConfigItem(topAiArt);
changes.setSoleAttributeValue(aia, AtsAttributeTypes.Actionable, false);
changes.execute();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java
index 40d040022c..0e43cb04ec 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsAccessOseeDslProvider.java
@@ -30,7 +30,7 @@ public class AtsAccessOseeDslProvider extends AbstractOseeDslProvider {
private Artifact getStorageArtifact() {
try {
- return ArtifactQuery.getArtifactFromToken(AtsArtifactToken.AtsCmAccessControl, CoreBranches.COMMON);
+ return ArtifactQuery.getArtifactFromId(AtsArtifactToken.AtsCmAccessControl, CoreBranches.COMMON);
} catch (OseeCoreException ex) {
return null;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/AtsWorkDefinitionImporter.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/AtsWorkDefinitionImporter.java
index ab06444261..1bc008ec75 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/AtsWorkDefinitionImporter.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/AtsWorkDefinitionImporter.java
@@ -86,7 +86,7 @@ public class AtsWorkDefinitionImporter {
Artifact artifact = null;
try {
if (token != null) {
- artifact = ArtifactQuery.getArtifactFromToken(token, AtsClientService.get().getAtsBranch());
+ artifact = ArtifactQuery.getArtifactFromId(token, AtsClientService.get().getAtsBranch());
} else {
artifact = ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.WorkDefinition, sheetName,
AtsClientService.get().getAtsBranch());
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 93543b9565..e111ad03f9 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
@@ -319,7 +319,7 @@ public class ArtifactQueryTest {
transaction = folder.getTransaction();
- Artifact rootArt = ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.DefaultHierarchyRoot, COMMON);
+ Artifact rootArt = ArtifactQuery.getArtifactFromId(CoreArtifactTokens.DefaultHierarchyRoot, COMMON);
rootArt.addChild(folder);
rootArt.persist(getClass().getName());
Assert.assertFalse(ArtifactQuery.isArtifactChangedViaEntries(folder));
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/MergeManagerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/MergeManagerTest.java
index 7319ca016f..76bb017f9c 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/MergeManagerTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/MergeManagerTest.java
@@ -77,7 +77,7 @@ public class MergeManagerTest {
}
workingBranch = BranchManager.createWorkingBranch(SAW_Bld_1, "Working Branch");
- Artifact artOnWorking = ArtifactQuery.getArtifactFromToken(NewArtifactToken, workingBranch);
+ Artifact artOnWorking = ArtifactQuery.getArtifactFromId(NewArtifactToken, workingBranch);
artOnWorking.setSoleAttributeValue(CoreAttributeTypes.WordTemplateContent, "Working Edit");
artOnWorking.persist("Working Edit");
@@ -88,7 +88,7 @@ public class MergeManagerTest {
@After
public void tearDown() throws OseeCoreException {
- Artifact artOnWorking = ArtifactQuery.getArtifactFromToken(NewArtifactToken, workingBranch);
+ Artifact artOnWorking = ArtifactQuery.getArtifactFromId(NewArtifactToken, workingBranch);
Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Collections.singleton(artOnWorking)));
BranchManager.purgeBranch(workingBranch);
@@ -132,7 +132,7 @@ public class MergeManagerTest {
workingBranch).isRebaselineInProgress() && !BranchManager.getState(workingBranch).isRebaselineInProgress());
// Purge art from SAW 2 since we did a commit
- Artifact artOnSaw2 = ArtifactQuery.getArtifactFromToken(NewArtifactToken, SAW_Bld_2);
+ Artifact artOnSaw2 = ArtifactQuery.getArtifactFromId(NewArtifactToken, SAW_Bld_2);
Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Collections.singleton(artOnSaw2)));
}
@@ -212,8 +212,8 @@ public class MergeManagerTest {
// Clean up this test
// Purge art from new Updated Branch
- Artifact artOnSaw2 = ArtifactQuery.getArtifactFromToken(NewArtifactToken, SAW_Bld_2);
- Artifact artOnUpdateBranch = ArtifactQuery.getArtifactFromToken(NewArtifactToken, branchForUpdate);
+ Artifact artOnSaw2 = ArtifactQuery.getArtifactFromId(NewArtifactToken, SAW_Bld_2);
+ Artifact artOnUpdateBranch = ArtifactQuery.getArtifactFromId(NewArtifactToken, branchForUpdate);
Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Arrays.asList(artOnSaw2, artOnUpdateBranch)));
BranchManager.purgeBranch(branchForUpdate);
}
@@ -321,7 +321,7 @@ public class MergeManagerTest {
workingBranch).isRebaselineInProgress() && !BranchManager.getState(workingBranch).isRebaselineInProgress());
// Clean up this test
- Artifact artOnSaw2 = ArtifactQuery.getArtifactFromToken(NewArtifactToken, SAW_Bld_2);
+ Artifact artOnSaw2 = ArtifactQuery.getArtifactFromId(NewArtifactToken, SAW_Bld_2);
Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Arrays.asList(artOnSaw2)));
}
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeArtifactsTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeArtifactsTest.java
index f56f90ae59..2d617023a4 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeArtifactsTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/PurgeArtifactsTest.java
@@ -49,7 +49,7 @@ public class PurgeArtifactsTest {
@Test
public void test() {
- Artifact userGroupsArt = ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.UserGroups, CoreBranches.COMMON);
+ Artifact userGroupsArt = ArtifactQuery.getArtifactFromId(CoreArtifactTokens.UserGroups, CoreBranches.COMMON);
SkynetTransaction transaction =
TransactionManager.createTransaction(CoreBranches.COMMON, getClass().getSimpleName());
@@ -61,7 +61,7 @@ public class PurgeArtifactsTest {
ArtifactCache.deCache(userGroupsArt);
- userGroupsArt = ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.UserGroups, CoreBranches.COMMON);
+ userGroupsArt = ArtifactQuery.getArtifactFromId(CoreArtifactTokens.UserGroups, CoreBranches.COMMON);
Assert.assertFalse(userGroupsArt.isDirty());
Assert.assertEquals(userGroupsArt, childFolder.getParent());
Assert.assertTrue(userGroupsArt.getChildren().contains(childFolder));
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 dae1c76850..022c317d2d 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
@@ -37,7 +37,7 @@ public final class OseeSystemArtifacts {
}
public static Artifact getDefaultHierarchyRootArtifact(BranchId branch) throws OseeCoreException {
- return ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.DefaultHierarchyRoot, branch);
+ return ArtifactQuery.getArtifactFromId(CoreArtifactTokens.DefaultHierarchyRoot, branch);
}
public static Artifact createGlobalPreferenceArtifact() throws OseeCoreException {
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 84361e274f..6c2dc08703 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
@@ -77,6 +77,6 @@ public class UniversalGroup {
}
public static Artifact getTopUniversalGroupArtifact(BranchId branch) throws OseeCoreException {
- return ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.UniversalGroupRoot, branch);
+ return ArtifactQuery.getArtifactFromId(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/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index 5ba348055b..2992d5849f 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
@@ -76,18 +76,10 @@ import org.eclipse.osee.orcs.rest.model.search.artifact.SearchResult;
public class ArtifactQuery {
private static Map<Long, String> uuidToGuid;
- public static <T extends ArtifactId & HasBranch> Artifact getArtifactFromToken(T artifactToken, BranchId branch) throws OseeCoreException {
- return getOrCheckArtifactFromId(artifactToken, branch, EXCLUDE_DELETED, QueryType.GET);
- }
-
public static <T extends ArtifactId & HasBranch> Artifact getArtifactFromToken(T artifactToken, DeletionFlag deletionFlag) {
return getOrCheckArtifactFromId(artifactToken, artifactToken.getBranch(), deletionFlag, QueryType.GET);
}
- public static <T extends ArtifactId & HasBranch> Artifact getArtifactFromToken(T artifactToken, BranchId branch, DeletionFlag deletionFlag) {
- return getOrCheckArtifactFromId(artifactToken, branch, deletionFlag, QueryType.GET);
- }
-
public static <T extends ArtifactId & HasBranch> Artifact getArtifactOrNull(T artifactToken, DeletionFlag deletionFlag) {
return getOrCheckArtifactFromId(artifactToken, artifactToken.getBranch(), deletionFlag, QueryType.CHECK);
}
@@ -880,7 +872,7 @@ public class ArtifactQuery {
JdbcStatement chStmt = ConnectionHandler.getStatement();
try {
String query = attributeTokenQuery.replaceFirst("ART_IDS_HERE", ids);
- chStmt.runPreparedQuery(query, branch.getId(), branch.getId(), attributetype.getId(), value);
+ chStmt.runPreparedQuery(query, branch, branch, attributetype, value);
List<ArtifactToken> tokens = extractTokensFromQuery(chStmt);
return tokens;
} finally {
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 1bd0614d30..d3a7eb3c22 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
@@ -698,7 +698,7 @@ public class ArtifactExplorerMenu {
if (selection != null) {
if (selection.isEmpty()) {
destinationArtifact =
- ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.DefaultHierarchyRoot, getBranch());
+ ArtifactQuery.getArtifactFromId(CoreArtifactTokens.DefaultHierarchyRoot, getBranch());
} else if (selection.getFirstElement() instanceof Artifact) {
Object object = selection.getFirstElement();
Artifact artifact = (Artifact) object;

Back to the top