Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-07-09 20:28:00 +0000
committerRoberto E. Escobar2014-08-28 23:59:09 +0000
commit4e0d5a7d88b6988044ace1fc8c34a08e44a06e03 (patch)
tree7fe023b329530d271c3b58daaa32f13db0ed83a7 /plugins/org.eclipse.osee.ats.impl
parentf84d2c9134547bedb6fb1cefe17abdbd995b7adf (diff)
downloadorg.eclipse.osee-4e0d5a7d88b6988044ace1fc8c34a08e44a06e03.tar.gz
org.eclipse.osee-4e0d5a7d88b6988044ace1fc8c34a08e44a06e03.tar.xz
org.eclipse.osee-4e0d5a7d88b6988044ace1fc8c34a08e44a06e03.zip
feature[ats_ATS64164]: Return action and teams created in ActionFactory
Diffstat (limited to 'plugins/org.eclipse.osee.ats.impl')
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/action/IAtsActionFactory.java3
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java8
2 files changed, 8 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/action/IAtsActionFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/action/IAtsActionFactory.java
index 8fe0927af27..923817c9d5b 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/action/IAtsActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/action/IAtsActionFactory.java
@@ -24,10 +24,11 @@ import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.INewActionListener;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.type.Pair;
public interface IAtsActionFactory {
- public abstract IAtsAction createAction(IAtsUser user, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<IAtsActionableItem> actionableItems, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, IAtsChangeSet changes) throws OseeCoreException;
+ public abstract Pair<IAtsAction, Collection<IAtsTeamWorkflow>> createAction(IAtsUser user, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<IAtsActionableItem> actionableItems, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, IAtsChangeSet changes) throws OseeCoreException;
public abstract 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;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
index 89340834673..3ae41dff0ca 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.impl.internal.action;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.LinkedList;
@@ -42,6 +43,7 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
+import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -72,7 +74,7 @@ public class ActionFactory implements IAtsActionFactory {
}
@Override
- public IAtsAction createAction(IAtsUser user, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<IAtsActionableItem> actionableItems, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, IAtsChangeSet changes) throws OseeCoreException {
+ public Pair<IAtsAction, Collection<IAtsTeamWorkflow>> createAction(IAtsUser user, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<IAtsActionableItem> actionableItems, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, IAtsChangeSet changes) throws OseeCoreException {
Conditions.checkNotNullOrEmptyOrContainNull(actionableItems, "actionableItems");
// if "tt" is title, this is an action created for development. To
// make it easier, all fields are automatically filled in for ATS developer
@@ -97,11 +99,13 @@ public class ActionFactory implements IAtsActionFactory {
}
// Create team workflow artifacts
+ List<IAtsTeamWorkflow> teamWfs = new ArrayList<IAtsTeamWorkflow>();
for (IAtsTeamDefinition teamDef : teamDefs) {
List<IAtsUser> leads = new LinkedList<IAtsUser>(teamDef.getLeads(actionableItems));
IAtsTeamWorkflow teamWf =
createTeamWorkflow(action, teamDef, actionableItems, leads, changes, createdDate, createdBy,
newActionListener);
+ teamWfs.add(teamWf);
changes.add(teamWf);
}
@@ -111,7 +115,7 @@ public class ActionFactory implements IAtsActionFactory {
}
changes.add(action);
- return action;
+ return new Pair<IAtsAction, Collection<IAtsTeamWorkflow>>(action, teamWfs);
}
@Override

Back to the top