Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-08-31 11:59:58 -0400
committerDonald Dunne2017-09-05 11:50:20 -0400
commite3f2eeb6f2777beab7738b2ba5e60fb7da4c26c8 (patch)
treee66e8f903e8b756e4a7481905696cdf20b80dda3
parentd89b07cd021af6417ebacb79e4c812bb68d6b238 (diff)
downloadorg.eclipse.osee-e3f2eeb6f2777beab7738b2ba5e60fb7da4c26c8.tar.gz
org.eclipse.osee-e3f2eeb6f2777beab7738b2ba5e60fb7da4c26c8.tar.xz
org.eclipse.osee-e3f2eeb6f2777beab7738b2ba5e60fb7da4c26c8.zip
feature: Convert WorkPackageGuid to uuid
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java1
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java12
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java23
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java47
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java16
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java38
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java11
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/CommonArtifactReferenceAttributeAdapter.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageQBDReport.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/AtsTaskToChangedArtifactReferenceAttributeAdapter.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/artifact.reference.adapter.xml2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/attribute.adapter.service.xml2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/ArtifactAttributeAdapter.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java2
22 files changed, 121 insertions, 104 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
index 4f0fa4b47b..f51a3eaab3 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
@@ -143,7 +143,6 @@ public final class AtsAttributeTypes {
public static final AttributeTypeToken ActivityId = createType(1152921504606847874L, "Activity ID");
public static final AttributeTypeToken UnPlannedWork = createType(2421093774890249189L, "Unplanned Work");
public static final AttributeTypeToken ActivityName = createType(1152921504606847875L, "Activity Name");
- public static final AttributeTypeToken WorkPackageGuid = createType(1152921504606847876L, "Work Package Guid", "Work Package for this Team Workflow, Review, Task or Goal");
public static final AttributeTypeToken ClosureActive = createType(1152921875139002555L, "Closure Active status of Program");
public static final AttributeTypeToken ClosureState = createType(1152921504606847452L, "Closure Status of Build");
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java
index 854522fc81..3f1e0c9ca3 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java
@@ -56,16 +56,16 @@ public class Pdd95CreateDemoEVConfigAndWorkPackages {
// set work packages
TeamWorkFlowArtifact commWf = DemoUtil.getSawCodeCommittedWf();
- changes.setSoleAttributeValue((IAtsTeamWorkflow) commWf, AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) commWf, AtsAttributeTypes.WorkPackageReference,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_01);
TeamWorkFlowArtifact unCommWf = DemoUtil.getSawCodeUnCommittedWf();
- changes.setSoleAttributeValue((IAtsTeamWorkflow) unCommWf, AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) unCommWf, AtsAttributeTypes.WorkPackageReference,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_01);
TeamWorkFlowArtifact noBranchWf = DemoUtil.getSawCodeNoBranchWf();
- changes.setSoleAttributeValue((IAtsTeamWorkflow) noBranchWf, AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_03.getGuid());
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) noBranchWf, AtsAttributeTypes.WorkPackageReference,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_03);
changes.execute();
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
index d3de173260..1dc8e2512a 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
@@ -213,19 +213,19 @@ public class AtsArtifactChecks extends ArtifactCheck {
}
private IStatus checkWorkPackages(boolean isAtsAdmin, Collection<Artifact> artifacts) throws OseeCoreException {
- List<String> guids = new ArrayList<>();
+ List<String> ids = new ArrayList<>();
for (Artifact art : artifacts) {
if (art.isOfType(AtsArtifactTypes.WorkPackage)) {
- guids.add(art.getGuid());
+ ids.add(art.getIdString());
}
}
- if (!guids.isEmpty()) {
+ if (!ids.isEmpty()) {
List<Artifact> artifactListFromIds = ArtifactQuery.getArtifactListFromAttributeValues(
- AtsAttributeTypes.WorkPackageGuid, guids, AtsClientService.get().getAtsBranch(), 5);
+ AtsAttributeTypes.WorkPackageReference, ids, AtsClientService.get().getAtsBranch(), 5);
if (artifactListFromIds.size() > 0) {
return createStatus(String.format(
"Work Packages [%s] selected to delete have related Work Items; Delete or re-assign Work Packages first.",
- guids));
+ ids));
}
}
return Status.OK_STATUS;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
index b5b7da8ea7..37caf167f4 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
@@ -69,8 +69,8 @@ public class EarnedValueReportOperation extends AbstractOperation {
for (IAtsWorkPackage workPkg : workPackages) {
checkForCancelledStatus(monitor);
- for (Artifact art : ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.WorkPackageGuid,
- workPkg.getGuid(), AtsClientService.get().getAtsBranch())) {
+ for (Artifact art : ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.WorkPackageReference,
+ workPkg.getIdString(), AtsClientService.get().getAtsBranch())) {
checkForCancelledStatus(monitor);
AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) art;
EarnedValueReportResult result = new EarnedValueReportResult(workPkg, art);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
index 739507fdc9..b6017e41fe 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
@@ -40,14 +40,14 @@ public class AtsEarnedValueImpl extends AtsAbstractEarnedValueImpl {
@Override
public String getWorkPackageId(IAtsWorkItem workItem) {
- String guid = null;
+ String id = null;
Artifact artifact = AtsClientService.get().getArtifact(workItem);
Conditions.checkNotNull(artifact, "workItem", "Can't Find Work Package matching %s", workItem.toStringWithId());
if (artifact instanceof AbstractWorkflowArtifact) {
AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) artifact;
- guid = awa.getSoleAttributeValue(AtsAttributeTypes.WorkPackageGuid, null);
+ id = awa.getSoleAttributeValue(AtsAttributeTypes.WorkPackageReference, null);
}
- return guid;
+ return id;
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
index 524c35464f..21f67dd0a5 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
@@ -57,19 +57,20 @@ public class ColorTeamColumnTest {
@org.junit.Test
public void testTeamWorkflow() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
Pair<String, Boolean> result = ColorTeamColumn.getWorkItemColorTeam(teamWf1, atsServices);
assertEquals("", result.getFirst());
- when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(
- "guid");
- when(atsServices.getArtifactById("guid")).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "id");
+ when(atsServices.getArtifactById("id")).thenReturn(null);
result = ColorTeamColumn.getWorkItemColorTeam(teamWf1, atsServices);
assertEquals("", result.getFirst());
- when(atsServices.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(atsServices.getArtifactById("id")).thenReturn(workPackageArt);
when(attributeResolver.getSoleAttributeValue(workPackageArt, AtsAttributeTypes.ColorTeam, "")).thenReturn("");
result = ColorTeamColumn.getWorkItemColorTeam(teamWf1, atsServices);
@@ -92,8 +93,8 @@ public class ColorTeamColumnTest {
}
private void testChildWorkItem(IAtsWorkItem childWorkItem) {
- when(attributeResolver.getSoleAttributeValue(childWorkItem, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(
- null);
+ when(attributeResolver.getSoleAttributeValue(childWorkItem, AtsAttributeTypes.WorkPackageReference,
+ null)).thenReturn(null);
Pair<String, Boolean> result = ColorTeamColumn.getWorkItemColorTeam(childWorkItem, atsServices);
assertEquals("", result.getFirst());
@@ -102,14 +103,14 @@ public class ColorTeamColumnTest {
result = ColorTeamColumn.getWorkItemColorTeam(childWorkItem, atsServices);
assertEquals("", result.getFirst());
- when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(
- "guid");
- when(atsServices.getArtifactById("guid")).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf1, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "id");
+ when(atsServices.getArtifactById("id")).thenReturn(null);
result = ColorTeamColumn.getWorkItemColorTeam(childWorkItem, atsServices);
assertEquals("", result.getFirst());
- when(atsServices.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(atsServices.getArtifactById("id")).thenReturn(workPackageArt);
when(attributeResolver.getSoleAttributeValue(workPackageArt, AtsAttributeTypes.ColorTeam, "")).thenReturn("");
result = ColorTeamColumn.getWorkItemColorTeam(childWorkItem, atsServices);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
index a2fd0c0a58..8cffaef7e0 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
@@ -81,32 +81,36 @@ public class WorkPackageUtilityTest {
@org.junit.Test
public void testGetWorkPackageArtifact() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
Pair<ArtifactId, Boolean> result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, null, false);
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactByGuid("guid")).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "37");
+ when(services.getArtifact(37L)).thenReturn(null);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
+ when(services.getArtifact(37L)).thenReturn(workPackageArt);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, workPackageArt, false);
- when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
result = util.getWorkPackageArtifact(services, task);
assertResult(result, workPackageArt, true);
}
@org.junit.Test
public void testGetInsertionActivity() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactByGuid("guid")).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "37");
+ when(services.getArtifact(37L)).thenReturn(null);
Pair<IAtsInsertionActivity, Boolean> result = util.getInsertionActivity(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
+ when(services.getArtifact(37L)).thenReturn(workPackageArt);
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(null);
result = util.getInsertionActivity(services, teamWf);
@@ -118,17 +122,19 @@ public class WorkPackageUtilityTest {
result = util.getInsertionActivity(services, teamWf);
assertResult(result, activity, false);
- when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
result = util.getInsertionActivity(services, task);
assertResult(result, activity, true);
}
@Test
public void testGetInsertion() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "37");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
+ when(services.getArtifact(37L)).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
Pair<IAtsInsertion, Boolean> result = util.getInsertion(services, teamWf);
@@ -140,17 +146,19 @@ public class WorkPackageUtilityTest {
result = util.getInsertion(services, teamWf);
assertResult(result, insertion, false);
- when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
result = util.getInsertion(services, task);
assertResult(result, insertion, true);
}
@Test
public void testGetProgram() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "37");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
+ when(services.getArtifact(37L)).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,
IAtsInsertion.class)).thenReturn(insertion);
@@ -163,17 +171,19 @@ public class WorkPackageUtilityTest {
result = util.getProgram(services, teamWf);
assertResult(result, program, false);
- when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
result = util.getProgram(services, task);
assertResult(result, program, true);
}
@Test
public void testGetCountry() throws Exception {
- when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
+ when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ "37");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
+ when(services.getArtifact(37L)).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,
@@ -189,7 +199,8 @@ public class WorkPackageUtilityTest {
result = util.getCountry(services, teamWf);
assertResult(result, country, false);
- when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null);
+ when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageReference, null)).thenReturn(
+ null);
result = util.getCountry(services, task);
assertResult(result, country, true);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java
index 8227b85558..4422472948 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java
@@ -31,20 +31,20 @@ public class ColorTeamColumn {
public static Pair<String, Boolean> getWorkItemColorTeam(IAtsWorkItem workItem, IAtsServices atsServices) {
Pair<String, Boolean> result = new Pair<>(null, false);
IAttributeResolver attributeResolver = atsServices.getAttributeResolver();
- String workPackageGuid =
- attributeResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null);
- if (workPackageGuid == null) {
- if (!(workItem instanceof IAtsTeamWorkflow)) {
+ String workPackageId =
+ attributeResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference, null);
+ if (workPackageId == null) {
+ if (!workItem.isTeamWorkflow()) {
IAtsTeamWorkflow teamWf = workItem.getParentTeamWorkflow();
if (teamWf != null) {
- workPackageGuid =
- attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null);
+ workPackageId =
+ attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageReference, null);
result.setSecond(true);
}
}
}
- if (workPackageGuid != null) {
- ArtifactId workPackageArt = atsServices.getArtifactById(workPackageGuid);
+ if (workPackageId != null) {
+ ArtifactId workPackageArt = atsServices.getArtifactById(workPackageId);
if (workPackageArt != null) {
String colorTeam = attributeResolver.getSoleAttributeValue(workPackageArt, AtsAttributeTypes.ColorTeam, "");
result.setFirst(colorTeam);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
index dd8f1dc9c4..1da6a246ca 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
@@ -96,10 +96,10 @@ public class WorkPackageUtility {
*/
public Pair<ArtifactId, Boolean> getWorkPackageArtifact(IAtsServices services, IAtsWorkItem workItem) {
Pair<ArtifactId, Boolean> result = new Pair<>(null, false);
- String workPackageGuid =
- services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null);
- if (Strings.isValid(workPackageGuid)) {
- ArtifactId workPackageArt = services.getArtifactByGuid(workPackageGuid);
+ String workPackageId =
+ services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference, null);
+ if (Strings.isNumeric(workPackageId)) {
+ ArtifactId workPackageArt = services.getArtifact(Long.valueOf(workPackageId));
if (workPackageArt != null) {
result.setFirst(workPackageArt);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
index 5930c46b29..0591782eae 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
@@ -131,9 +131,10 @@ public class AtsProgramService implements IAtsProgramService {
IAtsChangeSet changes = services.getStoreService().createAtsChangeSet("Set Work Package", asUser);
for (IAtsWorkItem workItem : workItems) {
if (workPackage == null) {
- changes.deleteSoleAttribute(workItem, AtsAttributeTypes.WorkPackageGuid);
+ changes.deleteSoleAttribute(workItem, AtsAttributeTypes.WorkPackageReference);
} else {
- changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, workPackage.getGuid());
+ changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference,
+ workPackage.getStoreObject());
}
}
if (!changes.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
index 29effbd2ab..de49b37efb 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
@@ -743,8 +743,8 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
private void addColorTeamCriteria() {
if (Strings.isValid(
colorTeam) && !isWorkPackageSpecified() && !isInsertionActivitySpecified() && !isInsertionSpecified() && !isProgramSpecified()) {
- List<String> workPackageGuids = getWorkPackagesForColorTeam(colorTeam);
- queryAnd(AtsAttributeTypes.WorkPackageGuid, workPackageGuids);
+ List<String> workPackageIds = getWorkPackagesForColorTeam(colorTeam);
+ queryAnd(AtsAttributeTypes.WorkPackageReference, workPackageIds);
}
}
@@ -754,8 +754,8 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
if (isWorkPackageSpecified()) {
ArtifactId workPackArt = services.getArtifact(workPackageUuid);
if (isColorTeamMatch(workPackArt)) {
- String guid = workPackArt.getGuid();
- queryAnd(AtsAttributeTypes.WorkPackageGuid, guid);
+ String id = workPackArt.getIdString();
+ queryAnd(AtsAttributeTypes.WorkPackageReference, id);
}
}
}
@@ -856,7 +856,7 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
if (!isInsertionSpecified()) {
if (programUuid != null && programUuid > 0) {
ArtifactId programArt = services.getArtifact(programUuid);
- List<String> workPackageGuids = new LinkedList<>();
+ List<String> workPackageIds = new LinkedList<>();
for (ArtifactId insertionArt : services.getRelationResolver().getRelated(programArt,
AtsRelationTypes.ProgramToInsertion_Insertion)) {
for (ArtifactId insertionActivityArt : services.getRelationResolver().getRelated(insertionArt,
@@ -864,13 +864,13 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
for (ArtifactId workPackageArt : services.getRelationResolver().getRelated(insertionActivityArt,
AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage)) {
if (isColorTeamMatch(workPackageArt)) {
- workPackageGuids.add(workPackageArt.getGuid());
+ workPackageIds.add(workPackageArt.getIdString());
}
}
}
}
- if (!workPackageGuids.isEmpty()) {
- queryAnd(AtsAttributeTypes.WorkPackageGuid, workPackageGuids);
+ if (!workPackageIds.isEmpty()) {
+ queryAnd(AtsAttributeTypes.WorkPackageReference, workPackageIds);
}
}
}
@@ -880,18 +880,18 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
if (!isInsertionActivitySpecified()) {
if (insertionUuid != null && insertionUuid > 0) {
ArtifactId insertionArt = services.getArtifact(insertionUuid);
- List<String> workPackageGuids = new LinkedList<>();
+ List<String> workPackageIds = new LinkedList<>();
for (ArtifactId insertionActivityArt : services.getRelationResolver().getRelated(insertionArt,
AtsRelationTypes.InsertionToInsertionActivity_InsertionActivity)) {
for (ArtifactId workPackageArt : services.getRelationResolver().getRelated(insertionActivityArt,
AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage)) {
if (isColorTeamMatch(workPackageArt)) {
- workPackageGuids.add(workPackageArt.getGuid());
+ workPackageIds.add(workPackageArt.getIdString());
}
}
}
- if (!workPackageGuids.isEmpty()) {
- queryAnd(AtsAttributeTypes.WorkPackageGuid, workPackageGuids);
+ if (!workPackageIds.isEmpty()) {
+ queryAnd(AtsAttributeTypes.WorkPackageReference, workPackageIds);
}
}
}
@@ -902,26 +902,26 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
public void addInsertionActivityCriteria() {
if (!isWorkPackageSpecified()) {
if (insertionActivityUuid != null && insertionActivityUuid > 0) {
- List<String> workPackageGuids = getWorkPackageGuidsFromActivity();
- if (!workPackageGuids.isEmpty()) {
- queryAnd(AtsAttributeTypes.WorkPackageGuid, workPackageGuids);
+ List<String> workPackageIds = getWorkPackageIdsFromActivity();
+ if (!workPackageIds.isEmpty()) {
+ queryAnd(AtsAttributeTypes.WorkPackageReference, workPackageIds);
}
}
}
}
- private List<String> getWorkPackageGuidsFromActivity() {
- List<String> guids = new LinkedList<>();
+ private List<String> getWorkPackageIdsFromActivity() {
+ List<String> ids = new LinkedList<>();
if (insertionActivityUuid != null && insertionActivityUuid > 0) {
ArtifactId insertionActivityArt = services.getArtifact(insertionActivityUuid);
for (ArtifactId workPackageArt : services.getRelationResolver().getRelated(insertionActivityArt,
AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage)) {
if (isColorTeamMatch(workPackageArt)) {
- guids.add(workPackageArt.getGuid());
+ ids.add(workPackageArt.getIdString());
}
}
}
- return guids;
+ return ids;
}
private void addStateTypeNameAndAttributeCriteria() {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
index ac9eb29d99..76a7ab0156 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
@@ -53,15 +53,16 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi
public String getWorkPackageId(IAtsWorkItem workItem) {
ArtifactId artifact = services.getArtifact(workItem);
Conditions.checkNotNull(artifact, "workItem", "Can't Find Work Package matching %s", workItem.toStringWithId());
- return services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null);
+ return services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference,
+ null);
}
@Override
public IAtsWorkPackage getWorkPackage(IAtsWorkItem workItem) throws OseeCoreException {
WorkPackage wpa = null;
- String workPackageGuid = getWorkPackageId(workItem);
- if (Strings.isValid(workPackageGuid)) {
- ArtifactToken workPkgArt = services.getArtifactById(workPackageGuid);
+ String workPackageId = getWorkPackageId(workItem);
+ if (Strings.isNumeric(workPackageId)) {
+ ArtifactToken workPkgArt = services.getArtifact(Long.valueOf(workPackageId));
wpa = new WorkPackage(logger, workPkgArt, services);
}
return wpa;
@@ -199,7 +200,7 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi
@Override
public void setWorkPackage(IAtsWorkPackage workPackage, IAtsWorkItem workItem, IAtsChangeSet changes) {
- changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, workPackage.getGuid());
+ changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference, workPackage.getIdString());
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
index 797a54e8a8..d00b1ed215 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
@@ -63,8 +63,8 @@ public class AtsWorkPackageEndpointImpl implements AtsWorkPackageEndpointApi {
if (workPackageArt == null) {
throw new OseeArgumentException("Work Package with id [%s] Not Found", workPackageId);
}
- return atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andAttr(AtsAttributeTypes.WorkPackageGuid,
- workPackageArt.getGuid()).getResults().getList();
+ return atsServer.getQueryService().createQuery(WorkItemType.WorkItem).andAttr(
+ AtsAttributeTypes.WorkPackageReference, workPackageArt.getIdString()).getResults().getList();
}
@PUT
@@ -91,7 +91,7 @@ public class AtsWorkPackageEndpointImpl implements AtsWorkPackageEndpointApi {
throw new OseeArgumentException("Work Packages can only be set on Team Workflow or Task, not [%s]",
workItem.getArtifactTypeName());
}
- changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, workPackageArt.getGuid());
+ changes.setSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference, workPackageArt.getIdString());
autoAddWorkItemToColorTeamGoals(getColorTeams(), workPackageArt, workPackageId, workItem, changes);
}
if (!changes.isEmpty()) {
@@ -162,9 +162,9 @@ public class AtsWorkPackageEndpointImpl implements AtsWorkPackageEndpointApi {
if (workItem == null) {
throw new OseeArgumentException("Work Item with id [%s] Not Found", workItemUuid);
}
- if (atsServer.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid,
+ if (atsServer.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageReference,
null) != null) {
- changes.deleteAttributes(workItem, AtsAttributeTypes.WorkPackageGuid);
+ changes.deleteAttributes(workItem, AtsAttributeTypes.WorkPackageReference);
}
}
if (!changes.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/CommonArtifactReferenceAttributeAdapter.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/CommonArtifactReferenceAttributeAdapter.java
index e1b4b14cdf..8dfc4dd81e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/CommonArtifactReferenceAttributeAdapter.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/CommonArtifactReferenceAttributeAdapter.java
@@ -27,10 +27,11 @@ import org.eclipse.osee.framework.skynet.core.attribute.AttributeAdapter;
/**
* @author Donald G. Dunne
*/
-public class CommonArtifactReferenceAttributeAdapter implements AttributeAdapter<Artifact> {
+public class CommonArtifactReferenceAttributeAdapter implements AttributeAdapter<ArtifactId> {
- private static final List<AttributeTypeId> ATTR_TYPE_UUID_LIST = Arrays.asList(AtsAttributeTypes.ProgramUuid,
- AtsAttributeTypes.TeamDefinitionReference, AtsAttributeTypes.ActionableItemReference);
+ private static final List<AttributeTypeId> ATTR_TYPE_UUID_LIST =
+ Arrays.asList(AtsAttributeTypes.ProgramUuid, AtsAttributeTypes.TeamDefinitionReference,
+ AtsAttributeTypes.ActionableItemReference, AtsAttributeTypes.WorkPackageReference);
@Override
public Collection<AttributeTypeId> getSupportedTypes() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageQBDReport.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageQBDReport.java
index 540ccbefb3..1cfef09559 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageQBDReport.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageQBDReport.java
@@ -63,9 +63,9 @@ public class WorkPackageQBDReport extends XNavigateItemAction implements IWorldE
@Override
public Collection<Artifact> performSearch(SearchType searchType) {
- List<ArtifactToken> workItemTokens =
- ArtifactQuery.getArtifactTokenListFromSoleAttributeInherited(AtsArtifactTypes.AbstractWorkflowArtifact,
- AtsAttributeTypes.WorkPackageGuid, selectedWorkPackage.getGuid(), AtsClientService.get().getAtsBranch());
+ List<ArtifactToken> workItemTokens = ArtifactQuery.getArtifactTokenListFromSoleAttributeInherited(
+ AtsArtifactTypes.AbstractWorkflowArtifact, AtsAttributeTypes.WorkPackageReference,
+ selectedWorkPackage.getIdString(), AtsClientService.get().getAtsBranch());
List<Artifact> workItems =
ArtifactQuery.getArtifactListFrom(workItemTokens, AtsClientService.get().getAtsBranch());
return workItems;
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 1523f9120d..d7ca7c42bd 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
@@ -35,7 +35,7 @@ import org.eclipse.osee.framework.skynet.core.attribute.AttributeAdapter;
/**
* @author Donald G. Dunne
*/
-public class AtsTaskToChangedArtifactReferenceAttributeAdapter implements AttributeAdapter<Artifact> {
+public class AtsTaskToChangedArtifactReferenceAttributeAdapter implements AttributeAdapter<ArtifactId> {
private static final List<AttributeTypeId> TASK_CHANGED_ARTIFACT_REFERENCE_ATTR =
Arrays.asList(AtsAttributeTypes.TaskToChangedArtifactReference);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/artifact.reference.adapter.xml b/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/artifact.reference.adapter.xml
index 5aad7a2750..63e397ea00 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/artifact.reference.adapter.xml
+++ b/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/artifact.reference.adapter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.framework.skynet.core.attribute.service.ArtifactAttributeAdapter">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.eclipse.osee.framework.skynet.core.attribute.service.ArtifactAttributeAdapter"/>
<service>
<provide interface="org.eclipse.osee.framework.skynet.core.attribute.AttributeAdapter"/>
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/attribute.adapter.service.xml b/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/attribute.adapter.service.xml
index 4b757b5b68..abce3d8465 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/attribute.adapter.service.xml
+++ b/plugins/org.eclipse.osee.framework.skynet.core/OSGI-INF/attribute.adapter.service.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="true" name="org.eclipse.osee.framework.skynet.core.attribute.service.AttributeAdapterServiceImpl">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" immediate="true">
<implementation class="org.eclipse.osee.framework.skynet.core.attribute.service.AttributeAdapterServiceImpl"/>
<service>
<provide interface="org.eclipse.osee.framework.skynet.core.attribute.service.AttributeAdapterService"/>
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 ce2a5327ba..14e4dbb3e5 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
@@ -174,8 +174,9 @@ public final class BranchManager {
public static Branch getBranch(BranchId branchId, ArtifactId view) {
if (branchId == null) {
throw new BranchDoesNotExist("Branch Id is null");
+ } else if (branchId.isInvalid()) {
+ throw new BranchDoesNotExist("Branch id is invalid");
}
-
Branch branch = null;
if (view.notEqual(ArtifactId.SENTINEL)) {
for (Branch branchView : getCache().getViews()) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
index 5f0fac240f..e882a1e8e1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/ArtifactReferenceAttribute.java
@@ -10,19 +10,19 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author Roberto E. Escobar
*/
-public class ArtifactReferenceAttribute extends IdentityReferenceAttribute<Artifact> {
+public class ArtifactReferenceAttribute extends IdentityReferenceAttribute<ArtifactId> {
Long rawValue;
@Override
- protected boolean subClassSetValue(Artifact artifact) throws OseeCoreException {
- rawValue = artifact == null ? null : artifact.getUuid();
+ protected boolean subClassSetValue(ArtifactId artifact) throws OseeCoreException {
+ rawValue = artifact == null ? null : artifact.getId();
return getAttributeDataProvider().setValue(artifact == null ? "" : artifact.getIdString());
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/ArtifactAttributeAdapter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/ArtifactAttributeAdapter.java
index 55a89526e0..73da615b1d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/ArtifactAttributeAdapter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/ArtifactAttributeAdapter.java
@@ -27,7 +27,7 @@ import org.eclipse.osee.framework.skynet.core.attribute.AttributeAdapter;
/**
* @author Roberto E. Escobar
*/
-public class ArtifactAttributeAdapter implements AttributeAdapter<Artifact> {
+public class ArtifactAttributeAdapter implements AttributeAdapter<ArtifactId> {
@Override
public Artifact adapt(Attribute<?> attribute, Id identity) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java
index 5054bd747d..ee3be082e2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.model.cache.IOseeCache;
import org.eclipse.osee.framework.core.model.cache.IOseeDataAccessor;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactLoader;
import org.eclipse.osee.framework.skynet.core.artifact.LoadType;
@@ -78,6 +79,7 @@ public class DatabaseBranchAccessor implements IOseeDataAccessor<Branch> {
* @return Branch or BranchDoesNotExist exception
*/
public static Branch loadBranch(IOseeCache<Branch> cache, BranchId branchId) {
+ Conditions.assertTrue(branchId.isValid(), "Invalid Branch %s", branchId);
return ConnectionHandler.getJdbcClient().fetchOrException(
() -> new BranchDoesNotExist("Branch could not be acquired for branch id %s", branchId),
stmt -> load(cache, stmt), SELECT_BRANCH, branchId);

Back to the top