Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-11-10 23:45:43 +0000
committerDavid W. Miller2016-11-10 23:45:43 +0000
commit3793c0e1a8603bf1516a60d6dd3a8aa50bc15067 (patch)
tree744cb4c69d36cff9865ea20a5ecfed49abb1fdb6 /plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
parent0fa7025afa9631ee6ad835273b07f5121dcd24f4 (diff)
downloadorg.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.tar.gz
org.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.tar.xz
org.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.zip
feature[ats_ATS322000]: Improvements to support action
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java')
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index 2a3fbfb40fb..29ead7c78f3 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -72,6 +72,7 @@ public class ActionFactory implements IAtsActionFactory {
private final IAttributeResolver attrResolver;
private final IAtsStateFactory stateFactory;
private final IAtsServices services;
+ private IAtsTeamDefinition topTeamDefinition;
public ActionFactory(IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, IAtsActionableItemService actionableItemManager, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsServices atsServices) {
this.workItemFactory = workItemFactory;
@@ -91,7 +92,7 @@ public class ActionFactory implements IAtsActionFactory {
Object actionArt = changes.createArtifact(AtsArtifactTypes.Action, title);
IAtsAction action = workItemFactory.getAction((ArtifactId) actionArt);
- IAtsTeamDefinition topTeamDefinition = TeamDefinitions.getTopTeamDefinition(services.getQueryService());
+ IAtsTeamDefinition topTeamDefinition = getTopTeamDef();
utilService.setAtsId(sequenceProvider, action, topTeamDefinition, changes);
changes.add(action);
setArtifactIdentifyData(action, title, desc, changeType, priority, validationRequired, needByDate, changes);
@@ -128,6 +129,13 @@ public class ActionFactory implements IAtsActionFactory {
return new Pair<IAtsAction, Collection<IAtsTeamWorkflow>>(action, teamWfs);
}
+ private IAtsTeamDefinition getTopTeamDef() {
+ if (topTeamDefinition == null) {
+ topTeamDefinition = TeamDefinitions.getTopTeamDefinition(services.getQueryService());
+ }
+ return topTeamDefinition;
+ }
+
@Override
public IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, IAtsChangeSet changes, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, CreateTeamOption... createTeamOption) throws OseeCoreException {
IArtifactType teamWorkflowArtifactType = getTeamWorkflowArtifactType(teamDef);

Back to the top