Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-08-23 13:22:16 -0400
committerDonald Dunne2017-08-30 12:30:50 -0400
commit69affa04b586cd4389e44fba1574335b2c727dd9 (patch)
treef2aced53abc894e7a9ed0b5347995aad566959e1
parentbf3035f85acb3354bf94edafaddb221966c634b4 (diff)
downloadorg.eclipse.osee-69affa04b586cd4389e44fba1574335b2c727dd9.tar.gz
org.eclipse.osee-69affa04b586cd4389e44fba1574335b2c727dd9.tar.xz
org.eclipse.osee-69affa04b586cd4389e44fba1574335b2c727dd9.zip
refinement Make Demo test suite easier to debug
- Make testing of workflows immediately after creation - Use artifact tokens for creation and testing of workflows - Cleanup test suite checks - Ensure suite does not run if init fails - Create other Artifact Tokens where applicable - Improve performance Change-Id: I1002ed1625911fccd67488b7b266c9d2b03f9f07
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java43
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java576
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java250
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/IPopulateDemoDatabase.java65
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java (renamed from plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java)412
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd20CreateCommittedAction.java182
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd21CreateUnCommittedAction.java193
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd22CreateUnCommittedConflictedAction.java125
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd23CreateNoBranchAction.java130
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd51CreateWorkaroundForGraphViewActions.java84
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd52CreateWorkingWithDiagramTreeActions.java84
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd80CreateButtonSDoesntWorkAction.java57
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd81CreateButtonWDoesntWorkAction.java57
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd82CreateCantLoadDiagramTreeAction.java51
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd83CreateCantSeeTheGraphViewAction.java55
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd84CreateProblemInDiagramTreeAction.java51
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd85CreateProblemWithTheGraphViewAction.java55
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd86CreateProblemWithTheUserWindowAction.java55
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd90CreateDemoTasks.java (renamed from plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java)34
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd91CreateDemoGroups.java (renamed from plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java)39
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd92CreateDemoReviews.java (renamed from plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java)60
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java (renamed from plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java)8
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd94CreateDemoFavorites.java41
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java248
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd97CreateDemoSawWorkTypes.java73
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats1
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/AtsClientIntegrationTestSuite.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/AtsTest_AllAts_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateSuite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateValidateAtsDatabaseTest.java11
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DirtyArtifactCacheTest.java9
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java434
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoDatabaseTest.java72
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/AtsTest_Ats_Suite.java7
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/DemoCountryConfigTest.java120
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsTest_Access_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/AtsTest_Action_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AtsTest_Agile_Suite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/AtsTest_Column_Suite.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/GroupsColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsTest_Config_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/AtsTest_Demo_Copy_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsValidationTest.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsCoreClient_Branch_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/AtsTest_DemoPopulateAndTest_Suite.java135
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/IPopulateDemoDatabaseTest.java100
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd10SetupAndImportReqsTest.java32
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd20CreateCommittedActionTest.java60
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd21CreateUnCommittedActionTest.java68
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd22CreateUnCommittedConflictedActionTest.java50
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd23CreateNoBranchActionTest.java65
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd51CreateWorkaroundForGraphViewActionsTest.java61
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd52CreateWorkingWithDiagramTreeActionsTest.java66
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd80CreateButtonSDoesntWorkActionTest.java47
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd81CreateButtonWDoesntWorkActionTest.java49
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd82CreateCantLoadDiagramTreeActionTest.java48
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd83CreateCantSeeTheGraphViewActionTest.java48
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd84CreateProblemInDiagramTreeActionTest.java48
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd85CreateProblemWithTheGraphViewActionTest.java48
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd86CreateProblemWithTheUserWindowActionTest.java48
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java66
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd91CreateDemoGroupsTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd92CreateDemoReviewsTest.java75
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd93CreateDemoAgileTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd94CreateDemoFavoritesTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd95CreateDemoWorkPackagesTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd97CreateSawWorkTypesTest.java33
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/dialog/AtsTest_Dialog_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/AtsTest_Editor_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsTest_Demo_StateItem_Suite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/export/AtsTest_Export_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/health/AtsTest_Health_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsTest_Navigate_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/operation/AtsTest_Operation_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/AtsTest_Renderer_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsTest_Resource_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsTest_Util_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/version/AtsTest_Version_Search_Suite.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsTest_Workflow_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/util/AtsTest_WorkflowUtil_Suite.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsTest_World_Search_Suite.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/skynet/core/artifact/SkyentCoreArtifact_Suite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/FrameworkUiSkynetTest_Dialog_Suite.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/orcs/rest/ClientEndpointTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DbInitTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java58
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java14
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerReader.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerWriter.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java2
-rw-r--r--plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java125
-rw-r--r--plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java15
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java28
-rw-r--r--plugins/org.eclipse.osee.framework.ui.plugin/META-INF/MANIFEST.MF5
106 files changed, 3247 insertions, 2171 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
index 1122e977b5..379931e2d8 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/INewActionListener.java
@@ -43,6 +43,9 @@ public interface INewActionListener {
return null;
}
+ /**
+ * @return the artifact token to use for team workflow for applicableAis
+ */
public default ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
// for override
return null;
diff --git a/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
index 5938a54b1c..f5d244a931 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.client.demo/META-INF/MANIFEST.MF
@@ -83,7 +83,8 @@ Import-Package: javax.ws.rs.core;version="2.0.0",
org.eclipse.osee.support.test.util
Export-Package:
org.eclipse.osee.ats.client.demo,
- org.eclipse.osee.ats.client.demo.config
+ org.eclipse.osee.ats.client.demo.config,
+ org.eclipse.osee.ats.client.demo.populate
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: org.eclipse.osee.ats.client.demo.internal.Activator
Service-Component: OSGI-INF/*.xml
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
index 425af70252..94ab8fad46 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java
@@ -10,25 +10,53 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.demo;
+import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
import java.util.Arrays;
import java.util.Collection;
+import java.util.List;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.QueryOption;
+import org.eclipse.osee.framework.core.util.Result;
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.util.Collections;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.utility.OseeInfo;
public class DemoUtil {
private static String atsIds;
+ public static List<String> Saw_Code_Committed_Task_Titles = Arrays.asList("Look into Graph View.",
+ "Redesign how view shows values.", "Discuss new design with Senior Engineer", "Develop prototype",
+ "Show prototype to management", "Create development plan", "Create test plan", "Make changes");
+ public static List<String> Saw_Code_UnCommitted_Task_Titles =
+ Arrays.asList("Document how Graph View works", "Update help contents", "Review new documentation",
+ "Publish documentation to website", "Remove old viewer", "Deploy release");
+
+ public static int getNumTasks() {
+ return Saw_Code_Committed_Task_Titles.size() + Saw_Code_UnCommitted_Task_Titles.size();
+ }
private DemoUtil() {
// Utility class
}
+ public static Result isDbPopulatedWithDemoData() throws Exception {
+ Collection<Artifact> robotArtifacts = ArtifactQuery.getArtifactListFromTypeAndName(
+ CoreArtifactTypes.SoftwareRequirement, "Robot", SAW_Bld_1, QueryOption.CONTAINS_MATCH_OPTIONS);
+ if (robotArtifacts.size() < 6) {
+ return new Result(String.format(
+ "Expected at least 6 Software Requirements with name \"Robot\" but found [%s]. Database is not be populated with demo data.",
+ robotArtifacts.size()));
+ }
+ return Result.TrueResult;
+ }
+
public static void checkDbInitSuccess() throws OseeCoreException {
if (!isDbInitSuccessful()) {
throw new OseeStateException("DbInit must be successful to continue");
@@ -40,7 +68,7 @@ public class DemoUtil {
throw new OseeStateException("DbInit must be successful to continue");
}
if (!isPopulateDbSuccessful()) {
- throw new OseeStateException("PopulateDb must be successful to continue");
+ throw new OseeStateException("PopulateDemoDb must be successful to continue");
}
}
@@ -113,6 +141,19 @@ public class DemoUtil {
return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf);
}
+ public static TeamWorkFlowArtifact getButtonWDoesntWorkOnSituationPageWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(
+ DemoArtifactToken.ButtonWDoesntWorkOnSituationPage_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getCantLoadDiagramTreeWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.CantLoadDiagramTree_TeamWf);
+ }
+
+ public static TeamWorkFlowArtifact getProblemInDiagramTree_TeamWfWf() throws OseeCoreException {
+ return (TeamWorkFlowArtifact) AtsClientService.get().getArtifact(DemoArtifactToken.ProblemInDiagramTree_TeamWf);
+ }
+
public static Collection<TeamWorkFlowArtifact> getSawCommittedTeamWfs() {
return Arrays.asList(DemoUtil.getSawTestCommittedWf(), DemoUtil.getSawReqCommittedWf(),
DemoUtil.getSawCodeCommittedWf());
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java
deleted file mode 100644
index c5ea28ed02..0000000000
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java
+++ /dev/null
@@ -1,576 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.client.demo;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.logging.Level;
-import org.eclipse.osee.ats.api.IAtsConfigObject;
-import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
-import org.eclipse.osee.ats.api.team.ChangeType;
-import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.api.workdef.model.ReviewBlockType;
-import org.eclipse.osee.ats.api.workflow.ActionResult;
-import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.api.workflow.INewActionListener;
-import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
-import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
-import org.eclipse.osee.ats.client.demo.config.DemoDbUtil.SoftwareRequirementStrs;
-import org.eclipse.osee.ats.client.demo.internal.Activator;
-import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
-import org.eclipse.osee.ats.core.client.branch.AtsBranchUtil;
-import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.workflow.state.TeamState;
-import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
-import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
-import org.eclipse.osee.ats.demo.api.DemoCscis;
-import org.eclipse.osee.ats.demo.api.DemoSubsystems;
-import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
-import org.eclipse.osee.ats.util.AtsBranchManager;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
-import org.eclipse.osee.framework.core.operation.IOperation;
-import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.core.util.Result;
-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.util.Conditions;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-
-/**
- * @author Donald G. Dunne
- */
-public class PopulateSawBuild2Actions {
-
- private static IAtsVersion version = null;
- private static TeamState toState = TeamState.Implement;
- private static boolean DEBUG = false;
-
- public static void run() throws OseeCoreException {
-
- version = AtsClientService.get().getVersionService().getById(DemoArtifactToken.SAW_Bld_2);
- Conditions.checkNotNull(version, "SAW_Bld_2");
-
- // Create SAW_Bld_2 Actions
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 1");
- ActionResult committedAction = sawBuild2Action1_createCommittedAction(changes);
- changes.execute();
-
- changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 2");
- ActionResult unCommittedAction = sawBuild2Action2_createUnCommittedAction(changes);
- changes.execute();
-
- changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 3");
- sawBuild2Action3_createNoBranchAction(changes);
- changes.execute();
-
- changes = AtsClientService.get().createChangeSet("Populate Demo DB - PopulateSawBuild2Actions - 4");
- ActionResult conflictedAction = sawBuild2Action4_createUnCommittedConflictedAction(changes);
- changes.execute();
-
- // Working Branch off SAW_Bld_2, Make Changes, Commit
- makeCommittedActionChanges(committedAction);
-
- // Working Branch off SAW_Bld_2, Make Changes, DON'T Commit
- makeUnCommittedActionChanges(unCommittedAction);
-
- // Working Branch off SAW_Bld_2, Make Conflicted Changes, DON'T Commit
- makeConflictedActionChanges(conflictedAction);
-
- }
-
- private static ActionResult sawBuild2Action4_createUnCommittedConflictedAction(IAtsChangeSet changes) throws OseeCoreException {
- Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI);
- Date createdDate = new Date();
- IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- String priority = "3";
-
- ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
- DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf.getName(), "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
- new SAWUnCommitedConflictedActionListener(), changes);
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
-
- TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
- TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
-
- // Transition to desired state
- Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
-
- if (!teamWf.isCompletedOrCancelled()) {
- // Reset assignees that may have been overwritten during transition
- teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
- }
-
- AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
- changes.add(teamWf);
- }
- return actionResult;
- }
-
- private static class SAWUnCommitedConflictedActionListener implements INewActionListener {
- @Override
- public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
- return DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf;
- }
- }
-
- private static ActionResult sawBuild2Action3_createNoBranchAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
- Collection<IAtsActionableItem> aias = AtsClientService.get().getConfigItems(DemoArtifactToken.SAW_Code_AI,
- DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
- Date createdDate = new Date();
- IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- String priority = "3";
-
- ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
- "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
- new SAWNoBranchArtifactTokenActionListener(), changes);
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
-
- boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
-
- TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
- TransitionOption.OverrideAssigneeCheck);
-
- if (isSwDesign) {
- // transition to analyze
- Result result =
- dtwm.transitionTo(TeamState.Analyze, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to Analyze state: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
- if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 1) {
- throw new OseeCoreException(
- "Error, 1 review should have been created instead of " + AtsClientService.get().getReviewService().getReviews(
- teamWf).size());
- }
- // set reviews to non-blocking
- for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
- changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
- }
-
- // transition to authorize
- result = dtwm.transitionTo(TeamState.Authorize, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to Authorize state: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
- if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 2) {
- throw new OseeCoreException(
- "Error, 2 reviews should exist instead of " + AtsClientService.get().getReviewService().getReviews(
- teamWf).size());
- }
-
- // set reviews to non-blocking
- for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
- changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
- }
- }
- // Transition to final state
- Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
-
- if (!teamWf.isCompletedOrCancelled()) {
- // Reset assignees that may have been overwritten during transition
- teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
- }
-
- AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
- changes.add(teamWf);
- }
- return actionResult;
- }
- private static class SAWNoBranchArtifactTokenActionListener implements INewActionListener {
- @Override
- public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
- if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
- return DemoArtifactToken.SAW_NoBranch_Test_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
- return DemoArtifactToken.SAW_NoBranch_Code_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
- return DemoArtifactToken.SAW_NoBranch_Req_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
- return DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf;
- }
- throw new UnsupportedOperationException();
- }
- }
-
- private static ActionResult sawBuild2Action2_createUnCommittedAction(IAtsChangeSet changes) throws OseeCoreException {
- String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
- Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Code_AI,
- DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
- Date createdDate = new Date();
- IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- String priority = "3";
-
- ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
- "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
- new SAWUnCommittedArtifactTokenActionListener(), changes);
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
-
- boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
-
- TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
- TransitionOption.OverrideAssigneeCheck, TransitionOption.None);
-
- if (isSwDesign) {
- // transition to analyze
- Result result =
- dtwm.transitionTo(TeamState.Analyze, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to Analyze state [%s] error [%s]",
- teamWf.toStringWithId(), toState.getName(), result.getText());
- }
- if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 1) {
- throw new OseeCoreException(
- "Error, 1 review should have been created instead of " + AtsClientService.get().getReviewService().getReviews(
- teamWf).size());
- }
- // set reviews to non-blocking
- for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
- changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
- }
-
- // transition to authorize
- result = dtwm.transitionTo(TeamState.Authorize, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to Authorize state: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
- if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 2) {
- throw new OseeCoreException(
- "Error, 2 AtsClientService.get().getReviewService().getReviews(teamWf) should exist instead of " + AtsClientService.get().getReviewService().getReviews(
- teamWf).size());
- }
-
- // set reviews to non-blocking
- for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
- changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
- }
- }
-
- // Transition to final state
- Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
-
- if (!teamWf.isCompletedOrCancelled()) {
- // Reset assignees that may have been overwritten during transition
- teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
- }
-
- AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
- changes.add(teamWf);
- }
- return actionResult;
- }
-
- private static class SAWUnCommittedArtifactTokenActionListener implements INewActionListener {
- @Override
- public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
- if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
- return DemoArtifactToken.SAW_UnCommited_Test_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
- return DemoArtifactToken.SAW_UnCommited_Code_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
- return DemoArtifactToken.SAW_UnCommited_Req_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
- return DemoArtifactToken.SAW_UnCommited_SWDesign_TeamWf;
- }
- throw new UnsupportedOperationException();
- }
- }
-
- private static ActionResult sawBuild2Action1_createCommittedAction(IAtsChangeSet changes) throws OseeCoreException {
- Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI,
- DemoArtifactToken.SAW_Code_AI, DemoArtifactToken.SAW_Test_AI);
- Date createdDate = new Date();
- IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- String priority = "1";
-
- ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
- DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "Problem with the Diagram View",
- ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
- new SAWCommittedArtifactTokenActionListener(), changes);
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
-
- if (teamWf.getTeamDefinition().getName().contains(
- "Req") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Req")) {
- throw new OseeCoreException("Req workflow expected work def [WorkDef_Team_Demo_Req] actual [%s]",
- teamWf.getWorkDefinition().getName());
- } else if (teamWf.getTeamDefinition().getName().contains(
- "Code") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Code")) {
- throw new OseeCoreException("Code workflow expected work def [WorkDef_Team_Demo_Code] actual [%s]",
- teamWf.getWorkDefinition().getName());
- } else if (teamWf.getTeamDefinition().getName().contains(
- "Test") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Test")) {
- throw new OseeCoreException("Test workflow expected work def [WorkDef_Team_Demo_Test] actual [%s]",
- teamWf.getWorkDefinition().getName());
- }
-
- TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
- TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
-
- // Transition to desired state
- Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
- toState.getName(), result.getText());
- }
-
- if (!teamWf.isCompletedOrCancelled()) {
- // Reset assignees that may have been overwritten during transition
- teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
- }
-
- changes.add(teamWf);
- AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
- }
- return actionResult;
- }
-
- private static class SAWCommittedArtifactTokenActionListener implements INewActionListener {
- @Override
- public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
- if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
- return DemoArtifactToken.SAW_Commited_Test_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
- return DemoArtifactToken.SAW_Commited_Code_TeamWf;
- } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
- return DemoArtifactToken.SAW_Commited_Req_TeamWf;
- }
- throw new UnsupportedOperationException();
- }
- }
-
- private static void makeCommittedActionChanges(ActionResult actionResult) throws OseeCoreException {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Making Action 1 Requirement Changes");
- }
- TeamWorkFlowArtifact reqTeamArt = null;
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
- if (teamWf.getTeamDefinition().getName().contains("Req")) {
- reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
- }
- }
-
- if (reqTeamArt == null) {
- throw new OseeArgumentException("Can't locate Req team.");
- }
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Creating working branch");
- }
- Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
- if (result.isFalse()) {
- throw new OseeArgumentException(
- new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
- }
- AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
-
- for (Artifact art : DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.Robot,
- reqTeamArt.getWorkingBranch())) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO,
- new StringBuilder("Modifying artifact => ").append(art).toString());
- }
- art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name());
- art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Navigation.name());
- Artifact navArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
- DemoSubsystems.Navigation.name(), reqTeamArt.getWorkingBranch());
- art.addRelation(CoreRelationTypes.Allocation__Component, navArt);
- art.persist(PopulateSawBuild2Actions.class.getSimpleName());
- }
-
- for (Artifact art : DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.Event,
- reqTeamArt.getWorkingBranch())) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO,
- new StringBuilder("Modifying artifact => ").append(art).toString());
- }
- art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
- art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
- Artifact robotArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
- DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
- art.addRelation(CoreRelationTypes.Allocation__Component, robotArt);
- art.persist(PopulateSawBuild2Actions.class.getSimpleName());
- }
-
- // Delete two artifacts
- for (Artifact art : DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.daVinci,
- reqTeamArt.getWorkingBranch())) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, new StringBuilder("Deleting artifact => ").append(art).toString());
- }
- art.deleteAndPersist();
- }
-
- // Add three new artifacts
- Artifact parentArt =
- DemoDbUtil.getInterfaceInitializationSoftwareRequirement(DEBUG, reqTeamArt.getWorkingBranch());
- for (int x = 1; x < 4; x++) {
- String name = "Robot Interface Init " + x;
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Adding artifact => " + name);
- }
- Artifact newArt =
- ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name);
- newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
- newArt.persist(PopulateSawBuild2Actions.class.getSimpleName());
- parentArt.addChild(newArt);
- parentArt.persist(PopulateSawBuild2Actions.class.getSimpleName());
- }
-
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Committing branch");
- }
- IOperation op = AtsBranchManager.commitWorkingBranch(reqTeamArt, false, true,
- AtsClientService.get().getBranchService().getBranch(
- (IAtsConfigObject) AtsClientService.get().getVersionService().getTargetedVersion(reqTeamArt)),
- true);
- Operations.executeWorkAndCheckStatus(op);
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Completing Action");
- }
- }
-
- private static void makeConflictedActionChanges(ActionResult actionResult) throws OseeCoreException {
- TeamWorkFlowArtifact reqTeamArt = null;
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
- if (teamWf.getTeamDefinition().getName().contains("Req")) {
- reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
- }
- }
-
- if (reqTeamArt == null) {
- throw new OseeArgumentException("Can't locate Req team.");
- }
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Creating working branch");
- }
- Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
- if (result.isFalse()) {
- throw new OseeArgumentException(
- new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
- }
- AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
-
- Artifact branchArtifact = DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SoftwareRequirement,
- DemoDbUtil.HAPTIC_CONSTRAINTS_REQ, reqTeamArt.getWorkingBranch()).iterator().next();
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO,
- new StringBuilder("Modifying branch artifact => ").append(branchArtifact).toString());
- }
- branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
- branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
- Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
- DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
- branchArtifact.addRelation(CoreRelationTypes.Allocation__Component, comArt);
- branchArtifact.persist(PopulateSawBuild2Actions.class.getSimpleName());
-
- Artifact parentArtifact = DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SoftwareRequirement,
- DemoDbUtil.HAPTIC_CONSTRAINTS_REQ, reqTeamArt.getWorkingBranch()).iterator().next();
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO,
- new StringBuilder("Modifying parent artifact => ").append(parentArtifact).toString());
- }
- parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name());
- parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem,
- DemoSubsystems.Cognitive_Decision_Aiding.name());
- parentArtifact.persist(PopulateSawBuild2Actions.class.getSimpleName());
-
- }
-
- private static void makeUnCommittedActionChanges(ActionResult actionResult) throws OseeCoreException {
- TeamWorkFlowArtifact reqTeamArt = null;
- for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
- if (teamWf.getTeamDefinition().getName().contains("Req")) {
- reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
- }
- }
-
- if (reqTeamArt == null) {
- throw new OseeArgumentException("Can't locate Req team.");
- }
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Creating working branch");
- }
- Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
- if (result.isFalse()) {
- throw new OseeArgumentException(
- new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
- }
- AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
-
- for (Artifact art : DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.Functional,
- reqTeamArt.getWorkingBranch())) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO,
- new StringBuilder("Modifying artifact => ").append(art).toString());
- }
- art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
- art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
- Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
- DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
-
- art.addRelation(CoreRelationTypes.Allocation__Component, comArt);
- art.persist(PopulateSawBuild2Actions.class.getSimpleName());
- }
-
- // Delete one artifacts
- for (Artifact art : DemoDbUtil.getSoftwareRequirements(DEBUG, SoftwareRequirementStrs.CISST,
- reqTeamArt.getWorkingBranch())) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, new StringBuilder("Deleting artifact => ").append(art).toString());
- }
- art.deleteAndPersist();
- }
-
- // Add two new artifacts
- Artifact parentArt =
- DemoDbUtil.getInterfaceInitializationSoftwareRequirement(DEBUG, reqTeamArt.getWorkingBranch());
- for (int x = 15; x < 17; x++) {
- String name = "Claw Interface Init " + x;
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Adding artifact => " + name);
- }
- Artifact newArt =
- ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name);
- newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
- parentArt.addChild(newArt);
-
- newArt.persist(PopulateSawBuild2Actions.class.getSimpleName());
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
index 641603999b..51e24f8af7 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
@@ -12,35 +12,17 @@ package org.eclipse.osee.ats.client.demo.config;
import static org.eclipse.osee.framework.core.enums.DemoBranches.CIS_Bld_1;
import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
-import org.eclipse.osee.ats.api.config.WorkType;
-import org.eclipse.osee.ats.api.country.CountryEndpointApi;
-import org.eclipse.osee.ats.api.country.JaxCountry;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.data.AtsRelationTypes;
-import org.eclipse.osee.ats.api.insertion.InsertionActivityEndpointApi;
-import org.eclipse.osee.ats.api.insertion.InsertionEndpointApi;
-import org.eclipse.osee.ats.api.insertion.JaxInsertion;
-import org.eclipse.osee.ats.api.insertion.JaxInsertionActivity;
-import org.eclipse.osee.ats.api.program.JaxProgram;
-import org.eclipse.osee.ats.api.program.ProgramEndpointApi;
-import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.config.AtsDatabaseConfig;
import org.eclipse.osee.ats.core.client.util.AtsGroup;
import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
-import org.eclipse.osee.ats.demo.api.DemoCountry;
-import org.eclipse.osee.ats.demo.api.DemoInsertion;
-import org.eclipse.osee.ats.demo.api.DemoInsertionActivity;
-import org.eclipse.osee.ats.demo.api.DemoProgram;
import org.eclipse.osee.ats.demo.api.DemoSubsystems;
import org.eclipse.osee.ats.workdef.AtsWorkDefinitionSheetProviders;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.DemoUsers;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.core.exception.OseeWrappedException;
import org.eclipse.osee.framework.core.util.OsgiUtil;
import org.eclipse.osee.framework.core.util.result.XResultData;
import org.eclipse.osee.framework.database.init.IDbInitializationTask;
@@ -50,9 +32,6 @@ import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
-import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
import org.eclipse.osee.framework.skynet.core.utility.Requirements;
import org.eclipse.osee.orcs.rest.client.OseeClient;
import org.eclipse.osee.orcs.rest.model.ApplicabilityEndpoint;
@@ -92,235 +71,6 @@ public class DemoDatabaseConfig implements IDbInitializationTask {
PermissionEnum.FULLACCESS);
AtsDatabaseConfig.organizePrograms(AtsArtifactTypes.Program, DemoArtifactToken.DemoPrograms);
-
- createUsgCountryConfig();
- createCntryCountryConfig();
-
- // Create Work Packages
- createAndSetWorkPackages();
-
- addSawWorkTypes();
- }
-
- private void addSawWorkTypes() {
- SkynetTransaction transaction =
- TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Add SAW Work Types");
- Artifact sawProgram = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Program);
- for (DemoCsci csci : DemoCsci.values()) {
- sawProgram.addAttribute(AtsAttributeTypes.CSCI, csci.name());
- }
- sawProgram.persist(transaction);
- Artifact sawTeamDef = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_SW);
- for (Artifact child : sawTeamDef.getChildren()) {
- child.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
- if (child.getName().contains("Code")) {
- child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Code.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
- } else if (child.getName().contains("Test")) {
- child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Test.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
- } else if (child.getName().contains("Requirements")) {
- child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Requirements.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
- } else if (child.getName().contains("Design")) {
- child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.SW_Design.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
- } else if (child.getName().contains("HW")) {
- child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Hardware.name());
- child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
- }
- child.persist(transaction);
- }
-
- Artifact sawTestAi = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Test_AI);
- sawTestAi.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
- sawTestAi.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Test.name());
- sawTestAi.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
- sawTestAi.persist(transaction);
-
- Artifact sawCodeAi = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Code_AI);
- sawCodeAi.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
- sawCodeAi.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Code.name());
- sawCodeAi.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
- sawCodeAi.persist(transaction);
-
- transaction.execute();
- }
-
- // configure USG for country, program, insertion, activity and work package
- private void createUsgCountryConfig() {
- try {
- CountryEndpointApi countryEp = AtsClientService.getCountryEp();
- InsertionEndpointApi insertionEp = AtsClientService.getInsertionEp();
- InsertionActivityEndpointApi insertionActivityEp = AtsClientService.getInsertionActivityEp();
-
- // create country
- createCountry(countryEp, DemoCountry.usg);
-
- // relate country to programs
- SkynetTransaction transaction =
- TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Create USG Country Config");
- Artifact country =
- ArtifactQuery.getArtifactFromId(DemoCountry.usg.getUuid(), AtsClientService.get().getAtsBranch());
- Artifact program =
- ArtifactQuery.getArtifactFromId(DemoProgram.sawProgram.getUuid(), AtsClientService.get().getAtsBranch());
- country.addRelation(AtsRelationTypes.CountryToProgram_Program, program);
- program.persist(transaction);
-
- program =
- ArtifactQuery.getArtifactFromId(DemoProgram.cisProgram.getUuid(), AtsClientService.get().getAtsBranch());
- country.addRelation(AtsRelationTypes.CountryToProgram_Program, program);
- program.persist(transaction);
- country.persist(transaction);
- transaction.execute();
-
- // create and relate insertion and insertion activities
- DemoInsertion.getInsertions();
- DemoInsertionActivity.getActivities();
- for (DemoProgram demoProg : DemoCountry.usg.getPrograms()) {
- createInsertions(insertionEp, insertionActivityEp, demoProg);
- }
-
- } catch (Exception ex) {
- throw new OseeWrappedException("Error creating ATS USG Country Config", ex);
- }
- }
-
- private void createCntryCountryConfig() {
- try {
- DemoCountry country = DemoCountry.cntry;
- CountryEndpointApi countryEp = AtsClientService.getCountryEp();
- ProgramEndpointApi programEp = AtsClientService.getProgramEp();
- InsertionEndpointApi insertionEp = AtsClientService.getInsertionEp();
- InsertionActivityEndpointApi insertionActivityEp = AtsClientService.getInsertionActivityEp();
-
- // create country
- createCountry(countryEp, country);
-
- // create and relate programs
- DemoInsertion.getInsertions();
- DemoInsertionActivity.getActivities();
- for (DemoProgram program : country.getPrograms()) {
- createProgram(programEp, program);
- createInsertions(insertionEp, insertionActivityEp, program);
- }
- } catch (Exception ex) {
- throw new OseeWrappedException("Error creating ATS Cntry Country Config", ex);
- }
- }
-
- private void createInsertions(InsertionEndpointApi insertionEp, InsertionActivityEndpointApi insertionActivityEp, DemoProgram demoProg) throws Exception {
- for (DemoInsertion demoIns : demoProg.getInsertions()) {
- createInsertion(insertionEp, demoIns);
-
- // create and relate insertion activities
- for (DemoInsertionActivity demoInsertionActivity : demoIns.getActivities()) {
- createInsertionActivity(insertionActivityEp, demoInsertionActivity);
- }
- }
- }
-
- private JaxInsertionActivity createInsertionActivity(InsertionActivityEndpointApi insertionActivityEp, DemoInsertionActivity insertionActivity) throws Exception {
- JaxInsertionActivity jaxInsertionActivity = new JaxInsertionActivity();
- jaxInsertionActivity.setName(insertionActivity.getName());
- jaxInsertionActivity.setUuid(insertionActivity.getUuid());
- jaxInsertionActivity.setActive(insertionActivity.isActive());
- jaxInsertionActivity.setDescription(insertionActivity.getDescription());
- jaxInsertionActivity.setInsertionUuid(insertionActivity.getInsertionUuid());
- insertionActivityEp.create(jaxInsertionActivity);
- return jaxInsertionActivity;
- }
-
- private JaxInsertion createInsertion(InsertionEndpointApi insertionEp, DemoInsertion insertion) throws Exception {
- JaxInsertion jaxInsertion = new JaxInsertion();
- jaxInsertion.setName(insertion.getName());
- jaxInsertion.setUuid(insertion.getUuid());
- jaxInsertion.setActive(insertion.isActive());
- jaxInsertion.setDescription(insertion.getDescription());
- jaxInsertion.setProgramUuid(insertion.getProgramUuid());
- insertionEp.create(jaxInsertion);
- return jaxInsertion;
- }
-
- private JaxProgram createProgram(ProgramEndpointApi programEp, DemoProgram program) throws Exception {
- JaxProgram jaxProgram = new JaxProgram();
- jaxProgram.setName(program.getName());
- jaxProgram.setUuid(program.getUuid());
- jaxProgram.setActive(program.isActive());
- jaxProgram.setDescription(program.getDescription());
- jaxProgram.setCountryUuid(program.getCountryUuid());
- programEp.create(jaxProgram);
- return jaxProgram;
- }
-
- private JaxCountry createCountry(CountryEndpointApi countryEp, DemoCountry country) throws Exception {
- JaxCountry jaxCountry = new JaxCountry();
- jaxCountry.setName(country.getName());
- jaxCountry.setUuid(country.getUuid());
- jaxCountry.setActive(country.isActive());
- jaxCountry.setDescription(country.getDescription());
- countryEp.create(jaxCountry);
- return jaxCountry;
- }
-
- private void createAndSetWorkPackages() throws OseeCoreException {
- SkynetTransaction transaction =
- TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Create Work Packages");
-
- Artifact codeTeamArt = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Code);
-
- Artifact workPkg1 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_01, "ASDHFA443");
- workPkg1.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
- relateInsertionActivity(workPkg1, DemoInsertionActivity.commPage);
- workPkg1.persist(transaction);
-
- Artifact workPkg2 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_02, "ASDHFA443");
- workPkg2.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
- relateInsertionActivity(workPkg2, DemoInsertionActivity.commPage);
- workPkg2.persist(transaction);
-
- Artifact workPkg3 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_03, "ASDHFA443");
- workPkg3.setSoleAttributeValue(AtsAttributeTypes.Active, false);
- workPkg3.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
- relateInsertionActivity(workPkg3, DemoInsertionActivity.commButton);
- workPkg3.persist(transaction);
-
- Artifact testTeamArt = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Test_AI);
-
- Artifact workPkg11 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0A, "AHESSH3");
- workPkg11.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
- relateInsertionActivity(workPkg11, DemoInsertionActivity.commPage);
- workPkg11.persist(transaction);
-
- Artifact workPkg21 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0B, "HAKSHD3");
- workPkg21.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
- relateInsertionActivity(workPkg21, DemoInsertionActivity.commPage);
- workPkg21.persist(transaction);
-
- Artifact workPkg31 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0C, "EHA4DS");
- workPkg31.setSoleAttributeValue(AtsAttributeTypes.Active, false);
- workPkg31.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
- relateInsertionActivity(workPkg31, DemoInsertionActivity.commButton);
- workPkg31.persist(transaction);
-
- transaction.execute();
- }
-
- private void relateInsertionActivity(Artifact workPackageArt, DemoInsertionActivity insertionActivity) {
- Artifact insertionActivityArt = AtsClientService.get().getArtifact(insertionActivity.getUuid());
- insertionActivityArt.addRelation(AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage, workPackageArt);
- }
-
- private Artifact createWorkPackage(ArtifactToken workPackageToken, String activityId) throws OseeCoreException {
- Artifact workPkg1 = ArtifactTypeManager.addArtifact(workPackageToken, AtsClientService.get().getAtsBranch());
- char charAt = workPackageToken.getName().charAt(workPackageToken.getName().length() - 1);
- workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageId, "WP_0" + charAt);
- workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageProgram, "Program A");
- workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageType, "LOE");
- workPkg1.addAttributeFromString(AtsAttributeTypes.ActivityId, activityId);
- workPkg1.addAttributeFromString(AtsAttributeTypes.ActivityName, "HUF 2" + charAt + "0");
- return workPkg1;
}
private void populateProgramBranch(BranchId programBranch) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/IPopulateDemoDatabase.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/IPopulateDemoDatabase.java
new file mode 100644
index 0000000000..d0201c7677
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/IPopulateDemoDatabase.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+
+public interface IPopulateDemoDatabase {
+
+ boolean debug = false;
+ boolean isSuccessful = true;
+ TeamState toState = TeamState.Implement;
+
+ default public boolean isDebug() {
+ return debug;
+ }
+
+ default void run() {
+ //
+ }
+
+ default void setValidationRequired(IAtsChangeSet changes, IAtsTeamWorkflow teamWf) {
+ changes.setSoleAttributeValue(teamWf, AtsAttributeTypes.ValidationRequired, true);
+ }
+
+ default void setVersion(IAtsTeamWorkflow teamWf, ArtifactToken versionToken, IAtsChangeSet changes) {
+ IAtsVersion version = AtsClientService.get().getVersionService().getById(versionToken);
+ AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
+ }
+
+ // Transition to desired state
+ default void transitionTo(IAtsTeamWorkflow teamWf, TeamState state, IAtsChangeSet changes) {
+
+ TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
+
+ Result result = dtwm.transitionTo(state, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(), state,
+ result.getText());
+ }
+ if (!teamWf.isCompletedOrCancelled()) {
+ // Reset assignees that may have been overwritten during transition
+ teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java
index c75085feda..ab53bc5c53 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
+ * Copyright (c) 2017 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,55 +8,21 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.client.demo;
+package org.eclipse.osee.ats.client.demo.populate;
import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
-import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_3;
import java.io.File;
-import java.util.Arrays;
import java.util.Collection;
-import java.util.Date;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import java.util.logging.Level;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.team.ChangeType;
-import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.api.workdef.model.ReviewBlockType;
-import org.eclipse.osee.ats.api.workflow.ActionResult;
-import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
-import org.eclipse.osee.ats.client.demo.config.DemoDbActionData;
-import org.eclipse.osee.ats.client.demo.config.DemoDbActionData.CreateReview;
-import org.eclipse.osee.ats.client.demo.config.DemoDbGroups;
-import org.eclipse.osee.ats.client.demo.config.DemoDbReviews;
-import org.eclipse.osee.ats.client.demo.config.DemoDbTasks;
import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
import org.eclipse.osee.ats.client.demo.internal.Activator;
-import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
-import org.eclipse.osee.ats.core.client.action.ActionArtifact;
-import org.eclipse.osee.ats.core.client.action.ActionArtifactRollup;
import org.eclipse.osee.ats.core.client.config.AtsBulkLoad;
-import org.eclipse.osee.ats.core.client.review.AbstractReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.ReviewManager;
-import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
-import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.workflow.state.TeamState;
-import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
-import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.FavoritesManager;
-import org.eclipse.osee.ats.util.SubscribeManagerUI;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
@@ -66,14 +32,12 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.DemoUsers;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.core.util.Result;
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.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
@@ -88,45 +52,16 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.framework.skynet.core.utility.ConnectionHandler;
-import org.eclipse.osee.framework.skynet.core.utility.DbUtil;
-import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
import org.eclipse.osee.framework.ui.skynet.Import.ArtifactImportOperationFactory;
import org.eclipse.osee.framework.ui.skynet.Import.ArtifactImportOperationParameter;
import org.eclipse.osee.framework.ui.skynet.Import.ArtifactResolverFactory;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.support.test.util.TestUtil;
/**
- * Run from the ATS Navigator after the DB is configured for "OSEE Demo Database", this class will populate the database
- * with sample actions written against XYZ configured teams
- *
* @author Donald G. Dunne
*/
-public class PopulateDemoActions extends XNavigateItemAction {
-
- private static boolean DEBUG = false;
- private final String[] TITLE_PREFIX = {
- "Problem with the",
- "Can't see the",
- "Button A doesn't work on",
- "Add to the",
- "Make new Button for ",
- "User can't load "};
- private final ChangeType[] CHANGE_TYPE = {
- ChangeType.Problem,
- ChangeType.Problem,
- ChangeType.Problem,
- ChangeType.Improvement,
- ChangeType.Improvement,
- ChangeType.Support,
- ChangeType.Improvement,
- ChangeType.Support};
+public class Pdd10SetupAndImportReqs implements IPopulateDemoDatabase {
private static final String UPDATE_BRANCH_TYPE = "update osee_branch set branch_type = ? where branch_id = ?";
-
private static final String ApplicabilityBasicTags =
"<w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Feature[A=Included]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test that a is included</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Feature[A=Included]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>feature[c]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test case insensitive &amp; default value</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End feature</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Feature[B=(Choice1| Choice2) | A=Included]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test OR in values and features</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Feature</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Feature[B=Choice1 &amp; A=Included]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test AND in features</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Feature</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Feature[A=Excluded]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test before else feature text</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Feature Else</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test after else feature text</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Feature</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Configuration [Config1]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test configuration</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Configuration</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Configuration[Config1]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test before else</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Configuration Else</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test after else</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Configuration</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Configuration[Config1=Excluded]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test excluding config1</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Configuration</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Configuration[Config1 | Config2]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>Test OR configurations</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr><w:r><w:t>End Configuration</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"009511DC\"><w:pPr><w:spacing w:after=\"0\"></w:spacing><w:sectPr wsp:rsidR=\"009511DC\"><w:ftr w:type=\"odd\"><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00DF6E46\"><w:pPr><w:pStyle w:val=\"para8pt\"></w:pStyle><w:jc w:val=\"center\"></w:jc></w:pPr><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"begin\"></w:fldChar></w:r><w:r wsp:rsidR=\"00A35FD3\"><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:instrText> PAGE </w:instrText></w:r><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"separate\"></w:fldChar></w:r><w:r wsp:rsidR=\"009511DC\"><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle><w:noProof></w:noProof></w:rPr><w:t>1</w:t></w:r><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"end\"></w:fldChar></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>UNSPECIFIED - PLEASE TAG WITH CORRECT DATA RIGHTS ATTRIBUTE!!!</w:t></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contract No.: W58RGZ-14-D-0045/T.O. 0016</w:t></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contractor Name: The Boeing Company</w:t></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contractor Address: 5000 E. McDowell Road; Mesa, AZ 85215-9797 </w:t></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00DF6E46\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00DF6E46\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>The Government's rights to use, modify, reproduce,</w:t></w:r><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t> release, perform, display, or disclose this software are restricted by paragraph (b)(3) of the Rights in Noncommercial Computer Software and Noncommercial Computer Software Documentation clause contained in the above identified contract. Any reproduction</w:t></w:r><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t> of computer software or portions thereof marked with this legend must also reproduce the markings. Any person, other than the Government, who has been provided access to such software must promptly notify the above named Contractor. </w:t></w:r></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00DF6E46\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00DF6E46\" wsp:rsidRDefault=\"00A35FD3\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Copyright (c) 2017 </w:t></w:r><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>– The Boeing Company</w:t></w:r></w:p></w:ftr><w:pgSz w:h=\"15840\" w:w=\"12240\"></w:pgSz><w:pgMar w:bottom=\"1440\" w:footer=\"432\" w:gutter=\"0\" w:header=\"432\" w:left=\"1440\" w:right=\"1440\" w:top=\"1440\"></w:pgMar><w:cols w:space=\"720\"></w:cols></w:sectPr></w:pPr></w:p>";
private static final String ApplicabilityEmbeddedTagsCase =
@@ -136,127 +71,46 @@ public class PopulateDemoActions extends XNavigateItemAction {
private static final String ApplicabilityLists =
"<w:p wsp:rsidP=\"001A3BB8\" wsp:rsidR=\"00C620A4\" wsp:rsidRDefault=\"00983D8A\"></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"00AC3EB1\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Feature[a] Test 1 End Feature[A]</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Feature[B=Choice1]Test 2</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Test 3 Feature Else</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Test 4 End Feature</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><w:ilvl w:val=\"0\"></w:ilvl><w:ilfo w:val=\"0\"></w:ilfo></w:listPr><w:ind w:left=\"720\"></w:ind></w:pPr></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><w:ilvl w:val=\"0\"></w:ilvl><w:ilfo w:val=\"0\"></w:ilfo></w:listPr><w:ind w:left=\"720\"></w:ind></w:pPr></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Feature[C=Included] test embedded lists</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Feature[A=Excluded] test inside embedded End Feature</w:t></w:r></w:p><w:p wsp:rsidP=\"009B239B\" wsp:rsidR=\"009B239B\" wsp:rsidRDefault=\"009B239B\"><w:pPr><w:pStyle w:val=\"bulletlvl1\"></w:pStyle><w:listPr><wx:t wx:val=\"·\"></wx:t><wx:font wx:val=\"Symbol\"></wx:font></w:listPr></w:pPr><w:r><w:t>Test last bullet End Feature[C=Included]</w:t></w:r></w:p><w:p wsp:rsidR=\"009511DC\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"006F3C1E\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\"></w:spacing></w:pPr></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00664D5C\"><w:pPr><w:spacing w:after=\"0\"></w:spacing><w:sectPr wsp:rsidR=\"00664D5C\"><w:ftr w:type=\"odd\"><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00664D5C\"><w:pPr><w:pStyle w:val=\"para8pt\"></w:pStyle><w:jc w:val=\"center\"></w:jc></w:pPr><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"begin\"></w:fldChar></w:r><w:r wsp:rsidR=\"00983D8A\"><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:instrText> PAGE </w:instrText></w:r><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"separate\"></w:fldChar></w:r><w:r wsp:rsidR=\"009B239B\"><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle><w:noProof></w:noProof></w:rPr><w:t>1</w:t></w:r><w:r><w:rPr><w:rStyle w:val=\"PageNumber\"></w:rStyle></w:rPr><w:fldChar w:fldCharType=\"end\"></w:fldChar></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>UNSPECIFIED - PLEASE TAG WITH CORRECT DATA RIGHTS ATTRIBUTE!!!</w:t></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contract No.: W58RGZ-14-D-0045/T.O. 0016</w:t></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contractor Name: The Boeing Company</w:t></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Contractor Address: 5000 E. McDowell Road; Mesa, AZ 85215-9797 </w:t></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00664D5C\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00664D5C\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>The Government's rights to use, modify, reproduce, release, perform, display, or disclose this software are restricted by paragraph (b)(3) of the Rights i</w:t></w:r><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>n Noncommercial Computer Software and Noncommercial Computer Software Documentation clause contained in the above identified contract. Any reproduction of computer software or portions thereof marked with this legend must also reproduce the markings. Any</w:t></w:r><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t> person, other than the Government, who has been provided access to such software must promptly notify the above named Contractor. </w:t></w:r></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00664D5C\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr></w:p><w:p wsp:rsidR=\"00664D5C\" wsp:rsidRDefault=\"00983D8A\"><w:pPr><w:spacing w:after=\"0\" w:before=\"0\" w:line=\"240\" w:line-rule=\"auto\"></w:spacing><w:jc w:val=\"both\"></w:jc><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr></w:pPr><w:r><w:rPr><w:rFonts w:cs=\"Arial\"></w:rFonts><w:sz w:val=\"16\"></w:sz></w:rPr><w:t>Copyright (c) 2017 – The Boeing Company</w:t></w:r></w:p></w:ftr><w:pgSz w:h=\"15840\" w:w=\"12240\"></w:pgSz><w:pgMar w:bottom=\"1440\" w:footer=\"432\" w:gutter=\"0\" w:header=\"432\" w:left=\"1440\" w:right=\"1440\" w:top=\"1440\"></w:pgMar><w:cols w:space=\"720\"></w:cols></w:sectPr></w:pPr></w:p>";
- public PopulateDemoActions(XNavigateItem parent) {
- super(parent, "Populate Demo Actions", PluginUiImage.ADMIN);
- }
-
@Override
- public void run(TableLoadOption... tableLoadOptions) throws Exception {
- run(true);
- }
-
- private static void validateArtifactCache() throws OseeStateException {
- final Collection<Artifact> list = ArtifactCache.getDirtyArtifacts();
- if (!list.isEmpty()) {
- for (Artifact artifact : list) {
- System.err.println(String.format("Artifact [%s] is dirty [%s]", artifact.toStringWithId(),
- Artifacts.getDirtyReport(artifact)));
- }
- throw new OseeStateException("[%d] Dirty Artifacts found after populate (see console for details)",
- list.size());
- }
-
- }
-
- public void run(boolean prompt) throws Exception {
+ public void run() {
AtsUtilClient.setEmailEnabled(false);
if (AtsUtil.isProductionDb()) {
throw new IllegalStateException("PopulateDemoActions should not be run on production DB");
}
- if (DbUtil.isDbInit() || !prompt || prompt && MessageDialog.openConfirm(Displays.getActiveShell(), getName(),
- getName())) {
-
- validateArtifactCache();
-
- OseeLog.log(Activator.class, Level.INFO, "Populate Demo Database");
+ validateArtifactCache();
- AtsBulkLoad.reloadConfig(true);
+ OseeLog.log(Activator.class, Level.INFO, "Populate Demo Database");
- SevereLoggingMonitor monitorLog = TestUtil.severeLoggingStart();
+ AtsBulkLoad.reloadConfig(true);
- // Import all requirements on SAW_Bld_1 Branch
- demoDbImportReqsTx();
+ // Import all requirements on SAW_Bld_1 Branch
+ demoDbImportReqsTx();
- // Create traceability between System, Subsystem and Software requirements
- SkynetTransaction demoDbTraceability =
- TransactionManager.createTransaction(SAW_Bld_1, "Populate Demo DB - Create Traceability");
- demoDbTraceabilityTx(demoDbTraceability, SAW_Bld_1);
- demoDbTraceability.execute();
+ // Create traceability between System, Subsystem and Software requirements
+ SkynetTransaction demoDbTraceability =
+ TransactionManager.createTransaction(SAW_Bld_1, "PopulateDemoDatabaseSetupAndImportReqs");
+ demoDbTraceabilityTx(demoDbTraceability, SAW_Bld_1);
+ demoDbTraceability.execute();
- // Create SAW_Bld_2 Child Main Working Branch off SAW_Bld_1
- createMainWorkingBranchTx();
-
- // Create SWB_Bld_2 Actions and Reviews
- PopulateSawBuild2Actions.run();
-
- // Create actions against non-requirement AIs and Teams
- createNonReqChangeDemoActions();
- createGenericDemoActions();
-
- // Mark all CIS Code "Team Workflows" as Favorites for "Joe Smith"
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Add Favorites");
- }
- for (Artifact art : ArtifactQuery.getArtifactListFromTypeAndName(DemoArtifactTypes.DemoCodeTeamWorkflow,
- "Diagram View", AtsClientService.get().getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)) {
- new FavoritesManager((AbstractWorkflowArtifact) art).toggleFavorite(false);
- }
+ // Create SAW_Bld_2 Child Main Working Branch off SAW_Bld_1
+ createMainWorkingBranchTx();
+ }
- // Mark all Tools Team "Team Workflows" as Subscribed for "Joe Smith"
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Add Subscribed");
- }
- for (Artifact art : ArtifactQuery.getArtifactListFromTypeAndName(DemoArtifactTypes.DemoCodeTeamWorkflow,
- "Even", AtsClientService.get().getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)) {
- new SubscribeManagerUI((AbstractWorkflowArtifact) art).toggleSubscribe(false);
+ private static void validateArtifactCache() throws OseeStateException {
+ final Collection<Artifact> list = ArtifactCache.getDirtyArtifacts();
+ if (!list.isEmpty()) {
+ for (Artifact artifact : list) {
+ OseeLog.log(Activator.class, Level.SEVERE, String.format("Artifact [%s] is dirty [%s]",
+ artifact.toStringWithId(), Artifacts.getDirtyReport(artifact)));
}
-
- // Create some tasks off sample workflows
- DemoDbTasks.createTasks(DEBUG);
-
- // Create group of sample artifacts
- DemoDbGroups.createGroups(DEBUG);
-
- // Create and transition reviews off sample workflows
- DemoDbReviews.createReviews(DEBUG);
-
- // Set Default Work Packages
- setDefaultWorkPackages();
-
- validateArtifactCache();
- TestUtil.severeLoggingEnd(monitorLog);
- OseeLog.log(Activator.class, Level.INFO, "Populate Complete");
+ throw new OseeStateException("[%d] Dirty Artifacts found after populate (see console for details)",
+ list.size());
}
- }
-
- private void setDefaultWorkPackages() {
- SkynetTransaction transaction =
- TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Set Work Packages");
-
- // set work packages
- TeamWorkFlowArtifact commWf = DemoUtil.getSawCodeCommittedWf();
- commWf.setSoleAttributeValue(AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
- commWf.persist(transaction);
-
- TeamWorkFlowArtifact unCommWf = DemoUtil.getSawCodeUnCommittedWf();
- unCommWf.setSoleAttributeValue(AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
- unCommWf.persist(transaction);
-
- TeamWorkFlowArtifact noBranchWf = DemoUtil.getSawCodeNoBranchWf();
- noBranchWf.setSoleAttributeValue(AtsAttributeTypes.WorkPackageGuid,
- DemoArtifactToken.SAW_Code_Team_WorkPackage_03.getGuid());
- noBranchWf.persist(transaction);
- transaction.execute();
}
private void createMainWorkingBranchTx() {
try {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Creating SAW_Bld_2 branch off SAW_Bld_1");
- }
// Create SAW_Bld_2 branch off SAW_Bld_1
BranchId childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2);
@@ -267,182 +121,31 @@ public class PopulateDemoActions extends XNavigateItemAction {
ConnectionHandler.runPreparedUpdate(UPDATE_BRANCH_TYPE, BranchType.BASELINE.getValue(), childBranch);
BranchManager.refreshBranches();
} catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
-
- private void createNonReqChangeDemoActions() throws Exception {
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - Create Actions");
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_3");
- }
- Set<ActionArtifact> actions =
- createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_3, null, changes);
- appendBuildNameToTitles(actions, SAW_Bld_3.getName(), changes);
-
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_2");
- }
- actions = createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_2, null, changes);
- appendBuildNameToTitles(actions, SAW_Bld_2.getName(), changes);
-
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_1");
- }
-
- actions = createActions(DemoDbActionData.getNonReqSawActionData(), DemoArtifactToken.SAW_Bld_1,
- TeamState.Completed, changes);
- appendBuildNameToTitles(actions, SAW_Bld_1.toString(), changes);
-
- changes.execute();
- }
-
- private void createGenericDemoActions() throws Exception {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "createNonReqChangeDemoActions - getGenericActionData");
- }
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - Create Generic Actions");
- createActions(DemoDbActionData.getGenericActionData(), null, null, changes);
- changes.execute();
- }
-
- private void appendBuildNameToTitles(Set<ActionArtifact> actions, String buildName, IAtsChangeSet changes) throws OseeCoreException {
- for (ActionArtifact action : actions) {
- for (TeamWorkFlowArtifact team : action.getTeams()) {
- team.setName(team.getName() + " for " + buildName);
- changes.add(team);
- }
- ActionArtifactRollup rollup = new ActionArtifactRollup(action);
- rollup.resetAttributesOffChildren();
- changes.add(action);
- }
- }
-
- private Set<ActionArtifact> createActions(List<DemoDbActionData> actionDatas, ArtifactToken versionToken, TeamState toStateOverride, IAtsChangeSet changes) throws Exception {
- Set<ActionArtifact> actionArts = new HashSet<>();
- int currNum = 1;
- for (DemoDbActionData aData : actionDatas) {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Creating " + currNum++ + "/" + actionDatas.size());
- }
- int x = 0;
- Date createdDate = new Date();
- IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- IAtsActionableItem ai = AtsClientService.get().getConfigItem(aData.aiToken);
- List<IAtsActionableItem> ais = Arrays.asList(ai);
-
- for (String prefixTitle : aData.prefixTitles) {
- ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
- prefixTitle + " " + aData.postFixTitle, TITLE_PREFIX[x] + " " + aData.postFixTitle, CHANGE_TYPE[x],
- aData.priority, false, null, ais, createdDate, createdBy, null, changes);
- actionArts.add((ActionArtifact) actionResult.getActionArt());
- for (IAtsTeamWorkflow teamWf : AtsClientService.get().getWorkItemService().getTeams(actionResult)) {
- TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
- TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
- // Add validation required flag if Decision review is required
- if (aData.getCreateReviews().length > 0) {
- for (CreateReview createReview : aData.getCreateReviews()) {
- if (createReview == CreateReview.Decision) {
- ((TeamWorkFlowArtifact) teamWf.getStoreObject()).setSoleAttributeValue(
- AtsAttributeTypes.ValidationRequired, true);
- }
- }
- }
- boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
- if (isSwDesign) {
- // set reviews to non-blocking so can transition to Completed
- for (AbstractReviewArtifact reviewArt : ReviewManager.getReviews(teamWf)) {
- reviewArt.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
- }
- }
-
- // Transition to desired state
- Result result = dtwm.transitionTo(toStateOverride != null ? toStateOverride : aData.toState,
- teamWf.getAssignees().iterator().next(), false, changes);
- if (result.isFalse()) {
- throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
- aData.toState.getName(), result.getText());
- }
- if (!teamWf.isCompletedOrCancelled()) {
- // Reset assignees that may have been overwritten during transition
- teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
- }
- if (versionToken != null) {
- IAtsVersion version = AtsClientService.get().getVersionService().getById(versionToken);
- AtsClientService.get().getVersionService().setTargetedVersion(teamWf, version, changes);
- }
- }
- }
- }
- return actionArts;
- }
-
- private void demoDbImportReqsTx() {
- try {
- //@formatter:off
- importRequirements(SAW_Bld_1, CoreArtifactTypes.SoftwareRequirement, "Software Requirements", "support/SAW-SoftwareRequirements.xml");
- importRequirements(SAW_Bld_1, CoreArtifactTypes.SystemRequirementMSWord, "System Requirements", "support/SAW-SystemRequirements.xml");
- importRequirements(SAW_Bld_1, CoreArtifactTypes.SubsystemRequirementMSWord, "Subsystem Requirements", "support/SAW-SubsystemRequirements.xml");
- //@formatter:on
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
-
- private void importRequirements(BranchId branch, IArtifactType requirementType, String folderName, String filename) throws Exception {
- if (DEBUG) {
- OseeLog.logf(Activator.class, Level.INFO, "Importing \"%s\" requirements on branch \"%s\"", folderName,
- branch);
- }
- Artifact systemReq = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, folderName, branch);
-
- File file = Activator.getInstance().getPluginFile(filename);
- IArtifactImportResolver artifactResolver = ArtifactResolverFactory.createAlwaysNewArtifacts(requirementType);
- IArtifactExtractor extractor = new WordOutlineExtractor();
- extractor.setDelegate(new WordOutlineExtractorDelegate());
-
- ArtifactImportOperationParameter importOptions = new ArtifactImportOperationParameter();
- importOptions.setSourceFile(file);
- importOptions.setDestinationArtifact(systemReq);
- importOptions.setExtractor(extractor);
- importOptions.setResolver(artifactResolver);
-
- IOperation operation = ArtifactImportOperationFactory.completeOperation(importOptions);
- Operations.executeWorkAndCheckStatus(operation);
-
- // Validate that something was imported
- if (systemReq.getChildren().isEmpty()) {
- throw new IllegalStateException("Artifacts were not imported");
- }
- }
-
- private void relate(RelationTypeSide relationSide, Artifact artifact, Collection<Artifact> artifacts) throws OseeCoreException {
- for (Artifact otherArtifact : artifacts) {
- artifact.addRelation(relationSide, otherArtifact);
+ OseeLog.log(Activator.class, Level.SEVERE, Lib.exceptionToString(ex));
}
}
private void demoDbTraceabilityTx(SkynetTransaction transaction, BranchId branch) {
try {
Collection<Artifact> systemArts =
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SystemRequirementMSWord, "Robot", branch);
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SystemRequirementMSWord, "Robot", branch);
Collection<Artifact> component =
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.Component, "API", branch);
- component.addAll(DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.Component, "Hardware", branch));
- component.addAll(DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.Component, "Sensor", branch));
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.Component, "API", branch);
+ component.addAll(DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.Component, "Hardware", branch));
+ component.addAll(DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.Component, "Sensor", branch));
Collection<Artifact> subSystemArts =
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SubsystemRequirementMSWord, "Robot", branch);
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SubsystemRequirementMSWord, "Robot", branch);
subSystemArts.addAll(
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SubsystemRequirementMSWord, "Video", branch));
- subSystemArts.addAll(DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SubsystemRequirementMSWord,
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SubsystemRequirementMSWord, "Video", branch));
+ subSystemArts.addAll(DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SubsystemRequirementMSWord,
"Interface", branch));
Collection<Artifact> softArts =
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SoftwareRequirement, "Robot", branch);
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SoftwareRequirement, "Robot", branch);
softArts.addAll(
- DemoDbUtil.getArtTypeRequirements(DEBUG, CoreArtifactTypes.SoftwareRequirement, "Interface", branch));
+ DemoDbUtil.getArtTypeRequirements(debug, CoreArtifactTypes.SoftwareRequirement, "Interface", branch));
// Relate System to SubSystem to Software Requirements
for (Artifact systemArt : systemArts) {
@@ -534,7 +237,13 @@ public class PopulateDemoActions extends XNavigateItemAction {
createApplicabilityArtifacts(transaction, branch);
} catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
+ OseeLog.log(Activator.class, Level.SEVERE, Lib.exceptionToString(ex));
+ }
+ }
+
+ private void relate(RelationTypeSide relationSide, Artifact artifact, Collection<Artifact> artifacts) throws OseeCoreException {
+ for (Artifact otherArtifact : artifacts) {
+ artifact.addRelation(relationSide, otherArtifact);
}
}
@@ -563,4 +272,39 @@ public class PopulateDemoActions extends XNavigateItemAction {
}
}
+ private void demoDbImportReqsTx() {
+ try {
+ //@formatter:off
+ importRequirements(SAW_Bld_1, CoreArtifactTypes.SoftwareRequirement, "Software Requirements", "support/SAW-SoftwareRequirements.xml");
+ importRequirements(SAW_Bld_1, CoreArtifactTypes.SystemRequirementMSWord, "System Requirements", "support/SAW-SystemRequirements.xml");
+ importRequirements(SAW_Bld_1, CoreArtifactTypes.SubsystemRequirementMSWord, "Subsystem Requirements", "support/SAW-SubsystemRequirements.xml");
+ //@formatter:on
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, Level.SEVERE, Lib.exceptionToString(ex));
+ }
+ }
+
+ private void importRequirements(BranchId branch, IArtifactType requirementType, String folderName, String filename) throws Exception {
+ Artifact systemReq = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, folderName, branch);
+
+ File file = Activator.getInstance().getPluginFile(filename);
+ IArtifactImportResolver artifactResolver = ArtifactResolverFactory.createAlwaysNewArtifacts(requirementType);
+ IArtifactExtractor extractor = new WordOutlineExtractor();
+ extractor.setDelegate(new WordOutlineExtractorDelegate());
+
+ ArtifactImportOperationParameter importOptions = new ArtifactImportOperationParameter();
+ importOptions.setSourceFile(file);
+ importOptions.setDestinationArtifact(systemReq);
+ importOptions.setExtractor(extractor);
+ importOptions.setResolver(artifactResolver);
+
+ IOperation operation = ArtifactImportOperationFactory.completeOperation(importOptions);
+ Operations.executeWorkAndCheckStatus(operation);
+
+ // Validate that something was imported
+ if (systemReq.getChildren().isEmpty()) {
+ throw new IllegalStateException("Artifacts were not imported");
+ }
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd20CreateCommittedAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd20CreateCommittedAction.java
new file mode 100644
index 0000000000..0d9717b8b7
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd20CreateCommittedAction.java
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.IAtsConfigObject;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil.SoftwareRequirementStrs;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.client.branch.AtsBranchUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoCscis;
+import org.eclipse.osee.ats.demo.api.DemoSubsystems;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.eclipse.osee.ats.util.AtsBranchManager;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
+import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd20CreateCommittedAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI,
+ DemoArtifactToken.SAW_Code_AI, DemoArtifactToken.SAW_Test_AI);
+ Date createdDate = new Date();
+ IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
+ String priority = "1";
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "Problem with the Diagram View",
+ ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, new ArtifactTokenActionListener(),
+ changes);
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+
+ if (teamWf.getTeamDefinition().getName().contains(
+ "Req") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Req")) {
+ throw new OseeCoreException("Req workflow expected work def [WorkDef_Team_Demo_Req] actual [%s]",
+ teamWf.getWorkDefinition().getName());
+ } else if (teamWf.getTeamDefinition().getName().contains(
+ "Code") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Code")) {
+ throw new OseeCoreException("Code workflow expected work def [WorkDef_Team_Demo_Code] actual [%s]",
+ teamWf.getWorkDefinition().getName());
+ } else if (teamWf.getTeamDefinition().getName().contains(
+ "Test") && !teamWf.getWorkDefinition().getName().equals("WorkDef_Team_Demo_Test")) {
+ throw new OseeCoreException("Test workflow expected work def [WorkDef_Team_Demo_Test] actual [%s]",
+ teamWf.getWorkDefinition().getName());
+ }
+
+ TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
+
+ // Transition to desired state
+ Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+
+ if (!teamWf.isCompletedOrCancelled()) {
+ // Reset assignees that may have been overwritten during transition
+ teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
+ }
+
+ changes.add(teamWf);
+
+ setVersion(teamWf, DemoArtifactToken.SAW_Bld_2, changes);
+ }
+ changes.execute();
+
+ TeamWorkFlowArtifact reqTeamArt = null;
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+ if (teamWf.getTeamDefinition().getName().contains("Req")) {
+ reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
+ }
+ }
+
+ if (reqTeamArt == null) {
+ throw new OseeArgumentException("Can't locate Req team.");
+ }
+ Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
+ if (result.isFalse()) {
+ throw new OseeArgumentException(
+ new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
+ }
+ AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
+
+ for (Artifact art : DemoDbUtil.getSoftwareRequirements(false, SoftwareRequirementStrs.Robot,
+ reqTeamArt.getWorkingBranch())) {
+ art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name());
+ art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Navigation.name());
+ Artifact navArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
+ DemoSubsystems.Navigation.name(), reqTeamArt.getWorkingBranch());
+ art.addRelation(CoreRelationTypes.Allocation__Component, navArt);
+ art.persist(getClass().getSimpleName());
+ }
+
+ for (Artifact art : DemoDbUtil.getSoftwareRequirements(false, SoftwareRequirementStrs.Event,
+ reqTeamArt.getWorkingBranch())) {
+ art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
+ art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
+ Artifact robotArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
+ DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
+ art.addRelation(CoreRelationTypes.Allocation__Component, robotArt);
+ art.persist(getClass().getSimpleName());
+ }
+
+ // Delete two artifacts
+ for (Artifact art : DemoDbUtil.getSoftwareRequirements(false, SoftwareRequirementStrs.daVinci,
+ reqTeamArt.getWorkingBranch())) {
+ art.deleteAndPersist();
+ }
+
+ // Add three new artifacts
+ Artifact parentArt =
+ DemoDbUtil.getInterfaceInitializationSoftwareRequirement(false, reqTeamArt.getWorkingBranch());
+ for (int x = 1; x < 4; x++) {
+ String name = "Robot Interface Init " + x;
+ Artifact newArt =
+ ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name);
+ newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
+ newArt.persist(getClass().getSimpleName());
+ parentArt.addChild(newArt);
+ parentArt.persist(getClass().getSimpleName());
+ }
+
+ IOperation op = AtsBranchManager.commitWorkingBranch(reqTeamArt, false, true,
+ AtsClientService.get().getBranchService().getBranch(
+ (IAtsConfigObject) AtsClientService.get().getVersionService().getTargetedVersion(reqTeamArt)),
+ true);
+ Operations.executeWorkAndCheckStatus(op);
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_Commited_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_Commited_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_Commited_Req_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd21CreateUnCommittedAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd21CreateUnCommittedAction.java
new file mode 100644
index 0000000000..f45e25282f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd21CreateUnCommittedAction.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workdef.model.ReviewBlockType;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil.SoftwareRequirementStrs;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.client.branch.AtsBranchUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoCscis;
+import org.eclipse.osee.ats.demo.api.DemoSubsystems;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
+import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd21CreateUnCommittedAction implements IPopulateDemoDatabase {
+
+ private ActionResult actionResult;
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+ String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Code_AI,
+ DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
+ Date createdDate = new Date();
+ IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
+ String priority = "3";
+
+ actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
+ "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new ArtifactTokenActionListener(), changes);
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+
+ boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
+
+ TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck, TransitionOption.None);
+
+ if (isSwDesign) {
+ // transition to analyze
+ Result result =
+ dtwm.transitionTo(TeamState.Analyze, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to Analyze state [%s] error [%s]",
+ teamWf.toStringWithId(), toState.getName(), result.getText());
+ }
+ if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 1) {
+ throw new OseeCoreException(
+ "Error, 1 review should have been created instead of " + AtsClientService.get().getReviewService().getReviews(
+ teamWf).size());
+ }
+ // set reviews to non-blocking
+ for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
+ changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
+ }
+
+ // transition to authorize
+ result = dtwm.transitionTo(TeamState.Authorize, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to Authorize state: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+ if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 2) {
+ throw new OseeCoreException(
+ "Error, 2 AtsClientService.get().getReviewService().getReviews(teamWf) should exist instead of " + AtsClientService.get().getReviewService().getReviews(
+ teamWf).size());
+ }
+
+ // set reviews to non-blocking
+ for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
+ changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
+ }
+ }
+
+ // Transition to final state
+ Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+
+ if (!teamWf.isCompletedOrCancelled()) {
+ // Reset assignees that may have been overwritten during transition
+ teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
+ }
+
+ setVersion(teamWf, DemoArtifactToken.SAW_Bld_2, changes);
+ changes.add(teamWf);
+ }
+ changes.execute();
+
+ TeamWorkFlowArtifact reqTeamArt = null;
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+ if (teamWf.getTeamDefinition().getName().contains("Req")) {
+ reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
+ }
+ }
+
+ if (reqTeamArt == null) {
+ throw new OseeArgumentException("Can't locate Req team.");
+ }
+ Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
+ if (result.isFalse()) {
+ throw new OseeArgumentException(
+ new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
+ }
+ AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
+
+ for (Artifact art : DemoDbUtil.getSoftwareRequirements(false, SoftwareRequirementStrs.Functional,
+ reqTeamArt.getWorkingBranch())) {
+ art.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
+ art.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
+ Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
+ DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
+
+ art.addRelation(CoreRelationTypes.Allocation__Component, comArt);
+ art.persist(getClass().getSimpleName());
+ }
+
+ // Delete one artifacts
+ for (Artifact art : DemoDbUtil.getSoftwareRequirements(false, SoftwareRequirementStrs.CISST,
+ reqTeamArt.getWorkingBranch())) {
+ art.deleteAndPersist();
+ }
+
+ // Add two new artifacts
+ Artifact parentArt =
+ DemoDbUtil.getInterfaceInitializationSoftwareRequirement(false, reqTeamArt.getWorkingBranch());
+ for (int x = 15; x < 17; x++) {
+ String name = "Claw Interface Init " + x;
+ Artifact newArt =
+ ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, parentArt.getBranch(), name);
+ newArt.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
+ parentArt.addChild(newArt);
+
+ newArt.persist(getClass().getSimpleName());
+ }
+
+ }
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_Req_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
+ return DemoArtifactToken.SAW_UnCommited_SWDesign_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd22CreateUnCommittedConflictedAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd22CreateUnCommittedConflictedAction.java
new file mode 100644
index 0000000000..341006e46a
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd22CreateUnCommittedConflictedAction.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.client.branch.AtsBranchUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoCscis;
+import org.eclipse.osee.ats.demo.api.DemoSubsystems;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
+import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd22CreateUnCommittedConflictedAction implements IPopulateDemoDatabase {
+
+ private ActionResult actionResult;
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_Requirements_AI);
+ Date createdDate = new Date();
+ IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
+ String priority = "3";
+
+ actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf.getName(), "Problem with the Diagram View",
+ ChangeType.Problem, priority, false, null, aias, createdDate, createdBy, new ArtifactTokenActionListener(),
+ changes);
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+
+ TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck, TransitionOption.OverrideTransitionValidityCheck);
+
+ // Transition to desired state
+ Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+
+ if (!teamWf.isCompletedOrCancelled()) {
+ // Reset assignees that may have been overwritten during transition
+ teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
+ }
+
+ setVersion(teamWf, DemoArtifactToken.SAW_Bld_2, changes);
+ changes.add(teamWf);
+ }
+ changes.execute();
+
+ TeamWorkFlowArtifact reqTeamArt = null;
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+ if (teamWf.getTeamDefinition().getName().contains("Req")) {
+ reqTeamArt = (TeamWorkFlowArtifact) teamWf.getStoreObject();
+ }
+ }
+
+ if (reqTeamArt == null) {
+ throw new OseeArgumentException("Can't locate Req team.");
+ }
+ Result result = AtsBranchUtil.createWorkingBranch_Validate(reqTeamArt);
+ if (result.isFalse()) {
+ throw new OseeArgumentException(
+ new StringBuilder("Error creating working branch: ").append(result.getText()).toString());
+ }
+ AtsBranchUtil.createWorkingBranch_Create(reqTeamArt, true);
+
+ Artifact branchArtifact = DemoDbUtil.getArtTypeRequirements(isDebug(), CoreArtifactTypes.SoftwareRequirement,
+ DemoDbUtil.HAPTIC_CONSTRAINTS_REQ, reqTeamArt.getWorkingBranch()).iterator().next();
+ branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Interface.name());
+ branchArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem, DemoSubsystems.Communications.name());
+ Artifact comArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Component,
+ DemoSubsystems.Robot_API.name(), reqTeamArt.getWorkingBranch());
+ branchArtifact.addRelation(CoreRelationTypes.Allocation__Component, comArt);
+ branchArtifact.persist(getClass().getSimpleName());
+
+ Artifact parentArtifact = DemoDbUtil.getArtTypeRequirements(isDebug(), CoreArtifactTypes.SoftwareRequirement,
+ DemoDbUtil.HAPTIC_CONSTRAINTS_REQ, reqTeamArt.getWorkingBranch()).iterator().next();
+ parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Csci, DemoCscis.Navigation.name());
+ parentArtifact.setSoleAttributeValue(CoreAttributeTypes.Subsystem,
+ DemoSubsystems.Cognitive_Decision_Aiding.name());
+ parentArtifact.persist(getClass().getSimpleName());
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd23CreateNoBranchAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd23CreateNoBranchAction.java
new file mode 100644
index 0000000000..bfbfa1ccba
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd23CreateNoBranchAction.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workdef.model.ReviewBlockType;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.core.workflow.transition.TeamWorkFlowManager;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd23CreateNoBranchAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+ String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ Collection<IAtsActionableItem> aias = AtsClientService.get().getConfigItems(DemoArtifactToken.SAW_Code_AI,
+ DemoArtifactToken.SAW_SW_Design_AI, DemoArtifactToken.SAW_Requirements_AI, DemoArtifactToken.SAW_Test_AI);
+ Date createdDate = new Date();
+ IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
+ String priority = "3";
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null, title,
+ "Problem with the Diagram View", ChangeType.Problem, priority, false, null, aias, createdDate, createdBy,
+ new ArtifactTokenActionListener(), changes);
+ for (IAtsTeamWorkflow teamWf : actionResult.getTeams()) {
+
+ boolean isSwDesign = teamWf.getTeamDefinition().getName().contains("SW Design");
+
+ TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck);
+
+ if (isSwDesign) {
+ // transition to analyze
+ Result result =
+ dtwm.transitionTo(TeamState.Analyze, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to Analyze state: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+ if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 1) {
+ throw new OseeCoreException(
+ "Error, 1 review should have been created instead of " + AtsClientService.get().getReviewService().getReviews(
+ teamWf).size());
+ }
+ // set reviews to non-blocking
+ for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
+ changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
+ }
+
+ // transition to authorize
+ result = dtwm.transitionTo(TeamState.Authorize, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to Authorize state: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+ if (AtsClientService.get().getReviewService().getReviews(teamWf).size() != 2) {
+ throw new OseeCoreException(
+ "Error, 2 reviews should exist instead of " + AtsClientService.get().getReviewService().getReviews(
+ teamWf).size());
+ }
+
+ // set reviews to non-blocking
+ for (IAtsAbstractReview review : AtsClientService.get().getReviewService().getReviews(teamWf)) {
+ changes.setSoleAttributeValue(review, AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
+ }
+ }
+ // Transition to final state
+ Result result = dtwm.transitionTo(toState, teamWf.getAssignees().iterator().next(), false, changes);
+ if (result.isFalse()) {
+ throw new OseeCoreException("Error transitioning [%s] to state [%s]: [%s]", teamWf.toStringWithId(),
+ toState.getName(), result.getText());
+ }
+
+ if (!teamWf.isCompletedOrCancelled()) {
+ // Reset assignees that may have been overwritten during transition
+ teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
+ }
+
+ setVersion(teamWf, DemoArtifactToken.SAW_Bld_2, changes);
+ changes.add(teamWf);
+ }
+ changes.execute();
+ }
+
+ private static class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Test_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Test_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Code_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Code_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_Requirements_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_Req_TeamWf;
+ } else if (applicableAis.iterator().next().equals(DemoArtifactToken.SAW_SW_Design_AI)) {
+ return DemoArtifactToken.SAW_NoBranch_SWDesign_TeamWf;
+ }
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd51CreateWorkaroundForGraphViewActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd51CreateWorkaroundForGraphViewActions.java
new file mode 100644
index 0000000000..c6dc255a64
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd51CreateWorkaroundForGraphViewActions.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd51CreateWorkaroundForGraphViewActions implements IPopulateDemoDatabase {
+
+ private static Map<ArtifactToken, ArtifactToken> versionToWorkflowToken;
+ private ArtifactToken currentVersion = null;
+
+ public Map<ArtifactToken, ArtifactToken> getVersionToWorkflowToken() {
+ if (versionToWorkflowToken == null) {
+ versionToWorkflowToken = new HashMap<>(3);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_1,
+ DemoArtifactToken.WorkaroundForGraphViewWorkflowForBld1_TeamWf);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_2,
+ DemoArtifactToken.WorkaroundForGraphViewWorkflowForBld2_TeamWf);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_3,
+ DemoArtifactToken.WorkaroundForGraphViewWorkflowForBld3_TeamWf);
+ }
+ return versionToWorkflowToken;
+ }
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.Adapter_AI);
+ Date createdDate = new Date();
+
+ for (ArtifactToken version : getVersionToWorkflowToken().keySet()) {
+ currentVersion = version;
+ ArtifactToken teamWfArtToken = getVersionToWorkflowToken().get(version);
+ ActionResult actionResult =
+ AtsClientService.get().getActionFactory().createAction(null, teamWfArtToken.getName(),
+ "Problem with the Graph View", ChangeType.Problem, "1", false, null, aias, createdDate,
+ AtsClientService.get().getUserService().getCurrentUser(), new ArtifactTokenActionListener(), changes);
+
+ transitionTo(actionResult.getFirstTeam(), getState(version), changes);
+
+ setVersion(actionResult.getFirstTeam(), version, changes);
+ }
+
+ changes.execute();
+ }
+
+ private TeamState getState(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? TeamState.Completed : TeamState.Implement;
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return versionToWorkflowToken.get(currentVersion);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd52CreateWorkingWithDiagramTreeActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd52CreateWorkingWithDiagramTreeActions.java
new file mode 100644
index 0000000000..8f414cf389
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd52CreateWorkingWithDiagramTreeActions.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd52CreateWorkingWithDiagramTreeActions implements IPopulateDemoDatabase {
+
+ private static Map<ArtifactToken, ArtifactToken> versionToWorkflowToken;
+ private ArtifactToken currentVersion = null;
+
+ public Map<ArtifactToken, ArtifactToken> getVersionToWorkflowToken() {
+ if (versionToWorkflowToken == null) {
+ versionToWorkflowToken = new HashMap<>(3);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_1,
+ DemoArtifactToken.WorkingWithDiagramTreeWorkflowForBld1_TeamWf);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_2,
+ DemoArtifactToken.WorkingWithDiagramTreeWorkflowForBld2_TeamWf);
+ versionToWorkflowToken.put(DemoArtifactToken.SAW_Bld_3,
+ DemoArtifactToken.WorkingWithDiagramTreeWorkflowForBld3_TeamWf);
+ }
+ return versionToWorkflowToken;
+ }
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.SAW_SW_Design_AI);
+ Date createdDate = new Date();
+
+ for (ArtifactToken version : getVersionToWorkflowToken().keySet()) {
+ currentVersion = version;
+ ArtifactToken teamWfArtToken = getVersionToWorkflowToken().get(version);
+ ActionResult actionResult =
+ AtsClientService.get().getActionFactory().createAction(null, teamWfArtToken.getName(),
+ "Problem with the Diagram Tree", ChangeType.Problem, "3", false, null, aias, createdDate,
+ AtsClientService.get().getUserService().getCurrentUser(), new ArtifactTokenActionListener(), changes);
+
+ transitionTo(actionResult.getFirstTeam(), getState(version), changes);
+
+ setVersion(actionResult.getFirstTeam(), version, changes);
+ }
+
+ changes.execute();
+ }
+
+ private TeamState getState(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? TeamState.Completed : TeamState.Implement;
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return getVersionToWorkflowToken().get(currentVersion);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd80CreateButtonSDoesntWorkAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd80CreateButtonSDoesntWorkAction.java
new file mode 100644
index 0000000000..902b536f7f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd80CreateButtonSDoesntWorkAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd80CreateButtonSDoesntWorkAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.Reader_AI);
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.ButtonSDoesntWorkOnHelp_TeamWf.getName(), "Problem with the help", ChangeType.Problem, "3",
+ false, null, aias, new Date(), AtsClientService.get().getUserService().getCurrentUser(),
+ new ArtifactTokenActionListener(), changes);
+
+ setValidationRequired(changes, actionResult.getFirstTeam());
+
+ transitionTo(actionResult.getFirstTeam(), TeamState.Completed, changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.ButtonSDoesntWorkOnHelp_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd81CreateButtonWDoesntWorkAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd81CreateButtonWDoesntWorkAction.java
new file mode 100644
index 0000000000..cab0742322
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd81CreateButtonWDoesntWorkAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd81CreateButtonWDoesntWorkAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.CIS_Test_AI);
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.ButtonWDoesntWorkOnSituationPage_TeamWf.getName(), "Problem with the Situation Page",
+ ChangeType.Problem, "3", false, null, aias, new Date(),
+ AtsClientService.get().getUserService().getCurrentUser(), new ArtifactTokenActionListener(), changes);
+
+ setValidationRequired(changes, actionResult.getFirstTeam());
+
+ transitionTo(actionResult.getFirstTeam(), TeamState.Analyze, changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.ButtonWDoesntWorkOnSituationPage_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd82CreateCantLoadDiagramTreeAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd82CreateCantLoadDiagramTreeAction.java
new file mode 100644
index 0000000000..2a304901df
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd82CreateCantLoadDiagramTreeAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd82CreateCantLoadDiagramTreeAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.CIS_Test_AI);
+
+ AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.CantLoadDiagramTree_TeamWf.getName(), "Problem with the Diagram Tree", ChangeType.Problem,
+ "3", false, null, aias, new Date(), AtsClientService.get().getUserService().getCurrentUser(),
+ new ArtifactTokenActionListener(), changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.CantLoadDiagramTree_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd83CreateCantSeeTheGraphViewAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd83CreateCantSeeTheGraphViewAction.java
new file mode 100644
index 0000000000..1493f0d957
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd83CreateCantSeeTheGraphViewAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd83CreateCantSeeTheGraphViewAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.Adapter_AI);
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.CantSeeTheGraphView_TeamWf.getName(), "Problem with the Graph View", ChangeType.Problem, "1",
+ false, null, aias, new Date(), AtsClientService.get().getUserService().getCurrentUser(),
+ new ArtifactTokenActionListener(), changes);
+
+ transitionTo(actionResult.getFirstTeam(), TeamState.Implement, changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.CantSeeTheGraphView_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd84CreateProblemInDiagramTreeAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd84CreateProblemInDiagramTreeAction.java
new file mode 100644
index 0000000000..b5778056d5
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd84CreateProblemInDiagramTreeAction.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd84CreateProblemInDiagramTreeAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.CIS_Test_AI);
+
+ AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.ProblemInDiagramTree_TeamWf.getName(), "Problem with the Diagram Tree", ChangeType.Problem,
+ "3", false, null, aias, new Date(), AtsClientService.get().getUserService().getCurrentUser(),
+ new ArtifactTokenActionListener(), changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.ProblemInDiagramTree_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd85CreateProblemWithTheGraphViewAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd85CreateProblemWithTheGraphViewAction.java
new file mode 100644
index 0000000000..c207701089
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd85CreateProblemWithTheGraphViewAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd85CreateProblemWithTheGraphViewAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.Adapter_AI);
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.ProblemWithTheGraphView_TeamWf.getName(), "Problem with the Graph View", ChangeType.Problem,
+ "1", false, null, aias, new Date(), AtsClientService.get().getUserService().getCurrentUser(),
+ new ArtifactTokenActionListener(), changes);
+
+ transitionTo(actionResult.getFirstTeam(), TeamState.Implement, changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.ProblemWithTheGraphView_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd86CreateProblemWithTheUserWindowAction.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd86CreateProblemWithTheUserWindowAction.java
new file mode 100644
index 0000000000..bc1223d402
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd86CreateProblemWithTheUserWindowAction.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.team.ChangeType;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.ActionResult;
+import org.eclipse.osee.ats.api.workflow.INewActionListener;
+import org.eclipse.osee.ats.client.demo.config.DemoDbUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd86CreateProblemWithTheUserWindowAction implements IPopulateDemoDatabase {
+
+ @Override
+ public void run() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ Collection<IAtsActionableItem> aias = DemoDbUtil.getConfigObjects(DemoArtifactToken.Timesheet_AI);
+
+ ActionResult actionResult = AtsClientService.get().getActionFactory().createAction(null,
+ DemoArtifactToken.ProblemWithTheUserWindow_TeamWf.getName(), "Problem with the user window",
+ ChangeType.Problem, "4", false, null, aias, new Date(),
+ AtsClientService.get().getUserService().getCurrentUser(), new ArtifactTokenActionListener(), changes);
+
+ transitionTo(actionResult.getFirstTeam(), TeamState.Implement, changes);
+
+ changes.execute();
+ }
+
+ private class ArtifactTokenActionListener implements INewActionListener {
+ @Override
+ public ArtifactToken getArtifactToken(List<IAtsActionableItem> applicableAis) {
+ return DemoArtifactToken.ProblemWithTheUserWindow_TeamWf;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd90CreateDemoTasks.java
index 295a7d73b4..09024bddae 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd90CreateDemoTasks.java
@@ -8,14 +8,12 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.client.demo.config;
+package org.eclipse.osee.ats.client.demo.populate;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Date;
import java.util.List;
-import java.util.logging.Level;
import org.eclipse.osee.ats.api.task.JaxAtsTask;
import org.eclipse.osee.ats.api.task.JaxAtsTaskFactory;
import org.eclipse.osee.ats.api.task.NewTaskData;
@@ -23,21 +21,16 @@ import org.eclipse.osee.ats.api.task.NewTaskDataFactory;
import org.eclipse.osee.ats.api.task.NewTaskDatas;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.framework.core.enums.DemoUsers;
-import org.eclipse.osee.framework.logging.OseeLog;
/**
* @author Donald G. Dunne
*/
-public class DemoDbTasks {
+public class Pdd90CreateDemoTasks {
- public static void createTasks(boolean DEBUG) throws Exception {
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Create tasks off code workflows");
- }
+ public void run() throws Exception {
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
boolean firstTaskWorkflow = true;
@@ -52,7 +45,7 @@ public class DemoDbTasks {
} else {
assigneeUserIds.add(DemoUsers.Joe_Smith.getUserId());
}
- for (String title : getTaskTitles(firstTaskWorkflow)) {
+ for (String title : firstTaskWorkflow ? DemoUtil.Saw_Code_Committed_Task_Titles : DemoUtil.Saw_Code_UnCommitted_Task_Titles) {
JaxAtsTask task = JaxAtsTaskFactory.get(newTaskData, title, createdBy, createdDate);
task.setRelatedToState(codeArt.getCurrentStateName());
task.setAssigneeUserIds(assigneeUserIds);
@@ -63,23 +56,4 @@ public class DemoDbTasks {
AtsClientService.get().getTaskService().createTasks(newTaskDatas);
}
- /**
- * Return different set of task titles for first and second workflow that make request
- */
- public static Collection<String> getTaskTitles(boolean firstTaskWorkflow) {
- if (firstTaskWorkflow) {
- firstTaskWorkflow = false;
- return Arrays.asList("Look into Graph View.", "Redesign how view shows values.",
- "Discuss new design with Senior Engineer", "Develop prototype", "Show prototype to management",
- "Create development plan", "Create test plan", "Make changes");
- } else {
- return Arrays.asList("Document how Graph View works", "Update help contents", "Review new documentation",
- "Publish documentation to website", "Remove old viewer", "Deploy release");
- }
- }
-
- public static int getNumTasks() {
- return getTaskTitles(false).size() + getTaskTitles(true).size();
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd91CreateDemoGroups.java
index 94c50614d1..3a793597c6 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd91CreateDemoGroups.java
@@ -8,47 +8,35 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.client.demo.config;
+package org.eclipse.osee.ats.client.demo.populate;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.logging.Level;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
-import org.eclipse.osee.framework.jdk.core.util.Conditions;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.UniversalGroup;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
-import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
/**
* @author Donald G. Dunne
*/
-public class DemoDbGroups {
- private static String TEST_GROUP_NAME = "Test Group";
+public class Pdd91CreateDemoGroups {
- public static List<TeamWorkFlowArtifact> createGroups(boolean DEBUG) throws Exception {
+ public void run() {
- SkynetTransaction transaction = TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(),
- "Populate Demo DB - Create Groups");
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), getClass().getSimpleName());
// Create group of all resulting objects
- List<TeamWorkFlowArtifact> codeWorkflows = new ArrayList<>();
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Create Groups and add objects");
- }
- Artifact groupArt = UniversalGroup.addGroup(TEST_GROUP_NAME, AtsClientService.get().getAtsBranch(), transaction);
+ Artifact groupArt =
+ UniversalGroup.addGroup(DemoArtifactToken.Test_Group, AtsClientService.get().getAtsBranch(), transaction);
for (TeamWorkFlowArtifact codeArt : Arrays.asList(DemoUtil.getSawCodeCommittedWf(),
DemoUtil.getSawCodeUnCommittedWf())) {
@@ -72,16 +60,5 @@ public class DemoDbGroups {
groupArt.persist(transaction);
transaction.execute();
- Collection<Artifact> members = groupArt.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members);
- Conditions.assertEquals(23, members.size(), "Group Members count not expected");
-
- Conditions.assertEquals(2, Artifacts.getOfType(AtsArtifactTypes.Action, members).size());
- Conditions.assertEquals(14, Artifacts.getOfType(AtsArtifactTypes.Task, members).size());
- Conditions.assertEquals(2, Artifacts.getOfType(DemoArtifactTypes.DemoCodeTeamWorkflow, members).size());
- Conditions.assertEquals(2, Artifacts.getOfType(DemoArtifactTypes.DemoTestTeamWorkflow, members).size());
- Conditions.assertEquals(2, Artifacts.getOfType(DemoArtifactTypes.DemoReqTeamWorkflow, members).size());
- Conditions.assertEquals(7, Artifacts.getOfType(AtsArtifactTypes.TeamWorkflow, members).size());
-
- return codeWorkflows;
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd92CreateDemoReviews.java
index 5ddba2ca8e..0b5e2bc0c9 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd92CreateDemoReviews.java
@@ -8,13 +8,11 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.client.demo.config;
+package org.eclipse.osee.ats.client.demo.populate;
-import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.logging.Level;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.review.IAtsDecisionReview;
import org.eclipse.osee.ats.api.review.Role;
@@ -22,7 +20,6 @@ import org.eclipse.osee.ats.api.review.UserRole;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.client.review.DecisionReviewManager;
@@ -35,26 +32,19 @@ import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Dispositi
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.InjectionActivity;
import org.eclipse.osee.ats.core.client.review.defect.ReviewDefectItem.Severity;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.enums.DemoUsers;
-import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.util.Result;
-import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
/**
* @author Donald G. Dunne
*/
-public class DemoDbReviews {
+public class Pdd92CreateDemoReviews {
- public static void createReviews(boolean DEBUG) throws Exception {
- createPeerToPeerReviews(DEBUG);
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - Create Decision Reviews");
- createDecisionReviews(DEBUG, changes);
- changes.execute();
+ public void run() {
+ createPeerToPeerReviews();
+ createDecisionReviews();
}
/**
@@ -64,20 +54,15 @@ public class DemoDbReviews {
* 3) Decision in Complete state w Joe Smith assignee and completed<br>
* <br>
*/
- public static void createDecisionReviews(boolean DEBUG, IAtsChangeSet changes) throws Exception {
+ public void createDecisionReviews() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
Date createdDate = new Date();
IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser();
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Create Decision reviews");
- }
- TeamWorkFlowArtifact firstTestArt = getSampleReviewTestWorkflows().get(0);
- TeamWorkFlowArtifact secondTestArt = getSampleReviewTestWorkflows().get(1);
-
// Create a Decision review and transition to ReWork
- IAtsDecisionReview review = AtsClientService.get().getReviewService().createValidateReview(firstTestArt, true,
- createdDate, createdBy, changes);
+ IAtsDecisionReview review = AtsClientService.get().getReviewService().createValidateReview(
+ DemoUtil.getButtonWDoesntWorkOnSituationPageWf(), true, createdDate, createdBy, changes);
Result result = DecisionReviewManager.transitionTo((DecisionReviewArtifact) review.getStoreObject(),
DecisionReviewState.Followup, createdBy, false, changes);
if (result.isFalse()) {
@@ -86,8 +71,8 @@ public class DemoDbReviews {
changes.add(review);
// Create a Decision review and transition to Completed
- review = AtsClientService.get().getReviewService().createValidateReview(secondTestArt, true, createdDate,
- createdBy, changes);
+ review = AtsClientService.get().getReviewService().createValidateReview(
+ DemoUtil.getProblemInDiagramTree_TeamWfWf(), true, createdDate, createdBy, changes);
DecisionReviewManager.transitionTo((DecisionReviewArtifact) review.getStoreObject(),
DecisionReviewState.Completed, createdBy, false, changes);
if (result.isFalse()) {
@@ -95,23 +80,7 @@ public class DemoDbReviews {
}
changes.add(review);
- }
-
- private static List<TeamWorkFlowArtifact> reviewTestArts;
-
- private static List<TeamWorkFlowArtifact> getSampleReviewTestWorkflows() throws Exception {
- if (reviewTestArts == null) {
- reviewTestArts = new ArrayList<>();
- for (String actionName : new String[] {"Button W doesn't work on", "Diagram Tree"}) {
- for (Artifact art : ArtifactQuery.getArtifactListFromName(actionName, AtsClientService.get().getAtsBranch(),
- EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS)) {
- if (art.isOfType(DemoArtifactTypes.DemoTestTeamWorkflow)) {
- reviewTestArts.add((TeamWorkFlowArtifact) art);
- }
- }
- }
- }
- return reviewTestArts;
+ changes.execute();
}
/**
@@ -121,13 +90,10 @@ public class DemoDbReviews {
* 3) PeerToPeer in Prepare state w Joe Smith assignee and completed<br>
* <br>
*/
- public static void createPeerToPeerReviews(boolean DEBUG) throws Exception {
+ public void createPeerToPeerReviews() {
IAtsChangeSet changes = AtsClientService.get().createChangeSet("Populate Demo DB - Create PeerToPeer Reviews 1");
- if (DEBUG) {
- OseeLog.log(Activator.class, Level.INFO, "Create Peer To Peer reviews");
- }
TeamWorkFlowArtifact firstCodeArt = DemoUtil.getSawCodeCommittedWf();
TeamWorkFlowArtifact secondCodeArt = DemoUtil.getSawCodeUnCommittedWf();
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java
index b97a0f78de..77a9c6a4af 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.client.demo;
+package org.eclipse.osee.ats.client.demo.populate;
import java.util.Arrays;
import java.util.Calendar;
@@ -35,6 +35,7 @@ import org.eclipse.osee.ats.api.workflow.WorkItemType;
import org.eclipse.osee.ats.api.workflow.transition.IAtsTransitionManager;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.api.workflow.transition.TransitionResults;
+import org.eclipse.osee.ats.client.demo.SprintItemData;
import org.eclipse.osee.ats.client.demo.internal.Activator;
import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.config.AtsBulkLoad;
@@ -60,12 +61,9 @@ import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.support.test.util.TestUtil;
/**
- * Run from the ATS Navigator after the DB is configured for "OSEE Demo Database", this class will populate the database
- * with sample actions written against XYZ configured teams
- *
* @author Donald G. Dunne
*/
-public class PopulateDemoAgile {
+public class Pdd93CreateDemoAgile {
private static void validateArtifactCache() throws OseeStateException {
final Collection<Artifact> list = ArtifactCache.getDirtyArtifacts();
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd94CreateDemoFavorites.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd94CreateDemoFavorites.java
new file mode 100644
index 0000000000..ad476aa4b9
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd94CreateDemoFavorites.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.util.FavoritesManager;
+import org.eclipse.osee.ats.util.SubscribeManagerUI;
+import org.eclipse.osee.framework.core.enums.QueryOption;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd94CreateDemoFavorites {
+
+ public void run() throws Exception {
+ // Mark all CIS Code "Team Workflows" as Favorites for "Joe Smith"
+ for (Artifact art : ArtifactQuery.getArtifactListFromTypeAndName(DemoArtifactTypes.DemoCodeTeamWorkflow,
+ "Diagram View", AtsClientService.get().getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)) {
+ new FavoritesManager((AbstractWorkflowArtifact) art).toggleFavorite(false);
+ }
+
+ // Mark all Tools Team "Team Workflows" as Subscribed for "Joe Smith"
+ for (Artifact art : ArtifactQuery.getArtifactListFromTypeAndName(DemoArtifactTypes.DemoCodeTeamWorkflow, "Even",
+ AtsClientService.get().getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)) {
+ new SubscribeManagerUI((AbstractWorkflowArtifact) art).toggleSubscribe(false);
+ }
+ }
+
+}
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
new file mode 100644
index 0000000000..854522fc81
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import org.eclipse.osee.ats.api.country.CountryEndpointApi;
+import org.eclipse.osee.ats.api.country.JaxCountry;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.insertion.InsertionActivityEndpointApi;
+import org.eclipse.osee.ats.api.insertion.InsertionEndpointApi;
+import org.eclipse.osee.ats.api.insertion.JaxInsertion;
+import org.eclipse.osee.ats.api.insertion.JaxInsertionActivity;
+import org.eclipse.osee.ats.api.program.JaxProgram;
+import org.eclipse.osee.ats.api.program.ProgramEndpointApi;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoCountry;
+import org.eclipse.osee.ats.demo.api.DemoInsertion;
+import org.eclipse.osee.ats.demo.api.DemoInsertionActivity;
+import org.eclipse.osee.ats.demo.api.DemoProgram;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.exception.OseeWrappedException;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd95CreateDemoEVConfigAndWorkPackages {
+
+ public void run() {
+ createUsgCountryConfig();
+ createCntryCountryConfig();
+ createAndSetWorkPackages();
+ setWorkPacakgeForWfs();
+ }
+
+ public void setWorkPacakgeForWfs() {
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getClass().getSimpleName());
+
+ // set work packages
+ TeamWorkFlowArtifact commWf = DemoUtil.getSawCodeCommittedWf();
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) commWf, AtsAttributeTypes.WorkPackageGuid,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
+
+ TeamWorkFlowArtifact unCommWf = DemoUtil.getSawCodeUnCommittedWf();
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) unCommWf, AtsAttributeTypes.WorkPackageGuid,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getGuid());
+
+ TeamWorkFlowArtifact noBranchWf = DemoUtil.getSawCodeNoBranchWf();
+ changes.setSoleAttributeValue((IAtsTeamWorkflow) noBranchWf, AtsAttributeTypes.WorkPackageGuid,
+ DemoArtifactToken.SAW_Code_Team_WorkPackage_03.getGuid());
+
+ changes.execute();
+ }
+
+ private void createAndSetWorkPackages() throws OseeCoreException {
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Create Work Packages");
+
+ Artifact codeTeamArt = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Code);
+
+ Artifact workPkg1 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_01, "ASDHFA443");
+ workPkg1.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
+ relateInsertionActivity(workPkg1, DemoInsertionActivity.commPage);
+ workPkg1.persist(transaction);
+
+ Artifact workPkg2 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_02, "ASDHFA443");
+ workPkg2.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
+ relateInsertionActivity(workPkg2, DemoInsertionActivity.commPage);
+ workPkg2.persist(transaction);
+
+ Artifact workPkg3 = createWorkPackage(DemoArtifactToken.SAW_Code_Team_WorkPackage_03, "ASDHFA443");
+ workPkg3.setSoleAttributeValue(AtsAttributeTypes.Active, false);
+ workPkg3.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, codeTeamArt);
+ relateInsertionActivity(workPkg3, DemoInsertionActivity.commButton);
+ workPkg3.persist(transaction);
+
+ Artifact testTeamArt = ArtifactQuery.getArtifactFromToken(DemoArtifactToken.SAW_Test_AI);
+
+ Artifact workPkg11 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0A, "AHESSH3");
+ workPkg11.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
+ relateInsertionActivity(workPkg11, DemoInsertionActivity.commPage);
+ workPkg11.persist(transaction);
+
+ Artifact workPkg21 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0B, "HAKSHD3");
+ workPkg21.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
+ relateInsertionActivity(workPkg21, DemoInsertionActivity.commPage);
+ workPkg21.persist(transaction);
+
+ Artifact workPkg31 = createWorkPackage(DemoArtifactToken.SAW_Test_AI_WorkPackage_0C, "EHA4DS");
+ workPkg31.setSoleAttributeValue(AtsAttributeTypes.Active, false);
+ workPkg31.addRelation(AtsRelationTypes.WorkPackage_TeamDefOrAi, testTeamArt);
+ relateInsertionActivity(workPkg31, DemoInsertionActivity.commButton);
+ workPkg31.persist(transaction);
+
+ transaction.execute();
+ }
+
+ private void relateInsertionActivity(Artifact workPackageArt, DemoInsertionActivity insertionActivity) {
+ Artifact insertionActivityArt = AtsClientService.get().getArtifact(insertionActivity.getUuid());
+ insertionActivityArt.addRelation(AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage, workPackageArt);
+ }
+
+ private Artifact createWorkPackage(ArtifactToken workPackageToken, String activityId) throws OseeCoreException {
+ Artifact workPkg1 = ArtifactTypeManager.addArtifact(workPackageToken, AtsClientService.get().getAtsBranch());
+ char charAt = workPackageToken.getName().charAt(workPackageToken.getName().length() - 1);
+ workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageId, "WP_0" + charAt);
+ workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageProgram, "Program A");
+ workPkg1.addAttributeFromString(AtsAttributeTypes.WorkPackageType, "LOE");
+ workPkg1.addAttributeFromString(AtsAttributeTypes.ActivityId, activityId);
+ workPkg1.addAttributeFromString(AtsAttributeTypes.ActivityName, "HUF 2" + charAt + "0");
+ return workPkg1;
+ }
+
+ // configure USG for country, program, insertion, activity and work package
+ private void createUsgCountryConfig() {
+ try {
+ CountryEndpointApi countryEp = AtsClientService.getCountryEp();
+ InsertionEndpointApi insertionEp = AtsClientService.getInsertionEp();
+ InsertionActivityEndpointApi insertionActivityEp = AtsClientService.getInsertionActivityEp();
+
+ // create country
+ createCountry(countryEp, DemoCountry.usg);
+
+ // relate country to programs
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Create USG Country Config");
+ Artifact country =
+ ArtifactQuery.getArtifactFromId(DemoCountry.usg.getUuid(), AtsClientService.get().getAtsBranch());
+ Artifact program =
+ ArtifactQuery.getArtifactFromId(DemoProgram.sawProgram.getUuid(), AtsClientService.get().getAtsBranch());
+ country.addRelation(AtsRelationTypes.CountryToProgram_Program, program);
+ program.persist(transaction);
+
+ program =
+ ArtifactQuery.getArtifactFromId(DemoProgram.cisProgram.getUuid(), AtsClientService.get().getAtsBranch());
+ country.addRelation(AtsRelationTypes.CountryToProgram_Program, program);
+ program.persist(transaction);
+ country.persist(transaction);
+ transaction.execute();
+
+ // create and relate insertion and insertion activities
+ DemoInsertion.getInsertions();
+ DemoInsertionActivity.getActivities();
+ for (DemoProgram demoProg : DemoCountry.usg.getPrograms()) {
+ createInsertions(insertionEp, insertionActivityEp, demoProg);
+ }
+
+ } catch (Exception ex) {
+ throw new OseeWrappedException("Error creating ATS USG Country Config", ex);
+ }
+ }
+
+ private void createCntryCountryConfig() {
+ try {
+ DemoCountry country = DemoCountry.cntry;
+ CountryEndpointApi countryEp = AtsClientService.getCountryEp();
+ ProgramEndpointApi programEp = AtsClientService.getProgramEp();
+ InsertionEndpointApi insertionEp = AtsClientService.getInsertionEp();
+ InsertionActivityEndpointApi insertionActivityEp = AtsClientService.getInsertionActivityEp();
+
+ // create country
+ createCountry(countryEp, country);
+
+ // create and relate programs
+ DemoInsertion.getInsertions();
+ DemoInsertionActivity.getActivities();
+ for (DemoProgram program : country.getPrograms()) {
+ createProgram(programEp, program);
+ createInsertions(insertionEp, insertionActivityEp, program);
+ }
+ } catch (Exception ex) {
+ throw new OseeWrappedException("Error creating ATS Cntry Country Config", ex);
+ }
+ }
+
+ private void createInsertions(InsertionEndpointApi insertionEp, InsertionActivityEndpointApi insertionActivityEp, DemoProgram demoProg) throws Exception {
+ for (DemoInsertion demoIns : demoProg.getInsertions()) {
+ createInsertion(insertionEp, demoIns);
+
+ // create and relate insertion activities
+ for (DemoInsertionActivity demoInsertionActivity : demoIns.getActivities()) {
+ createInsertionActivity(insertionActivityEp, demoInsertionActivity);
+ }
+ }
+ }
+
+ private JaxInsertionActivity createInsertionActivity(InsertionActivityEndpointApi insertionActivityEp, DemoInsertionActivity insertionActivity) throws Exception {
+ JaxInsertionActivity jaxInsertionActivity = new JaxInsertionActivity();
+ jaxInsertionActivity.setName(insertionActivity.getName());
+ jaxInsertionActivity.setUuid(insertionActivity.getUuid());
+ jaxInsertionActivity.setActive(insertionActivity.isActive());
+ jaxInsertionActivity.setDescription(insertionActivity.getDescription());
+ jaxInsertionActivity.setInsertionUuid(insertionActivity.getInsertionUuid());
+ insertionActivityEp.create(jaxInsertionActivity);
+ return jaxInsertionActivity;
+ }
+
+ private JaxInsertion createInsertion(InsertionEndpointApi insertionEp, DemoInsertion insertion) throws Exception {
+ JaxInsertion jaxInsertion = new JaxInsertion();
+ jaxInsertion.setName(insertion.getName());
+ jaxInsertion.setUuid(insertion.getUuid());
+ jaxInsertion.setActive(insertion.isActive());
+ jaxInsertion.setDescription(insertion.getDescription());
+ jaxInsertion.setProgramUuid(insertion.getProgramUuid());
+ insertionEp.create(jaxInsertion);
+ return jaxInsertion;
+ }
+
+ private JaxProgram createProgram(ProgramEndpointApi programEp, DemoProgram program) throws Exception {
+ JaxProgram jaxProgram = new JaxProgram();
+ jaxProgram.setName(program.getName());
+ jaxProgram.setUuid(program.getUuid());
+ jaxProgram.setActive(program.isActive());
+ jaxProgram.setDescription(program.getDescription());
+ jaxProgram.setCountryUuid(program.getCountryUuid());
+ programEp.create(jaxProgram);
+ return jaxProgram;
+ }
+
+ private JaxCountry createCountry(CountryEndpointApi countryEp, DemoCountry country) throws Exception {
+ JaxCountry jaxCountry = new JaxCountry();
+ jaxCountry.setName(country.getName());
+ jaxCountry.setUuid(country.getUuid());
+ jaxCountry.setActive(country.isActive());
+ jaxCountry.setDescription(country.getDescription());
+ countryEp.create(jaxCountry);
+ return jaxCountry;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd97CreateDemoSawWorkTypes.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd97CreateDemoSawWorkTypes.java
new file mode 100644
index 0000000000..ac8b7c473e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd97CreateDemoSawWorkTypes.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.demo.populate;
+
+import org.eclipse.osee.ats.api.config.WorkType;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.client.demo.config.DemoCsci;
+import org.eclipse.osee.ats.client.demo.internal.AtsClientService;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd97CreateDemoSawWorkTypes {
+
+ public void run() {
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(AtsClientService.get().getAtsBranch(), "Add SAW Work Types");
+ Artifact sawProgram = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Program);
+ for (DemoCsci csci : DemoCsci.values()) {
+ sawProgram.addAttribute(AtsAttributeTypes.CSCI, csci.name());
+ }
+ sawProgram.persist(transaction);
+ Artifact sawTeamDef = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_SW);
+ for (Artifact child : sawTeamDef.getChildren()) {
+ child.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
+ if (child.getName().contains("Code")) {
+ child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Code.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
+ } else if (child.getName().contains("Test")) {
+ child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Test.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
+ } else if (child.getName().contains("Requirements")) {
+ child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Requirements.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
+ } else if (child.getName().contains("Design")) {
+ child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.SW_Design.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
+ } else if (child.getName().contains("HW")) {
+ child.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Hardware.name());
+ child.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
+ }
+ child.persist(transaction);
+ }
+
+ Artifact sawTestAi = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Test_AI);
+ sawTestAi.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
+ sawTestAi.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Test.name());
+ sawTestAi.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.DP.name());
+ sawTestAi.persist(transaction);
+
+ Artifact sawCodeAi = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Code_AI);
+ sawCodeAi.setSoleAttributeValue(AtsAttributeTypes.ProgramUuid, sawProgram);
+ sawCodeAi.setSoleAttributeValue(AtsAttributeTypes.WorkType, WorkType.Code.name());
+ sawCodeAi.addAttribute(AtsAttributeTypes.CSCI, DemoCsci.SP.name());
+ sawCodeAi.persist(transaction);
+
+ transaction.execute();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
index 188c419454..0d454164d8 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
+++ b/plugins/org.eclipse.osee.ats.client.demo/support/WorkDef_Demo_AIs_And_Team_Definitions.ats
@@ -266,6 +266,7 @@ actionableItem "Actionable Items" GetOrCreate {
}
}
actionableItem "SAW HW" {
+ id 4687946
team "SAW HW"
children {
actionableItem "Adapter" {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.client.integration.tests/META-INF/MANIFEST.MF
index 18360439b7..dc488c2e88 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.junit;bundle-version="4.11.0",
org.hamcrest.core,
org.objenesis,
org.eclipse.equinox.registry,
- org.eclipse.osee.ats.api
+ org.eclipse.osee.ats.api,
+ org.eclipse.osee.jdbc
Import-Package: com.google.common.collect,
com.google.gson,
javax.ws.rs.client;version="2.0.0",
@@ -32,6 +33,7 @@ Import-Package: com.google.common.collect,
org.eclipse.osee.ats.artifact,
org.eclipse.osee.ats.client.demo,
org.eclipse.osee.ats.client.demo.config,
+ org.eclipse.osee.ats.client.demo.populate,
org.eclipse.osee.ats.column,
org.eclipse.osee.ats.config,
org.eclipse.osee.ats.config.copy,
@@ -82,6 +84,7 @@ Import-Package: com.google.common.collect,
org.eclipse.osee.ats.world,
org.eclipse.osee.ats.world.search,
org.eclipse.osee.define.report.api,
+ org.eclipse.osee.framework.access,
org.eclipse.osee.framework.core.client,
org.eclipse.osee.framework.core.client.server,
org.eclipse.osee.framework.core.data,
@@ -110,6 +113,8 @@ Import-Package: com.google.common.collect,
org.eclipse.osee.framework.skynet.core.event,
org.eclipse.osee.framework.skynet.core.event.model,
org.eclipse.osee.framework.skynet.core.httpRequests,
+ org.eclipse.osee.framework.skynet.core.importing.parsers,
+ org.eclipse.osee.framework.skynet.core.importing.resolvers,
org.eclipse.osee.framework.skynet.core.linking,
org.eclipse.osee.framework.skynet.core.revision,
org.eclipse.osee.framework.skynet.core.transaction,
@@ -119,6 +124,7 @@ Import-Package: com.google.common.collect,
org.eclipse.osee.framework.ui.plugin.util,
org.eclipse.osee.framework.ui.plugin.xnavigate,
org.eclipse.osee.framework.ui.skynet,
+ org.eclipse.osee.framework.ui.skynet.Import,
org.eclipse.osee.framework.ui.skynet.access,
org.eclipse.osee.framework.ui.skynet.artifact,
org.eclipse.osee.framework.ui.skynet.artifact.editor,
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/AtsClientIntegrationTestSuite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/AtsClientIntegrationTestSuite.java
index 3a166a198e..3ce9ad1b42 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/AtsClientIntegrationTestSuite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/AtsClientIntegrationTestSuite.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.client.integration.tests.orcs.rest.ClientEndpointTes
import org.eclipse.osee.ats.client.integration.tests.util.DbInitTest;
import org.eclipse.osee.framework.jdk.core.util.ElapsedTime;
import org.eclipse.osee.framework.jdk.core.util.ElapsedTime.Units;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -46,11 +47,13 @@ public class AtsClientIntegrationTestSuite {
@BeforeClass
public static void setup() {
time = new ElapsedTime("AtsClientIntegrationTestSuite", true);
+ OseeProperties.setIsInTest(true);
}
@AfterClass
public static void cleanup() {
time.end(Units.MIN);
+ OseeProperties.setIsInTest(false);
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/AtsTest_AllAts_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/AtsTest_AllAts_Suite.java
index 15b17176b6..bb183f0685 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/AtsTest_AllAts_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/AtsTest_AllAts_Suite.java
@@ -47,8 +47,8 @@ public class AtsTest_AllAts_Suite {
@BeforeClass
public static void setUp() throws Exception {
- DemoUtil.checkDbInitSuccess();
- System.out.println("\nBegin " + AtsClientIntegrationTestSuite.class.getSimpleName());
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ System.out.println("\nBegin " + AtsTest_AllAts_Suite.class.getSimpleName());
OseeProperties.setIsInTest(true);
assertTrue("Demo Application Server must be running.",
ClientSessionManager.getAuthenticationProtocols().contains("demo"));
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateSuite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateSuite.java
index 4def225313..9e2dc59896 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateSuite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateSuite.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.client.integration.tests;
import static org.junit.Assert.assertTrue;
import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.integration.tests.ats.DemoCountryConfigTest;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtilTest;
+import org.eclipse.osee.ats.client.integration.tests.ats.demo.AtsTest_DemoPopulateAndTest_Suite;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
@@ -26,9 +26,7 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({//
AtsTestUtilTest.class,
- PopulateDemoDatabaseTest.class,
- DemoCountryConfigTest.class,
- PopulateDemoActionsTest.class,
+ AtsTest_DemoPopulateAndTest_Suite.class,
DemoDbPopulateValidateAtsDatabaseTest.class //
})
/**
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateValidateAtsDatabaseTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateValidateAtsDatabaseTest.java
index 7d5d8727db..711dbbfca6 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateValidateAtsDatabaseTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DemoDbPopulateValidateAtsDatabaseTest.java
@@ -10,14 +10,21 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.ats.health.AtsValidateAtsDatabaseTest;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.junit.BeforeClass;
/**
* Extension to validate ats database so test will run once after populate and once at end of the tests. Without this,
* JUnit only runs test once.
- *
+ *
* @author Donald G Dunne
*/
public class DemoDbPopulateValidateAtsDatabaseTest extends AtsValidateAtsDatabaseTest {
- // do nothing
+
+ @BeforeClass
+ public static void cleanup() throws OseeCoreException {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DirtyArtifactCacheTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DirtyArtifactCacheTest.java
index 36f85c1056..e833734aa9 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DirtyArtifactCacheTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/DirtyArtifactCacheTest.java
@@ -12,19 +12,26 @@ package org.eclipse.osee.ats.client.integration.tests;
import java.util.Collection;
import java.util.logging.Level;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.junit.Assert;
+import org.junit.BeforeClass;
/**
* This test should be run as the last test of a suite to make sure that the ArtifactCache has no dirty artifacts.
- *
+ *
* @author Donald G. Dunne
*/
public class DirtyArtifactCacheTest {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ }
+
@org.junit.Test
public void testArtifactCacheNotDirty() {
final Collection<Artifact> dirtyArtifacts = ArtifactCache.getDirtyArtifacts();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
deleted file mode 100644
index 2850661767..0000000000
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.client.integration.tests;
-
-import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
-import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
-import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_3;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.version.IAtsVersion;
-import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.demo.PopulateDemoActions;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.ats.core.client.action.ActionArtifact;
-import org.eclipse.osee.ats.core.client.config.AtsBulkLoad;
-import org.eclipse.osee.ats.core.client.review.AbstractReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
-import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
-import org.eclipse.osee.ats.core.client.review.ReviewManager;
-import org.eclipse.osee.ats.core.client.task.TaskArtifact;
-import org.eclipse.osee.ats.core.client.task.TaskStates;
-import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.util.AtsObjects;
-import org.eclipse.osee.ats.core.workflow.state.TeamState;
-import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
-import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
-import org.eclipse.osee.ats.demo.api.DemoTeam;
-import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
-import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.enums.DeletionFlag;
-import org.eclipse.osee.framework.core.enums.DemoUsers;
-import org.eclipse.osee.framework.core.enums.QueryOption;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-
-/**
- * Test unit for {@link PopulateDemoActions}
- *
- * @author Donald G. Dunne
- */
-public class PopulateDemoActionsTest {
-
- @BeforeClass
- public static void validateDbInit() throws OseeCoreException {
- DemoUtil.checkDbInitAndPopulateSuccess();
- }
-
- @AfterClass
- public static void cleanup() throws OseeCoreException {
- IAtsChangeSet changes = AtsClientService.get().createChangeSet("Cleanup PopulateDemoActionsTest");
- for (Artifact art : ArtifactQuery.getArtifactListFromName("Auto-created", AtsClientService.get().getAtsBranch(),
- DeletionFlag.EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS)) {
- changes.deleteArtifact(art);
- }
- changes.execute();
- }
-
- @Before
- public void setup() throws OseeCoreException {
- AtsBulkLoad.reloadConfig(true);
- }
-
- @org.junit.Test
- public void testAtsAdmin() throws OseeCoreException {
- Assert.assertEquals(DemoUsers.Joe_Smith.getUserId(),
- AtsClientService.get().getUserService().getCurrentUser().getUserId());
- Assert.assertFalse(AtsClientService.get().getUserService().isAtsAdmin());
- Assert.assertTrue(AtsClientService.get().getUserService().isAtsAdmin(
- AtsClientService.get().getUserServiceClient().getUserById(DemoUsers.Jason_Michael.getUserId())));
- }
-
- @org.junit.Test
- public void testSawUnCommittedTeamWfs() throws OseeCoreException {
- Collection<TeamWorkFlowArtifact> sawUnCommittedTeamWfs = DemoUtil.getSawUnCommittedTeamWfs();
- Assert.assertEquals(4, sawUnCommittedTeamWfs.size());
-
- TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeUnCommittedWf();
- Assert.assertNotNull(codeTeamArt);
- TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestUnCommittedWf();
- Assert.assertNotNull(testTeamArt);
- TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqUnCommittedWf();
- Assert.assertNotNull(reqTeamArt);
- TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignUnCommittedWf();
- Assert.assertNotNull(designTeamArt);
-
- testTeamContents(codeTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
- SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code", "Joe Smith",
- DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
- testTeamContents(testTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
- SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test", "Kay Jones",
- DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
- testTeamContents(reqTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
- SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements", "Joe Smith",
- DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- testTeamContents(designTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
- SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design", "Kay Jones",
- AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
-
- // test code team 1 review and 6 tasks
- // - test review
- Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews(codeTeamArt);
- Assert.assertEquals(1, reviews.size());
- PeerToPeerReviewArtifact revArt = (PeerToPeerReviewArtifact) reviews.iterator().next();
- testReviewContents(revArt, "Review new logic", PeerToPeerReviewState.Completed.getName());
-
- // - test tasks
- List<String> taskNames = new ArrayList<>();
- taskNames.addAll(DemoTestUtil.getTaskTitles(false));
- for (TaskArtifact task : codeTeamArt.getTaskArtifacts()) {
- testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName());
- taskNames.remove(task.getName());
- Assert.assertEquals("Joe Smith", task.getStateMgr().getAssigneesStr());
- }
- Assert.assertEquals(
- String.format("Not all tasks exist for [%s]; [%s] remain", codeTeamArt.toStringWithId(), taskNames), 0,
- taskNames.size());
-
- // test sw_design 1 peer and 1 decision review
- testSwDesign1PeerAnd1DecisionReview(designTeamArt);
-
- }
-
- @org.junit.Test
- public void testSawNoBranchCommittedTeamWfs() throws OseeCoreException {
- // {@link DemoDbActionData.getReqSawActionsData()} - 3
- String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
-
- TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeNoBranchWf();
- Assert.assertNotNull(codeTeamArt);
- TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestNoBranchWf();
- Assert.assertNotNull(testTeamArt);
- TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqNoBranchWf();
- Assert.assertNotNull(reqTeamArt);
- TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignNoBranchWf();
- Assert.assertNotNull(designTeamArt);
-
- testTeamContents(codeTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
- "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
- testTeamContents(testTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
- "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
- testTeamContents(reqTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements",
- "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- testTeamContents(designTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design",
- "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
-
- // test sw_design 1 peer and 1 decision review
- testSwDesign1PeerAnd1DecisionReview(designTeamArt);
- }
-
- @org.junit.Test
- public void testSawUnCommittedForDiagramViewTeamWfs() throws OseeCoreException {
- // {@link DemoDbActionData.getReqSawActionsData()} - 4
- String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
- IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf);
- Assert.assertNotNull(teamWf);
-
- testTeamContents((TeamWorkFlowArtifact) teamWf.getStoreObject(), title, "3", SAW_Bld_2.getName(),
- TeamState.Implement.getName(), "SAW Requirements", "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
- }
-
- @org.junit.Test
- public void testWorkaroundForGraphViewBld1Action() throws OseeCoreException {
- String title = "Workaround for Graph View for SAW_Bld_1";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "1", SAW_Bld_1.getName(), TeamState.Completed.getName(), "Adapter", "",
- DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
- }
-
- @org.junit.Test
- public void testWorkaroundForGraphViewBld2Action() throws OseeCoreException {
- String title = "Workaround for Graph View for SAW_Bld_2";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "1", SAW_Bld_2.getName(), TeamState.Implement.getName(), "Adapter",
- DemoUsers.Jason_Michael.getName(), DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
- }
-
- @org.junit.Test
- public void testWorkaroundForGraphViewBld3Action() throws OseeCoreException {
- String title = "Workaround for Graph View for SAW_Bld_3";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "1", SAW_Bld_3.getName(), TeamState.Implement.getName(), "Adapter",
- DemoUsers.Jason_Michael.getName(), DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
- }
-
- @org.junit.Test
- public void testWorkingWithDiagramTreeBld1Action() throws OseeCoreException {
- String title = "Working with Diagram Tree for SAW_Bld_1";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", SAW_Bld_1.getName(), TeamState.Completed.getName(), "SAW SW Design", "",
- AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- }
-
- @org.junit.Test
- public void testWorkingWithDiagramTreeBld2Action() throws OseeCoreException {
- String title = "Working with Diagram Tree for SAW_Bld_2";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", SAW_Bld_2.getName(), TeamState.Endorse.getName(), "SAW SW Design",
- "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- }
-
- @org.junit.Test
- public void testWorkingWithDiagramTreeBld3Action() throws OseeCoreException {
- String title = "Working with Diagram Tree for SAW_Bld_3";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", SAW_Bld_3.getName(), TeamState.Endorse.getName(), "SAW SW Design",
- "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
- }
-
- @org.junit.Test
- public void testButton2DoesntWorkOnHelpAction() throws OseeCoreException {
- String title = "Button S doesn't work on help";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", "", TeamState.Completed.getName(), "Reader", "",
- AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.Tools_Team));
-
- // test decision review
- Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews(teamArt);
- Assert.assertEquals(1, reviews.size());
- DecisionReviewArtifact revArt = (DecisionReviewArtifact) reviews.iterator().next();
- testReviewContents(revArt, "Is the resolution of this Action valid?", DecisionReviewState.Decision.getName(),
- "Joe Smith");
-
- }
-
- @org.junit.Test
- public void testButtonWDoesntWorkOnSituationPageAction() throws OseeCoreException {
- String title = "Button W doesn't work on Situation Page";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", "", TeamState.Analyze.getName(), "CIS Test", "Kay Jones",
- DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
-
- // test decision review
- Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews(teamArt);
- Assert.assertEquals(1, reviews.size());
- DecisionReviewArtifact revArt = (DecisionReviewArtifact) reviews.iterator().next();
- testReviewContents(revArt, "Is the resolution of this Action valid?", DecisionReviewState.Followup.getName(),
- "Joe Smith");
-
- }
-
- @org.junit.Test
- public void testCantLoadDiagramTreeAction() throws OseeCoreException {
- String title = "Can't load Diagram Tree";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", "", TeamState.Endorse.getName(), "CIS Test", "Kay Jones",
- DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
- }
-
- @org.junit.Test
- public void testCantSeeTheGraphViewAction() throws OseeCoreException {
- String title = "Can't see the Graph View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "1", "", TeamState.Implement.getName(), "Adapter",
- DemoUsers.Jason_Michael.getName(), DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
-
- }
-
- @org.junit.Test
- public void testProblemInDiagramTreeAction() throws OseeCoreException {
- String title = "Problem in Diagram Tree";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "3", "", TeamState.Endorse.getName(), "CIS Test", "Kay Jones",
- DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
-
- }
-
- @org.junit.Test
- public void testProblemWithTheGraphViewAction() throws OseeCoreException {
- String title = "Problem with the Graph View";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "1", "", TeamState.Implement.getName(), "Adapter",
- DemoUsers.Jason_Michael.getName(), DemoArtifactTypes.DemoReqTeamWorkflow,
- DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
-
- }
-
- @org.junit.Test
- public void testProblemWithTheUserWindowAction() throws OseeCoreException {
- String title = "Problem with the user window";
- ActionArtifact action = (ActionArtifact) ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.Action, title,
- AtsClientService.get().getAtsBranch());
- Assert.assertNotNull(action);
- Assert.assertEquals(1, action.getTeams().size());
- TeamWorkFlowArtifact teamArt = action.getTeams().iterator().next();
-
- testTeamContents(teamArt, title, "4", "", TeamState.Implement.getName(), "Timesheet", "Jeffery Kay",
- AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.Tools_Team));
-
- }
-
- private static void testReviewContents(AbstractReviewArtifact revArt, String title, String currentStateName, String... assigneeStrs) throws OseeCoreException {
- Assert.assertEquals(title, revArt.getName());
- Assert.assertEquals(currentStateName, revArt.getCurrentStateName());
-
- Collection<String> assigneeNames = AtsObjects.getNames(revArt.getStateMgr().getAssignees());
-
- Assert.assertEquals(assigneeNames.size(), assigneeStrs.length);
- for (String assignee : assigneeStrs) {
- if (!assigneeNames.contains(assignee)) {
- Assert.fail(String.format("revArt.getStateMgr().getAssignees(), does not contain user: %s", assignee));
- }
- }
- }
-
- private static void testTeamContents(TeamWorkFlowArtifact teamArt, String title, String priority, String versionName, String currentStateName, String actionableItemStr, String assigneeStr, IArtifactType artifactType, IAtsTeamDefinition teamDef) throws OseeCoreException {
- Assert.assertEquals(currentStateName, teamArt.getCurrentStateName());
- Assert.assertEquals(priority, teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType, ""));
- // want targeted version, not error/exception
- String targetedVerStr = "";
- IAtsVersion version = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
- if (version != null) {
- targetedVerStr = version.getName();
- }
- Assert.assertEquals(versionName, targetedVerStr);
- Assert.assertEquals(artifactType, teamArt.getArtifactType());
- Assert.assertEquals(teamDef, teamArt.getTeamDefinition());
- Assert.assertEquals(assigneeStr, teamArt.getStateMgr().getAssigneesStr());
- Assert.assertEquals(actionableItemStr,
- AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItemsStr(teamArt));
- }
-
- private void testTaskContents(TaskArtifact task, String currentStateName, String relatedToState) throws OseeCoreException {
- Assert.assertEquals(currentStateName, task.getCurrentStateName());
- Assert.assertEquals(relatedToState, task.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, ""));
- }
-
- private void testSwDesign1PeerAnd1DecisionReview(TeamWorkFlowArtifact designTeam) throws OseeCoreException {
- Assert.assertNotNull(designTeam);
- PeerToPeerReviewArtifact peerArt = null;
- DecisionReviewArtifact decArt = null;
- for (AbstractReviewArtifact revArt1 : ReviewManager.getReviews(designTeam)) {
- if (revArt1.getName().contains("PeerToPeer")) {
- peerArt = (PeerToPeerReviewArtifact) revArt1;
- } else {
- decArt = (DecisionReviewArtifact) revArt1;
- }
- }
- Assert.assertNotNull(peerArt);
- Assert.assertNotNull(decArt);
- testReviewContents(peerArt,
- "Auto-created Peer Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo",
- PeerToPeerReviewState.Prepare.getName(), "UnAssigned");
- testReviewContents(decArt,
- "Auto-created Decision Review from ruleId: atsAddDecisionReview.test.addDecisionReview.Analyze.None.TransitionTo",
- DecisionReviewState.Decision.getName(), "UnAssigned");
-
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoDatabaseTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoDatabaseTest.java
deleted file mode 100644
index b5b05d1b06..0000000000
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoDatabaseTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.client.integration.tests;
-
-import static org.junit.Assert.assertTrue;
-import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.demo.PopulateDemoActions;
-import org.eclipse.osee.ats.client.demo.PopulateDemoAgile;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.core.data.IdeClientSession;
-import org.eclipse.osee.framework.core.enums.DemoUsers;
-import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
-import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-
-/**
- * @author Donald G. Dunne
- */
-public class PopulateDemoDatabaseTest {
-
- @BeforeClass
- public static void setup() throws Exception {
- if (!DemoUtil.isDbInitSuccessful()) {
- throw new OseeStateException("DbInit must be successful to continue");
- }
- OseeProperties.setIsInTest(true);
- assertTrue("Demo Application Server must be running",
- ClientSessionManager.getAuthenticationProtocols().contains("demo"));
- RenderingUtil.setPopupsAllowed(false);
- DemoUtil.setPopulateDbSuccessful(false);
- }
-
- @org.junit.Test
- public void testPopulateDemoDb() {
- System.out.println("\nBegin Populate Demo DB...");
- try {
- ClientSessionManager.releaseSession();
- // Re-authenticate so we can continue
- IdeClientSession session = ClientSessionManager.getSession();
- UserManager.releaseUser();
-
- Assert.assertEquals("Must run populate as Joe Smith (3333)", DemoUsers.Joe_Smith.getUserId(),
- session.getUserId());
- Assert.assertEquals("Must run populate as Joe Smith (3333)", DemoUsers.Joe_Smith.getUserId(),
- UserManager.getUser().getUserId());
-
- PopulateDemoActions populateDemoActions = new PopulateDemoActions(null);
- populateDemoActions.run(false);
-
- PopulateDemoAgile populateDemoAgile = new PopulateDemoAgile();
- populateDemoAgile.run();
-
- DemoUtil.setPopulateDbSuccessful(true);
- System.out.println("End Populate Demo DB...\n");
- } catch (Exception ex) {
- Assert.fail(Lib.exceptionToString(ex));
- }
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/AtsTest_Ats_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/AtsTest_Ats_Suite.java
index 8eb0ebeabf..826d294d93 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/AtsTest_Ats_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/AtsTest_Ats_Suite.java
@@ -28,8 +28,6 @@ import org.eclipse.osee.ats.client.integration.tests.ats.util.AtsTest_Util_Suite
import org.eclipse.osee.ats.client.integration.tests.ats.version.AtsTest_Version_Search_Suite;
import org.eclipse.osee.ats.client.integration.tests.ats.workflow.AtsTest_Workflow_Suite;
import org.eclipse.osee.ats.client.integration.tests.ats.world.search.AtsTest_World_Search_Suite;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -58,14 +56,11 @@ import org.junit.runners.Suite;
AtsTest_Util_Suite.class,
AtsTest_Workflow_Suite.class,
AtsTest_World_Search_Suite.class,
- AtsTest_Version_Search_Suite.class,
-})
+ AtsTest_Version_Search_Suite.class,})
public class AtsTest_Ats_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Ats_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/DemoCountryConfigTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/DemoCountryConfigTest.java
deleted file mode 100644
index 45a9d7ced7..0000000000
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/DemoCountryConfigTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.client.integration.tests.ats;
-
-import java.util.List;
-import org.eclipse.osee.ats.api.country.JaxCountry;
-import org.eclipse.osee.ats.api.insertion.JaxInsertion;
-import org.eclipse.osee.ats.api.insertion.JaxInsertionActivity;
-import org.eclipse.osee.ats.api.program.JaxProgram;
-import org.eclipse.osee.ats.client.demo.DemoUtil;
-import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
-import org.eclipse.osee.ats.demo.api.DemoCountry;
-import org.eclipse.osee.ats.demo.api.DemoInsertion;
-import org.eclipse.osee.ats.demo.api.DemoInsertionActivity;
-import org.eclipse.osee.ats.demo.api.DemoProgram;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class DemoCountryConfigTest {
-
- @BeforeClass
- public static void validateDbInit() throws OseeCoreException {
- DemoUtil.checkDbInitAndPopulateSuccess();
- }
-
- @Test
- public void testCreateCountry() throws Exception {
- List<JaxCountry> countries = AtsClientService.getCountryEp().get();
- Assert.assertEquals(2, countries.size());
- }
-
- @Test
- public void testCreateProgram() throws Exception {
- List<JaxProgram> programs = AtsClientService.getProgramEp().get();
- Assert.assertEquals(5, programs.size());
- }
-
- @Test
- public void testCreateInsertion() throws Exception {
- List<JaxInsertion> insertions = AtsClientService.getInsertionEp().get();
- Assert.assertEquals(12, insertions.size());
- }
-
- @Test
- public void testCreateInsertionActivity() throws Exception {
- List<JaxInsertionActivity> insertionActivities = AtsClientService.getInsertionActivityEp().get();
- Assert.assertEquals(10, insertionActivities.size());
- }
-
- @Test
- public void testCreateSawConfig() throws Exception {
- List<JaxCountry> countries = AtsClientService.getCountryEp().get();
- JaxCountry usgCountry = null;
- for (JaxCountry country : countries) {
- if (country.getUuid().equals(DemoCountry.usg.getUuid())) {
- usgCountry = country;
- break;
- }
- }
- Assert.assertNotNull(usgCountry);
- Assert.assertEquals(DemoCountry.usg.getName(), usgCountry.getName());
- Assert.assertEquals(DemoCountry.usg.getDescription(), usgCountry.getDescription());
-
- List<JaxProgram> programs = AtsClientService.getCountryEp().getProgram(usgCountry.getUuid()).get();
- Assert.assertEquals(2, programs.size());
-
- JaxProgram sawProgram = null;
- for (JaxProgram program : programs) {
- if (program.getUuid().equals(DemoProgram.sawProgram.getUuid())) {
- sawProgram = program;
- break;
- }
- }
-
- Assert.assertNotNull(sawProgram);
- Assert.assertEquals(DemoProgram.sawProgram.getName(), sawProgram.getName());
-
- List<JaxInsertion> insertions = AtsClientService.getProgramEp().getInsertion(sawProgram.getUuid()).get();
- Assert.assertEquals(4, insertions.size());
-
- JaxInsertion sawCommInsertion = null;
- for (JaxInsertion insertion : insertions) {
- if (insertion.getUuid().equals(DemoInsertion.sawComm.getUuid())) {
- sawCommInsertion = insertion;
- break;
- }
- }
- Assert.assertNotNull(sawCommInsertion);
- Assert.assertEquals(DemoInsertion.sawComm.getName(), sawCommInsertion.getName());
- Assert.assertEquals(DemoInsertion.sawComm.getDescription(), sawCommInsertion.getDescription());
-
- List<JaxInsertionActivity> insertionActivities =
- AtsClientService.getInsertionEp().getInsertionActivity(sawCommInsertion.getUuid()).get();
- Assert.assertEquals(2, insertionActivities.size());
-
- JaxInsertionActivity commPageInsertionActivity = null;
- for (JaxInsertionActivity activity : insertionActivities) {
- if (activity.getUuid().equals(DemoInsertionActivity.commPage.getUuid())) {
- commPageInsertionActivity = activity;
- break;
- }
- }
- Assert.assertNotNull(commPageInsertionActivity);
- Assert.assertEquals(DemoInsertionActivity.commPage.getName(), commPageInsertionActivity.getName());
- Assert.assertEquals(DemoInsertionActivity.commPage.getDescription(), commPageInsertionActivity.getDescription());
- }
-}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsTest_Access_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsTest_Access_Suite.java
index 9cdef07b82..f761995a6a 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsTest_Access_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsTest_Access_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.access;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -25,9 +23,7 @@ import org.junit.runners.Suite;
public class AtsTest_Access_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Access_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/AtsTest_Action_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/AtsTest_Action_Suite.java
index 4420b6c87a..6ac60703e8 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/AtsTest_Action_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/AtsTest_Action_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.actions;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -62,9 +60,7 @@ import org.junit.runners.Suite;
public class AtsTest_Action_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Action_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AtsTest_Agile_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AtsTest_Agile_Suite.java
index 0570f7f5e8..a4bd477df5 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AtsTest_Agile_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AtsTest_Agile_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.agile;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -21,15 +19,13 @@ import org.junit.runners.Suite;
@Suite.SuiteClasses({AgileEndpointTest.class})
/**
* This test suite contains test that can be run against any production db
- *
+ *
* @author Donald G. Dunne
*/
public class AtsTest_Agile_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Agile_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/AtsTest_Column_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/AtsTest_Column_Suite.java
index 7e06feac25..1cab6ee009 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/AtsTest_Column_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/AtsTest_Column_Suite.java
@@ -10,10 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.column;
-import static org.junit.Assert.assertTrue;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -46,13 +42,7 @@ import org.junit.runners.Suite;
public class AtsTest_Column_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
- assertTrue("Demo Application Server must be running.",
- ClientSessionManager.getAuthenticationProtocols().contains("demo"));
- assertTrue("Client must authenticate using demo protocol",
- ClientSessionManager.getSession().getAuthenticationProtocol().equals("demo"));
System.out.println("\n\nBegin " + AtsTest_Column_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/GroupsColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/GroupsColumnTest.java
index 765bcaa6e4..de04738996 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/GroupsColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/GroupsColumnTest.java
@@ -31,11 +31,11 @@ public class GroupsColumnTest {
TeamWorkFlowArtifact reqArt =
(TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements);
- Assert.assertEquals("Test Group",
+ Assert.assertEquals("Demo Group",
GroupsColumn.getInstance().getColumnText(reqArt, GroupsColumn.getInstance(), 0));
Artifact actionArt = reqArt.getParentActionArtifact();
- Assert.assertEquals("Test Group",
+ Assert.assertEquals("Demo Group",
GroupsColumn.getInstance().getColumnText(actionArt, GroupsColumn.getInstance(), 0));
TestUtil.severeLoggingEnd(loggingMonitor);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsTest_Config_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsTest_Config_Suite.java
index e8dee2678c..fe9e36ff64 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsTest_Config_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsTest_Config_Suite.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.client.integration.tests.ats.config;
import org.eclipse.osee.ats.client.integration.tests.ats.config.copy.AtsTest_Demo_Copy_Suite;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -38,9 +36,7 @@ import org.junit.runners.Suite;
public class AtsTest_Config_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Config_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/AtsTest_Demo_Copy_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/AtsTest_Demo_Copy_Suite.java
index 672e3db7c3..359deab040 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/AtsTest_Demo_Copy_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/AtsTest_Demo_Copy_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.config.copy;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -30,9 +28,7 @@ public class AtsTest_Demo_Copy_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Demo_Copy_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsValidationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsValidationTest.java
index 08626f962d..811656c8b4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsValidationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsValidationTest.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.client.integration.tests.ats.config.copy;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.config.copy.ConfigData;
import org.eclipse.osee.ats.config.copy.CopyAtsValidation;
@@ -25,14 +26,14 @@ import org.junit.Test;
/**
* Test case for {@link CopyAtsValidation}
- *
+ *
* @author Donald G. Dunne
*/
public class CopyAtsValidationTest {
@BeforeClass
public static void setup() throws Exception {
- DemoTestUtil.setUpTest();
+ DemoUtil.checkDbInitAndPopulateSuccess();
}
@Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsCoreClient_Branch_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsCoreClient_Branch_Suite.java
index d5ae4b56a8..88cf4315dc 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsCoreClient_Branch_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsCoreClient_Branch_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.core.client.branch;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsCoreClient_Branch_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsCoreClient_Branch_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/AtsTest_DemoPopulateAndTest_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/AtsTest_DemoPopulateAndTest_Suite.java
new file mode 100644
index 0000000000..5922132c35
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/AtsTest_DemoPopulateAndTest_Suite.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import java.util.Collection;
+import java.util.logging.Level;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.framework.core.client.ClientSessionManager;
+import org.eclipse.osee.framework.core.data.IdeClientSession;
+import org.eclipse.osee.framework.core.enums.DemoUsers;
+import org.eclipse.osee.framework.core.util.Result;
+import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
+import org.eclipse.osee.framework.jdk.core.util.Lib;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.framework.ui.skynet.render.RenderingUtil;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * This suite runs each demo population and immediately tests what was created for validity.
+ *
+ * @author Donald G. Dunne
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ //
+ Pdd10SetupAndImportReqsTest.class,
+ //
+ Pdd20CreateCommittedActionTest.class,
+ Pdd21CreateUnCommittedActionTest.class,
+ Pdd22CreateUnCommittedConflictedActionTest.class,
+ Pdd23CreateNoBranchActionTest.class,
+ //
+ Pdd51CreateWorkaroundForGraphViewActionsTest.class,
+ Pdd52CreateWorkingWithDiagramTreeActionsTest.class,
+ //
+ Pdd80CreateButtonSDoesntWorkActionTest.class,
+ Pdd81CreateButtonWDoesntWorkActionTest.class,
+ Pdd82CreateCantLoadDiagramTreeActionTest.class,
+ Pdd83CreateCantSeeTheGraphViewActionTest.class,
+ Pdd84CreateProblemInDiagramTreeActionTest.class,
+ Pdd85CreateProblemWithTheGraphViewActionTest.class,
+ Pdd86CreateProblemWithTheUserWindowActionTest.class,
+ //
+ Pdd90CreateDemoTasksTest.class,
+ Pdd91CreateDemoGroupsTest.class,
+ Pdd92CreateDemoReviewsTest.class,
+ Pdd93CreateDemoAgileTest.class,
+ Pdd94CreateDemoFavoritesTest.class,
+ Pdd95CreateDemoWorkPackagesTest.class,
+ Pdd97CreateSawWorkTypesTest.class,
+ //
+})
+
+public class AtsTest_DemoPopulateAndTest_Suite {
+
+ @BeforeClass
+ public static void setup() throws Exception {
+ if (!DemoUtil.isDbInitSuccessful()) {
+ throw new OseeStateException("DbInit must be successful to continue");
+ }
+ OseeProperties.setIsInTest(true);
+ assertTrue("Demo Application Server must be running",
+ ClientSessionManager.getAuthenticationProtocols().contains("demo"));
+ RenderingUtil.setPopupsAllowed(false);
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ ClientSessionManager.releaseSession();
+ // Re-authenticate so we can continue
+ IdeClientSession session = ClientSessionManager.getSession();
+ UserManager.releaseUser();
+
+ Assert.assertEquals("Must run populate as Joe Smith (3333)", DemoUsers.Joe_Smith.getUserId(),
+ session.getUserId());
+ Assert.assertEquals("Must run populate as Joe Smith (3333)", DemoUsers.Joe_Smith.getUserId(),
+ UserManager.getUser().getUserId());
+
+ validateArtifactCache();
+
+ OseeLog.log(AtsTest_DemoPopulateAndTest_Suite.class, Level.SEVERE, "\nBegin Populate Demo DB...");
+ }
+
+ private static void validateArtifactCache() throws OseeStateException {
+ final Collection<Artifact> list = ArtifactCache.getDirtyArtifacts();
+ if (!list.isEmpty()) {
+ for (Artifact artifact : list) {
+ OseeLog.log(AtsTest_DemoPopulateAndTest_Suite.class, Level.SEVERE, String.format(
+ "Artifact [%s] is dirty [%s]", artifact.toStringWithId(), Artifacts.getDirtyReport(artifact)));
+ }
+ throw new OseeStateException("[%d] Dirty Artifacts found after populate (see console for details)",
+ list.size());
+ }
+
+ }
+
+ @AfterClass
+ public static void testPopulateDemoDb() {
+ try {
+ // This test should only be run on test db
+ assertFalse(AtsUtil.isProductionDb());
+ // Confirm test setup with demo data
+ Result result = DemoUtil.isDbPopulatedWithDemoData();
+ assertTrue(result.getText(), result.isTrue());
+ // Confirm user is Joe Smith
+ assertTrue("User \"3333\" does not exist in DB. Run Demo DBInit prior to this test.",
+ UserManager.getUserByUserId("3333") != null);
+ // Confirm user is Joe Smith
+ assertTrue(
+ "Authenticated user should be \"3333\" and is not. Check that Demo Application Server is being run.",
+ AtsClientService.get().getUserService().getCurrentUser().getUserId().equals("3333"));
+ System.out.println("End Populate Demo DB...\n");
+ } catch (Exception ex) {
+ Assert.fail(Lib.exceptionToString(ex));
+ }
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/IPopulateDemoDatabaseTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/IPopulateDemoDatabaseTest.java
new file mode 100644
index 0000000000..2f0fbfdb4c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/IPopulateDemoDatabaseTest.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import java.util.Collection;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.core.client.review.AbstractReviewArtifact;
+import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
+import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
+import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
+import org.eclipse.osee.ats.core.client.review.ReviewManager;
+import org.eclipse.osee.ats.core.client.task.TaskArtifact;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.util.AtsObjects;
+import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.junit.Assert;
+import org.junit.Test;
+
+public interface IPopulateDemoDatabaseTest {
+
+ @Test
+ public default void testPopulate() {
+ Assert.assertTrue(true);
+ }
+
+ default void testTaskContents(TaskArtifact task, String currentStateName, String relatedToState) throws OseeCoreException {
+ Assert.assertEquals(currentStateName, task.getCurrentStateName());
+ Assert.assertEquals(relatedToState, task.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, ""));
+ }
+
+ default void testReviewContents(IAtsAbstractReview review, String title, String currentStateName, String... assigneeStrs) throws OseeCoreException {
+ Assert.assertEquals(title, review.getName());
+ Assert.assertEquals(currentStateName, review.getStateMgr().getCurrentStateName());
+
+ Collection<String> assigneeNames = AtsObjects.getNames(review.getStateMgr().getAssignees());
+
+ Assert.assertEquals(assigneeStrs.length, assigneeNames.size());
+ for (String assignee : assigneeStrs) {
+ if (!assigneeNames.contains(assignee)) {
+ Assert.fail(String.format("revArt.getStateMgr().getAssignees(), does not contain user: %s", assignee));
+ }
+ }
+ }
+
+ default void testTeamContents(IAtsTeamWorkflow teamWf, String title, String priority, String versionName, String currentStateName, String actionableItemStr, String assigneeStr, IArtifactType artifactType, IAtsTeamDefinition teamDef) throws OseeCoreException {
+ Assert.assertEquals(currentStateName, teamWf.getStateMgr().getCurrentStateName());
+ Assert.assertEquals(priority, AtsClientService.get().getAttributeResolver().getSoleAttributeValue(teamWf,
+ AtsAttributeTypes.PriorityType, ""));
+ // want targeted version, not error/exception
+ String targetedVerStr = "";
+ IAtsVersion version = AtsClientService.get().getVersionService().getTargetedVersion(teamWf);
+ if (version != null) {
+ targetedVerStr = version.getName();
+ }
+ Assert.assertEquals(versionName, targetedVerStr);
+ Assert.assertEquals(artifactType, teamWf.getArtifactType());
+ Assert.assertEquals(teamDef, teamWf.getTeamDefinition());
+ Assert.assertEquals(assigneeStr, teamWf.getStateMgr().getAssigneesStr());
+ Assert.assertEquals(actionableItemStr,
+ AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItemsStr(teamWf));
+ }
+
+ default void testSwDesign1PeerAnd1DecisionReview(TeamWorkFlowArtifact designTeam) throws OseeCoreException {
+ Assert.assertNotNull(designTeam);
+ PeerToPeerReviewArtifact peerArt = null;
+ DecisionReviewArtifact decArt = null;
+ for (AbstractReviewArtifact revArt1 : ReviewManager.getReviews(designTeam)) {
+ if (revArt1.getName().contains("PeerToPeer")) {
+ peerArt = (PeerToPeerReviewArtifact) revArt1;
+ } else {
+ decArt = (DecisionReviewArtifact) revArt1;
+ }
+ }
+ Assert.assertNotNull(peerArt);
+ Assert.assertNotNull(decArt);
+ testReviewContents(peerArt,
+ "Auto-created Peer Review from ruleId atsAddPeerToPeerReview.test.addPeerToPeerReview.Authorize.None.TransitionTo",
+ PeerToPeerReviewState.Prepare.getName(), "UnAssigned");
+ testReviewContents(decArt,
+ "Auto-created Decision Review from ruleId: atsAddDecisionReview.test.addDecisionReview.Analyze.None.TransitionTo",
+ DecisionReviewState.Decision.getName(), "UnAssigned");
+
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd10SetupAndImportReqsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd10SetupAndImportReqsTest.java
new file mode 100644
index 0000000000..3fce7208b3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd10SetupAndImportReqsTest.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd10SetupAndImportReqs;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd10SetupAndImportReqsTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void setupAndImportRequirements() {
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd10SetupAndImportReqs create = new Pdd10SetupAndImportReqs();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd20CreateCommittedActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd20CreateCommittedActionTest.java
new file mode 100644
index 0000000000..937cc04c0b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd20CreateCommittedActionTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd20CreateCommittedAction;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd20CreateCommittedActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd20CreateCommittedAction create = new Pdd20CreateCommittedAction();
+ create.run();
+
+ Assert.assertEquals(3, DemoUtil.getSawCommittedTeamWfs().size());
+
+ TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeCommittedWf();
+ Assert.assertNotNull(codeTeamArt);
+ TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestCommittedWf();
+ Assert.assertNotNull(testTeamArt);
+ TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqCommittedWf();
+ Assert.assertNotNull(reqTeamArt);
+
+ testTeamContents(codeTeamArt, DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "1",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code", "Joe Smith",
+ DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
+ testTeamContents(testTeamArt, DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "1",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test", "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
+ testTeamContents(reqTeamArt, DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "1",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements", "Joe Smith",
+ DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd21CreateUnCommittedActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd21CreateUnCommittedActionTest.java
new file mode 100644
index 0000000000..4bbbb2b5cc
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd21CreateUnCommittedActionTest.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
+import java.util.Collection;
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd21CreateUnCommittedAction;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd21CreateUnCommittedActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd21CreateUnCommittedAction create = new Pdd21CreateUnCommittedAction();
+ create.run();
+
+ Collection<TeamWorkFlowArtifact> sawUnCommittedTeamWfs = DemoUtil.getSawUnCommittedTeamWfs();
+ Assert.assertEquals(4, sawUnCommittedTeamWfs.size());
+
+ TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeUnCommittedWf();
+ Assert.assertNotNull(codeTeamArt);
+ TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestUnCommittedWf();
+ Assert.assertNotNull(testTeamArt);
+ TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqUnCommittedWf();
+ Assert.assertNotNull(reqTeamArt);
+ TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignUnCommittedWf();
+ Assert.assertNotNull(designTeamArt);
+
+ testTeamContents(codeTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code", "Joe Smith",
+ DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
+ testTeamContents(testTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test", "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
+ testTeamContents(reqTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements", "Joe Smith",
+ DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+ testTeamContents(designTeamArt, DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, "3",
+ SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design", "Kay Jones",
+ AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd22CreateUnCommittedConflictedActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd22CreateUnCommittedConflictedActionTest.java
new file mode 100644
index 0000000000..8e173a69bd
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd22CreateUnCommittedConflictedActionTest.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd22CreateUnCommittedConflictedAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd22CreateUnCommittedConflictedActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd22CreateUnCommittedConflictedAction create = new Pdd22CreateUnCommittedConflictedAction();
+ create.run();
+
+ String title = DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.SAW_UnCommitedConflicted_Req_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements",
+ "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd23CreateNoBranchActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd23CreateNoBranchActionTest.java
new file mode 100644
index 0000000000..6b94679322
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd23CreateNoBranchActionTest.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_2;
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd23CreateNoBranchAction;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.ats.demo.api.DemoWorkflowTitles;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd23CreateNoBranchActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd23CreateNoBranchAction create = new Pdd23CreateNoBranchAction();
+ create.run();
+
+ String title = DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW;
+
+ TeamWorkFlowArtifact codeTeamArt = DemoUtil.getSawCodeNoBranchWf();
+ Assert.assertNotNull(codeTeamArt);
+ TeamWorkFlowArtifact testTeamArt = DemoUtil.getSawTestNoBranchWf();
+ Assert.assertNotNull(testTeamArt);
+ TeamWorkFlowArtifact reqTeamArt = DemoUtil.getSawReqNoBranchWf();
+ Assert.assertNotNull(reqTeamArt);
+ TeamWorkFlowArtifact designTeamArt = DemoUtil.getSawSWDesignNoBranchWf();
+ Assert.assertNotNull(designTeamArt);
+
+ testTeamContents(codeTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Code",
+ "Joe Smith", DemoArtifactTypes.DemoCodeTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Code));
+ testTeamContents(testTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Test",
+ "Kay Jones", DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Test));
+ testTeamContents(reqTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW Requirements",
+ "Joe Smith", DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_Requirements));
+ testTeamContents(designTeamArt, title, "3", SAW_Bld_2.getName(), TeamState.Implement.getName(), "SAW SW Design",
+ "Kay Jones", AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
+
+ // test sw_design 1 peer and 1 decision review
+ testSwDesign1PeerAnd1DecisionReview(designTeamArt);
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd51CreateWorkaroundForGraphViewActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd51CreateWorkaroundForGraphViewActionsTest.java
new file mode 100644
index 0000000000..7b2df46ab3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd51CreateWorkaroundForGraphViewActionsTest.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd51CreateWorkaroundForGraphViewActions;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd51CreateWorkaroundForGraphViewActionsTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd51CreateWorkaroundForGraphViewActions create = new Pdd51CreateWorkaroundForGraphViewActions();
+ create.run();
+
+ for (ArtifactToken version : create.getVersionToWorkflowToken().keySet()) {
+ ArtifactToken teamWfArtToken = create.getVersionToWorkflowToken().get(version);
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(teamWfArtToken);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, teamWfArtToken.getName(), "1", version.getName(), getState(version).getName(),
+ DemoArtifactToken.Adapter_AI.getName(), getAssignees(version), DemoArtifactTypes.DemoReqTeamWorkflow,
+ DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
+ }
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+ private String getAssignees(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? "" : "Jason Michael";
+ }
+
+ private TeamState getState(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? TeamState.Completed : TeamState.Implement;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd52CreateWorkingWithDiagramTreeActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd52CreateWorkingWithDiagramTreeActionsTest.java
new file mode 100644
index 0000000000..0ea7360c0a
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd52CreateWorkingWithDiagramTreeActionsTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd52CreateWorkingWithDiagramTreeActions;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd52CreateWorkingWithDiagramTreeActionsTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd52CreateWorkingWithDiagramTreeActions create = new Pdd52CreateWorkingWithDiagramTreeActions();
+ create.run();
+
+ for (ArtifactToken version : create.getVersionToWorkflowToken().keySet()) {
+ ArtifactToken teamWfArtToken = create.getVersionToWorkflowToken().get(version);
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(teamWfArtToken);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, teamWfArtToken.getName(), "3", version.getName(), getState(version).getName(),
+ DemoArtifactToken.SAW_SW_Design_AI.getName(), getAssigneesStr(version), getArtifactType(),
+ DemoTestUtil.getTeamDef(DemoTeam.SAW_SW_Design));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+ }
+
+ private String getAssigneesStr(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? "" : "Kay Jones";
+ }
+
+ private IArtifactType getArtifactType() {
+ return AtsArtifactTypes.TeamWorkflow;
+ }
+
+ private TeamState getState(ArtifactToken version) {
+ return version.equals(DemoArtifactToken.SAW_Bld_1) ? TeamState.Completed : TeamState.Implement;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd80CreateButtonSDoesntWorkActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd80CreateButtonSDoesntWorkActionTest.java
new file mode 100644
index 0000000000..9ead59e4b0
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd80CreateButtonSDoesntWorkActionTest.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd80CreateButtonSDoesntWorkAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd80CreateButtonSDoesntWorkActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd80CreateButtonSDoesntWorkAction create = new Pdd80CreateButtonSDoesntWorkAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.ButtonSDoesntWorkOnHelp_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.ButtonSDoesntWorkOnHelp_TeamWf.getName(), "3", "",
+ TeamState.Completed.getName(), DemoArtifactToken.Reader_AI.getName(), "", AtsArtifactTypes.TeamWorkflow,
+ DemoTestUtil.getTeamDef(DemoTeam.Tools_Team));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd81CreateButtonWDoesntWorkActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd81CreateButtonWDoesntWorkActionTest.java
new file mode 100644
index 0000000000..5572d6a9bd
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd81CreateButtonWDoesntWorkActionTest.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd81CreateButtonWDoesntWorkAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd81CreateButtonWDoesntWorkActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd81CreateButtonWDoesntWorkAction create = new Pdd81CreateButtonWDoesntWorkAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf =
+ AtsClientService.get().getTeamWf(DemoArtifactToken.ButtonWDoesntWorkOnSituationPage_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.ButtonWDoesntWorkOnSituationPage_TeamWf.getName(), "3", "",
+ TeamState.Analyze.getName(), DemoArtifactToken.CIS_Test_AI.getName(), "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd82CreateCantLoadDiagramTreeActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd82CreateCantLoadDiagramTreeActionTest.java
new file mode 100644
index 0000000000..bcd1457619
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd82CreateCantLoadDiagramTreeActionTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd82CreateCantLoadDiagramTreeAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd82CreateCantLoadDiagramTreeActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd82CreateCantLoadDiagramTreeAction create = new Pdd82CreateCantLoadDiagramTreeAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.CantLoadDiagramTree_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.CantLoadDiagramTree_TeamWf.getName(), "3", "",
+ TeamState.Endorse.getName(), DemoArtifactToken.CIS_Test_AI.getName(), "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd83CreateCantSeeTheGraphViewActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd83CreateCantSeeTheGraphViewActionTest.java
new file mode 100644
index 0000000000..8bf3b8300b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd83CreateCantSeeTheGraphViewActionTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd83CreateCantSeeTheGraphViewAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd83CreateCantSeeTheGraphViewActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd83CreateCantSeeTheGraphViewAction create = new Pdd83CreateCantSeeTheGraphViewAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.CantSeeTheGraphView_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.CantSeeTheGraphView_TeamWf.getName(), "1", "",
+ TeamState.Implement.getName(), DemoArtifactToken.Adapter_AI.getName(), "Jason Michael",
+ DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd84CreateProblemInDiagramTreeActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd84CreateProblemInDiagramTreeActionTest.java
new file mode 100644
index 0000000000..1f086bf7b7
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd84CreateProblemInDiagramTreeActionTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd84CreateProblemInDiagramTreeAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd84CreateProblemInDiagramTreeActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd84CreateProblemInDiagramTreeAction create = new Pdd84CreateProblemInDiagramTreeAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.ProblemInDiagramTree_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.ProblemInDiagramTree_TeamWf.getName(), "3", "",
+ TeamState.Endorse.getName(), DemoArtifactToken.CIS_Test_AI.getName(), "Kay Jones",
+ DemoArtifactTypes.DemoTestTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.CIS_Test));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd85CreateProblemWithTheGraphViewActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd85CreateProblemWithTheGraphViewActionTest.java
new file mode 100644
index 0000000000..f6499b850d
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd85CreateProblemWithTheGraphViewActionTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd85CreateProblemWithTheGraphViewAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd85CreateProblemWithTheGraphViewActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd85CreateProblemWithTheGraphViewAction create = new Pdd85CreateProblemWithTheGraphViewAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.ProblemWithTheGraphView_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.ProblemWithTheGraphView_TeamWf.getName(), "1", "",
+ TeamState.Implement.getName(), DemoArtifactToken.Adapter_AI.getName(), "Jason Michael",
+ DemoArtifactTypes.DemoReqTeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.SAW_HW));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd86CreateProblemWithTheUserWindowActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd86CreateProblemWithTheUserWindowActionTest.java
new file mode 100644
index 0000000000..d8cfa6b2c8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd86CreateProblemWithTheUserWindowActionTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd86CreateProblemWithTheUserWindowAction;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.ats.demo.api.DemoTeam;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd86CreateProblemWithTheUserWindowActionTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd86CreateProblemWithTheUserWindowAction create = new Pdd86CreateProblemWithTheUserWindowAction();
+ create.run();
+
+ IAtsTeamWorkflow teamWf = AtsClientService.get().getTeamWf(DemoArtifactToken.ProblemWithTheUserWindow_TeamWf);
+ Assert.assertNotNull(teamWf);
+
+ testTeamContents(teamWf, DemoArtifactToken.ProblemWithTheUserWindow_TeamWf.getName(), "4", "",
+ TeamState.Implement.getName(), DemoArtifactToken.Timesheet_AI.getName(), "Jeffery Kay",
+ AtsArtifactTypes.TeamWorkflow, DemoTestUtil.getTeamDef(DemoTeam.Tools_Team));
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java
new file mode 100644
index 0000000000..d3df080f04
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd90CreateDemoTasks;
+import org.eclipse.osee.ats.core.client.task.TaskArtifact;
+import org.eclipse.osee.ats.core.client.task.TaskStates;
+import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.core.workflow.state.TeamState;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd90CreateDemoTasksTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd90CreateDemoTasks create = new Pdd90CreateDemoTasks();
+ create.run();
+
+ TeamWorkFlowArtifact teamWf = DemoUtil.getSawCodeCommittedWf();
+ List<String> taskNames = new LinkedList<String>();
+ taskNames.addAll(DemoUtil.Saw_Code_Committed_Task_Titles);
+ for (TaskArtifact task : teamWf.getTaskArtifacts()) {
+ testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName());
+ taskNames.remove(task.getName());
+ Assert.assertEquals("Joe Smith; Kay Jones", task.getStateMgr().getAssigneesStr());
+ }
+ if (!taskNames.isEmpty()) {
+ Assert.assertEquals(String.format("Not all tasks exist. [%s] remain", taskNames), taskNames.size(),
+ teamWf.getTaskArtifacts());
+ }
+
+ teamWf = DemoUtil.getSawCodeUnCommittedWf();
+ taskNames.clear();
+ taskNames.addAll(DemoUtil.Saw_Code_UnCommitted_Task_Titles);
+ for (TaskArtifact task : teamWf.getTaskArtifacts()) {
+ testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName());
+ taskNames.remove(task.getName());
+ Assert.assertEquals("Joe Smith", task.getStateMgr().getAssigneesStr());
+ }
+ if (!taskNames.isEmpty()) {
+ Assert.assertEquals(String.format("Not all tasks exist. [%s] remain", taskNames), taskNames.size(),
+ teamWf.getTaskArtifacts());
+ }
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd91CreateDemoGroupsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd91CreateDemoGroupsTest.java
new file mode 100644
index 0000000000..d559f834b8
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd91CreateDemoGroupsTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd91CreateDemoGroups;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd91CreateDemoGroupsTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd91CreateDemoGroups create = new Pdd91CreateDemoGroups();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd92CreateDemoReviewsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd92CreateDemoReviewsTest.java
new file mode 100644
index 0000000000..f14762c032
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd92CreateDemoReviewsTest.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import java.util.Collection;
+import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd92CreateDemoReviews;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.core.client.review.DecisionReviewState;
+import org.eclipse.osee.ats.core.client.review.PeerToPeerReviewState;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd92CreateDemoReviewsTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd92CreateDemoReviews create = new Pdd92CreateDemoReviews();
+ create.run();
+
+ // test decision review 1
+ IAtsTeamWorkflow teamWf = DemoUtil.getButtonWDoesntWorkOnSituationPageWf();
+ Collection<IAtsAbstractReview> reviews = AtsClientService.get().getReviewService().getReviews(teamWf);
+ Assert.assertEquals("Should only 1 review", 1, reviews.size());
+ IAtsAbstractReview review = reviews.iterator().next();
+ testReviewContents(review, "Is the resolution of this Action valid?", DecisionReviewState.Followup.getName(),
+ "Joe Smith");
+
+ // test decision review2
+ IAtsTeamWorkflow teamWf1 = DemoUtil.getProblemInDiagramTree_TeamWfWf();
+ Collection<IAtsAbstractReview> reviews1 = AtsClientService.get().getReviewService().getReviews(teamWf1);
+ Assert.assertEquals("Should only 1 review", 1, reviews.size());
+ IAtsAbstractReview review1 = reviews1.iterator().next();
+ testReviewContents(review1, "Is the resolution of this Action valid?", DecisionReviewState.Completed.getName());
+
+ // test peer reviews reviews
+ IAtsTeamWorkflow teamWf3 = DemoUtil.getSawCodeCommittedWf();
+ Collection<IAtsAbstractReview> reviews3 = AtsClientService.get().getReviewService().getReviews(teamWf3);
+ Assert.assertEquals("Should only be two reviews", 2, reviews3.size());
+ IAtsAbstractReview rev1 = null;
+ IAtsAbstractReview rev2 = null;
+ for (IAtsAbstractReview revArt : reviews3) {
+ if (revArt.getName().contains("algorithm")) {
+ rev1 = revArt;
+ } else {
+ rev2 = revArt;
+ }
+ }
+ Assert.assertNotNull(rev1);
+ Assert.assertNotNull(rev2);
+ testReviewContents(rev1, "Peer Review algorithm used in code", PeerToPeerReviewState.Review.getName(),
+ new String[] {"Joe Smith", "Kay Jones"});
+ testReviewContents(rev2, "Peer Review first set of code changes", PeerToPeerReviewState.Prepare.getName(),
+ "Joe Smith");
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd93CreateDemoAgileTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd93CreateDemoAgileTest.java
new file mode 100644
index 0000000000..e8c75df719
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd93CreateDemoAgileTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd93CreateDemoAgile;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd93CreateDemoAgileTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd93CreateDemoAgile create = new Pdd93CreateDemoAgile();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd94CreateDemoFavoritesTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd94CreateDemoFavoritesTest.java
new file mode 100644
index 0000000000..671d2d45d2
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd94CreateDemoFavoritesTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd94CreateDemoFavorites;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd94CreateDemoFavoritesTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd94CreateDemoFavorites create = new Pdd94CreateDemoFavorites();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd95CreateDemoWorkPackagesTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd95CreateDemoWorkPackagesTest.java
new file mode 100644
index 0000000000..0245467e11
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd95CreateDemoWorkPackagesTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd95CreateDemoEVConfigAndWorkPackages;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd95CreateDemoWorkPackagesTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd95CreateDemoEVConfigAndWorkPackages create = new Pdd95CreateDemoEVConfigAndWorkPackages();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd97CreateSawWorkTypesTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd97CreateSawWorkTypesTest.java
new file mode 100644
index 0000000000..1c957f125c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd97CreateSawWorkTypesTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.client.integration.tests.ats.demo;
+
+import org.eclipse.osee.ats.client.demo.DemoUtil;
+import org.eclipse.osee.ats.client.demo.populate.Pdd97CreateDemoSawWorkTypes;
+import org.junit.Test;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class Pdd97CreateSawWorkTypesTest implements IPopulateDemoDatabaseTest {
+
+ @Test
+ public void testAction() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ DemoUtil.setPopulateDbSuccessful(false);
+
+ Pdd97CreateDemoSawWorkTypes create = new Pdd97CreateDemoSawWorkTypes();
+ create.run();
+
+ DemoUtil.setPopulateDbSuccessful(true);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/dialog/AtsTest_Dialog_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/dialog/AtsTest_Dialog_Suite.java
index d818c339b0..428a606fef 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/dialog/AtsTest_Dialog_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/dialog/AtsTest_Dialog_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.dialog;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -34,9 +32,7 @@ public class AtsTest_Dialog_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Dialog_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/AtsTest_Editor_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/AtsTest_Editor_Suite.java
index ae6a73d632..df97dcc9a4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/AtsTest_Editor_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/AtsTest_Editor_Suite.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.client.integration.tests.ats.editor;
import org.eclipse.osee.ats.client.integration.tests.ats.editor.stateItem.AtsTest_Demo_StateItem_Suite;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -31,9 +29,7 @@ public class AtsTest_Editor_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Editor_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsTest_Demo_StateItem_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsTest_Demo_StateItem_Suite.java
index ce1dc2ebb9..ed20ad145e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsTest_Demo_StateItem_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/editor/stateItem/AtsTest_Demo_StateItem_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.editor.stateItem;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,15 +24,13 @@ import org.junit.runners.Suite;
AtsPeerToPeerReviewReviewStateItemTest.class})
/**
* This test suite contains tests that must be run against demo database
- *
+ *
* @author Donald G. Dunne
*/
public class AtsTest_Demo_StateItem_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Demo_StateItem_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/export/AtsTest_Export_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/export/AtsTest_Export_Suite.java
index afc1b7aeed..338814929e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/export/AtsTest_Export_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/export/AtsTest_Export_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.export;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsTest_Export_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Export_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/health/AtsTest_Health_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/health/AtsTest_Health_Suite.java
index 001067db6a..cf5439d200 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/health/AtsTest_Health_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/health/AtsTest_Health_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.health;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsTest_Health_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Health_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsTest_Navigate_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsTest_Navigate_Suite.java
index 5d3aa86bdc..d0f85ab53f 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsTest_Navigate_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsTest_Navigate_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.navigate;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsTest_Navigate_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Navigate_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/operation/AtsTest_Operation_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/operation/AtsTest_Operation_Suite.java
index 58a4d86d25..045814bd61 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/operation/AtsTest_Operation_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/operation/AtsTest_Operation_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.operation;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsTest_Operation_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Operation_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/AtsTest_Renderer_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/AtsTest_Renderer_Suite.java
index 250c41101c..b53a12509a 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/AtsTest_Renderer_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/AtsTest_Renderer_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.render;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -26,9 +24,7 @@ public class AtsTest_Renderer_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Renderer_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
index 9cdbc7c35b..709b64cadd 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsActionEndpointImplTest.java
@@ -70,7 +70,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest {
@Test
public void testQueryWorking() throws Exception {
- queryAndConfirmCount("ats/action/query?StateType=Working", 42);
+ queryAndConfirmCount("ats/action/query?StateType=Working", 52);
}
@Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsTest_Resource_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsTest_Resource_Suite.java
index 9ca5337a51..d04a7c4c68 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsTest_Resource_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsTest_Resource_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.resource;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -35,9 +33,7 @@ import org.junit.runners.Suite;
public class AtsTest_Resource_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Resource_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
index 5085adb126..524f76d152 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java
@@ -26,7 +26,6 @@ import org.eclipse.osee.ats.api.workflow.ActionResult;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.ats.core.client.AtsTestUtil;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.core.client.review.DecisionReviewArtifact;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
@@ -63,7 +62,6 @@ public class AtsDeleteManagerTest {
@BeforeClass
public static void testCleanupPre() throws Exception {
- DemoTestUtil.setUpTest();
cleanup();
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsTest_Util_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsTest_Util_Suite.java
index a63af62b93..6f17161728 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsTest_Util_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsTest_Util_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.util;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -34,9 +32,7 @@ import org.junit.runners.Suite;
public class AtsTest_Util_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Util_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/version/AtsTest_Version_Search_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/version/AtsTest_Version_Search_Suite.java
index 20d80ef747..54a3e9a6b6 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/version/AtsTest_Version_Search_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/version/AtsTest_Version_Search_Suite.java
@@ -10,10 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.version;
-import static org.junit.Assert.assertTrue;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -27,13 +23,7 @@ import org.junit.runners.Suite;
public class AtsTest_Version_Search_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
- assertTrue("Demo Application Server must be running.",
- ClientSessionManager.getAuthenticationProtocols().contains("demo"));
- assertTrue("Client must authenticate using demo protocol",
- ClientSessionManager.getSession().getAuthenticationProtocol().equals("demo"));
System.out.println("\n\nBegin " + AtsTest_Version_Search_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsTest_Workflow_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsTest_Workflow_Suite.java
index 16ad0d5d59..e4251d829c 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsTest_Workflow_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsTest_Workflow_Suite.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.client.integration.tests.ats.workflow;
import org.eclipse.osee.ats.client.integration.tests.ats.workflow.util.AtsTest_WorkflowUtil_Suite;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -35,9 +33,7 @@ public class AtsTest_Workflow_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_Workflow_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/util/AtsTest_WorkflowUtil_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/util/AtsTest_WorkflowUtil_Suite.java
index 9a3c11242b..4ab5a3f4f3 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/util/AtsTest_WorkflowUtil_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/util/AtsTest_WorkflowUtil_Suite.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.workflow.util;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -29,9 +27,7 @@ public class AtsTest_WorkflowUtil_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
System.out.println("\n\nBegin " + AtsTest_WorkflowUtil_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
index c0a41d0883..c111662117 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsQueryImplTest.java
@@ -116,12 +116,12 @@ public class AtsQueryImplTest {
query = queryService.createQuery(WorkItemType.WorkItem);
query.isOfType(WorkItemType.PeerReview);
query.andState("Prepare");
- assertEquals(1, query.getResults().size());
+ assertEquals(6, query.getResults().size());
// by state type
query = queryService.createQuery(WorkItemType.WorkItem);
query.andStateType(StateType.Working);
- assertEquals(42, query.getResults().size());
+ assertEquals(52, query.getResults().size());
query = queryService.createQuery(WorkItemType.TeamWorkflow);
query.andStateType(StateType.Working);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsTest_World_Search_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsTest_World_Search_Suite.java
index 4709c740d2..e13458a9d2 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsTest_World_Search_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/AtsTest_World_Search_Suite.java
@@ -10,10 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.ats.world.search;
-import static org.junit.Assert.assertTrue;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -39,13 +35,7 @@ import org.junit.runners.Suite;
public class AtsTest_World_Search_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
- assertTrue("Demo Application Server must be running.",
- ClientSessionManager.getAuthenticationProtocols().contains("demo"));
- assertTrue("Client must authenticate using demo protocol",
- ClientSessionManager.getSession().getAuthenticationProtocol().equals("demo"));
System.out.println("\n\nBegin " + AtsTest_World_Search_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
index f6de278910..50814cd3ab 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/world/search/ShowOpenWorkflowsByArtifactTypeTest.java
@@ -21,7 +21,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Open " + WorkItemType.DecisionReview.name() + "s",
WorkItemType.DecisionReview, false, false, AtsImage.DECISION_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(2, AtsArtifactTypes.DecisionReview, results);
+ checkResults(7, AtsArtifactTypes.DecisionReview, results);
}
@org.junit.Test
@@ -30,7 +30,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Workflows Waiting " + WorkItemType.DecisionReview.name() + "s",
WorkItemType.DecisionReview, false, true, AtsImage.DECISION_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(2, AtsArtifactTypes.TeamWorkflow, results);
+ checkResults(7, AtsArtifactTypes.TeamWorkflow, results);
}
@org.junit.Test
@@ -39,7 +39,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Open " + WorkItemType.PeerReview.name() + "s", WorkItemType.PeerReview,
false, false, AtsImage.PEER_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(2, AtsArtifactTypes.PeerToPeerReview, results);
+ checkResults(7, AtsArtifactTypes.PeerToPeerReview, results);
}
@org.junit.Test
@@ -48,7 +48,7 @@ public class ShowOpenWorkflowsByArtifactTypeTest {
new ShowOpenWorkflowsByReviewType("Show Workflows Waiting " + WorkItemType.PeerReview.name() + "s",
WorkItemType.PeerReview, false, true, AtsImage.PEER_REVIEW);
Collection<Artifact> results = search.performSearchGetResults();
- checkResults(1, AtsArtifactTypes.TeamWorkflow, results);
+ checkResults(6, AtsArtifactTypes.TeamWorkflow, results);
}
private void checkResults(int expectedCount, IArtifactType ofType, Collection<Artifact> results) {
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/skynet/core/artifact/SkyentCoreArtifact_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/skynet/core/artifact/SkyentCoreArtifact_Suite.java
index 6b468633e8..6718a8ab03 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/skynet/core/artifact/SkyentCoreArtifact_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/skynet/core/artifact/SkyentCoreArtifact_Suite.java
@@ -10,8 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.framework.skynet.core.artifact;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -28,9 +27,8 @@ public class SkyentCoreArtifact_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
+ DemoUtil.checkDbInitAndPopulateSuccess();
System.out.println("\n\nBegin " + SkyentCoreArtifact_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java
index 0bb100654b..1a46569fcc 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java
@@ -10,8 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.framework.ui.skynet;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -28,9 +27,8 @@ public class FrameworkUiSkynetTest_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
+ DemoUtil.checkDbInitAndPopulateSuccess();
System.out.println("\n\nBegin " + FrameworkUiSkynetTest_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/FrameworkUiSkynetTest_Dialog_Suite.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/FrameworkUiSkynetTest_Dialog_Suite.java
index 1b39fe4139..02ddc9ffc8 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/FrameworkUiSkynetTest_Dialog_Suite.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/FrameworkUiSkynetTest_Dialog_Suite.java
@@ -10,8 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.client.integration.tests.framework.ui.skynet.dialog;
-import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
-import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -30,9 +29,8 @@ public class FrameworkUiSkynetTest_Dialog_Suite {
@BeforeClass
public static void setUp() throws Exception {
- OseeProperties.setIsInTest(true);
+ DemoUtil.checkDbInitAndPopulateSuccess();
System.out.println("\n\nBegin " + FrameworkUiSkynetTest_Dialog_Suite.class.getSimpleName());
- DemoTestUtil.setUpTest();
}
@AfterClass
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/orcs/rest/ClientEndpointTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/orcs/rest/ClientEndpointTest.java
index ebbc8b46ea..3908e50f79 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/orcs/rest/ClientEndpointTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/orcs/rest/ClientEndpointTest.java
@@ -14,12 +14,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.Collection;
import javax.ws.rs.core.Response;
+import org.eclipse.osee.ats.client.demo.DemoUtil;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.framework.core.enums.DemoUsers;
import org.eclipse.osee.framework.server.ide.api.client.ClientEndpoint;
import org.eclipse.osee.framework.server.ide.api.client.model.Sessions;
import org.eclipse.osee.framework.server.ide.api.model.IdeVersion;
import org.junit.Assert;
+import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -30,6 +32,12 @@ import org.junit.Test;
*/
public class ClientEndpointTest {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ DemoUtil.checkDbInitAndPopulateSuccess();
+ System.out.println("\n\nBegin " + ClientEndpointTest.class.getSimpleName());
+ }
+
@Test
public void testGetAll() {
ClientEndpoint clientEp = AtsClientService.get().getOseeClient().getClientEndpoint();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DbInitTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DbInitTest.java
index 9e71562f02..8f393c4b01 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DbInitTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DbInitTest.java
@@ -43,6 +43,7 @@ public class DbInitTest {
@org.junit.Test
public void testDbInit() throws Exception {
+ OseeProperties.setIsInTest(true);
List<String> protocols = ClientSessionManager.getAuthenticationProtocols();
Assert.assertTrue("Application Server must be running." + protocols, protocols.contains("demo"));
@@ -74,6 +75,7 @@ public class DbInitTest {
}
}
+ OseeProperties.setIsInTest(false);
System.out.println("End database initialization...\n");
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
index ff86ef76b7..d75d7829de 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java
@@ -11,10 +11,6 @@
package org.eclipse.osee.ats.client.integration.tests.util;
import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED;
-import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -43,13 +39,8 @@ import org.eclipse.osee.ats.demo.api.DemoActionableItems;
import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.demo.api.DemoTeam;
import org.eclipse.osee.ats.demo.api.DemoWorkType;
-import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.data.UserToken;
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.core.enums.QueryOption;
-import org.eclipse.osee.framework.core.exception.OseeAuthenticationException;
-import org.eclipse.osee.framework.core.util.Result;
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.util.Collections;
@@ -67,33 +58,6 @@ public class DemoTestUtil {
public static Map<DemoWorkType, Artifact> committedWorkflows;
public static TeamWorkFlowArtifact toolsTeamWorkflow;
- public static Result isDbPopulatedWithDemoData() throws Exception {
- Collection<Artifact> robotArtifacts = ArtifactQuery.getArtifactListFromTypeAndName(
- CoreArtifactTypes.SoftwareRequirement, "Robot", SAW_Bld_1, QueryOption.CONTAINS_MATCH_OPTIONS);
- if (robotArtifacts.size() < 6) {
- return new Result(String.format(
- "Expected at least 6 Software Requirements with name \"Robot\" but found [%s]. Database is not be populated with demo data.",
- robotArtifacts.size()));
- }
- return Result.TrueResult;
- }
-
- public static Collection<String> getTaskTitles(boolean firstTaskWorkflow) {
- if (firstTaskWorkflow) {
- firstTaskWorkflow = false;
- return Arrays.asList("Look into Graph View.", "Redesign how view shows values.",
- "Discuss new design with Senior Engineer", "Develop prototype", "Show prototype to management",
- "Create development plan", "Create test plan", "Make changes");
- } else {
- return Arrays.asList("Document how Graph View works", "Update help contents", "Review new documentation",
- "Publish documentation to website", "Remove old viewer", "Deploy release");
- }
- }
-
- public static int getNumTasks() {
- return getTaskTitles(false).size() + getTaskTitles(true).size();
- }
-
public static User getDemoUser(UserToken demoUser) throws OseeCoreException {
return UserManager.getUserByName(demoUser.getName());
}
@@ -205,28 +169,6 @@ public class DemoTestUtil {
return committedWorkflows.get(demoWorkType);
}
- public static void setUpTest() throws Exception {
- try {
- // This test should only be run on test db
- assertFalse(AtsUtil.isProductionDb());
- // Confirm test setup with demo data
- Result result = isDbPopulatedWithDemoData();
- assertTrue(result.getText(), result.isTrue());
- // Confirm user is Joe Smith
- assertTrue("User \"3333\" does not exist in DB. Run Demo DBInit prior to this test.",
- UserManager.getUserByUserId("3333") != null);
- // Confirm user is Joe Smith
- assertTrue(
- "Authenticated user should be \"3333\" and is not. Check that Demo Application Server is being run.",
- AtsClientService.get().getUserService().getCurrentUser().getUserId().equals("3333"));
- } catch (OseeAuthenticationException ex) {
- OseeLog.log(DemoTestUtil.class, Level.SEVERE, ex);
- fail(
- "Can't authenticate, either Demo Application Server is not running or Demo DbInit has not been performed");
- }
-
- }
-
public static IAtsTeamDefinition getTeamDef(DemoTeam team) throws OseeCoreException {
IAtsTeamDefinition results = null;
// Add check to keep exception from occurring for OSEE developers running against production
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
index 5e1361133d..537522ee43 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
@@ -503,7 +503,10 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
@Override
public void clearImplementersCache(IAtsWorkItem workItem) {
- ((AbstractWorkflowArtifact) workItem).clearImplementersCache();
+ AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) getArtifact(workItem);
+ if (awa != null) {
+ awa.clearImplementersCache();
+ }
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
index 3fafe59a41..ae5c3cf6fe 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java
@@ -109,6 +109,8 @@ public class StateManagerStoreTest {
Assert.assertEquals(2, stateMgr.getAssignees().size());
when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentState, "")).thenReturn(
"Analyze;<Joe><Kay>;;");
+ when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentStateType, null)).thenReturn(
+ StateType.Working.name());
WorkState currentState = new WorkStateImpl("Analyze", Arrays.asList(Joe, Kay), 0, 0);
when(workStateFactory.fromStoreStr(eq("Analyze;<Joe><Kay>;;"))).thenReturn(currentState);
@@ -127,6 +129,8 @@ public class StateManagerStoreTest {
Assert.assertEquals(2, stateMgr.getAssignees().size());
when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentState, "")).thenReturn(
"Analyze;<Joe><Kay>;;");
+ when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentStateType, null)).thenReturn(
+ StateType.Working.name());
WorkState currentState = new WorkStateImpl("Analyze", Arrays.asList(Joe, Kay), 0, 0);
when(workStateFactory.fromStoreStr(eq("Analyze;<Joe><Kay>;;"))).thenReturn(currentState);
when(changes.getNotifications()).thenReturn(notifications);
@@ -153,6 +157,8 @@ public class StateManagerStoreTest {
when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentState, "")).thenReturn(
"Analyze;<Joe><Kay>;;");
+ when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentStateType, null)).thenReturn(
+ StateType.Working.name());
WorkState currentState = new WorkStateImpl("Analyze", Arrays.asList(Joe, Kay), 0, 0);
when(workStateFactory.fromStoreStr(eq("Analyze;<Joe><Kay>;;"))).thenReturn(currentState);
when(changes.getNotifications()).thenReturn(notifications);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
index 947793b99d..bd1a4299d6 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
@@ -22,7 +22,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IStateToken;
@@ -63,6 +62,7 @@ public class StateManager implements IAtsStateManager {
private final String instanceGuid;
private final IAtsLogFactory logFactory;
private final IAtsServices services;
+ private StateType stateType;
public StateManager(IAtsWorkItem workItem, IAtsLogFactory logFactory, IAtsServices services) {
this.workItem = workItem;
@@ -72,6 +72,10 @@ public class StateManager implements IAtsStateManager {
this.instanceGuid = GUID.create();
}
+ public void setStateType(StateType stateType) {
+ this.stateType = stateType;
+ }
+
@Override
public String getCurrentStateName() {
return currentStateName;
@@ -84,9 +88,7 @@ public class StateManager implements IAtsStateManager {
@Override
public StateType getCurrentStateType() {
- StateType type = StateType.valueOf(services.getAttributeResolver().getSoleAttributeValue(workItem,
- AtsAttributeTypes.CurrentStateType, "Working"));
- return type;
+ return stateType;
}
@Override
@@ -177,8 +179,7 @@ public class StateManager implements IAtsStateManager {
@Override
public StateType getStateType() throws OseeCoreException {
- return StateType.valueOf(services.getAttributeResolver().getSoleAttributeValue(workItem,
- AtsAttributeTypes.CurrentStateType, StateType.Working.name()));
+ return stateType;
}
@Override
@@ -285,6 +286,7 @@ public class StateManager implements IAtsStateManager {
createState(toState);
setAssignees(toState.getName(), toAssignees);
setCurrentStateName(toState.getName());
+ stateType = toState.getStateType();
setDirty(true);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerReader.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerReader.java
index e4b1395ca7..ec03a49f15 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerReader.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerReader.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.core.internal.state;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
+import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.WorkState;
import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -51,6 +52,8 @@ public class StateManagerReader {
}
}
Integer percentComplete = attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.PercentComplete, null);
+ stateMgr.setStateType(
+ StateType.valueOf(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentStateType, null)));
stateMgr.setPercentCompleteValue(percentComplete);
stateMgr.setDirty(false);
stateMgr.getInitialAssignees().addAll(stateMgr.getAssignees());
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerWriter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerWriter.java
index 6631d98de7..658e3b4090 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerWriter.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerWriter.java
@@ -50,7 +50,7 @@ public class StateManagerWriter {
writeStatesToStore(changes);
- StateType stateType = workItem.getWorkDefinition().getStateByName(currentStateName).getStateType();
+ StateType stateType = stateMgr.getStateType();
attrResolver.setSoleAttributeValue(workItem, AtsAttributeTypes.CurrentStateType, stateType.name(), changes);
Integer percentCompleteValue = stateMgr.getPercentCompleteValue();
if (percentCompleteValue == null) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
index 224aebe0af..b8698e2a68 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
@@ -23,7 +23,6 @@ import org.eclipse.osee.ats.api.review.IAtsPeerToPeerReview;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
-import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsGoal;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
@@ -240,8 +239,7 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
@Override
public boolean isCompleted() {
- return services.getAttributeResolver().getSoleAttributeValue(artifact, AtsAttributeTypes.CurrentStateType,
- "").equals(StateType.Completed.name());
+ return getStateMgr().getStateType().isCompleted();
}
@Override
@@ -251,8 +249,7 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
@Override
public boolean isCancelled() {
- return services.getAttributeResolver().getSoleAttributeValue(artifact, AtsAttributeTypes.CurrentStateType,
- "").equals(StateType.Cancelled.name());
+ return getStateMgr().getStateType().isCancelled();
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java
index 50a1ba839e..4698661205 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.api.workflow.WorkState;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
+import org.eclipse.osee.ats.core.internal.state.StateManager;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -40,6 +41,7 @@ public class StateManagerUtility {
if (assignees == null) {
assignees = new LinkedList<>();
}
+ ((StateManager) stateMgr).setStateType(workPage.getStateType());
if (workPage.getStateType().isWorkingState()) {
if (assignees.isEmpty()) {
if (!currentUser.equals(AtsCoreUsers.SYSTEM_USER)) {
diff --git a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
index ef41c52b7f..a4510736ec 100644
--- a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
+++ b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoArtifactToken.java
@@ -20,33 +20,35 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
*/
public final class DemoArtifactToken {
- public static ArtifactToken Process_Team =
+ public static final ArtifactToken Process_Team =
TokenFactory.createArtifactToken(55170736, "Process_Team", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken Tools_Team =
+ public static final ArtifactToken Tools_Team =
TokenFactory.createArtifactToken(4830548, "Tools_Team", AtsArtifactTypes.TeamDefinition);
public static final ArtifactToken SAW_Program =
TokenFactory.createArtifactToken(19196003, "SAW Program", AtsArtifactTypes.Program);
- public static ArtifactToken SAW_HW =
+ public static final ArtifactToken SAW_HW =
TokenFactory.createArtifactToken(2876840, "SAW HW", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_Code =
+ public static final ArtifactToken SAW_Code =
TokenFactory.createArtifactToken(30013695, "SAW Code", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_Test =
+ public static final ArtifactToken SAW_Test =
TokenFactory.createArtifactToken(31608252, "SAW Test", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_SW_Design =
+ public static final ArtifactToken SAW_SW_Design =
TokenFactory.createArtifactToken(138220, "SAW SW Design", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_Requirements =
+ public static final ArtifactToken SAW_Requirements =
TokenFactory.createArtifactToken(20592, "SAW Requirements", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_SW =
+ public static final ArtifactToken SAW_SW =
TokenFactory.createArtifactToken(3902389, "SAW SW", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken SAW_CSCI_AI =
+ public static final ArtifactToken SAW_HW_AI =
+ TokenFactory.createArtifactToken(4687946, "SAW HW", AtsArtifactTypes.ActionableItem);
+ public static final ArtifactToken SAW_CSCI_AI =
TokenFactory.createArtifactToken(1866, "SAW CSCI", AtsArtifactTypes.ActionableItem);
- public static ArtifactToken Timesheet_AI =
+ public static final ArtifactToken Timesheet_AI =
TokenFactory.createArtifactToken(79465444, "Timesheet", AtsArtifactTypes.ActionableItem);
- public static ArtifactToken Reader_AI =
+ public static final ArtifactToken Reader_AI =
TokenFactory.createArtifactToken(132213123, "Reader", AtsArtifactTypes.ActionableItem);
- public static ArtifactToken Adapter_AI =
+ public static final ArtifactToken Adapter_AI =
TokenFactory.createArtifactToken(456465465, "Adapter", AtsArtifactTypes.ActionableItem);
public static final ArtifactToken CIS_Test_AI =
TokenFactory.createArtifactToken(441657987, "CIS Test", AtsArtifactTypes.ActionableItem);
@@ -59,89 +61,110 @@ public final class DemoArtifactToken {
public static final ArtifactToken SAW_SW_Design_AI =
TokenFactory.createArtifactToken(98129283, "SAW SW Design", AtsArtifactTypes.ActionableItem);
+ // Demo Group
+ public static final ArtifactToken Test_Group =
+ TokenFactory.createArtifactToken(46894461, "Demo Group", CoreArtifactTypes.UniversalGroup);
+
// SAW_SW Versions
- public static ArtifactToken SAW_Bld_1 =
+ public static final ArtifactToken SAW_Bld_1 =
TokenFactory.createArtifactToken(2749182, "SAW_Bld_1", AtsArtifactTypes.Version);
- public static ArtifactToken SAW_Bld_2 =
+ public static final ArtifactToken SAW_Bld_2 =
TokenFactory.createArtifactToken(7632957, "SAW_Bld_2", AtsArtifactTypes.Version);
- public static ArtifactToken SAW_Bld_3 =
+ public static final ArtifactToken SAW_Bld_3 =
TokenFactory.createArtifactToken(577781, "SAW_Bld_3", AtsArtifactTypes.Version);
public static final ArtifactToken CIS_Program =
TokenFactory.createArtifactToken(8242414, "CIS Program", AtsArtifactTypes.Program);
- public static ArtifactToken CIS_SW =
+ public static final ArtifactToken CIS_SW =
TokenFactory.createArtifactToken(695910, "CIS_SW", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken CIS_Code =
+ public static final ArtifactToken CIS_Code =
TokenFactory.createArtifactToken(1629262, "CIS_Code", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken CIS_Test =
+ public static final ArtifactToken CIS_Test =
TokenFactory.createArtifactToken(541255, "CIS_Test", AtsArtifactTypes.TeamDefinition);
- public static ArtifactToken Facilities_Team =
+ public static final ArtifactToken Facilities_Team =
TokenFactory.createArtifactToken(4811031, "Facilities_Team", CoreArtifactTypes.Folder);
- public static ArtifactToken DemoPrograms =
+ public static final ArtifactToken DemoPrograms =
TokenFactory.createArtifactToken(90120, "Demo Programs", CoreArtifactTypes.Artifact);
- public static ArtifactToken SAW_Code_Team_WorkPackage_01 =
+ public static final ArtifactToken SAW_Code_Team_WorkPackage_01 =
TokenFactory.createArtifactToken(38512616, "AZp8M1dPuESWYBPPbDgA", "Work Pkg 01", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Code_Team_WorkPackage_02 =
+ public static final ArtifactToken SAW_Code_Team_WorkPackage_02 =
TokenFactory.createArtifactToken(513994, "AZp8M1d7TCJiBw6A5bgA", "Work Pkg 02", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Code_Team_WorkPackage_03 =
+ public static final ArtifactToken SAW_Code_Team_WorkPackage_03 =
TokenFactory.createArtifactToken(304908, "AZp8M1em4EC1xE6bPEwA", "Work Pkg 03", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Test_AI_WorkPackage_0A =
+ public static final ArtifactToken SAW_Test_AI_WorkPackage_0A =
TokenFactory.createArtifactToken(75666, "AZp8M1fSc1JwMDQBtLwA", "Work Pkg 0A", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Test_AI_WorkPackage_0B =
+ public static final ArtifactToken SAW_Test_AI_WorkPackage_0B =
TokenFactory.createArtifactToken(281326, "AZp8M1hP81QOm6W9yNgA", "Work Pkg 0B", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Test_AI_WorkPackage_0C =
+ public static final ArtifactToken SAW_Test_AI_WorkPackage_0C =
TokenFactory.createArtifactToken(8141323, "AZp8M1kvEGrRt9tybTwA", "Work Pkg 0C", AtsArtifactTypes.WorkPackage);
- public static ArtifactToken SAW_Commited_Req_TeamWf = TokenFactory.createArtifactToken(68678945,
+ public static final ArtifactToken SAW_Commited_Req_TeamWf = TokenFactory.createArtifactToken(68678945,
DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
- public static ArtifactToken SAW_Commited_Code_TeamWf = TokenFactory.createArtifactToken(745689465,
+ public static final ArtifactToken SAW_Commited_Code_TeamWf = TokenFactory.createArtifactToken(745689465,
DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
- public static ArtifactToken SAW_Commited_Test_TeamWf = TokenFactory.createArtifactToken(4684523,
+ public static final ArtifactToken SAW_Commited_Test_TeamWf = TokenFactory.createArtifactToken(4684523,
DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
- public static ArtifactToken SAW_Commited_SWDesign_TeamWf = TokenFactory.createArtifactToken(9784654,
+ public static final ArtifactToken SAW_Commited_SWDesign_TeamWf = TokenFactory.createArtifactToken(9784654,
DemoWorkflowTitles.SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
- public static ArtifactToken SAW_UnCommited_Code_TeamWf = TokenFactory.createArtifactToken(295510263,
+ public static final ArtifactToken SAW_UnCommited_Code_TeamWf = TokenFactory.createArtifactToken(295510263,
DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
- public static ArtifactToken SAW_UnCommited_Test_TeamWf = TokenFactory.createArtifactToken(81679355,
+ public static final ArtifactToken SAW_UnCommited_Test_TeamWf = TokenFactory.createArtifactToken(81679355,
DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
- public static ArtifactToken SAW_UnCommited_Req_TeamWf = TokenFactory.createArtifactToken(55313463,
+ public static final ArtifactToken SAW_UnCommited_Req_TeamWf = TokenFactory.createArtifactToken(55313463,
DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
- public static ArtifactToken SAW_UnCommited_SWDesign_TeamWf = TokenFactory.createArtifactToken(8879465,
+ public static final ArtifactToken SAW_UnCommited_SWDesign_TeamWf = TokenFactory.createArtifactToken(8879465,
DemoWorkflowTitles.SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
- public static ArtifactToken SAW_UnCommitedConflicted_Code_TeamWf = TokenFactory.createArtifactToken(114579,
+ public static final ArtifactToken SAW_UnCommitedConflicted_Code_TeamWf = TokenFactory.createArtifactToken(114579,
DemoWorkflowTitles.SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW,
DemoArtifactTypes.DemoCodeTeamWorkflow);
- public static ArtifactToken SAW_UnCommitedConflicted_Req_TeamWf = TokenFactory.createArtifactToken(9876413,
+ public static final ArtifactToken SAW_UnCommitedConflicted_Req_TeamWf = TokenFactory.createArtifactToken(9876413,
DemoWorkflowTitles.SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW,
DemoArtifactTypes.DemoReqTeamWorkflow);
- public static ArtifactToken SAW_NoBranch_Code_TeamWf = TokenFactory.createArtifactToken(8885445,
+ public static final ArtifactToken SAW_NoBranch_Code_TeamWf = TokenFactory.createArtifactToken(8885445,
DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoCodeTeamWorkflow);
- public static ArtifactToken SAW_NoBranch_SWDesign_TeamWf = TokenFactory.createArtifactToken(7784565,
+ public static final ArtifactToken SAW_NoBranch_SWDesign_TeamWf = TokenFactory.createArtifactToken(7784565,
DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, AtsArtifactTypes.TeamWorkflow);
- public static ArtifactToken SAW_NoBranch_Req_TeamWf = TokenFactory.createArtifactToken(5564873,
+ public static final ArtifactToken SAW_NoBranch_Req_TeamWf = TokenFactory.createArtifactToken(5564873,
DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoReqTeamWorkflow);
- public static ArtifactToken SAW_NoBranch_Test_TeamWf = TokenFactory.createArtifactToken(11548766,
+ public static final ArtifactToken SAW_NoBranch_Test_TeamWf = TokenFactory.createArtifactToken(11548766,
DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, DemoArtifactTypes.DemoTestTeamWorkflow);
- /**
- * Do NOT use these as ways to load Demo workflows by Name. Use DemoUtil instead.
- */
- public static final String SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
- "SAW (committed) Reqt Changes for Diagram View";
- public static final String SAW_UNCOMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
- "SAW (uncommitted) More Reqt Changes for Diagram View";
- public static final String SAW_UNCOMMITTED_CONFLICTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
- "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
- public static final String SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW =
- "SAW (no-branch) Even More Requirement Changes for Diagram View";
+ public static final ArtifactToken WorkaroundForGraphViewWorkflowForBld1_TeamWf = TokenFactory.createArtifactToken(
+ 468813246, DemoWorkflowTitles.WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_1_ACTION, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static final ArtifactToken WorkaroundForGraphViewWorkflowForBld2_TeamWf = TokenFactory.createArtifactToken(
+ 794546444, DemoWorkflowTitles.WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_2_ACTION, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static final ArtifactToken WorkaroundForGraphViewWorkflowForBld3_TeamWf = TokenFactory.createArtifactToken(
+ 184679646, DemoWorkflowTitles.WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_3_ACTION, DemoArtifactTypes.DemoReqTeamWorkflow);
+
+ public static final ArtifactToken WorkingWithDiagramTreeWorkflowForBld1_TeamWf = TokenFactory.createArtifactToken(
+ 998798564, DemoWorkflowTitles.WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_1_ACTION, AtsArtifactTypes.TeamWorkflow);
+ public static final ArtifactToken WorkingWithDiagramTreeWorkflowForBld2_TeamWf = TokenFactory.createArtifactToken(
+ 312564659, DemoWorkflowTitles.WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_2_ACTION, AtsArtifactTypes.TeamWorkflow);
+ public static final ArtifactToken WorkingWithDiagramTreeWorkflowForBld3_TeamWf = TokenFactory.createArtifactToken(
+ 115469956, DemoWorkflowTitles.WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_3_ACTION, AtsArtifactTypes.TeamWorkflow);
+
+ public static final ArtifactToken ButtonSDoesntWorkOnHelp_TeamWf = TokenFactory.createArtifactToken(791613525,
+ DemoWorkflowTitles.BUTTON_S_DOESNT_WORK_ON_HELP, AtsArtifactTypes.TeamWorkflow);
+ public static final ArtifactToken ButtonWDoesntWorkOnSituationPage_TeamWf = TokenFactory.createArtifactToken(
+ 665156548, DemoWorkflowTitles.BUTTON_W_DOESNT_WORK_ON_SITUATION_PAGE, DemoArtifactTypes.DemoTestTeamWorkflow);
+ public static final ArtifactToken CantLoadDiagramTree_TeamWf = TokenFactory.createArtifactToken(159753789,
+ DemoWorkflowTitles.CANT_LOAD_DIAGRAM_TREE, DemoArtifactTypes.DemoTestTeamWorkflow);
+ public static final ArtifactToken CantSeeTheGraphView_TeamWf = TokenFactory.createArtifactToken(444777888,
+ DemoWorkflowTitles.CANT_SEE_THE_GRAPH_TREE, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static final ArtifactToken ProblemInDiagramTree_TeamWf = TokenFactory.createArtifactToken(789987789,
+ DemoWorkflowTitles.PROBLEM_IN_DIAGRAM_TREE, DemoArtifactTypes.DemoTestTeamWorkflow);
+ public static final ArtifactToken ProblemWithTheGraphView_TeamWf = TokenFactory.createArtifactToken(431354978,
+ DemoWorkflowTitles.PROBLEM_WITH_THE_GRAPH_VIEW_ACTION, DemoArtifactTypes.DemoReqTeamWorkflow);
+ public static final ArtifactToken ProblemWithTheUserWindow_TeamWf = TokenFactory.createArtifactToken(456794312,
+ DemoWorkflowTitles.PROBLEM_WITH_THE_USER_WINDOW, AtsArtifactTypes.TeamWorkflow);
private DemoArtifactToken() {
// Constants
diff --git a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java
index 54f4a170b4..3b07414478 100644
--- a/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java
+++ b/plugins/org.eclipse.osee.ats.demo.api/src/org/eclipse/osee/ats/demo/api/DemoWorkflowTitles.java
@@ -20,7 +20,7 @@ public class DemoWorkflowTitles {
}
/**
- * Do NOT use these as ways to load Demo workflows by Name. Use DemoUtil instead.
+ * Do NOT use these as ways to load Demo workflows by Name. Use DemoUtil instead.
*/
public static final String SAW_COMMITTED_REQT_CHANGES_FOR_DIAGRAM_VIEW =
"SAW (committed) Reqt Changes for Diagram View";
@@ -30,5 +30,18 @@ public class DemoWorkflowTitles {
"SAW (uncommitted-conflicted) More Requirement Changes for Diagram View";
public static final String SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW =
"SAW (no-branch) Even More Requirement Changes for Diagram View";
+ public static final String WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_1_ACTION = "Workaround for Graph View for SAW_Bld_1";
+ public static final String WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_2_ACTION = "Workaround for Graph View for SAW_Bld_2";
+ public static final String WORKAROUND_FOR_GRAPH_VIEW_FOR_BLD_3_ACTION = "Workaround for Graph View for SAW_Bld_3";
+ public static final String PROBLEM_WITH_THE_GRAPH_VIEW_ACTION = "Problem with the Graph View";
+ public static final String WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_1_ACTION = "Working with Diagram Tree for SAW_Bld_1";
+ public static final String WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_2_ACTION = "Working with Diagram Tree for SAW_Bld_2";
+ public static final String WORKAROUND_WITH_DIAGRAM_TREE_FOR_BLD_3_ACTION = "Working with Diagram Tree for SAW_Bld_3";
+ public static final String BUTTON_S_DOESNT_WORK_ON_HELP = "Button S doesn't work on help";
+ public static final String BUTTON_W_DOESNT_WORK_ON_SITUATION_PAGE = "Button W doesn't work on Situation Page";
+ public static final String CANT_LOAD_DIAGRAM_TREE = "Can't load Diagram Tree";
+ public static final String CANT_SEE_THE_GRAPH_TREE = "Can't see the Graph View";
+ public static final String PROBLEM_IN_DIAGRAM_TREE = "Problem in Diagram Tree";
+ public static final String PROBLEM_WITH_THE_USER_WINDOW = "Problem with the user window";
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
index 39d7afe946..6b31c07227 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.ats.rest;
import java.util.Collection;
-import java.util.List;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.config.AtsConfigEndpointApi;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java
index 6c2dc08703..ae06dee4f4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java
@@ -15,12 +15,15 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTokens;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
+import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
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.util.GUID;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
@@ -61,6 +64,15 @@ public class UniversalGroup {
return new ArrayList<Artifact>();
}
+ public static Artifact getGroupOrNull(ArtifactToken groupToken, BranchId branch) {
+ try {
+ return ArtifactQuery.getArtifactFromId(groupToken, branch);
+ } catch (ArtifactDoesNotExist ex) {
+ // do nothing
+ }
+ return null;
+ }
+
public static Artifact addGroup(String name, BranchId branch, SkynetTransaction transaction) throws OseeCoreException {
if (!getGroups(name, branch).isEmpty()) {
throw new OseeArgumentException("Group Already Exists");
@@ -76,6 +88,22 @@ public class UniversalGroup {
return groupArt;
}
+ public static Artifact addGroup(ArtifactToken groupToken, BranchId branch, SkynetTransaction transaction) throws OseeCoreException {
+ if (getGroupOrNull(groupToken, branch) != null) {
+ throw new OseeArgumentException("Group Already Exists");
+ }
+
+ Artifact groupArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.UniversalGroup, branch,
+ groupToken.getName(), GUID.create(), groupToken.getId());
+ groupArt.persist(transaction);
+
+ Artifact groupRoot = getTopUniversalGroupArtifact(branch);
+ groupRoot.addRelation(CoreRelationTypes.Universal_Grouping__Members, groupArt);
+ groupRoot.persist(transaction);
+
+ return groupArt;
+ }
+
public static Artifact getTopUniversalGroupArtifact(BranchId branch) throws OseeCoreException {
return ArtifactQuery.getArtifactFromId(CoreArtifactTokens.UniversalGroupRoot, branch);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.plugin/META-INF/MANIFEST.MF
index 60459d8a68..248f1d9d61 100644
--- a/plugins/org.eclipse.osee.framework.ui.plugin/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.plugin/META-INF/MANIFEST.MF
@@ -34,5 +34,8 @@ Import-Package: javax.ws.rs.core;version="2.0.0",
org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.logging,
org.eclipse.osee.jaxrs.client,
- org.eclipse.osee.orcs.rest.client
+ org.eclipse.osee.orcs.rest.client,
+ org.junit;version="4.12.0",
+ org.junit.rules;version="4.12.0",
+ org.junit.runners.model;version="4.12.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Back to the top