Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-07-28 22:34:12 +0000
committerRoberto E. Escobar2014-09-29 22:54:51 +0000
commit9c41e69ebf04a688c114b53b581449a01a9b51a5 (patch)
tree422b22cb07c370c0b7b36e4f79d165eb349d140f
parent2044c120477a346a8b25bb39a5a7656c576e50a2 (diff)
downloadorg.eclipse.osee-9c41e69ebf04a688c114b53b581449a01a9b51a5.tar.gz
org.eclipse.osee-9c41e69ebf04a688c114b53b581449a01a9b51a5.tar.xz
org.eclipse.osee-9c41e69ebf04a688c114b53b581449a01a9b51a5.zip
feature[ats_ATS64164]: CPA: Improve performance of TeamWorkflow getTeamDef and getAi
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java
index b9910f366aa..9973e06edc8 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java
@@ -35,8 +35,11 @@ public class TeamWorkflow extends WorkItem implements IAtsTeamWorkflow {
Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>();
for (Object aiGuidObj : artifact.getAttributeValues(AtsAttributeTypes.ActionableItem)) {
String aiGuid = (String) aiGuidObj;
- ArtifactReadable aiArt = getAtsServer().getArtifactByGuid(aiGuid);
- IAtsActionableItem ai = getAtsServer().getConfigItemFactory().getActionableItem(aiArt);
+ IAtsActionableItem ai = getAtsServer().getConfig().getSoleByGuid(aiGuid, IAtsActionableItem.class);
+ if (ai == null) {
+ ArtifactReadable aiArt = getAtsServer().getArtifactByGuid(aiGuid);
+ ai = getAtsServer().getConfigItemFactory().getActionableItem(aiArt);
+ }
ais.add(ai);
}
return ais;
@@ -45,9 +48,11 @@ public class TeamWorkflow extends WorkItem implements IAtsTeamWorkflow {
@Override
public IAtsTeamDefinition getTeamDefinition() throws OseeCoreException {
String teamDefGuid = artifact.getSoleAttributeValue(AtsAttributeTypes.TeamDefinition);
- ArtifactReadable teamDefArt = getAtsServer().getArtifactByGuid(teamDefGuid);
- IAtsTeamDefinition teamDef = getAtsServer().getConfigItemFactory().getTeamDef(teamDefArt);
+ IAtsTeamDefinition teamDef = getAtsServer().getConfig().getSoleByGuid(teamDefGuid, IAtsTeamDefinition.class);
+ if (teamDef == null) {
+ ArtifactReadable teamDefArt = getAtsServer().getArtifactByGuid(teamDefGuid);
+ teamDef = getAtsServer().getConfigItemFactory().getTeamDef(teamDefArt);
+ }
return teamDef;
}
-
}

Back to the top