diff options
28 files changed, 1118 insertions, 55 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java index 273d22fd059..81328d98b9e 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java @@ -65,7 +65,7 @@ public interface IAtsServices { IAtsWorkItemFactory getWorkItemFactory(); - Object getArtifactById(String id); + ArtifactId getArtifactById(String id); IAtsConfigItemFactory getConfigItemFactory(); diff --git a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF index 1ee45791228..24b7b3f1246 100644 --- a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF @@ -15,6 +15,7 @@ Import-Package: com.google.inject, org.eclipse.osee.ats.core.ai, org.eclipse.osee.ats.core.column, org.eclipse.osee.ats.core.config, + org.eclipse.osee.ats.core.insertion, org.eclipse.osee.ats.core.model.impl, org.eclipse.osee.ats.core.query, org.eclipse.osee.ats.core.users, diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java index c56558e45d6..1f8835caf0d 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java @@ -27,7 +27,10 @@ import org.eclipse.osee.ats.core.client.IAtsClient; import org.eclipse.osee.ats.core.client.agile.AgileFeatureGroup; import org.eclipse.osee.ats.core.client.agile.AgileTeam; import org.eclipse.osee.ats.core.config.AbstractConfigItemFactory; +import org.eclipse.osee.ats.core.config.Country; import org.eclipse.osee.ats.core.config.Program; +import org.eclipse.osee.ats.core.insertion.Insertion; +import org.eclipse.osee.ats.core.insertion.InsertionActivity; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.skynet.core.artifact.Artifact; @@ -137,13 +140,25 @@ public class ConfigItemFactory extends AbstractConfigItemFactory { } @Override - public IAtsInsertion getInsertion(ArtifactId object) { - throw new UnsupportedOperationException("getInsertion not implemented on client"); + public IAtsInsertion getInsertion(ArtifactId artifact) { + IAtsInsertion result = null; + if (artifact instanceof IAtsInsertion) { + result = (IAtsInsertion) artifact; + } else if ((artifact instanceof Artifact) && ((Artifact) artifact).isOfType(AtsArtifactTypes.Insertion)) { + result = new Insertion(logger, atsClient.getServices(), artifact); + } + return result; } @Override - public IAtsInsertionActivity getInsertionActivity(ArtifactId object) { - throw new UnsupportedOperationException("getInsertionActivity not implemented on client"); + public IAtsInsertionActivity getInsertionActivity(ArtifactId artifact) { + IAtsInsertionActivity result = null; + if (artifact instanceof IAtsInsertionActivity) { + result = (IAtsInsertionActivity) artifact; + } else if ((artifact instanceof Artifact) && ((Artifact) artifact).isOfType(AtsArtifactTypes.InsertionActivity)) { + result = new InsertionActivity(logger, atsClient.getServices(), artifact); + } + return result; } @Override @@ -184,8 +199,10 @@ public class ConfigItemFactory extends AbstractConfigItemFactory { @Override public IAtsCountry getCountry(ArtifactId artifact) { IAtsCountry country = null; - if ((artifact instanceof Artifact) && ((Artifact) artifact).isOfType(AtsArtifactTypes.Country)) { - country = (IAtsCountry) atsClient.getConfigObject((Artifact) artifact); + if (artifact instanceof IAtsCountry) { + country = (IAtsCountry) artifact; + } else if ((artifact instanceof Artifact) && ((Artifact) artifact).isOfType(AtsArtifactTypes.Country)) { + country = new Country(logger, atsClient.getServices(), artifact); } return country; } diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AllAtsCoreTestSuite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AllAtsCoreTestSuite.java index 5cb73d03641..334cbb9399f 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AllAtsCoreTestSuite.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AllAtsCoreTestSuite.java @@ -12,6 +12,7 @@ package org.eclipse.osee.ats.core; import org.eclipse.osee.ats.core.ai.AtsCore_AI_Suite; import org.eclipse.osee.ats.core.column.AtsCore_Column_JT_Suite; +import org.eclipse.osee.ats.core.config.AtsCore_Config_JT_Suite; import org.eclipse.osee.ats.core.internal.column.ev.AtsCore_InternalColumnEv_JT_Suite; import org.eclipse.osee.ats.core.internal.log.AtsTest_Internal_Log_Suite; import org.eclipse.osee.ats.core.internal.state.AtsCore_Internal_State_Suite; @@ -31,6 +32,7 @@ import org.junit.runners.Suite; @Suite.SuiteClasses({ AtsCore_AI_Suite.class, AtsCore_Column_JT_Suite.class, + AtsCore_Config_JT_Suite.class, AtsTest_Internal_Log_Suite.class, AtsCore_Internal_State_Suite.class, AtsCore_Internal_Util_Suite.class, @@ -45,7 +47,7 @@ import org.junit.runners.Suite; AtsCore_Workflow_JT_Suite.class}) /** * This test suite contains tests that can be run as stand-alone JUnit tests (JT) - * + * * @author Donald G. Dunne */ public class AllAtsCoreTestSuite { diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AtsCore_Column_JT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AtsCore_Column_JT_Suite.java index d87a39f9b6f..8ffcff553a6 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AtsCore_Column_JT_Suite.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AtsCore_Column_JT_Suite.java @@ -21,8 +21,12 @@ import org.junit.runners.Suite; @Suite.SuiteClasses({ ActionableItemsColumnTest.class, AssigneeColumnTest.class, + CountryColumnTest.class, ImplementersColumnTest.class, + InsertionColumnTest.class, + InsertionActivityColumnTest.class, ParentTopTeamColumnTest.class, + ProgramColumnTest.class, TeamColumnUtilityTest.class}) /** * This test suite contains tests that can be run as stand-alone JUnit tests (JT) diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java new file mode 100644 index 00000000000..b61ddf0c88a --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * 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.core.column; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.country.IAtsCountry; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** + * Test case for {@link CountryColumn} + * + * @author Donald G. Dunne + */ +public class CountryColumnTest extends CountryColumn { + + // @formatter:off + @Mock private WorkPackageUtility util; + @Mock private IAtsServices services; + @Mock private IAtsWorkItem workItem; + @Mock private IAtsObject object; + @Mock private IAtsCountry country; + // @formatter:on + + @Before + public void setup() throws OseeCoreException { + MockitoAnnotations.initMocks(this); + } + + @Test + public void test() { + String str = CountryColumn.getCountryStr(object, services, util); + assertEquals(str, ""); + + when(util.getCountry(services, workItem)).thenReturn(new Pair<IAtsCountry, Boolean>(null, false)); + + str = CountryColumn.getCountryStr(workItem, services, util); + assertEquals(str, ""); + + when(util.getCountry(services, workItem)).thenReturn(new Pair<IAtsCountry, Boolean>(country, false)); + when(country.getName()).thenReturn("Country"); + str = CountryColumn.getCountryStr(workItem, services, util); + assertEquals(str, "Country"); + + when(util.getCountry(services, workItem)).thenReturn(new Pair<IAtsCountry, Boolean>(country, true)); + str = CountryColumn.getCountryStr(workItem, services, util); + assertEquals(str, "Country (I)"); + + } +} diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java new file mode 100644 index 00000000000..70604be4815 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * 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.core.column; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** + * Test case for {@link InsertionColumn} + * + * @author Donald G. Dunne + */ +public class InsertionActivityColumnTest extends InsertionColumn { + +// @formatter:off + @Mock private WorkPackageUtility util; + @Mock private IAtsServices services; + @Mock private IAtsWorkItem workItem; + @Mock private IAtsObject object; + @Mock private IAtsInsertionActivity program; + // @formatter:on + + @Before + public void setup() throws OseeCoreException { + MockitoAnnotations.initMocks(this); + } + + @Test + public void test() { + String str = InsertionActivityColumn.getInsertionActivityStr(object, services, util); + assertEquals(str, ""); + + when(util.getInsertionActivity(services, workItem)).thenReturn( + new Pair<IAtsInsertionActivity, Boolean>(null, false)); + + str = InsertionActivityColumn.getInsertionActivityStr(workItem, services, util); + assertEquals(str, ""); + + when(util.getInsertionActivity(services, workItem)).thenReturn( + new Pair<IAtsInsertionActivity, Boolean>(program, false)); + when(program.getName()).thenReturn("Country"); + str = InsertionActivityColumn.getInsertionActivityStr(workItem, services, util); + assertEquals(str, "Country"); + + when(util.getInsertionActivity(services, workItem)).thenReturn( + new Pair<IAtsInsertionActivity, Boolean>(program, true)); + str = InsertionActivityColumn.getInsertionActivityStr(workItem, services, util); + assertEquals(str, "Country (I)"); + + } +} diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java new file mode 100644 index 00000000000..cc54a0a6982 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * 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.core.column; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.insertion.IAtsInsertion; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** + * Test case for {@link InsertionColumn} + * + * @author Donald G. Dunne + */ +public class InsertionColumnTest extends InsertionColumn { + + // @formatter:off + @Mock private WorkPackageUtility util; + @Mock private IAtsServices services; + @Mock private IAtsWorkItem workItem; + @Mock private IAtsObject object; + @Mock private IAtsInsertion program; + // @formatter:on + + @Before + public void setup() throws OseeCoreException { + MockitoAnnotations.initMocks(this); + } + + @Test + public void test() { + String str = InsertionColumn.getInsertionStr(object, services, util); + assertEquals(str, ""); + + when(util.getInsertion(services, workItem)).thenReturn(new Pair<IAtsInsertion, Boolean>(null, false)); + + str = InsertionColumn.getInsertionStr(workItem, services, util); + assertEquals(str, ""); + + when(util.getInsertion(services, workItem)).thenReturn(new Pair<IAtsInsertion, Boolean>(program, false)); + when(program.getName()).thenReturn("Country"); + str = InsertionColumn.getInsertionStr(workItem, services, util); + assertEquals(str, "Country"); + + when(util.getInsertion(services, workItem)).thenReturn(new Pair<IAtsInsertion, Boolean>(program, true)); + str = InsertionColumn.getInsertionStr(workItem, services, util); + assertEquals(str, "Country (I)"); + + } +} diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java new file mode 100644 index 00000000000..01c97d0980d --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * 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.core.column; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.when; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.program.IAtsProgram; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** + * Test case for {@link ProgramColumn} + * + * @author Donald G. Dunne + */ +public class ProgramColumnTest extends ProgramColumn { + + // @formatter:off + @Mock private WorkPackageUtility util; + @Mock private IAtsServices services; + @Mock private IAtsWorkItem workItem; + @Mock private IAtsObject object; + @Mock private IAtsProgram program; + // @formatter:on + + @Before + public void setup() throws OseeCoreException { + MockitoAnnotations.initMocks(this); + } + + @Test + public void test() { + String str = ProgramColumn.getProgramStr(object, services, util); + assertEquals(str, ""); + + when(util.getProgram(services, workItem)).thenReturn(new Pair<IAtsProgram, Boolean>(null, false)); + + str = ProgramColumn.getProgramStr(workItem, services, util); + assertEquals(str, ""); + + when(util.getProgram(services, workItem)).thenReturn(new Pair<IAtsProgram, Boolean>(program, false)); + when(program.getName()).thenReturn("Country"); + str = ProgramColumn.getProgramStr(workItem, services, util); + assertEquals(str, "Country"); + + when(util.getProgram(services, workItem)).thenReturn(new Pair<IAtsProgram, Boolean>(program, true)); + str = ProgramColumn.getProgramStr(workItem, services, util); + assertEquals(str, "Country (I)"); + + } +} diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_JT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_JT_Suite.java new file mode 100644 index 00000000000..fc99b1ccb96 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_JT_Suite.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * 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.core.config; + +import org.eclipse.osee.framework.jdk.core.util.OseeProperties; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses({WorkPackageUtilityTest.class}) +/** + * This test suite contains tests that can be run as stand-alone JUnit tests (JT) + * + * @author Donald G. Dunne + */ +public class AtsCore_Config_JT_Suite { + @BeforeClass + public static void setUp() throws Exception { + OseeProperties.setIsInTest(true); + System.out.println("\n\nBegin " + AtsCore_Config_JT_Suite.class.getSimpleName()); + } + + @AfterClass + public static void tearDown() throws Exception { + System.out.println("End " + AtsCore_Config_JT_Suite.class.getSimpleName()); + } +} diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java new file mode 100644 index 00000000000..2fb5a94a603 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java @@ -0,0 +1,203 @@ +/******************************************************************************* + * 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.core.config; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Mockito.when; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.country.IAtsCountry; +import org.eclipse.osee.ats.api.data.AtsAttributeTypes; +import org.eclipse.osee.ats.api.data.AtsRelationTypes; +import org.eclipse.osee.ats.api.insertion.IAtsInsertion; +import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity; +import org.eclipse.osee.ats.api.program.IAtsProgram; +import org.eclipse.osee.ats.api.team.IAtsConfigItemFactory; +import org.eclipse.osee.ats.api.workdef.IAttributeResolver; +import org.eclipse.osee.ats.api.workdef.IRelationResolver; +import org.eclipse.osee.ats.api.workflow.IAtsGoal; +import org.eclipse.osee.ats.api.workflow.IAtsTask; +import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; +import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** + * Test Case for {@link WorkPackageUtility} + * + * @author Donald G. Dunne + */ +public class WorkPackageUtilityTest { + + // @formatter:off + @Mock private IAtsGoal goal; + @Mock private IAtsTeamWorkflow teamWf; + @Mock private IAtsTask task; + @Mock private ArtifactId workPackageArt; + + @Mock private IAtsServices services; + @Mock private IAttributeResolver attributeResolver; + @Mock private IRelationResolver relationResolver; + + @Mock private ArtifactId activityArt; + @Mock private IAtsInsertionActivity activity; + + @Mock private IAtsInsertion insertion; + @Mock private IAtsProgram program; + @Mock private IAtsCountry country; + + @Mock private IAtsConfigItemFactory factory; + // @formatter:on + + private WorkPackageUtility util; + + @Before + public void setup() throws OseeCoreException { + MockitoAnnotations.initMocks(this); + when(teamWf.isTeamWorkflow()).thenReturn(true); + + when(task.getParentTeamWorkflow()).thenReturn(teamWf); + when(task.isTeamWorkflow()).thenReturn(false); + + when(services.getAttributeResolver()).thenReturn(attributeResolver); + when(services.getRelationResolver()).thenReturn(relationResolver); + when(services.getConfigItemFactory()).thenReturn(factory); + + util = new WorkPackageUtility(); + } + + @org.junit.Test + public void testGetWorkPackageArtifact() throws Exception { + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + Pair<ArtifactId, Boolean> result = util.getWorkPackageArtifact(services, teamWf); + assertResult(result, null, false); + + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid"); + when(services.getArtifactById("guid")).thenReturn(null); + result = util.getWorkPackageArtifact(services, teamWf); + assertResult(result, null, false); + + when(services.getArtifactById("guid")).thenReturn(workPackageArt); + result = util.getWorkPackageArtifact(services, teamWf); + assertResult(result, workPackageArt, false); + + when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + result = util.getWorkPackageArtifact(services, task); + assertResult(result, workPackageArt, true); + } + + @org.junit.Test + public void testGetInsertionActivity() throws Exception { + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid"); + when(services.getArtifactById("guid")).thenReturn(null); + Pair<IAtsInsertionActivity, Boolean> result = util.getInsertionActivity(services, teamWf); + assertResult(result, null, false); + + when(services.getArtifactById("guid")).thenReturn(workPackageArt); + when(relationResolver.getRelatedOrNull(workPackageArt, + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(null); + result = util.getInsertionActivity(services, teamWf); + assertResult(result, null, false); + + when(relationResolver.getRelatedOrNull(workPackageArt, + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt); + when(factory.getInsertionActivity(activityArt)).thenReturn(activity); + result = util.getInsertionActivity(services, teamWf); + assertResult(result, activity, false); + + when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + result = util.getInsertionActivity(services, task); + assertResult(result, activity, true); + } + + @Test + public void testGetInsertion() throws Exception { + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid"); + when(relationResolver.getRelatedOrNull(workPackageArt, + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt); + when(services.getArtifactById("guid")).thenReturn(workPackageArt); + when(factory.getInsertionActivity(activityArt)).thenReturn(null); + + Pair<IAtsInsertion, Boolean> result = util.getInsertion(services, teamWf); + assertResult(result, null, false); + + when(factory.getInsertionActivity(activityArt)).thenReturn(activity); + when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion, + IAtsInsertion.class)).thenReturn(insertion); + result = util.getInsertion(services, teamWf); + assertResult(result, insertion, false); + + when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + result = util.getInsertion(services, task); + assertResult(result, insertion, true); + } + + @Test + public void testGetProgram() throws Exception { + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid"); + when(relationResolver.getRelatedOrNull(workPackageArt, + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt); + when(services.getArtifactById("guid")).thenReturn(workPackageArt); + when(factory.getInsertionActivity(activityArt)).thenReturn(null); + when(factory.getInsertionActivity(activityArt)).thenReturn(activity); + when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion, + IAtsInsertion.class)).thenReturn(insertion); + + Pair<IAtsProgram, Boolean> result = util.getProgram(services, teamWf); + assertResult(result, null, false); + + when(relationResolver.getRelatedOrNull(insertion, AtsRelationTypes.ProgramToInsertion_Program, + IAtsProgram.class)).thenReturn(program); + result = util.getProgram(services, teamWf); + assertResult(result, program, false); + + when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + result = util.getProgram(services, task); + assertResult(result, program, true); + } + + @Test + public void testGetCountry() throws Exception { + when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid"); + when(relationResolver.getRelatedOrNull(workPackageArt, + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt); + when(services.getArtifactById("guid")).thenReturn(workPackageArt); + when(factory.getInsertionActivity(activityArt)).thenReturn(null); + when(factory.getInsertionActivity(activityArt)).thenReturn(activity); + when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion, + IAtsInsertion.class)).thenReturn(insertion); + when(relationResolver.getRelatedOrNull(insertion, AtsRelationTypes.ProgramToInsertion_Program, + IAtsProgram.class)).thenReturn(program); + + Pair<IAtsCountry, Boolean> result = util.getCountry(services, teamWf); + assertResult(result, null, false); + + when(relationResolver.getRelatedOrNull(program, AtsRelationTypes.CountryToProgram_Country, + IAtsCountry.class)).thenReturn(country); + result = util.getCountry(services, teamWf); + assertResult(result, country, false); + + when(attributeResolver.getSoleAttributeValue(task, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn(null); + result = util.getCountry(services, task); + assertResult(result, country, true); + } + + private void assertResult(Pair<? extends Object, Boolean> result, Object object, boolean inherited) { + assertNotNull(result); + assertEquals(result.getFirst(), object); + assertEquals(inherited, result.getSecond()); + } + +} diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CountryColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CountryColumn.java new file mode 100644 index 00000000000..d8665e6b148 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CountryColumn.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * 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.core.column; + +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.country.IAtsCountry; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; + +/** + * @author Donald G. Dunne + */ +public class CountryColumn { + + private static WorkPackageUtility util; + + public static WorkPackageUtility getUtil() { + if (util == null) { + util = new WorkPackageUtility(); + } + return util; + } + + public static String getCountryStr(IAtsObject atsObject, IAtsServices services) throws OseeCoreException { + return getCountryStr(atsObject, services, getUtil()); + } + + public static String getCountryStr(IAtsObject atsObject, IAtsServices services, WorkPackageUtility util) throws OseeCoreException { + String result = ""; + if (atsObject instanceof IAtsWorkItem) { + IAtsWorkItem workItem = (IAtsWorkItem) atsObject; + Pair<IAtsCountry, Boolean> country = util.getCountry(services, workItem); + if (country.getFirst() != null) { + result = String.format("%s%s", country.getFirst().getName(), (country.getSecond() ? " (I)" : "")); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionActivityColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionActivityColumn.java new file mode 100644 index 00000000000..5cfdb5d5ef1 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionActivityColumn.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * 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.core.column; + +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; + +/** + * @author Donald G. Dunne + */ +public class InsertionActivityColumn { + + public static String getInsertionActivityStr(IAtsObject atsObject, IAtsServices services) throws OseeCoreException { + return getInsertionActivityStr(atsObject, services, CountryColumn.getUtil()); + } + + public static String getInsertionActivityStr(IAtsObject atsObject, IAtsServices services, WorkPackageUtility util) throws OseeCoreException { + String result = ""; + if (atsObject instanceof IAtsWorkItem) { + IAtsWorkItem workItem = (IAtsWorkItem) atsObject; + Pair<IAtsInsertionActivity, Boolean> insertionActivity = util.getInsertionActivity(services, workItem); + if (insertionActivity.getFirst() != null) { + result = String.format("%s%s", insertionActivity.getFirst().getName(), + (insertionActivity.getSecond() ? " (I)" : "")); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionColumn.java new file mode 100644 index 00000000000..3e8a2bf15e5 --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/InsertionColumn.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * 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.core.column; + +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.insertion.IAtsInsertion; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; + +/** + * @author Donald G. Dunne + */ +public class InsertionColumn { + + public static String getInsertionStr(IAtsObject atsObject, IAtsServices services) throws OseeCoreException { + return getInsertionStr(atsObject, services, CountryColumn.getUtil()); + } + + public static String getInsertionStr(IAtsObject atsObject, IAtsServices services, WorkPackageUtility util) throws OseeCoreException { + String result = ""; + if (atsObject instanceof IAtsWorkItem) { + IAtsWorkItem workItem = (IAtsWorkItem) atsObject; + Pair<IAtsInsertion, Boolean> insertion = util.getInsertion(services, workItem); + if (insertion.getFirst() != null) { + result = String.format("%s%s", insertion.getFirst().getName(), (insertion.getSecond() ? " (I)" : "")); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ProgramColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ProgramColumn.java new file mode 100644 index 00000000000..67f3e6a2efa --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ProgramColumn.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * 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.core.column; + +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.program.IAtsProgram; +import org.eclipse.osee.ats.core.config.WorkPackageUtility; +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; +import org.eclipse.osee.framework.jdk.core.type.Pair; + +/** + * @author Donald G. Dunne + */ +public class ProgramColumn { + + public static String getProgramStr(IAtsObject atsObject, IAtsServices services) throws OseeCoreException { + return getProgramStr(atsObject, services, CountryColumn.getUtil()); + } + + public static String getProgramStr(IAtsObject atsObject, IAtsServices services, WorkPackageUtility util) throws OseeCoreException { + String result = ""; + if (atsObject instanceof IAtsWorkItem) { + IAtsWorkItem workItem = (IAtsWorkItem) atsObject; + Pair<IAtsProgram, Boolean> program = util.getProgram(services, workItem); + if (program.getFirst() != null) { + result = String.format("%s%s", program.getFirst().getName(), (program.getSecond() ? " (I)" : "")); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java index 152d46ba945..77329854b99 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java @@ -22,8 +22,8 @@ import org.eclipse.osee.logger.Log; */ public class Country extends AtsConfigObject implements IAtsCountry { - public Country(Log logger, IAtsServices atsServer, ArtifactId artifact) { - super(logger, atsServer, artifact); + public Country(Log logger, IAtsServices services, ArtifactId artifact) { + super(logger, services, artifact); } @Override diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java new file mode 100644 index 00000000000..26268913f8c --- /dev/null +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * 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.core.config; + +import org.eclipse.osee.ats.api.IAtsServices; +import org.eclipse.osee.ats.api.IAtsWorkItem; +import org.eclipse.osee.ats.api.country.IAtsCountry; +import org.eclipse.osee.ats.api.data.AtsAttributeTypes; +import org.eclipse.osee.ats.api.data.AtsRelationTypes; +import org.eclipse.osee.ats.api.insertion.IAtsInsertion; +import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity; +import org.eclipse.osee.ats.api.program.IAtsProgram; +import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; +import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.jdk.core.type.Pair; +import org.eclipse.osee.framework.jdk.core.util.Strings; + +/** + * @author Donald G. Dunne + */ +public class WorkPackageUtility { + + public Pair<IAtsCountry, Boolean> getCountry(IAtsServices services, IAtsWorkItem workItem) { + Pair<IAtsCountry, Boolean> result = new Pair<IAtsCountry, Boolean>(null, false); + Pair<IAtsProgram, Boolean> programResult = getProgram(services, workItem); + if (programResult.getFirst() != null) { + IAtsCountry country = services.getRelationResolver().getRelatedOrNull(programResult.getFirst(), + AtsRelationTypes.CountryToProgram_Country, IAtsCountry.class); + if (country != null) { + result.setFirst(country); + result.setSecond(programResult.getSecond()); + } + } + return result; + } + + public Pair<IAtsProgram, Boolean> getProgram(IAtsServices services, IAtsWorkItem workItem) { + Pair<IAtsProgram, Boolean> result = new Pair<IAtsProgram, Boolean>(null, false); + Pair<IAtsInsertion, Boolean> insertionResult = getInsertion(services, workItem); + if (insertionResult.getFirst() != null) { + IAtsProgram program = services.getRelationResolver().getRelatedOrNull(insertionResult.getFirst(), + AtsRelationTypes.ProgramToInsertion_Program, IAtsProgram.class); + if (program != null) { + result.setFirst(program); + result.setSecond(insertionResult.getSecond()); + } + } + return result; + } + + /** + * @return IAtsInsertionActivity and true if value is inherited from parent team wf, false otherwise + */ + public Pair<IAtsInsertion, Boolean> getInsertion(IAtsServices services, IAtsWorkItem workItem) { + Pair<IAtsInsertion, Boolean> result = new Pair<IAtsInsertion, Boolean>(null, false); + Pair<IAtsInsertionActivity, Boolean> insertionActivityResult = getInsertionActivity(services, workItem); + if (insertionActivityResult.getFirst() != null) { + IAtsInsertion insertion = services.getRelationResolver().getRelatedOrNull(insertionActivityResult.getFirst(), + AtsRelationTypes.InsertionToInsertionActivity_Insertion, IAtsInsertion.class); + if (insertion != null) { + result.setFirst(insertion); + result.setSecond(insertionActivityResult.getSecond()); + } + } + return result; + } + + /** + * @return IAtsInsertionActivity and true if value is inherited from parent team wf, false otherwise + */ + public Pair<IAtsInsertionActivity, Boolean> getInsertionActivity(IAtsServices services, IAtsWorkItem workItem) { + Pair<IAtsInsertionActivity, Boolean> result = new Pair<IAtsInsertionActivity, Boolean>(null, false); + Pair<ArtifactId, Boolean> workPackageResult = getWorkPackageArtifact(services, workItem); + if (workPackageResult.getFirst() != null) { + ArtifactId activityArt = services.getRelationResolver().getRelatedOrNull(workPackageResult.getFirst(), + AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity); + if (activityArt != null) { + IAtsInsertionActivity activity = services.getConfigItemFactory().getInsertionActivity(activityArt); + result.setFirst(activity); + result.setSecond(workPackageResult.getSecond()); + } + } + return result; + } + + /** + * @return Work Package artifact and true if value is inherited from parent team wf, false otherwise + */ + public Pair<ArtifactId, Boolean> getWorkPackageArtifact(IAtsServices services, IAtsWorkItem workItem) { + Pair<ArtifactId, Boolean> result = new Pair<ArtifactId, Boolean>(null, false); + String workPackageGuid = + services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null); + if (Strings.isValid(workPackageGuid)) { + ArtifactId workPackageArt = services.getArtifactById(workPackageGuid); + if (workPackageArt != null) { + result.setFirst(workPackageArt); + } + } + if (result.getFirst() == null && !workItem.isTeamWorkflow()) { + IAtsTeamWorkflow teamWf = workItem.getParentTeamWorkflow(); + Pair<ArtifactId, Boolean> teamResult = getWorkPackageArtifact(services, teamWf); + if (teamResult.getFirst() != null) { + result.setSecond(true); + result.setFirst(teamResult.getFirst()); + } + } + return result; + } + +} diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java index 80d521856f7..e162adab701 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java @@ -35,6 +35,7 @@ import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory; import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory; import org.eclipse.osee.ats.core.config.IAtsConfigProvider; import org.eclipse.osee.ats.core.util.IAtsActionFactory; +import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.IArtifactToken; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.orcs.OrcsApi; @@ -76,7 +77,7 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa ArtifactReadable getArtifactByAtsId(String id); @Override - ArtifactReadable getArtifactById(String id); + ArtifactId getArtifactById(String id); QueryBuilder getQuery(); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java index 9206ff9a221..d4ae2761a2e 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java @@ -199,9 +199,8 @@ public class AtsServerImpl implements IAtsServer { attributeResolverService = new AtsAttributeResolverServiceImpl(); relationResolver = new AtsRelationResolverServiceImpl(this); attributeResolverService.setOrcsApi(orcsApi); - workDefAdmin = - new AtsWorkDefinitionAdminImpl(workDefCacheProvider, workItemService, workDefService, - attributeResolverService, teamWorkflowProvidersLazy); + workDefAdmin = new AtsWorkDefinitionAdminImpl(workDefCacheProvider, workItemService, workDefService, + attributeResolverService, teamWorkflowProvidersLazy); atsLogFactory = AtsCoreFactory.newLogFactory(); atsStateFactory = AtsCoreFactory.newStateFactory(getServices(), atsLogFactory); @@ -218,9 +217,8 @@ public class AtsServerImpl implements IAtsServer { }; config = new AtsArtifactConfigCache(configItemFactory, orcsApi); actionableItemManager = new ActionableItemManager(config, attributeResolverService, atsStoreService); - actionFactory = - new ActionFactory(workItemFactory, utilService, sequenceProvider, workItemService, actionableItemManager, - userService, attributeResolverService, atsStateFactory, config, getServices()); + actionFactory = new ActionFactory(workItemFactory, utilService, sequenceProvider, workItemService, + actionableItemManager, userService, attributeResolverService, atsStateFactory, config, getServices()); atsProgramService = new AtsProgramService(this); atsTeamDefinitionService = new AtsTeamDefinitionService(this); @@ -268,8 +266,8 @@ public class AtsServerImpl implements IAtsServer { if (atsObject.getStoreObject() != null) { result = (ArtifactReadable) atsObject.getStoreObject(); } else { - result = - orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid(atsObject.getUuid()).getResults().getAtMostOneOrNull(); + result = orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid( + atsObject.getUuid()).getResults().getAtMostOneOrNull(); } } return result; @@ -281,8 +279,8 @@ public class AtsServerImpl implements IAtsServer { if (atsObject.getStoreObject() != null) { result = (ArtifactReadable) atsObject.getStoreObject(); } else { - result = - orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid(atsObject.getUuid()).getResults().getAtMostOneOrNull(); + result = orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid( + atsObject.getUuid()).getResults().getAtMostOneOrNull(); } return result; } @@ -318,8 +316,8 @@ public class AtsServerImpl implements IAtsServer { public ArtifactReadable getArtifactByAtsId(String id) { ArtifactReadable artifact = null; try { - artifact = - orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).and(AtsAttributeTypes.AtsId, id).getResults().getOneOrNull(); + artifact = orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).and(AtsAttributeTypes.AtsId, + id).getResults().getOneOrNull(); } catch (ItemDoesNotExist ex) { // do nothing } @@ -377,7 +375,7 @@ public class AtsServerImpl implements IAtsServer { } @Override - public ArtifactReadable getArtifactById(String id) { + public ArtifactId getArtifactById(String id) { ArtifactReadable action = null; if (GUID.isValid(id)) { action = getArtifactByGuid(id); @@ -399,7 +397,8 @@ public class AtsServerImpl implements IAtsServer { @Override public ArtifactReadable getArtifactByUuid(long uuid) { - return orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid(new Long(uuid).intValue()).getResults().getOneOrNull(); + return orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid( + new Long(uuid).intValue()).getResults().getOneOrNull(); } @Override @@ -419,7 +418,7 @@ public class AtsServerImpl implements IAtsServer { for (String id : ids.split(",")) { id = id.replaceAll("^ +", ""); id = id.replaceAll(" +$", ""); - ArtifactReadable action = getArtifactById(id); + ArtifactReadable action = (ArtifactReadable) getArtifactById(id); if (action != null) { actions.add(action); } @@ -436,8 +435,8 @@ public class AtsServerImpl implements IAtsServer { public String getConfigValue(String key) { String result = null; @SuppressWarnings("unchecked") - ArtifactReadable atsConfig = - orcsApi.getQueryFactory().fromBranch(CoreBranches.COMMON).andIds(AtsArtifactToken.AtsConfig).getResults().getAtMostOneOrNull(); + ArtifactReadable atsConfig = orcsApi.getQueryFactory().fromBranch(CoreBranches.COMMON).andIds( + AtsArtifactToken.AtsConfig).getResults().getAtMostOneOrNull(); if (atsConfig != null) { for (Object obj : atsConfig.getAttributeValues(CoreAttributeTypes.GeneralStringData)) { String str = (String) obj; @@ -468,9 +467,8 @@ public class AtsServerImpl implements IAtsServer { } else { workItemNotificationProcessor = new WorkItemNotificationProcessor(logger, this, workItemFactory, userService, attributeResolverService); - notificationEventProcessor = - new AtsNotificationEventProcessor(workItemNotificationProcessor, userService, - getConfigValue("NoReplyEmail")); + notificationEventProcessor = new AtsNotificationEventProcessor(workItemNotificationProcessor, userService, + getConfigValue("NoReplyEmail")); notificationEventProcessor.sendNotifications(notifications, notifiers); } } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java index 8ddc1fbc421..d1ba142d0c7 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java @@ -35,8 +35,8 @@ import com.google.common.cache.CacheBuilder; public class AtsProgramService implements IAtsProgramService { private final IAtsServer atsServer; - private final Cache<IAtsTeamDefinition, IAtsProgram> cache = CacheBuilder.newBuilder().expireAfterAccess(1, - TimeUnit.HOURS).build(); + private final Cache<IAtsTeamDefinition, IAtsProgram> cache = + CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.HOURS).build(); public AtsProgramService(IAtsServer atsServer) { this.atsServer = atsServer; @@ -73,7 +73,7 @@ public class AtsProgramService implements IAtsProgramService { @Override public IAtsProgram getProgramByGuid(String guid) { - ArtifactReadable prgArt = atsServer.getArtifactById(guid); + ArtifactReadable prgArt = (ArtifactReadable) atsServer.getArtifactById(guid); return atsServer.getConfigItemFactory().getProgram(prgArt); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java index f13932eeb04..606345f5d00 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java @@ -44,7 +44,7 @@ public class CpaDuplicator { public XResultData duplicate() { XResultData rd = new XResultData(false); - ArtifactReadable cpaArt = atsServer.getArtifactById(duplicate.getCpaUuid()); + ArtifactReadable cpaArt = (ArtifactReadable) atsServer.getArtifactById(duplicate.getCpaUuid()); String atsId = cpaArt.getSoleAttributeValue(AtsAttributeTypes.AtsId, null); String duplicatePcrId = ""; if (!Strings.isValid(atsId)) { @@ -56,27 +56,24 @@ public class CpaDuplicator { if (cpaService == null) { rd.logErrorWithFormat("CPA Tool not configured for Tool Id [%s]. Skipping.", cpaService); } else { - IAtsChangeSet changes = - atsServer.getStoreService().createAtsChangeSet("Duplicate for CPA " + duplicate.getCpaUuid(), - AtsCoreUsers.SYSTEM_USER); + IAtsChangeSet changes = atsServer.getStoreService().createAtsChangeSet( + "Duplicate for CPA " + duplicate.getCpaUuid(), AtsCoreUsers.SYSTEM_USER); IAtsTeamWorkflow cpaWf = atsServer.getWorkItemFactory().getTeamWf(cpaArt); duplicatePcrId = cpaArt.getSoleAttributeValue(AtsAttributeTypes.DuplicatedPcrId, null); if (Strings.isValid(duplicatePcrId)) { rd.logErrorWithFormat("CPA already has duplicate pcr id set as [%s]. Skipping.", duplicatePcrId); } else { String originatingPcrId = cpaArt.getSoleAttributeValue(AtsAttributeTypes.OriginatingPcrId); - duplicatePcrId = - cpaService.duplicate(cpaWf, duplicate.getProgramUuid(), duplicate.getVersionUuid(), - originatingPcrId, rd); + duplicatePcrId = cpaService.duplicate(cpaWf, duplicate.getProgramUuid(), duplicate.getVersionUuid(), + originatingPcrId, rd); if (Strings.isValid(duplicatePcrId)) { changes.setSoleAttributeValue(cpaWf, AtsAttributeTypes.DuplicatedPcrId, duplicatePcrId); changes.setSoleAttributeValue(cpaWf, AtsAttributeTypes.ApplicableToProgram, "Yes"); } if (duplicate.isCompleteCpa()) { - TransitionHelper helper = - new TransitionHelper("Complete Applicability Workflow", Arrays.asList(cpaWf), "Completed", - new ArrayList<IAtsUser>(), "", changes, atsServer.getServices(), - TransitionOption.OverrideAssigneeCheck); + TransitionHelper helper = new TransitionHelper("Complete Applicability Workflow", + Arrays.asList(cpaWf), "Completed", new ArrayList<IAtsUser>(), "", changes, + atsServer.getServices(), TransitionOption.OverrideAssigneeCheck); IAtsUser asUser = atsServer.getUserService().getUserById(duplicate.getUserId()); if (asUser == null) { rd.logErrorWithFormat("Invalid userId [%s]. Skipping.", asUser); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java index 4843d9d02ec..b5968629a28 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java @@ -67,8 +67,7 @@ public final class ActionUiResource { } if (workItems.size() == 1) { ActionPage page = - new ActionPage(logger, atsServer, (ArtifactReadable) workItems.iterator().next().getStoreObject(), - false); + new ActionPage(logger, atsServer, (ArtifactReadable) workItems.iterator().next().getStoreObject(), false); return page.generate(); } else { String idStr = ""; @@ -92,7 +91,7 @@ public final class ActionUiResource { @GET @Produces(MediaType.TEXT_HTML) public ViewModel getActionWithDetails(@PathParam("id") String id) throws Exception { - ArtifactReadable action = atsServer.getArtifactById(id); + ArtifactReadable action = (ArtifactReadable) atsServer.getArtifactById(id); if (action == null) { return RestUtil.simplePage(String.format("Action with id [%s] can not be found", id)); } @@ -159,7 +158,7 @@ public final class ActionUiResource { @GET @Produces(MediaType.TEXT_HTML) public ViewModel getTransition(@PathParam("id") String id) throws Exception { - ArtifactReadable action = atsServer.getArtifactById(id); + ArtifactReadable action = (ArtifactReadable) atsServer.getArtifactById(id); if (action == null) { return RestUtil.simplePage(String.format("Action with id [%s] can not be found", id)); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java index 6234c00f44a..99491d0e044 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java @@ -27,8 +27,8 @@ import org.eclipse.osee.ats.core.workflow.transition.TransitionFactory; import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper; import org.eclipse.osee.ats.impl.IAtsServer; import org.eclipse.osee.ats.rest.internal.util.RestUtil; +import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.jdk.core.util.Strings; -import org.eclipse.osee.orcs.data.ArtifactReadable; /** * @author Donald G. Dunne @@ -83,7 +83,7 @@ public final class StateResource { } if (operation.equals("transition")) { - ArtifactReadable action = atsServer.getArtifactById(id); + ArtifactId action = atsServer.getArtifactById(id); if (action == null) { return RestUtil.returnBadRequest(String.format("Action by id [%s] does not exist", id)); } @@ -91,9 +91,8 @@ public final class StateResource { IAtsChangeSet changes = atsServer.getStoreService().createAtsChangeSet("Transition Action - Server", transitionUser); - TransitionHelper helper = - new TransitionHelper("Transition " + id, Collections.singleton(workItem), toState, workItem.getAssignees(), - reason, changes, atsServer.getServices(), TransitionOption.None); + TransitionHelper helper = new TransitionHelper("Transition " + id, Collections.singleton(workItem), toState, + workItem.getAssignees(), reason, changes, atsServer.getServices(), TransitionOption.None); helper.setTransitionUser(transitionUser); IAtsTransitionManager mgr = TransitionFactory.getTransitionManager(helper); TransitionResults results = mgr.handleAll(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CountryColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CountryColumnUI.java new file mode 100644 index 00000000000..c0e8f079367 --- /dev/null +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CountryColumnUI.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * 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.column; + +import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn; +import org.eclipse.nebula.widgets.xviewer.XViewerColumn; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.core.column.CountryColumn; +import org.eclipse.osee.ats.internal.AtsClientService; +import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn; +import org.eclipse.osee.ats.world.WorldXViewerFactory; +import org.eclipse.swt.SWT; + +/** + * @author Donald G. Dunne + */ +public class CountryColumnUI extends XViewerAtsColumn implements IXViewerValueColumn { + + public static CountryColumnUI instance = new CountryColumnUI(); + + public static CountryColumnUI getInstance() { + return instance; + } + + private CountryColumnUI() { + super(WorldXViewerFactory.COLUMN_NAMESPACE + ".country", "Country", 80, SWT.LEFT, false, SortDataType.String, + false, "Country specified by related Work Package. (I) if inherited from parent."); + } + + /** + * XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending + * XViewerValueColumn MUST extend this constructor so the correct sub-class is created + */ + @Override + public CountryColumnUI copy() { + CountryColumnUI newXCol = new CountryColumnUI(); + super.copy(this, newXCol); + return newXCol; + } + + @Override + public String getColumnText(Object element, XViewerColumn column, int columnIndex) { + String result = ""; + if (element instanceof IAtsObject) { + result = CountryColumn.getCountryStr((IAtsObject) element, AtsClientService.get().getServices()); + } + return result; + } +} diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionActivityColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionActivityColumnUI.java new file mode 100644 index 00000000000..ddbbb3e501f --- /dev/null +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionActivityColumnUI.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * 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.column; + +import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn; +import org.eclipse.nebula.widgets.xviewer.XViewerColumn; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.core.column.InsertionActivityColumn; +import org.eclipse.osee.ats.internal.AtsClientService; +import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn; +import org.eclipse.osee.ats.world.WorldXViewerFactory; +import org.eclipse.swt.SWT; + +/** + * @author Donald G. Dunne + */ +public class InsertionActivityColumnUI extends XViewerAtsColumn implements IXViewerValueColumn { + + public static InsertionActivityColumnUI instance = new InsertionActivityColumnUI(); + + public static InsertionActivityColumnUI getInstance() { + return instance; + } + + private InsertionActivityColumnUI() { + super(WorldXViewerFactory.COLUMN_NAMESPACE + ".insertionActivity", "Insertion Activity", 80, SWT.LEFT, false, + SortDataType.String, false, + "Insertion Activity specified by related Work Package. (I) if inherited from parent."); + } + + /** + * XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending + * XViewerValueColumn MUST extend this constructor so the correct sub-class is created + */ + @Override + public InsertionActivityColumnUI copy() { + InsertionActivityColumnUI newXCol = new InsertionActivityColumnUI(); + super.copy(this, newXCol); + return newXCol; + } + + @Override + public String getColumnText(Object element, XViewerColumn column, int columnIndex) { + String result = ""; + if (element instanceof IAtsObject) { + result = + InsertionActivityColumn.getInsertionActivityStr((IAtsObject) element, AtsClientService.get().getServices()); + } + return result; + } +} diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionColumnUI.java new file mode 100644 index 00000000000..bfed98ec8d0 --- /dev/null +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/InsertionColumnUI.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * 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.column; + +import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn; +import org.eclipse.nebula.widgets.xviewer.XViewerColumn; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.core.column.InsertionColumn; +import org.eclipse.osee.ats.internal.AtsClientService; +import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn; +import org.eclipse.osee.ats.world.WorldXViewerFactory; +import org.eclipse.swt.SWT; + +/** + * @author Donald G. Dunne + */ +public class InsertionColumnUI extends XViewerAtsColumn implements IXViewerValueColumn { + + public static InsertionColumnUI instance = new InsertionColumnUI(); + + public static InsertionColumnUI getInstance() { + return instance; + } + + private InsertionColumnUI() { + super(WorldXViewerFactory.COLUMN_NAMESPACE + ".insertion", "Insertion", 80, SWT.LEFT, false, SortDataType.String, + false, "Insertion specified by related Work Package. (I) if inherited from parent."); + } + + /** + * XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending + * XViewerValueColumn MUST extend this constructor so the correct sub-class is created + */ + @Override + public InsertionColumnUI copy() { + InsertionColumnUI newXCol = new InsertionColumnUI(); + super.copy(this, newXCol); + return newXCol; + } + + @Override + public String getColumnText(Object element, XViewerColumn column, int columnIndex) { + String result = ""; + if (element instanceof IAtsObject) { + result = InsertionColumn.getInsertionStr((IAtsObject) element, AtsClientService.get().getServices()); + } + return result; + } +} diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ProgramColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ProgramColumnUI.java new file mode 100644 index 00000000000..e9f615638b7 --- /dev/null +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ProgramColumnUI.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * 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.column; + +import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn; +import org.eclipse.nebula.widgets.xviewer.XViewerColumn; +import org.eclipse.osee.ats.api.IAtsObject; +import org.eclipse.osee.ats.core.column.ProgramColumn; +import org.eclipse.osee.ats.internal.AtsClientService; +import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn; +import org.eclipse.osee.ats.world.WorldXViewerFactory; +import org.eclipse.swt.SWT; + +/** + * @author Donald G. Dunne + */ +public class ProgramColumnUI extends XViewerAtsColumn implements IXViewerValueColumn { + + public static ProgramColumnUI instance = new ProgramColumnUI(); + + public static ProgramColumnUI getInstance() { + return instance; + } + + private ProgramColumnUI() { + super(WorldXViewerFactory.COLUMN_NAMESPACE + ".program", "Program", 80, SWT.LEFT, false, SortDataType.String, + false, "Program specified by related Work Package. (I) if inherited from parent."); + } + + /** + * XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending + * XViewerValueColumn MUST extend this constructor so the correct sub-class is created + */ + @Override + public ProgramColumnUI copy() { + ProgramColumnUI newXCol = new ProgramColumnUI(); + super.copy(this, newXCol); + return newXCol; + } + + @Override + public String getColumnText(Object element, XViewerColumn column, int columnIndex) { + String result = ""; + if (element instanceof IAtsObject) { + result = ProgramColumn.getProgramStr((IAtsObject) element, AtsClientService.get().getServices()); + } + return result; + } +} diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java index 1014b4c5cd0..80421bea41e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerFactory.java @@ -30,6 +30,7 @@ import org.eclipse.osee.ats.column.CompletedByColumn; import org.eclipse.osee.ats.column.CompletedCancelledByColumn; import org.eclipse.osee.ats.column.CompletedCancelledDateColumn; import org.eclipse.osee.ats.column.CompletedDateColumn; +import org.eclipse.osee.ats.column.CountryColumnUI; import org.eclipse.osee.ats.column.CreatedDateColumn; import org.eclipse.osee.ats.column.DaysInCurrentStateColumn; import org.eclipse.osee.ats.column.DeadlineColumn; @@ -49,6 +50,8 @@ import org.eclipse.osee.ats.column.HoursSpentStateTasksColumn; import org.eclipse.osee.ats.column.HoursSpentStateTotalColumn; import org.eclipse.osee.ats.column.HoursSpentTotalColumn; import org.eclipse.osee.ats.column.ImplementorColumnUI; +import org.eclipse.osee.ats.column.InsertionActivityColumnUI; +import org.eclipse.osee.ats.column.InsertionColumnUI; import org.eclipse.osee.ats.column.LastStatusedColumn; import org.eclipse.osee.ats.column.LegacyPcrIdColumn; import org.eclipse.osee.ats.column.LocChangedColumn; @@ -81,6 +84,7 @@ import org.eclipse.osee.ats.column.PercentCompleteWorkflowColumn; import org.eclipse.osee.ats.column.PercentReworkColumn; import org.eclipse.osee.ats.column.PointsColumn; import org.eclipse.osee.ats.column.PriorityColumn; +import org.eclipse.osee.ats.column.ProgramColumnUI; import org.eclipse.osee.ats.column.RelatedToStateColumn; import org.eclipse.osee.ats.column.ReleaseDateColumn; import org.eclipse.osee.ats.column.RemainingHoursColumn; @@ -251,7 +255,11 @@ public class WorldXViewerFactory extends SkynetXViewerFactory { RemainingPointsTotalColumn.getInstance(), PercentCompleteReviewsColumn.getInstance(), PercentCompleteTasksColumn.getInstance(), - PercentCompleteTasksReviewsColumn.getInstance()}; + PercentCompleteTasksReviewsColumn.getInstance(), + CountryColumnUI.getInstance(), + ProgramColumnUI.getInstance(), + InsertionColumnUI.getInstance(), + InsertionActivityColumnUI.getInstance()}; public WorldXViewerFactory() { super(NAMESPACE); |