diff options
author | donald.g.dunne | 2016-11-10 23:45:43 +0000 |
---|---|---|
committer | David W. Miller | 2016-11-10 23:45:43 +0000 |
commit | 3793c0e1a8603bf1516a60d6dd3a8aa50bc15067 (patch) | |
tree | 744cb4c69d36cff9865ea20a5ecfed49abb1fdb6 /plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java | |
parent | 0fa7025afa9631ee6ad835273b07f5121dcd24f4 (diff) | |
download | org.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.tar.gz org.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.tar.xz org.eclipse.osee-3793c0e1a8603bf1516a60d6dd3a8aa50bc15067.zip |
feature[ats_ATS322000]: Improvements to support action
Change-Id: I2a89cf73b29b513f926249df23f81c7c6d1efa16
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.java | 10 |
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); |