Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-08-11 16:42:16 +0000
committerRoberto E. Escobar2014-09-29 22:55:24 +0000
commit03451ab764f509756f2cf3492ca736d45adcf67f (patch)
treeb5974466e7240f8789296a0d3680b7ffe3f3a006
parent1c33a705cf7938d1b54025530e1680b78ac3abe0 (diff)
downloadorg.eclipse.osee-03451ab764f509756f2cf3492ca736d45adcf67f.tar.gz
org.eclipse.osee-03451ab764f509756f2cf3492ca736d45adcf67f.tar.xz
org.eclipse.osee-03451ab764f509756f2cf3492ca736d45adcf67f.zip
bug[ats_ATS77090]: ATS service circularity issues at startup
Move shared ATS DSL to new ats.dsl.integration bundle Remove services provided to ats.core and from ats.core Change-Id: I526afc1d857ef53e5843cf67cae78bf1ba9dd57b
-rw-r--r--features/org.eclipse.osee.ats.feature/feature.xml10
-rw-r--r--features/org.eclipse.osee.x.ats.feature/feature.xml7
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java39
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/ITransitionHelper.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java5
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateSawBuild2Actions.java13
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/CreateGoalTestDemoArtifacts.java19
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java11
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/ConfigDataTest.java7
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java9
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/MockTransitionHelper.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java37
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToMassEditorTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java13
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java12
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java21
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/SMAPromptChangeStatusTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.attribute.resolver.service.xml2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.cache.update.listener.xml2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml8
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.user.service.xml2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.workdef.store.service.xml2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java19
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java35
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/ActionableItemArtifactWriter.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/TeamDefinitionArtifactWriter.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/VersionArtifactWriter.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskManager.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriterTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java15
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java11
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/HoursSpentUtilTest.java38
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_JT_Suite.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/BooleanDefUtilTest.java45
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/UserRefUtilTest.java87
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperTest.java22
-rw-r--r--plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.core.service.xml11
-rw-r--r--plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.earned.value.ref.xml5
-rw-r--r--plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.version.provider.ref.xml5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java21
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsVersionService.java35
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java29
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsCoreService.java176
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsEarnedValueService.java30
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriter.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java21
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java28
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerStore.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java12
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/HoursSpentUtil.java78
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/PercentCompleteTotalUtil.java53
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogStoreProvider.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogUtility.java26
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionFactory.java14
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java22
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java24
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java18
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/.classpath7
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/.project28
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/build.properties4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/pom.xml31
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/AtsDsl_Internal_JT_Suite.java (renamed from plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/AtsCore_WorkDefProvider_JT_Suite.java)11
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDslTest.java)23
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItemTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/AbstractWorkDefItemTest.java)6
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AtsDsl_Internal_Model_JT_Suite.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelTestSuite.java)4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeStateItemTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/CompositeStateItemTest.java)4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinitionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewDefinitionTest.java)8
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOptionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewOptionTest.java)4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/ModelUtilTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelUtilTest.java)12
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinitionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/PeerReviewDefinitionTest.java)6
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinitionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/StateDefinitionTest.java)18
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetDefinitionTest.java)6
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionHandlerTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionHandlerTest.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionTest.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java (renamed from plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WorkDefinitionTest.java)10
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/.classpath7
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/.project33
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/META-INF/MANIFEST.MF25
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/OSGI-INF/ats.workdef.service.xml (renamed from plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.workdef.service.xml)4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/build.properties5
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/pom.xml35
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsWorkDefinitionServiceImpl.java)6
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertAtsDslToWorkDefinition.java)22
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDsl.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItem.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/AbstractWorkDefItem.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/CompositeLayoutItem.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewDefinition.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewOption.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/LayoutItem.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/LayoutItem.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/PeerReviewDefinition.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/RuleManager.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/StateDefinition.java)4
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinition.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionFloatMinMaxConstraint.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionFloatMinMaxConstraint.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionIntMinMaxConstraint.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionIntMinMaxConstraint.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionListMinMaxSelectedConstraint.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionListMinMaxSelectedConstraint.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java (renamed from plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WorkDefinition.java)2
-rw-r--r--plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/AllAtsImplTestSuite.java5
-rw-r--r--plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/util/AtsUtilServerTest.java39
-rw-r--r--plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/WorkDefTestSuite.java23
-rw-r--r--plugins/org.eclipse.osee.ats.impl/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.attribute.resolver.xml2
-rw-r--r--plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.server.service.xml6
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java13
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java74
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java7
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/AtsNotifierServiceImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java9
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsArtifactConfigCache.java13
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java38
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreFactoryImpl.java19
-rw-r--r--plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java2
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java2
-rw-r--r--plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java3
-rw-r--r--plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java5
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/resources/StateResource.java2
-rw-r--r--plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowLabelProvider.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentSMAStateColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateReviewColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTasksColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTotalColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentTotalColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PercentCompleteTotalColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/ConfigData.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPercentCompleteHeader.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMATargetedVersionHeader.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkflowMetricsHeader.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/log/column/LogAuthorColumn.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java19
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FirstTimeQualityMetricReportItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ActionTeamDateListDialog.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/PublishFullVersionReportItem.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AICheckTreeDialog.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionActionableItemListDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionTeamListDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionCheckTreeDialog.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/GenerateFullVersionReportItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/MassEditTeamVersionItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/ReleaseVersionItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerView.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java20
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java2
-rw-r--r--plugins/org.eclipse.osee.x.ats.parent/pom.xml3
231 files changed, 1181 insertions, 1184 deletions
diff --git a/features/org.eclipse.osee.ats.feature/feature.xml b/features/org.eclipse.osee.ats.feature/feature.xml
index cc303e6a4c1..5852c91aeed 100644
--- a/features/org.eclipse.osee.ats.feature/feature.xml
+++ b/features/org.eclipse.osee.ats.feature/feature.xml
@@ -71,35 +71,35 @@
unpack="false"/>
<plugin
- id="org.eclipse.osee.ats.impl"
+ id="org.eclipse.osee.ats.reports"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.osee.ats.reports"
+ id="org.eclipse.osee.ats.reports.burndown"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.osee.ats.reports.burndown"
+ id="org.eclipse.osee.ats.reports.efficiency"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.osee.ats.reports.efficiency"
+ id="org.eclipse.osee.ats.reports.split"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.osee.ats.reports.split"
+ id="org.eclipse.osee.ats.dsl.integration"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/features/org.eclipse.osee.x.ats.feature/feature.xml b/features/org.eclipse.osee.x.ats.feature/feature.xml
index 3acf70df62d..672dc5962e7 100644
--- a/features/org.eclipse.osee.x.ats.feature/feature.xml
+++ b/features/org.eclipse.osee.x.ats.feature/feature.xml
@@ -56,4 +56,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.osee.ats.dsl.integration"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
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
new file mode 100644
index 00000000000..d78fe2995a3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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.api;
+
+import org.eclipse.osee.ats.api.review.IAtsReviewService;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
+import org.eclipse.osee.ats.api.version.IAtsVersionService;
+import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService;
+import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
+import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
+import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
+
+/**
+ * @author Donald G. Dunne
+ */
+public interface IAtsServices {
+
+ public IAttributeResolver getAttributeResolver();
+
+ public IAtsUserService getUserService();
+
+ public IAtsWorkItemService getWorkItemService();
+
+ public IAtsReviewService getReviewService();
+
+ public IAtsBranchService getBranchService();
+
+ public IAtsWorkDefinitionService getWorkDefService();
+
+ public IAtsVersionService getVersionService();
+}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/ITransitionHelper.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/ITransitionHelper.java
index a852d153b8c..f46fbf686b7 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/ITransitionHelper.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/ITransitionHelper.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.api.workflow.transition;
import java.util.Collection;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -70,4 +71,6 @@ public interface ITransitionHelper {
public void setTransitionUser(IAtsUser user) throws OseeCoreException;
+ public IAtsServices getServices();
+
}
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/PopulateDemoActions.java
index f4cad35bef6..d502be99887 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/PopulateDemoActions.java
@@ -44,7 +44,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.util.AtsUtil;
@@ -329,8 +328,8 @@ public class PopulateDemoActions extends XNavigateItemAction {
teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
}
if (versionToken != null) {
- IAtsVersion version = AtsVersionService.get().getById(versionToken);
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, version);
+ IAtsVersion version = AtsClientService.get().getVersionService().getById(versionToken);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, version);
}
}
}
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
index 4ab02116cbe..61c3d7915cd 100644
--- 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
@@ -35,7 +35,6 @@ 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.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.util.AtsBranchManager;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -63,7 +62,7 @@ public class PopulateSawBuild2Actions {
public static void run() throws OseeCoreException {
- version = AtsVersionService.get().getById(DemoArtifactToken.SAW_Bld_2);
+ version = AtsClientService.get().getVersionService().getById(DemoArtifactToken.SAW_Bld_2);
Conditions.checkNotNull(version, "SAW_Bld_2");
// Create SAW_Bld_2 Actions
@@ -126,7 +125,7 @@ public class PopulateSawBuild2Actions {
teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
}
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, version);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, version);
changes.add(teamWf);
}
return actionArt;
@@ -198,7 +197,7 @@ public class PopulateSawBuild2Actions {
teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
}
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, version);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, version);
changes.add(teamWf);
}
return actionArt;
@@ -272,7 +271,7 @@ public class PopulateSawBuild2Actions {
teamWf.getStateMgr().setAssignees(teamWf.getTeamDefinition().getLeads());
}
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, version);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, version);
changes.add(teamWf);
}
return actionArt;
@@ -329,7 +328,7 @@ public class PopulateSawBuild2Actions {
}
changes.add(teamWf);
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, version);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, version);
}
return actionArt;
}
@@ -422,7 +421,7 @@ public class PopulateSawBuild2Actions {
false,
true,
AtsClientService.get().getBranchService().getBranch(
- (IAtsConfigObject) AtsVersionService.get().getTargetedVersion(reqTeam)), true);
+ (IAtsConfigObject) AtsClientService.get().getVersionService().getTargetedVersion(reqTeam)), true);
Operations.executeWorkAndCheckStatus(op);
if (DEBUG) {
OseeLog.log(Activator.class, Level.INFO, "Completing Action");
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
index 0f65c2e366e..ea0535f8601 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java
@@ -20,6 +20,7 @@ import java.util.logging.Level;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.client.demo.DemoArtifactTypes;
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.core.config.ActionableItems;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
@@ -122,7 +123,7 @@ public class DemoDbUtil {
public static Collection<IAtsActionableItem> getActionableItems(String[] aiasNames) throws OseeCoreException {
Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>();
for (String str : aiasNames) {
- for (IAtsActionableItem aia : ActionableItems.getActionableItemsAll()) {
+ for (IAtsActionableItem aia : ActionableItems.getActionableItemsAll(AtsClientService.get().getConfig())) {
if (str.equals(aia.getName())) {
aias.add(aia);
}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/CreateGoalTestDemoArtifacts.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/CreateGoalTestDemoArtifacts.java
index abaac262ee2..fb4844df1e6 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/CreateGoalTestDemoArtifacts.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/CreateGoalTestDemoArtifacts.java
@@ -92,7 +92,8 @@ public class CreateGoalTestDemoArtifacts extends XNavigateItemAction {
private void createAction7(IAtsChangeSet changes, GoalArtifact facilitiesGoal) throws OseeCoreException {
Artifact action =
ActionManager.createAction(null, "Add the Improvement", "Description", ChangeType.Improvement, "4", false,
- null, ActionableItems.getActionableItems(Arrays.asList("Network")), createdDate, createdBy, null, changes);
+ null, ActionableItems.getActionableItems(Arrays.asList("Network"), AtsClientService.get().getConfig()),
+ createdDate, createdBy, null, changes);
facilitiesGoal.addMember(action);
changes.add(facilitiesGoal);
}
@@ -101,8 +102,9 @@ public class CreateGoalTestDemoArtifacts extends XNavigateItemAction {
for (String msaTool : Arrays.asList("Backups", "Computers", "Network")) {
Artifact action =
ActionManager.createAction(null, "Fix " + msaTool + " button", "Description", ChangeType.Problem, "4",
- false, null, ActionableItems.getActionableItems(Arrays.asList(msaTool)), createdDate, createdBy, null,
- changes);
+ false, null,
+ ActionableItems.getActionableItems(Arrays.asList(msaTool), AtsClientService.get().getConfig()),
+ createdDate, createdBy, null, changes);
facilitiesGoal.addMember(ActionManager.getFirstTeam(action));
teamArt = ActionManager.getFirstTeam(action);
TaskArtifact taskArt = teamArt.createNewTask("Task 1", createdDate, createdBy, changes);
@@ -118,8 +120,8 @@ public class CreateGoalTestDemoArtifacts extends XNavigateItemAction {
private void createAction3(IAtsChangeSet changes, GoalArtifact sawCodeGoal, GoalArtifact cisReqGoal) throws OseeCoreException {
Artifact action =
ActionManager.createAction(null, "Remove Workflow button", "Description", ChangeType.Problem, "4", false,
- null, ActionableItems.getActionableItems(Arrays.asList("SAW Code", "CIS Requirements")), createdDate,
- createdBy, null, changes);
+ null, ActionableItems.getActionableItems(Arrays.asList("SAW Code", "CIS Requirements"),
+ AtsClientService.get().getConfig()), createdDate, createdBy, null, changes);
sawCodeGoal.addMember(ActionManager.getFirstTeam(action));
cisReqGoal.addMember(ActionManager.getFirstTeam(action));
}
@@ -127,8 +129,8 @@ public class CreateGoalTestDemoArtifacts extends XNavigateItemAction {
private void createAction2(IAtsChangeSet changes, GoalArtifact sawCodeGoal, GoalArtifact cisReqGoal) throws OseeCoreException {
ActionArtifact action =
ActionManager.createAction(null, "Add CDB Check Signals", "Description", ChangeType.Problem, "4", false, null,
- ActionableItems.getActionableItems(Arrays.asList("SAW Code", "CIS Requirements")), createdDate, createdBy,
- null, changes);
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code", "CIS Requirements"),
+ AtsClientService.get().getConfig()), createdDate, createdBy, null, changes);
sawCodeGoal.addMember(ActionManager.getFirstTeam(action));
cisReqGoal.addMember(ActionManager.getFirstTeam(action));
}
@@ -136,7 +138,8 @@ public class CreateGoalTestDemoArtifacts extends XNavigateItemAction {
private TeamWorkFlowArtifact createAction1(IAtsChangeSet changes, GoalArtifact sawCodeGoal) throws OseeCoreException {
Artifact action =
ActionManager.createAction(null, "Fix this model", "Description", ChangeType.Problem, "2", false, null,
- ActionableItems.getActionableItems(Arrays.asList("SAW Code")), createdDate, createdBy, null, changes);
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code"), AtsClientService.get().getConfig()),
+ createdDate, createdBy, null, changes);
sawCodeGoal.addMember(ActionManager.getFirstTeam(action));
TeamWorkFlowArtifact teamArt = ActionManager.getFirstTeam(action);
PeerToPeerReviewArtifact peerReviewArt =
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
index 51694cb4532..bf3a4593cdf 100644
--- 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
@@ -34,7 +34,6 @@ 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.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
@@ -478,7 +477,7 @@ public class PopulateDemoActionsTest {
Assert.assertEquals(priority, teamArt.getSoleAttributeValue(AtsAttributeTypes.PriorityType, ""));
// want targeted version, not error/exception
String targetedVerStr = "";
- IAtsVersion version = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion version = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
if (version != null) {
targetedVerStr = version.getName();
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
index 618cba2dea8..89c9c0a559d 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/access/AtsBranchAccessManagerTest.java
@@ -140,7 +140,8 @@ public class AtsBranchAccessManagerTest {
String aiContextId = "ai.context.1";
Artifact aiArt =
AtsClientService.get().getConfigArtifact(
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Requirements.getName())).iterator().next());
+ ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Requirements.getName()),
+ AtsClientService.get().getConfig()).iterator().next());
aiArt.setAttributeValues(CoreAttributeTypes.AccessContextId, Arrays.asList(aiContextId));
aiArt.persist(getClass().getSimpleName());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
index f48596ace4d..c9360e97cf8 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CancelledDateColumnTest.java
@@ -62,7 +62,8 @@ public class CancelledDateColumnTest {
TransitionHelper helper =
new TransitionHelper("Transition to Cancelled", Arrays.asList(teamArt), TeamState.Cancelled.getName(), null,
- "reason", changes, TransitionOption.OverrideTransitionValidityCheck, TransitionOption.OverrideAssigneeCheck);
+ "reason", changes, AtsClientService.get().getServices(), TransitionOption.OverrideTransitionValidityCheck,
+ TransitionOption.OverrideAssigneeCheck);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAllAndPersist();
Assert.assertTrue(results.toString(), results.isEmpty());
@@ -77,7 +78,8 @@ public class CancelledDateColumnTest {
helper =
new TransitionHelper("Transition to Endorse", Arrays.asList(teamArt), TeamState.Endorse.getName(),
Collections.singleton(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
- TransitionOption.OverrideTransitionValidityCheck, TransitionOption.OverrideAssigneeCheck);
+ AtsClientService.get().getServices(), TransitionOption.OverrideTransitionValidityCheck,
+ TransitionOption.OverrideAssigneeCheck);
transitionMgr = TransitionFactory.getTransitionManager(helper);
results = transitionMgr.handleAllAndPersist();
Assert.assertTrue(results.toString(), results.isEmpty());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
index 3c24adade37..b732ae92f4b 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/CompletedDateColumnTest.java
@@ -61,7 +61,8 @@ public class CompletedDateColumnTest {
TransitionHelper helper =
new TransitionHelper("Transition to Completed", Arrays.asList(teamArt), TeamState.Completed.getName(), null,
- null, changes, TransitionOption.OverrideTransitionValidityCheck, TransitionOption.OverrideAssigneeCheck);
+ null, changes, AtsClientService.get().getServices(), TransitionOption.OverrideTransitionValidityCheck,
+ TransitionOption.OverrideAssigneeCheck);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAllAndPersist();
Assert.assertTrue(results.toString(), results.isEmpty());
@@ -76,7 +77,8 @@ public class CompletedDateColumnTest {
helper =
new TransitionHelper("Transition to Endorse", Arrays.asList(teamArt), TeamState.Endorse.getName(),
Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
- TransitionOption.OverrideTransitionValidityCheck, TransitionOption.OverrideAssigneeCheck);
+ AtsClientService.get().getServices(), TransitionOption.OverrideTransitionValidityCheck,
+ TransitionOption.OverrideAssigneeCheck);
transitionMgr = TransitionFactory.getTransitionManager(helper);
results = transitionMgr.handleAll();
Assert.assertTrue(results.toString(), results.isEmpty());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
index 80a4f5e8fb6..63584aedbf9 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java
@@ -32,7 +32,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.config.ActionableItems;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.editor.SMAEditor;
@@ -159,7 +158,7 @@ public class AtsBranchConfigurationTest {
}
Collection<IAtsActionableItem> selectedActionableItems =
- ActionableItems.getActionableItems(appendToName(BRANCH_VIA_VERSIONS, "A1"));
+ ActionableItems.getActionableItems(appendToName(BRANCH_VIA_VERSIONS, "A1"), AtsClientService.get().getConfig());
assertFalse(selectedActionableItems.isEmpty());
changes.clear();
@@ -168,7 +167,7 @@ public class AtsBranchConfigurationTest {
ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(),
AtsClientService.get().getUserService().getCurrentUser(), null, changes);
TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
- AtsVersionService.get().setTargetedVersionAndStore(teamWf, versionToTarget);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamWf, versionToTarget);
changes.execute();
TeamWorkFlowManager dtwm = new TeamWorkFlowManager(teamWf);
@@ -270,7 +269,8 @@ public class AtsBranchConfigurationTest {
OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Create new Action");
}
Collection<IAtsActionableItem> selectedActionableItems =
- ActionableItems.getActionableItems(appendToName(BRANCH_VIA_TEAM_DEFINITION, "A1"));
+ ActionableItems.getActionableItems(appendToName(BRANCH_VIA_TEAM_DEFINITION, "A1"),
+ AtsClientService.get().getConfig());
assertFalse(selectedActionableItems.isEmpty());
changes.reset("Test branch via team definition: create action");
@@ -278,7 +278,8 @@ public class AtsBranchConfigurationTest {
changes.clear();
Artifact actionArt =
ActionManager.createAction(null, actionTitle, "description", ChangeType.Problem, "1", false, null,
- selectedActionableItems, new Date(), AtsClientService.get().getUserService().getCurrentUser(), null, changes);
+ selectedActionableItems, new Date(), AtsClientService.get().getUserService().getCurrentUser(), null,
+ changes);
changes.execute();
final TeamWorkFlowArtifact teamWf = ActionManager.getTeams(actionArt).iterator().next();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/ConfigDataTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/ConfigDataTest.java
index c9ee1fda93a..e0798daf8e0 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/ConfigDataTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/ConfigDataTest.java
@@ -14,6 +14,7 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.client.demo.DemoActionableItems;
import org.eclipse.osee.ats.client.demo.DemoTeam;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.config.copy.ConfigData;
import org.eclipse.osee.ats.core.config.ActionableItems;
@@ -72,7 +73,8 @@ public class ConfigDataTest {
tda = DemoTestUtil.getTeamDef(DemoTeam.CIS_SW);
data.setTeamDef(tda);
- Assert.assertEquals(TeamDefinitions.getTopTeamDefinition(), data.getParentTeamDef());
+ Assert.assertEquals(TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()),
+ data.getParentTeamDef());
}
@org.junit.Test
@@ -84,7 +86,8 @@ public class ConfigDataTest {
tda = DemoTestUtil.getTeamDef(DemoTeam.CIS_SW);
data.setTeamDef(tda);
- Assert.assertEquals(ActionableItems.getTopActionableItem(), data.getParentActionableItem());
+ Assert.assertEquals(ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()),
+ data.getParentActionableItem());
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java
index accc919672e..528b51569c0 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java
@@ -51,7 +51,8 @@ public class CopyAtsConfigurationOperationTest {
Operations.executeWork(operation);
Assert.assertFalse(rd.isErrors());
- Collection<IAtsTeamDefinition> teamDefs = TeamDefinitions.getTeamDefinitionsNameStartsWith("CISv2");
+ Collection<IAtsTeamDefinition> teamDefs =
+ TeamDefinitions.getTeamDefinitionsNameStartsWith("CISv2", AtsClientService.get().getConfig());
Assert.assertEquals(5, teamDefs.size());
Collection<IAtsActionableItem> ais = getActionableItemsNameStartsWith("CISv2");
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
index c2643b512b0..4d0046112f4 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java
@@ -51,7 +51,6 @@ 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.client.util.AtsChangeSet;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workdef.SimpleDecisionReviewOption;
import org.eclipse.osee.ats.core.workflow.state.StateTypeAdapter;
@@ -549,7 +548,7 @@ public class AtsTestUtil {
private static Result transitionToState(TeamWorkFlowArtifact teamArt, IStateToken toState, IAtsUser user, IAtsChangeSet changes, TransitionOption... transitionOptions) {
TransitionHelper helper =
new TransitionHelper("Transition to " + toState.getName(), Arrays.asList(teamArt), toState.getName(),
- Arrays.asList(user), null, changes, transitionOptions);
+ Arrays.asList(user), null, changes, AtsClientService.get().getServices(), transitionOptions);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (results.isEmpty()) {
@@ -640,7 +639,7 @@ public class AtsTestUtil {
AtsClientService.get().getUserService().getCurrentUser(), null, changes);
teamArt4 = actionArt4.getFirstTeam();
- AtsVersionService.get().setTargetedVersion(teamArt4, verArt4);
+ AtsClientService.get().getVersionService().setTargetedVersion(teamArt4, verArt4);
changes.execute();
}
return teamArt4;
@@ -726,8 +725,8 @@ public class AtsTestUtil {
verArt.setAllowCreateBranch(true);
verArt.setAllowCommitBranch(true);
verArt.setBaselineBranchUuid(BranchManager.getBranch(DemoSawBuilds.SAW_Bld_1).getUuid());
- if (!AtsVersionService.get().hasTargetedVersion(getTeamWf())) {
- AtsVersionService.get().setTargetedVersion(getTeamWf(), getVerArt1());
+ if (!AtsClientService.get().getVersionService().hasTargetedVersion(getTeamWf())) {
+ AtsClientService.get().getVersionService().setTargetedVersion(getTeamWf(), getVerArt1());
getTeamWf().persist(AtsTestUtil.class.getSimpleName() + "-SetTeamWfTargetedVer1");
}
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
index d27c4629d28..ad89903115e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java
@@ -15,7 +15,6 @@ import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.util.Result;
@@ -102,7 +101,7 @@ public class AtsTestUtilTest extends AtsTestUtil {
Assert.assertNotSame(AtsTestUtil.getActionArt(), AtsTestUtil.getActionArt4());
Assert.assertNotSame(AtsTestUtil.getTeamWf().getActionableItemsDam().getActionableItems().iterator().next(),
AtsTestUtil.getTeamWf4().getActionableItemsDam().getActionableItems().iterator().next());
- Assert.assertEquals(AtsVersionService.get().getTargetedVersion(AtsTestUtil.getTeamWf4()),
+ Assert.assertEquals(AtsClientService.get().getVersionService().getTargetedVersion(AtsTestUtil.getTeamWf4()),
AtsTestUtil.getVerArt4());
AtsTestUtil.cleanup();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
index cb81f86ef9e..f9387b882b7 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchManagerCoreTest.java
@@ -19,10 +19,10 @@ import org.eclipse.osee.ats.api.commit.ICommitConfigItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.client.demo.DemoSawBuilds;
+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.core.client.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
@@ -81,7 +81,7 @@ public class AtsBranchManagerCoreTest {
IAtsVersion verArt1 = AtsTestUtil.getVerArt1();
IAtsVersion verArt2 = AtsTestUtil.getVerArt2();
verArt1.getParallelVersions().add(verArt2);
- AtsVersionService.get().setTargetedVersion(teamArt, verArt1);
+ AtsClientService.get().getVersionService().setTargetedVersion(teamArt, verArt1);
Collection<Object> commitObjs = AtsBranchManagerCore.getCommitTransactionsAndConfigItemsForTeamWf(teamArt);
assertTrue("commitObjs has wrong size", commitObjs.size() == 2);
assertTrue("commitObjs is missing verArt1", commitObjs.contains(verArt1));
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
index e04f77e2509..f26775ac0db 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/TaskManagerTest.java
@@ -155,7 +155,7 @@ public class TaskManagerTest extends TaskManager {
changes.execute();
Assert.assertEquals(TaskStates.Completed.getName(), taskArt.getCurrentStateName());
- Assert.assertEquals(3.0, HoursSpentUtil.getHoursSpentTotal(taskArt), 0.0);
+ Assert.assertEquals(3.0, HoursSpentUtil.getHoursSpentTotal(taskArt, AtsClientService.get().getServices()), 0.0);
Assert.assertEquals("", taskArt.getStateMgr().getAssigneesStr());
// ensure nothing dirty
@@ -169,7 +169,7 @@ public class TaskManagerTest extends TaskManager {
Assert.assertEquals(Result.TrueResult, result);
changes.execute();
Assert.assertEquals(TaskStates.InWork.getName(), taskArt.getCurrentStateName());
- Assert.assertEquals(3.5, HoursSpentUtil.getHoursSpentTotal(taskArt), 0.0);
+ Assert.assertEquals(3.5, HoursSpentUtil.getHoursSpentTotal(taskArt, AtsClientService.get().getServices()), 0.0);
Assert.assertEquals("Joe Smith", taskArt.getStateMgr().getAssigneesStr());
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
index fcb68ec0737..1ca420dae82 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/task/createTasks/CreateTasksOperationTest.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.client.demo.DemoSawBuilds;
+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.core.client.branch.AtsBranchManagerCore;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
@@ -33,7 +34,6 @@ import org.eclipse.osee.ats.core.client.task.createtasks.TaskMetadata;
import org.eclipse.osee.ats.core.client.task.createtasks.TaskOpModify;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.MultipleAttributesExist;
@@ -239,9 +239,9 @@ public class CreateTasksOperationTest {
ver2_ChangesWithoutTasks.setName(ver2_ChangesWithoutTasks.getName() + " ChangesWithoutTasks");
ver3_TasksWithoutChanges.setName(ver3_TasksWithoutChanges.getName() + " TasksWithoutChanges");
- AtsVersionService.get().setTargetedVersion(destTeamWf1_Proper, ver1_Proper);
- AtsVersionService.get().setTargetedVersion(destTeamWf2_ChangesWithoutTasks, ver2_ChangesWithoutTasks);
- AtsVersionService.get().setTargetedVersion(destTeamWf3_TasksWithoutChanges, ver3_TasksWithoutChanges);
+ AtsClientService.get().getVersionService().setTargetedVersion(destTeamWf1_Proper, ver1_Proper);
+ AtsClientService.get().getVersionService().setTargetedVersion(destTeamWf2_ChangesWithoutTasks, ver2_ChangesWithoutTasks);
+ AtsClientService.get().getVersionService().setTargetedVersion(destTeamWf3_TasksWithoutChanges, ver3_TasksWithoutChanges);
IAtsVersion verArt4 = AtsTestUtil.getVerArt4();
verArt4.setBaselineBranchUuid(DemoSawBuilds.SAW_Bld_1.getUuid());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/MockTransitionHelper.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/MockTransitionHelper.java
index 18643aa6efa..84cb570f979 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/MockTransitionHelper.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/MockTransitionHelper.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -34,7 +35,8 @@ public class MockTransitionHelper extends TransitionHelper {
public Boolean overrideTransitionValidityCheck = null;
public MockTransitionHelper(String name, Collection<? extends AbstractWorkflowArtifact> awas, String toStateName, Collection<? extends IAtsUser> toAssignees, String cancellationReason, IAtsChangeSet changes, TransitionOption... transitionOption) {
- super(name, awas, toStateName, toAssignees, cancellationReason, changes, transitionOption);
+ super(name, awas, toStateName, toAssignees, cancellationReason, changes, AtsClientService.get().getServices(),
+ transitionOption);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
index 34d30f8e11e..7873ed6c44d 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/StateManagerTest.java
@@ -67,17 +67,17 @@ public class StateManagerTest {
Assert.assertTrue(results.toString(), results.isEmpty());
- Assert.assertEquals(3.3, HoursSpentUtil.getHoursSpentTotal(teamWf), 0.001);
+ Assert.assertEquals(3.3, HoursSpentUtil.getHoursSpentTotal(teamWf, AtsClientService.get().getServices()), 0.001);
teamWf.getStateMgr().updateMetrics(AtsTestUtil.getCompletedStateDef(), -2.2, 1, false,
AtsClientService.get().getUserService().getCurrentUser());
AtsChangeSet.execute(getClass().getSimpleName(), teamWf);
- Assert.assertEquals(1.1, HoursSpentUtil.getHoursSpentTotal(teamWf), 0.001);
+ Assert.assertEquals(1.1, HoursSpentUtil.getHoursSpentTotal(teamWf, AtsClientService.get().getServices()), 0.001);
teamWf.getStateMgr().updateMetrics(AtsTestUtil.getCompletedStateDef(), -2.2, 1, false,
AtsClientService.get().getUserService().getCurrentUser());
AtsChangeSet.execute(getClass().getSimpleName(), teamWf);
- Assert.assertEquals(0, HoursSpentUtil.getHoursSpentTotal(teamWf), 0.001);
+ Assert.assertEquals(0, HoursSpentUtil.getHoursSpentTotal(teamWf, AtsClientService.get().getServices()), 0.001);
AtsTestUtil.cleanup();
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
index 8c487e7e6fc..c10444b3cce 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java
@@ -39,7 +39,6 @@ import org.eclipse.osee.ats.core.client.task.TaskManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.core.workflow.transition.TransitionFactory;
import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper;
@@ -73,7 +72,7 @@ public class TransitionManagerTest {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), EMPTY_AWAS, AtsTestUtil.getImplementStateDef().getName(),
Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, new AtsChangeSet(
- getClass().getSimpleName()), TransitionOption.None);
+ getClass().getSimpleName()), AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -85,7 +84,7 @@ public class TransitionManagerTest {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), null,
Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, new AtsChangeSet(
- getClass().getSimpleName()), TransitionOption.None);
+ getClass().getSimpleName()), AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -97,7 +96,7 @@ public class TransitionManagerTest {
TransitionHelper helper =
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), "InvalidStateName",
Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, new AtsChangeSet(
- getClass().getSimpleName()), TransitionOption.None);
+ getClass().getSimpleName()), AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransitionValidation(results);
@@ -115,7 +114,7 @@ public class TransitionManagerTest {
new TransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
AtsTestUtil.getImplementStateDef().getName(),
Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, new AtsChangeSet(
- getClass().getSimpleName()), TransitionOption.None);
+ getClass().getSimpleName()), AtsClientService.get().getServices(), TransitionOption.None);
helper.setExecuteChanges(true);
IAtsTransitionManager transMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = new TransitionResults();
@@ -128,7 +127,8 @@ public class TransitionManagerTest {
results.clear();
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertFalse(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(
+ AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.contains(AtsTestUtil.getTeamWf(), TransitionResult.MUST_BE_ASSIGNED));
@@ -137,7 +137,8 @@ public class TransitionManagerTest {
Assert.assertFalse(helper.isOverrideAssigneeCheck());
helper.addTransitionOption(TransitionOption.PrivilegedEditEnabled);
Assert.assertTrue(helper.isPrivilegedEditEnabled());
- teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(
+ AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
@@ -147,7 +148,8 @@ public class TransitionManagerTest {
helper.addTransitionOption(TransitionOption.OverrideAssigneeCheck);
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertTrue(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
+ teamArt.getStateMgr().setAssignee(
+ AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
@@ -156,12 +158,14 @@ public class TransitionManagerTest {
helper.removeTransitionOption(TransitionOption.OverrideAssigneeCheck);
Assert.assertFalse(helper.isPrivilegedEditEnabled());
Assert.assertFalse(helper.isOverrideAssigneeCheck());
- teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserServiceClient().getUserFromToken(SystemUser.UnAssigned));
+ teamArt.getStateMgr().setAssignee(
+ AtsClientService.get().getUserServiceClient().getUserFromToken(SystemUser.UnAssigned));
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
// cleanup test
- teamArt.getStateMgr().setAssignee(AtsClientService.get().getUserServiceClient().getUserFromToken(SystemUser.UnAssigned));
+ teamArt.getStateMgr().setAssignee(
+ AtsClientService.get().getUserServiceClient().getUserFromToken(SystemUser.UnAssigned));
}
@org.junit.Test
@@ -415,7 +419,7 @@ public class TransitionManagerTest {
// set targeted version; transition validation should succeed
results.clear();
- AtsVersionService.get().setTargetedVersion(teamArt, AtsTestUtil.getVerArt1());
+ AtsClientService.get().getVersionService().setTargetedVersion(teamArt, AtsTestUtil.getVerArt1());
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
}
@@ -444,7 +448,7 @@ public class TransitionManagerTest {
// set targeted version; transition validation should succeed
results.clear();
- AtsVersionService.get().setTargetedVersion(teamArt, AtsTestUtil.getVerArt1());
+ AtsClientService.get().getVersionService().setTargetedVersion(teamArt, AtsTestUtil.getVerArt1());
transMgr.handleTransitionValidation(results);
Assert.assertTrue(results.isEmpty());
}
@@ -622,7 +626,8 @@ public class TransitionManagerTest {
MockTransitionHelper helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
AtsTestUtil.getCompletedStateDef().getName(),
- Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
+ TransitionOption.None);
IAtsTransitionManager transMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = new TransitionResults();
transMgr.handleTransition(results);
@@ -636,7 +641,8 @@ public class TransitionManagerTest {
helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
AtsTestUtil.getImplementStateDef().getName(),
- Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
+ TransitionOption.None);
transMgr = TransitionFactory.getTransitionManager(helper);
results = new TransitionResults();
transMgr.handleTransition(results);
@@ -651,7 +657,8 @@ public class TransitionManagerTest {
helper =
new MockTransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt),
AtsTestUtil.getCancelledStateDef().getName(),
- Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes, TransitionOption.None);
+ Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
+ TransitionOption.None);
transMgr = TransitionFactory.getTransitionManager(helper);
results = new TransitionResults();
transMgr.handleTransition(results);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToMassEditorTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToMassEditorTest.java
index 3b3b770b1a6..8d03a20b143 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToMassEditorTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToMassEditorTest.java
@@ -14,6 +14,7 @@ import java.util.Collection;
import java.util.Collections;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
@@ -52,7 +53,8 @@ public class AtsNavigateItemsToMassEditorTest {
Assert.assertTrue(item instanceof MassEditTeamVersionItem);
MassEditTeamVersionItem massEditItem = ((MassEditTeamVersionItem) item);
- Collection<IAtsTeamDefinition> teamDefs = TeamDefinitions.getTeamDefinitions(Collections.singleton("SAW SW"));
+ Collection<IAtsTeamDefinition> teamDefs =
+ TeamDefinitions.getTeamDefinitions(Collections.singleton("SAW SW"), AtsClientService.get().getConfig());
Assert.assertNotNull(teamDefs);
Assert.assertFalse(teamDefs.isEmpty());
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java
index 748cf57e412..c6401bcd72e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java
@@ -18,6 +18,7 @@ import java.util.List;
import java.util.Set;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.client.demo.DemoSawBuilds;
+import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
import org.eclipse.osee.ats.core.client.config.AtsBulkLoad;
@@ -59,7 +60,8 @@ public class AtsNavigateItemsToTaskEditorTest {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
AtsBulkLoad.reloadConfig(true);
- Collection<IAtsTeamDefinition> selectedUsers = TeamDefinitions.getTeamTopLevelDefinitions(Active.Active);
+ Collection<IAtsTeamDefinition> selectedUsers =
+ TeamDefinitions.getTeamTopLevelDefinitions(Active.Active, AtsClientService.get().getConfig());
TaskEditor.closeAll();
XNavigateItem item = NavigateTestUtil.getAtsNavigateItem("Task Search");
assertTrue(((SearchNavigateItem) item).getWorldSearchItem() instanceof TaskSearchWorldSearchItem);
@@ -70,7 +72,7 @@ public class AtsNavigateItemsToTaskEditorTest {
selectedUsers.clear();
List<String> teamDefs = new ArrayList<String>();
teamDefs.add("SAW Code");
- Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs);
+ Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs, AtsClientService.get().getConfig());
runGeneralTaskSearchOnTeamTest(item, tda, 14);
runGeneralTaskSearchOnAssigneeTest(item, "Joe Smith", 14);
runGeneralTaskSearchOnVersionTest(item, DemoSawBuilds.SAW_Bld_1.getName(), 0);
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
index 7c79c62c7ca..382b5edae70 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java
@@ -37,7 +37,6 @@ import org.eclipse.osee.ats.client.integration.tests.util.DemoTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.NavigateTestUtil;
import org.eclipse.osee.ats.client.integration.tests.util.WorldEditorUtil;
import org.eclipse.osee.ats.core.config.ActionableItems;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
@@ -423,7 +422,8 @@ public class AtsNavigateItemsToWorldViewTest {
public void testTeamWorkflowSearch() throws Exception {
SevereLoggingMonitor monitor = TestUtil.severeLoggingStart();
- List<IAtsTeamDefinition> selectedTeamDefs = TeamDefinitions.getTeamTopLevelDefinitions(Active.Active);
+ List<IAtsTeamDefinition> selectedTeamDefs =
+ TeamDefinitions.getTeamTopLevelDefinitions(Active.Active, AtsClientService.get().getConfig());
WorldEditor.closeAll();
XNavigateItem item = NavigateTestUtil.getAtsNavigateItem("Team Workflow Search");
assertTrue(((SearchNavigateItem) item).getWorldSearchItem() instanceof TeamWorkflowSearchWorkflowSearchItem);
@@ -441,7 +441,7 @@ public class AtsNavigateItemsToWorldViewTest {
List<String> teamDefs = new ArrayList<String>();
teamDefs.add("SAW Test");
teamDefs.add("SAW Design");
- Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs);
+ Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs, AtsClientService.get().getConfig());
runGeneralTeamWorkflowSearchOnTeamTest(item, tda, 3);
runGeneralTeamWorkflowSearchOnVersionTest(item, DemoSawBuilds.SAW_Bld_1.getName(), 0);
runGeneralTeamWorkflowSearchOnVersionTest(item, DemoSawBuilds.SAW_Bld_2.getName(), 3);
@@ -511,7 +511,8 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = NavigateTestUtil.getAtsNavigateItem("Actionable Item Search");
assertTrue(((SearchNavigateItem) item).getWorldSearchItem() instanceof ActionableItemWorldSearchItem);
- ((ActionableItemWorldSearchItem) ((SearchNavigateItem) item).getWorldSearchItem()).setSelectedActionItems(ActionableItems.getActionableItems(Arrays.asList("SAW Code")));
+ ((ActionableItemWorldSearchItem) ((SearchNavigateItem) item).getWorldSearchItem()).setSelectedActionItems(ActionableItems.getActionableItems(
+ Arrays.asList("SAW Code"), AtsClientService.get().getConfig()));
// normal searches copy search item which would clear out the set value above; for this test, don't copy item
runGeneralLoadingTest(item, AtsArtifactTypes.TeamWorkflow, 3, null, TableLoadOption.DontCopySearchItem);
TestUtil.severeLoggingEnd(monitor);
@@ -525,7 +526,7 @@ public class AtsNavigateItemsToWorldViewTest {
// First one is the global one
XNavigateItem item = items.iterator().next();
assertTrue(((SearchNavigateItem) item).getWorldSearchItem() instanceof VersionTargetedForTeamSearchItem);
- IAtsVersion version = AtsVersionService.get().getById(DemoArtifactToken.SAW_Bld_2);
+ IAtsVersion version = AtsClientService.get().getVersionService().getById(DemoArtifactToken.SAW_Bld_2);
((VersionTargetedForTeamSearchItem) ((SearchNavigateItem) item).getWorldSearchItem()).setSelectedVersionArt(version);
runGeneralLoadingTest(item, AtsArtifactTypes.TeamWorkflow, 14, null, TableLoadOption.DontCopySearchItem);
TestUtil.severeLoggingEnd(monitor);
@@ -540,7 +541,7 @@ public class AtsNavigateItemsToWorldViewTest {
XNavigateItem item = items.iterator().next();
assertTrue(((SearchNavigateItem) item).getWorldSearchItem() instanceof NextVersionSearchItem);
((NextVersionSearchItem) ((SearchNavigateItem) item).getWorldSearchItem()).setSelectedTeamDef(TeamDefinitions.getTeamDefinitions(
- Arrays.asList("SAW SW")).iterator().next());
+ Arrays.asList("SAW SW"), AtsClientService.get().getConfig()).iterator().next());
runGeneralLoadingTest(item, AtsArtifactTypes.TeamWorkflow, 14, null, TableLoadOption.DontCopySearchItem);
TestUtil.severeLoggingEnd(monitor);
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
index 8466b2c312f..a3c36fd9cfc 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/review/ReviewWorldSearchItemDemoTest.java
@@ -44,7 +44,8 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testAiSearch() throws Exception {
IAtsUser joe = AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Joe_Smith);
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code"), AtsClientService.get().getConfig());
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, joe, null, null, null);
Collection<Artifact> arts = search.performSearchGetResults();
@@ -55,7 +56,8 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testState() throws Exception {
IAtsUser joe = AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Joe_Smith);
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code"), AtsClientService.get().getConfig());
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, joe, null, null, "Prepare");
Collection<Artifact> arts = search.performSearchGetResults();
@@ -65,7 +67,8 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testIncludeCompleted() throws Exception {
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code"), AtsClientService.get().getConfig());
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, true, false, false, null, null, null, null, null);
Collection<Artifact> arts = search.performSearchGetResults();
@@ -76,7 +79,8 @@ public class ReviewWorldSearchItemDemoTest {
@org.junit.Test
public void testAssignee_Kay() throws Exception {
IAtsUser Kay_Jones = AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Kay_Jones);
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(Arrays.asList("SAW Code"));
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(Arrays.asList("SAW Code"), AtsClientService.get().getConfig());
ReviewWorldSearchItem search =
new ReviewWorldSearchItem("", aias, false, false, false, null, Kay_Jones, null, null, null);
Collection<Artifact> arts = search.performSearchGetResults();
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 fef6b527014..87457f672da 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
@@ -80,8 +80,8 @@ public class AtsDeleteManagerTest {
AtsChangeSet changes = new AtsChangeSet("Delete Manager Test");
// Create Action
TeamWorkFlowArtifact teamArt =
- createAction(TestNames.TeamArtDeleteOneWorkflow,
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), changes);
+ createAction(TestNames.TeamArtDeleteOneWorkflow, ActionableItems.getActionableItems(
+ Arrays.asList(DemoActionableItems.SAW_Code.getName()), AtsClientService.get().getConfig()), changes);
changes.execute();
// Verify exists
@@ -104,8 +104,9 @@ public class AtsDeleteManagerTest {
AtsChangeSet changes = new AtsChangeSet("Delete Manager Test");
// Create Action
TeamWorkFlowArtifact teamArt =
- createAction(TestNames.TeamArtDeleteWithTwoWorkflows, ActionableItems.getActionableItems(Arrays.asList(
- DemoActionableItems.SAW_Code.getName(), DemoActionableItems.SAW_Requirements.getName())), changes);
+ createAction(TestNames.TeamArtDeleteWithTwoWorkflows, ActionableItems.getActionableItems(
+ Arrays.asList(DemoActionableItems.SAW_Code.getName(), DemoActionableItems.SAW_Requirements.getName()),
+ AtsClientService.get().getConfig()), changes);
changes.execute();
// Verify exists
@@ -123,8 +124,8 @@ public class AtsDeleteManagerTest {
AtsChangeSet changes = new AtsChangeSet("Delete Manager Test");
// Create Action
TeamWorkFlowArtifact teamArt =
- createAction(TestNames.TeamArtPurge,
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), changes);
+ createAction(TestNames.TeamArtPurge, ActionableItems.getActionableItems(
+ Arrays.asList(DemoActionableItems.SAW_Code.getName()), AtsClientService.get().getConfig()), changes);
changes.execute();
// Verify exists
@@ -142,8 +143,8 @@ public class AtsDeleteManagerTest {
AtsChangeSet changes = new AtsChangeSet("Delete Manager Test");
// Create Action
TeamWorkFlowArtifact teamArt =
- createAction(TestNames.ActionDelete,
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), changes);
+ createAction(TestNames.ActionDelete, ActionableItems.getActionableItems(
+ Arrays.asList(DemoActionableItems.SAW_Code.getName()), AtsClientService.get().getConfig()), changes);
changes.execute();
// Verify exists
@@ -161,8 +162,8 @@ public class AtsDeleteManagerTest {
AtsChangeSet changes = new AtsChangeSet("Delete Manager Test");
// Create Action
TeamWorkFlowArtifact teamArt =
- createAction(TestNames.ActionPurge,
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), changes);
+ createAction(TestNames.ActionPurge, ActionableItems.getActionableItems(
+ Arrays.asList(DemoActionableItems.SAW_Code.getName()), AtsClientService.get().getConfig()), changes);
changes.execute();
// Verify exists
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java
index 63f38f21e4b..308d7081d5b 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java
@@ -19,11 +19,11 @@ 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.artifact.GoalManager;
+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.core.client.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.util.Import.ImportActionsViaSpreadsheetBlam;
@@ -99,7 +99,7 @@ public class ImportActionsViaSpreadsheetTest {
Assert.assertEquals("5", testWf.getSoleAttributeValue(AtsAttributeTypes.PriorityType, ""));
Assert.assertTrue(testWf.getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, 0.0) == 4.0);
Assert.assertEquals("Improvement", testWf.getSoleAttributeValue(AtsAttributeTypes.ChangeType, null));
- Assert.assertEquals("SAW_Bld_3", AtsVersionService.get().getTargetedVersion(testWf).getName());
+ Assert.assertEquals("SAW_Bld_3", AtsClientService.get().getVersionService().getTargetedVersion(testWf).getName());
}
@org.junit.Test
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/SMAPromptChangeStatusTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/SMAPromptChangeStatusTest.java
index 1b7e14881a9..4786239a29e 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/SMAPromptChangeStatusTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/SMAPromptChangeStatusTest.java
@@ -124,7 +124,7 @@ public class SMAPromptChangeStatusTest {
changes.clear();
TransitionHelper helper =
new TransitionHelper("Transition to Cancelled", Arrays.asList(cancelTask), TaskStates.Cancelled.getName(),
- null, null, changes, TransitionOption.None);
+ null, null, changes, AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAllAndPersist();
assertEquals("Transition should have no errors", true, results.isEmpty());
@@ -174,10 +174,10 @@ public class SMAPromptChangeStatusTest {
assertEquals("ats.CurrentState wrong " + awa.getAtsId(), awa.getStateMgr().getCurrentStateName() + ";;;",
awa.getSoleAttributeValue(AtsAttributeTypes.CurrentState));
}
- assertEquals("Percent wrong for " + awa.getAtsId(), PercentCompleteTotalUtil.getPercentCompleteTotal(awa),
- totalPercent);
- assertEquals("Hours Spent wrong for " + awa.getAtsId(), HoursSpentUtil.getHoursSpentTotal(awa), hoursSpent,
- 0.0);
+ assertEquals("Percent wrong for " + awa.getAtsId(),
+ PercentCompleteTotalUtil.getPercentCompleteTotal(awa, AtsClientService.get().getServices()), totalPercent);
+ assertEquals("Hours Spent wrong for " + awa.getAtsId(),
+ HoursSpentUtil.getHoursSpentTotal(awa, AtsClientService.get().getServices()), hoursSpent, 0.0);
for (String xml : awa.getAttributesToStringList(AtsAttributeTypes.State)) {
WorkState state = AtsClientService.get().getWorkStateFactory().fromStoreStr(xml);
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 cadd1877d6b..d9b2297b464 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
@@ -101,7 +101,8 @@ public class DemoTestUtil {
public static TeamWorkFlowArtifact createSimpleAction(String title, IAtsChangeSet changes) throws OseeCoreException {
Artifact actionArt =
ActionManager.createAction(null, title, "Description", ChangeType.Improvement, "2", false, null,
- ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())), new Date(),
+ ActionableItems.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName()),
+ AtsClientService.get().getConfig()), new Date(),
AtsClientService.get().getUserService().getCurrentUser(), null, changes);
TeamWorkFlowArtifact teamArt = null;
@@ -114,7 +115,8 @@ public class DemoTestUtil {
}
public static Set<IAtsActionableItem> getActionableItems(DemoActionableItems demoActionableItems) throws OseeCoreException {
- return ActionableItems.getActionableItems(Arrays.asList(demoActionableItems.getName()));
+ return ActionableItems.getActionableItems(Arrays.asList(demoActionableItems.getName()),
+ AtsClientService.get().getConfig());
}
public static IAtsActionableItem getActionableItem(DemoActionableItems demoActionableItems) throws OseeCoreException {
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 e212d6873ab..0b106606042 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
@@ -12,11 +12,6 @@ Import-Package: com.google.inject,
javax.ws.rs.core;version="2.0.0",
org.eclipse.core.runtime,
org.eclipse.core.runtime.jobs,
- org.eclipse.emf.common.util,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.resource,
- org.eclipse.emf.ecore.resource.impl,
- org.eclipse.emf.ecore.xmi.impl,
org.eclipse.osee.ats.api,
org.eclipse.osee.ats.api.ai,
org.eclipse.osee.ats.api.commit,
@@ -45,7 +40,6 @@ Import-Package: com.google.inject,
org.eclipse.osee.ats.core.util,
org.eclipse.osee.ats.core.validator,
org.eclipse.osee.ats.core.workdef,
- org.eclipse.osee.ats.core.workdef.provider,
org.eclipse.osee.ats.core.workflow,
org.eclipse.osee.ats.core.workflow.log,
org.eclipse.osee.ats.core.workflow.state,
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.attribute.resolver.service.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.attribute.resolver.service.xml
index fe7dd86f6c0..2d4c5d14451 100644
--- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.attribute.resolver.service.xml
+++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.attribute.resolver.service.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.client.internal.workflow.AtsAttributeResolverServiceImpl">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.eclipse.osee.ats.core.client.internal.workflow.AtsAttributeResolverServiceImpl"/>
<service>
<provide interface="org.eclipse.osee.ats.api.workdef.IAttributeResolver"/>
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.cache.update.listener.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.cache.update.listener.xml
index 72a37da6d55..e26ade7a3f0 100644
--- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.cache.update.listener.xml
+++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.cache.update.listener.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.client.internal.AtsCacheManagerUpdateListener">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.eclipse.osee.ats.core.client.internal.AtsCacheManagerUpdateListener"/>
<service>
<provide interface="org.eclipse.osee.framework.skynet.core.event.listener.IEventListener"/>
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml
index ceb4275de97..bc95a1bc459 100644
--- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml
+++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml
@@ -1,18 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop" name="org.eclipse.osee.ats.core.client.internal.AtsClientImpl">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop">
<implementation class="org.eclipse.osee.ats.core.client.internal.AtsClientImpl"/>
<service>
<provide interface="org.eclipse.osee.ats.core.client.IAtsClient"/>
<provide interface="org.eclipse.osee.ats.core.config.IAtsConfigProvider"/>
<provide interface="org.eclipse.osee.ats.api.query.IAtsQueryService"/>
- <provide interface="org.eclipse.osee.ats.api.version.IAtsVersionServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider"/>
<provide interface="org.eclipse.osee.ats.core.client.internal.IAtsWorkItemArtifactServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.workflow.IAtsBranchServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider"/>
</service>
<reference bind="setAtsWorkDefinitionService" cardinality="1..1" interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService" name="IAtsWorkDefinitionService" policy="static"/>
- <reference bind="setAtsUserService" cardinality="1..1" interface="org.eclipse.osee.ats.api.user.IAtsUserService" name="IAtsUserService" policy="static"/>
<reference bind="setDatabaseService" cardinality="1..1" interface="org.eclipse.osee.framework.database.IOseeDatabaseService" name="IOseeDatabaseService" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.user.service.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.user.service.xml
index f1889bebb66..b897d9c381e 100644
--- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.user.service.xml
+++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.user.service.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.client.internal.user.AtsUserServiceImpl">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.eclipse.osee.ats.core.client.internal.user.AtsUserServiceImpl"/>
<service>
<provide interface="org.eclipse.osee.ats.api.user.IAtsUserService"/>
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.workdef.store.service.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.workdef.store.service.xml
index 16786d8d2b0..772651803e7 100644
--- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.workdef.store.service.xml
+++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.workdef.store.service.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.client.internal.workdef.AtsWorkDefinitionStore">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
<implementation class="org.eclipse.osee.ats.core.client.internal.workdef.AtsWorkDefinitionStore"/>
<service>
<provide interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionStore"/>
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
index 832cabf0c6c..0b0043eddce 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/IAtsClient.java
@@ -14,6 +14,7 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.ev.IAtsEarnedValueService;
import org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider;
import org.eclipse.osee.ats.api.notify.IAtsNotifier;
@@ -49,7 +50,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author Donald G. Dunne
*/
-public interface IAtsClient extends IAtsNotifier, IAttributeResolverProvider, IAtsReviewServiceProvider, IAtsBranchServiceProvider, IAtsWorkItemArtifactServiceProvider, IAtsWorkItemServiceProvider, IAtsConfigProvider, ITeamDefinitionFactory, IActionableItemFactory, IArtifactProvider, IVersionFactory, IAtsQueryService, IAtsVersionServiceProvider, IAtsEarnedValueServiceProvider {
+public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolverProvider, IAtsReviewServiceProvider, IAtsBranchServiceProvider, IAtsWorkItemArtifactServiceProvider, IAtsWorkItemServiceProvider, IAtsConfigProvider, ITeamDefinitionFactory, IActionableItemFactory, IArtifactProvider, IVersionFactory, IAtsQueryService, IAtsVersionServiceProvider, IAtsEarnedValueServiceProvider {
<T extends IAtsConfigObject> Artifact storeConfigObject(T configObject, IAtsChangeSet changes) throws OseeCoreException;
@@ -86,6 +87,7 @@ public interface IAtsClient extends IAtsNotifier, IAttributeResolverProvider, IA
@Override
IAtsVersionAdmin getVersionService() throws OseeStateException;
+ @Override
IAtsUserService getUserService() throws OseeStateException;
@Override
@@ -114,6 +116,8 @@ public interface IAtsClient extends IAtsNotifier, IAttributeResolverProvider, IA
IAtsUtilService getUtilService();
+ IAtsServices getServices();
+
String getConfigValue(String key);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionManager.java
index 74a0050c507..e14836b3c60 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionManager.java
@@ -61,7 +61,7 @@ public class ActionManager {
(ActionArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.Action, AtsUtilCore.getAtsBranch());
setArtifactIdentifyData(actionArt, title, desc, changeType, priority, validationRequired, needByDate);
AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), actionArt,
- TeamDefinitions.getTopTeamDefinition(), null);
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()), null);
// Retrieve Team Definitions corresponding to selected Actionable Items
if (monitor != null) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java
index f906960bb67..9930dcbf3ae 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java
@@ -43,7 +43,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.stateitem.AtsStateItemCoreManager;
import org.eclipse.osee.ats.core.client.workflow.stateitem.IAtsStateItemCore;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.core.data.IOseeBranch;
@@ -285,10 +284,10 @@ public class AtsBranchManagerCore {
return Result.FalseResult;
}
if (teamArt.getTeamDefinition().isTeamUsesVersions()) {
- if (!AtsVersionService.get().hasTargetedVersion(teamArt)) {
+ if (!AtsClientService.get().getVersionService().hasTargetedVersion(teamArt)) {
return new Result(false, "Workflow not targeted for Version");
}
- IAtsVersion targetedVersion = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion targetedVersion = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
Result result = targetedVersion.isAllowCommitBranchInherited();
if (result.isFalse()) {
return result;
@@ -319,10 +318,10 @@ public class AtsBranchManagerCore {
}
if (teamArt.getTeamDefinition().isTeamUsesVersions()) {
- if (!AtsVersionService.get().hasTargetedVersion(teamArt)) {
+ if (!AtsClientService.get().getVersionService().hasTargetedVersion(teamArt)) {
return new Result(false, "Workflow not targeted for Version");
}
- IAtsVersion targetedVersion = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion targetedVersion = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
Result result = targetedVersion.isAllowCreateBranchInherited();
if (result.isFalse()) {
return result;
@@ -368,8 +367,8 @@ public class AtsBranchManagerCore {
public static Collection<ICommitConfigItem> getConfigArtifactsConfiguredToCommitTo(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
Set<ICommitConfigItem> configObjects = new HashSet<ICommitConfigItem>();
if (teamArt.getTeamDefinition().isTeamUsesVersions()) {
- if (AtsVersionService.get().hasTargetedVersion(teamArt)) {
- AtsVersionService.get().getTargetedVersion(teamArt).getParallelVersions(configObjects);
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(teamArt)) {
+ AtsClientService.get().getVersionService().getTargetedVersion(teamArt).getParallelVersions(configObjects);
}
} else {
if (teamArt.isTeamWorkflow() && AtsClientService.get().getBranchService().isBranchValid(
@@ -382,8 +381,8 @@ public class AtsBranchManagerCore {
public static ICommitConfigItem getParentBranchConfigArtifactConfiguredToCommitTo(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
if (teamArt.getTeamDefinition().isTeamUsesVersions()) {
- if (AtsVersionService.get().hasTargetedVersion(teamArt)) {
- return AtsVersionService.get().getTargetedVersion(teamArt);
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(teamArt)) {
+ return AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
}
} else {
if (teamArt.isTeamWorkflow() && AtsClientService.get().getBranchService().isBranchValid(
@@ -482,7 +481,7 @@ public class AtsBranchManagerCore {
// Check for parent branch uuid in Version artifact
if (teamArt.getTeamDefinition().isTeamUsesVersions()) {
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
if (verArt != null) {
parentBranch = AtsClientService.get().getBranchService().getBranch((IAtsConfigObject) verArt);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
index b9de09267c5..77acb4ea8f3 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.ats.api.util.ColumnAdapter;
import org.eclipse.osee.ats.api.util.ColumnType;
import org.eclipse.osee.ats.api.util.IColumn;
import org.eclipse.osee.ats.core.client.internal.Activator;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
@@ -83,8 +84,8 @@ public class EarnedValueReportOperation extends AbstractOperation {
result.setValue(Related_Action_Id, getActionId(art));
result.setValue(Related_Action_Name, art.getName());
result.setValue(Related_Action_Type, awa.getParentTeamWorkflow().getTeamDefinition().getName());
- result.setValue(Related_Action_Percent,
- String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal((IAtsWorkItem) art)));
+ result.setValue(Related_Action_Percent, String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal(
+ (IAtsWorkItem) art, AtsClientService.get().getServices())));
result.setValue(Related_Action_Guid, art.getGuid());
}
}
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 acda4a2676c..68ef954ca76 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
@@ -17,11 +17,13 @@ import java.util.List;
import java.util.Map;
import org.eclipse.osee.ats.api.IAtsConfigObject;
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.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.ev.IAtsEarnedValueService;
+import org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider;
import org.eclipse.osee.ats.api.notify.AtsNotificationCollector;
import org.eclipse.osee.ats.api.query.IAtsQuery;
import org.eclipse.osee.ats.api.review.IAtsReviewService;
@@ -60,6 +62,7 @@ import org.eclipse.osee.ats.core.client.internal.store.TeamDefinitionArtifactRea
import org.eclipse.osee.ats.core.client.internal.store.TeamDefinitionArtifactWriter;
import org.eclipse.osee.ats.core.client.internal.store.VersionArtifactReader;
import org.eclipse.osee.ats.core.client.internal.store.VersionArtifactWriter;
+import org.eclipse.osee.ats.core.client.internal.user.AtsUserServiceImpl;
import org.eclipse.osee.ats.core.client.internal.workdef.AtsWorkDefinitionCacheProvider;
import org.eclipse.osee.ats.core.client.internal.workdef.AtsWorkItemArtifactProviderImpl;
import org.eclipse.osee.ats.core.client.internal.workflow.AtsAttributeResolverServiceImpl;
@@ -130,14 +133,8 @@ public class AtsClientImpl implements IAtsClient {
this.workDefService = workDefService;
}
- public void setAtsUserService(IAtsUserService atsUserService) {
- this.userService = atsUserService;
- this.userServiceClient = (IAtsUserServiceClient) userService;
- }
-
public void start() throws OseeCoreException {
Conditions.checkNotNull(workDefService, "IAtsWorkDefinitionService");
- Conditions.checkNotNull(userService, "IAtsUserService");
Map<Class<? extends IAtsConfigObject>, IAtsArtifactWriter<? extends IAtsConfigObject>> writers =
new HashMap<Class<? extends IAtsConfigObject>, IAtsArtifactWriter<? extends IAtsConfigObject>>();
@@ -148,6 +145,9 @@ public class AtsClientImpl implements IAtsClient {
writers.put(IAtsTeamDefinition.class, new TeamDefinitionArtifactWriter());
writers.put(IAtsVersion.class, new VersionArtifactWriter());
+ userService = new AtsUserServiceImpl();
+ userServiceClient = (IAtsUserServiceClient) userService;
+
artifactStore = new AtsArtifactStore(readers, writers);
configCacheProvider = new AtsConfigCacheProvider(artifactStore);
earnedValueService = new AtsEarnedValueImpl();
@@ -444,7 +444,7 @@ public class AtsClientImpl implements IAtsClient {
@Override
public IAtsStateFactory getStateFactory() {
if (stateFactory == null) {
- stateFactory = AtsCoreFactory.newStateFactory(getAttributeResolver(), getUserService());
+ stateFactory = AtsCoreFactory.newStateFactory(getServices(), getLogFactory());
}
return stateFactory;
}
@@ -467,8 +467,17 @@ public class AtsClientImpl implements IAtsClient {
@Override
public IAtsColumnUtilities getColumnUtilities() {
+ final IAtsEarnedValueService fEarnedValueService = earnedValueService;
if (columnUtilities == null) {
- columnUtilities = AtsCoreFactory.getColumnUtilities(getReviewService(), getWorkItemService());
+ columnUtilities =
+ AtsCoreFactory.getColumnUtilities(getReviewService(), getWorkItemService(),
+ new IAtsEarnedValueServiceProvider() {
+
+ @Override
+ public IAtsEarnedValueService getEarnedValueService() throws OseeStateException {
+ return fEarnedValueService;
+ }
+ });
}
return columnUtilities;
}
@@ -502,4 +511,14 @@ public class AtsClientImpl implements IAtsClient {
return result;
}
+ @Override
+ public IAtsServices getServices() {
+ return this;
+ }
+
+ @Override
+ public IAtsWorkDefinitionService getWorkDefService() {
+ return workDefService;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/ActionableItemArtifactWriter.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/ActionableItemArtifactWriter.java
index eac6fee6527..39afcc92c78 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/ActionableItemArtifactWriter.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/ActionableItemArtifactWriter.java
@@ -16,6 +16,7 @@ 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.util.IAtsChangeSet;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.internal.config.AtsArtifactConfigCache;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.util.AtsObjects;
@@ -100,9 +101,11 @@ public class ActionableItemArtifactWriter extends AbstractAtsArtifactWriter<IAts
}
// set parent artifact to top team def
- if (ai.getParentActionableItem() == null && !ai.getGuid().equals(ActionableItems.getTopActionableItem().getGuid())) {
+ if (ai.getParentActionableItem() == null && !ai.getGuid().equals(
+ ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()).getGuid())) {
// if parent is null, add to top team definition
- Artifact topAIArt = cache.getSoleArtifact(ActionableItems.getTopActionableItem());
+ Artifact topAIArt =
+ cache.getSoleArtifact(ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()));
topAIArt.addChild(artifact);
changes.add(topAIArt);
} else {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/TeamDefinitionArtifactWriter.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/TeamDefinitionArtifactWriter.java
index 4aea6108e2e..ab333f99a9a 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/TeamDefinitionArtifactWriter.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/TeamDefinitionArtifactWriter.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.internal.config.AtsArtifactConfigCache;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsObjects;
@@ -129,9 +130,10 @@ public class TeamDefinitionArtifactWriter extends AbstractAtsArtifactWriter<IAts
// set parent artifact to top team def
if (teamDef.getParentTeamDef() == null && !teamDef.getGuid().equals(
- TeamDefinitions.getTopTeamDefinition().getGuid())) {
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()).getGuid())) {
// if parent is null, add to top team definition
- Artifact topTeamDefArt = cache.getSoleArtifact(TeamDefinitions.getTopTeamDefinition());
+ Artifact topTeamDefArt =
+ cache.getSoleArtifact(TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()));
topTeamDefArt.addChild(artifact);
changes.add(topTeamDefArt);
} else {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/VersionArtifactWriter.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/VersionArtifactWriter.java
index 1b2b0d2bc1d..017980f3b1c 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/VersionArtifactWriter.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/VersionArtifactWriter.java
@@ -17,8 +17,8 @@ import org.eclipse.osee.ats.api.data.AtsRelationTypes;
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.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.internal.config.AtsArtifactConfigCache;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -74,7 +74,7 @@ public class VersionArtifactWriter extends AbstractAtsArtifactWriter<IAtsVersion
}
// set parent artifact to top team def
- IAtsTeamDefinition teamDefinition = AtsVersionService.get().getTeamDefinition(version);
+ IAtsTeamDefinition teamDefinition = AtsClientService.get().getVersionService().getTeamDefinition(version);
if (teamDefinition != null) {
Artifact teamDefArt = cache.getArtifact(teamDefinition);
if (teamDefArt != null) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java
index 6d4cabc798f..0a003eab3ef 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java
@@ -107,7 +107,7 @@ public class DecisionReviewManager {
TransitionHelper helper =
new TransitionHelper("Transition to " + toState.getName(), Arrays.asList(reviewArt), toState.getName(),
Arrays.asList((user == null ? reviewArt.getStateMgr().getAssignees().iterator().next() : user)), null,
- changes, TransitionOption.None);
+ changes, AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (results.isEmpty()) {
@@ -139,7 +139,7 @@ public class DecisionReviewManager {
// transition to decision
TransitionHelper helper =
new TransitionHelper("Transition to Decision", Arrays.asList(decRev), DecisionReviewState.Decision.getName(),
- assignees, null, changes, TransitionOption.OverrideAssigneeCheck);
+ assignees, null, changes, AtsClientService.get().getServices(), TransitionOption.OverrideAssigneeCheck);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
index 39f6f2d6879..e8f6b08ae7e 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java
@@ -96,7 +96,7 @@ public class PeerToPeerReviewManager {
TransitionHelper helper =
new TransitionHelper("Transition to " + toState.getName(), Arrays.asList(reviewArt), toState.getName(),
Arrays.asList(reviewArt.getStateMgr().getAssignees().iterator().next()), null, changes,
- TransitionOption.OverrideAssigneeCheck);
+ AtsClientService.get().getServices(), TransitionOption.OverrideAssigneeCheck);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (results.isEmpty()) {
@@ -170,7 +170,8 @@ public class PeerToPeerReviewManager {
actionableItem).getWorkDefinition(), null, reviewTitle, againstState, createdDate, createdBy, changes);
peerArt.getActionableItemsDam().addActionableItem(actionableItem);
IAtsTeamDefinition teamDef = actionableItem.getTeamDefinitionInherited();
- AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), peerArt, teamDef, changes);
+ AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), peerArt, teamDef,
+ changes);
changes.add(peerArt);
return peerArt;
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java
index eaee9c54211..3cf04a71f74 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.core.client.internal.Activator;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
@@ -121,7 +122,7 @@ public class ReviewManager {
public static double getHoursSpent(TeamWorkFlowArtifact teamArt, IStateToken relatedToState) throws OseeCoreException {
double spent = 0;
for (AbstractReviewArtifact reviewArt : getReviews(teamArt, relatedToState)) {
- spent += HoursSpentUtil.getHoursSpentTotal(reviewArt);
+ spent += HoursSpentUtil.getHoursSpentTotal(reviewArt, AtsClientService.get().getServices());
}
return spent;
}
@@ -135,7 +136,7 @@ public class ReviewManager {
int spent = 0;
Collection<AbstractReviewArtifact> reviewArts = getReviews(teamArt, relatedToState);
for (AbstractReviewArtifact reviewArt : reviewArts) {
- spent += PercentCompleteTotalUtil.getPercentCompleteTotal(reviewArt);
+ spent += PercentCompleteTotalUtil.getPercentCompleteTotal(reviewArt, AtsClientService.get().getServices());
}
if (spent == 0) {
return 0;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java
index da2cea7881f..fe514927d3c 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java
@@ -87,7 +87,7 @@ public class ValidateReviewManager {
TransitionHelper helper =
new TransitionHelper("Transition to Decision", Arrays.asList(decRev),
DecisionReviewState.Decision.getName(), Arrays.asList(teamArt.getCreatedBy()), null, changes,
- TransitionOption.None);
+ AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (!results.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java
index d1358b8b883..f69f2e98c39 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java
@@ -230,7 +230,7 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
int spent = 0;
Collection<TaskArtifact> taskArts = getTaskArtifacts(relatedToState);
for (TaskArtifact taskArt : taskArts) {
- spent += PercentCompleteTotalUtil.getPercentCompleteTotal(taskArt);
+ spent += PercentCompleteTotalUtil.getPercentCompleteTotal(taskArt, AtsClientService.get().getServices());
}
if (spent == 0) {
return 0;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskManager.java
index e468f7f555b..b7ff9d50b9b 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/TaskManager.java
@@ -64,7 +64,7 @@ public class TaskManager {
}
TransitionHelper helper =
new TransitionHelper("Transition to Completed", Arrays.asList(taskArt), TaskStates.Completed.getName(),
- null, null, changes);
+ null, null, changes, AtsClientService.get().getServices());
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
@@ -85,7 +85,8 @@ public class TaskManager {
}
TransitionHelper helper =
new TransitionHelper("Transition to InWork", Arrays.asList(taskArt), TaskStates.InWork.getName(),
- Arrays.asList(toUser), null, changes, TransitionOption.OverrideAssigneeCheck);
+ Arrays.asList(toUser), null, changes, AtsClientService.get().getServices(),
+ TransitionOption.OverrideAssigneeCheck);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (!results.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java
index 70c53220de4..ae060c67ee3 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java
@@ -33,7 +33,6 @@ import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
@@ -152,7 +151,8 @@ public class CreateTasksOperation extends AbstractOperation {
if (derivedArt instanceof TeamWorkFlowArtifact) {
derivedTeamWfArt = (TeamWorkFlowArtifact) derivedArt;
- IAtsVersion derivedArtVersion = AtsVersionService.get().getTargetedVersion(derivedTeamWfArt);
+ IAtsVersion derivedArtVersion =
+ AtsClientService.get().getVersionService().getTargetedVersion(derivedTeamWfArt);
boolean isDestVersion = destVersion.equals(derivedArtVersion);
ActionableItemManager actionableItemsDamFromArt = derivedTeamWfArt.getActionableItemsDam();
@@ -190,10 +190,10 @@ public class CreateTasksOperation extends AbstractOperation {
destTeamWf =
ActionManager.createTeamWorkflow(actionArt, teamDef, Collections.singleton(actionableItemArt),
- Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), changes, createdDate, createdBy,
- null, CreateTeamOption.Duplicate_If_Exists);
+ Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()), changes, createdDate,
+ createdBy, null, CreateTeamOption.Duplicate_If_Exists);
if (destTeamWf != null) {
- AtsVersionService.get().setTargetedVersionAndStore(destTeamWf, destVersion);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(destTeamWf, destVersion);
}
}
return destTeamWf;
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java
index b7ff760fd34..e3ae5d7b8c9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java
@@ -33,7 +33,6 @@ 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.task.AbstractTaskableArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.model.Branch;
@@ -103,7 +102,7 @@ public class TeamWorkFlowArtifact extends AbstractTaskableArtifact implements IA
public String getEditorTitle() throws OseeCoreException {
try {
if (getTeamDefinition().isTeamUsesVersions()) {
- IAtsVersion version = AtsVersionService.get().getTargetedVersion(this);
+ IAtsVersion version = AtsClientService.get().getVersionService().getTargetedVersion(this);
return String.format("%s: [%s] - %s", getType(), version != null ? version : "Un-Targeted", getName());
}
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
index 1c65053b9ec..adbf29f2eff 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java
@@ -34,6 +34,7 @@ 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.core.client.internal.Activator;
+import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
@@ -176,7 +177,7 @@ public class TeamWorkFlowManager {
private Result transitionToState(boolean popup, TeamWorkFlowArtifact teamArt, IStateToken toState, Collection<IAtsUser> transitionToAssignees, IAtsChangeSet changes) {
TransitionHelper helper =
new TransitionHelper("Transition to " + toState.getName(), Arrays.asList(teamArt), toState.getName(),
- transitionToAssignees, null, changes, transitionOptions);
+ transitionToAssignees, null, changes, AtsClientService.get().getServices(), transitionOptions);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
if (results.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
index 6d308105af6..09e44ad71f5 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
@@ -261,7 +261,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
if (est == 0) {
return getEstimatedHoursFromArtifact();
}
- return est - est * PercentCompleteTotalUtil.getPercentCompleteTotal(this) / 100.0;
+ return est - est * PercentCompleteTotalUtil.getPercentCompleteTotal(this, AtsClientService.get().getServices()) / 100.0;
}
public double getRemainHoursTotal() throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats.core.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core.test/META-INF/MANIFEST.MF
index 53cb995d452..b79b67a34b8 100644
--- a/plugins/org.eclipse.osee.ats.core.test/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core.test/META-INF/MANIFEST.MF
@@ -10,4 +10,3 @@ Require-Bundle: org.junit,
org.hamcrest.core,
org.objenesis
Bundle-Vendor: Eclipse Open System Engineering Environment
-Import-Package: org.eclipse.emf.ecore.util
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriterTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriterTest.java
index b47cbb27a88..b6405321794 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriterTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriterTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.internal.log;
+import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Calendar;
@@ -21,6 +22,7 @@ import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.api.workflow.log.ILogStorageProvider;
import org.eclipse.osee.ats.api.workflow.log.LogType;
+import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.junit.Before;
import org.junit.Test;
@@ -56,6 +58,7 @@ public class AtsLogWriterTest {
public void testEmpty() {
when(storeProvider.getLogXml()).thenReturn("");
AtsLogWriter writer = new AtsLogWriter(log, storeProvider);
+ when(storeProvider.saveLogXml(any(String.class), any(IAtsChangeSet.class))).thenReturn(Result.TrueResult);
writer.save(changes);
verify(storeProvider).saveLogXml(getEmptyLog(), changes);
}
@@ -72,6 +75,7 @@ public class AtsLogWriterTest {
item = log.addLog(LogType.StateEntered, "Analyze", "", "456");
item.setDate(testDate2011);
AtsLogWriter writer = new AtsLogWriter(log, storeProvider);
+ when(storeProvider.saveLogXml(any(String.class), any(IAtsChangeSet.class))).thenReturn(Result.TrueResult);
writer.save(changes);
verify(storeProvider).saveLogXml(getLogStr(), changes);
}
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 c7f443cfc93..ba64cbe604b 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
@@ -17,6 +17,7 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+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.notify.AtsNotificationCollector;
@@ -30,6 +31,7 @@ import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
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.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
import org.eclipse.osee.ats.core.model.impl.WorkStateImpl;
@@ -60,6 +62,8 @@ public class StateManagerStoreTest {
@Mock IAtsWorkStateFactory workStateFactory;
@Mock IAtsUserService userService;
@Mock AtsNotificationCollector notifications;
+ @Mock IAtsLogFactory logFactory;
+ @Mock IAtsServices services;
// @formatter:on
@Before
@@ -73,6 +77,9 @@ public class StateManagerStoreTest {
when(workDef.getStateByName("Completed")).thenReturn(completedState);
when(completedState.getStateType()).thenReturn(StateType.Completed);
+ when(services.getAttributeResolver()).thenReturn(attrResolver);
+ when(services.getUserService()).thenReturn(userService);
+
}
@Test
@@ -82,7 +89,7 @@ public class StateManagerStoreTest {
@Test
public void testWriteToStore() {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
TestState state = new TestState("Analyze", StateType.Working);
StateManagerUtility.initializeStateMachine(stateMgr, state, Arrays.asList(Joe, Kay), Joe, changes);
Assert.assertEquals("Analyze", stateMgr.getCurrentStateName());
@@ -96,7 +103,7 @@ public class StateManagerStoreTest {
@Test
public void testLoad() {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
stateMgr.setCurrentStateName("Analyze");
TestState state = new TestState("Analyze", StateType.Working);
StateManagerUtility.initializeStateMachine(stateMgr, state, Arrays.asList(Joe, Kay), Joe, changes);
@@ -114,7 +121,7 @@ public class StateManagerStoreTest {
@Test
public void testPostPersistNotifyReset() {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
stateMgr.setCurrentStateName("Analyze");
TestState state = new TestState("Analyze", StateType.Working);
StateManagerUtility.initializeStateMachine(stateMgr, state, Arrays.asList(Joe, Kay), Joe, changes);
@@ -134,7 +141,7 @@ public class StateManagerStoreTest {
@Test
public void testGetPostPersistExecutionListener() {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
stateMgr.setCurrentStateName("Analyze");
TestState state = new TestState("Analyze", StateType.Working);
StateManagerUtility.initializeStateMachine(stateMgr, state, Arrays.asList(Joe, Kay), Joe, changes);
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
index 7b1c934e55a..3b27789acd4 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java
@@ -19,11 +19,13 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
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.log.IAtsLogFactory;
import org.eclipse.osee.ats.core.AbstractUserTest;
import org.eclipse.osee.ats.core.mock.MockWorkItem;
import org.eclipse.osee.ats.core.model.impl.WorkStateImpl;
@@ -48,6 +50,8 @@ public class StateManagerTest extends AbstractUserTest {
@Mock private IAtsWorkDefinition workDef;
@Mock private IAtsStateDefinition endorseStateDef;
@Mock private IAtsStateDefinition analyzeStateDef;
+ @Mock private IAtsLogFactory logFactory;
+ @Mock private IAtsServices services;
// @formatter:on
@Override
@@ -56,13 +60,14 @@ public class StateManagerTest extends AbstractUserTest {
super.setup();
MockWorkItem workItem = Mockito.spy(new MockWorkItem("mock work item", "Endorse", StateType.Working));
- stateMgr = Mockito.spy(new StateManager(workItem));
+ stateMgr = Mockito.spy(new StateManager(workItem, logFactory, services));
when(workItem.getWorkDefinition()).thenReturn(workDef);
when(workDef.getStateByName("endorse")).thenReturn(endorseStateDef);
when(endorseStateDef.getStateType()).thenReturn(StateType.Working);
when(workDef.getStateByName("analyze")).thenReturn(analyzeStateDef);
when(analyzeStateDef.getStateType()).thenReturn(StateType.Working);
+
}
@Test
@@ -406,7 +411,7 @@ public class StateManagerTest extends AbstractUserTest {
@Test
public void testIsHoursEqual() {
IAtsWorkItem awa = Mockito.mock(IAtsWorkItem.class);
- StateManager mgr = new StateManager(awa);
+ StateManager mgr = new StateManager(awa, logFactory, services);
assertTrue(mgr.isHoursEqual(1.0, 1.0));
assertTrue(mgr.isHoursEqual(01.0, 1.0));
@@ -422,7 +427,7 @@ public class StateManagerTest extends AbstractUserTest {
@Test
public void testSetMetrics() throws OseeCoreException {
IAtsWorkItem awa = mock(IAtsWorkItem.class);
- StateManager mgr = new StateManager(awa);
+ StateManager mgr = new StateManager(awa, logFactory, services);
IAtsStateDefinition state = mock(IAtsStateDefinition.class);
when(state.getName()).thenReturn("Endorse");
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
index 7bbe637c607..8032fcfe856 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
+import org.eclipse.osee.ats.core.internal.log.AtsLogFactory;
import org.eclipse.osee.ats.core.internal.state.StateManager;
import org.eclipse.osee.ats.core.util.AtsUserGroup;
import org.eclipse.osee.framework.jdk.core.type.Identity;
@@ -51,7 +52,7 @@ public class MockWorkItem implements IAtsWorkItem {
public MockWorkItem(String name) {
this.name = name;
atsId = name;
- this.stateMgr = new StateManager(this);
+ this.stateMgr = new StateManager(this, new AtsLogFactory(), null);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/HoursSpentUtilTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/HoursSpentUtilTest.java
index ecc1b7e35d7..2644a7b8c08 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/HoursSpentUtilTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/HoursSpentUtilTest.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.core.util;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Arrays;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider;
import org.eclipse.osee.ats.api.user.IAtsUserService;
@@ -25,7 +26,6 @@ import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.workflow.state.SimpleTeamState;
import org.junit.Assert;
import org.junit.Before;
@@ -55,41 +55,37 @@ public class HoursSpentUtilTest {
@Mock IAttributeResolver attrResolver;
@Mock IAtsBranchServiceProvider branchServiceProvider;
@Mock IAtsReviewServiceProvider reviewServiceProvider;
+ @Mock IAtsServices services;
// @formatter:on
- AtsCoreService atsCore = new AtsCoreService();
-
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
- atsCore.setAtsUserService(userService);
- AtsCoreService.setAtsWorkDefService(workDefService);
- AtsCoreService.setAtsWorkItemServiceProvider(workItemServiceProvider);
- AtsCoreService.setAtsAttributeResolver(attrResolver);
- AtsCoreService.setAtsBranchServiceProvider(branchServiceProvider);
- AtsCoreService.setAtsReviewServiceProvider(reviewServiceProvider);
- atsCore.start();
-
when(teamWf.getStateMgr()).thenReturn(wfStateMgr);
when(task1.getStateMgr()).thenReturn(taskStateMgr);
when(task2.getStateMgr()).thenReturn(taskStateMgr);
when(task3.getStateMgr()).thenReturn(taskStateMgr);
when(pr1.getStateMgr()).thenReturn(prStateMgr);
- when(AtsCoreService.getWorkItemService()).thenReturn(workItemService);
when(wfStateMgr.getVisitedStateNames()).thenReturn(Arrays.asList("Endorse", "Analyze", "Authorize", "Implement"));
when(wfStateMgr.getHoursSpent("Endorse")).thenReturn(0.0);
when(wfStateMgr.getHoursSpent("Analyze")).thenReturn(2.0);
when(wfStateMgr.getHoursSpent("Authorize")).thenReturn(0.0);
when(wfStateMgr.getHoursSpent("Implement")).thenReturn(18.0);
+
+ when(services.getAttributeResolver()).thenReturn(attrResolver);
+ when(services.getUserService()).thenReturn(userService);
+ when(services.getWorkItemService()).thenReturn(workItemService);
+
}
@Test
public void testGetHoursSpentTotalWithState() {
- double hours = HoursSpentUtil.getHoursSpentTotal(teamWf, new SimpleTeamState("Implement", StateType.Working));
+ double hours =
+ HoursSpentUtil.getHoursSpentTotal(teamWf, new SimpleTeamState("Implement", StateType.Working), services);
Assert.assertEquals(20.0, hours, 0);
}
@@ -108,7 +104,7 @@ public class HoursSpentUtilTest {
when(prStateMgr.getHoursSpent("In-Work")).thenReturn(5.0);
when(prStateMgr.getHoursSpent("Complete")).thenReturn(4.0);
- double hours = HoursSpentUtil.getHoursSpentTotal(teamWf);
+ double hours = HoursSpentUtil.getHoursSpentTotal(teamWf, services);
Assert.assertEquals(35.0, hours, 0);
}
@@ -121,7 +117,7 @@ public class HoursSpentUtilTest {
when(taskStateMgr.getHoursSpent("In-Work")).thenReturn(6.0);
when(taskStateMgr.getHoursSpent("Complete")).thenReturn(4.0);
- double hours = HoursSpentUtil.getHoursSpentFromTasks(teamWf);
+ double hours = HoursSpentUtil.getHoursSpentFromTasks(teamWf, services);
Assert.assertEquals(10.0, hours, 0);
}
@@ -138,17 +134,17 @@ public class HoursSpentUtilTest {
SimpleTeamState relatedToState = new SimpleTeamState("In-Work", StateType.Working);
when(workItemService.getTasks(teamWf, relatedToState)).thenReturn(Arrays.asList(task2));
- double hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState);
+ double hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState, services);
Assert.assertEquals(6.0, hours, 0);
relatedToState = new SimpleTeamState("Complete", StateType.Working);
when(workItemService.getTasks(teamWf, relatedToState)).thenReturn(Arrays.asList(task2, task3));
- hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState);
+ hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState, services);
Assert.assertEquals(12.0, hours, 0);
relatedToState = new SimpleTeamState("Implement", StateType.Working);
when(workItemService.getTasks(teamWf, relatedToState)).thenReturn(new ArrayList<IAtsTask>());
- hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState);
+ hours = HoursSpentUtil.getHoursSpentFromStateTasks(teamWf, relatedToState, services);
Assert.assertEquals(0.0, hours, 0);
}
@@ -158,12 +154,12 @@ public class HoursSpentUtilTest {
SimpleTeamState relatedToState = new SimpleTeamState("In-Work", StateType.Working);
when(workItemService.getReviews(teamWf, relatedToState)).thenReturn(Arrays.asList(pr1));
- double hours = HoursSpentUtil.getHoursSpentStateReview(teamWf, relatedToState);
+ double hours = HoursSpentUtil.getHoursSpentStateReview(teamWf, relatedToState, services);
Assert.assertEquals(2.0, hours, 0);
relatedToState = new SimpleTeamState("Implement", StateType.Working);
when(workItemService.getReviews(teamWf, relatedToState)).thenReturn(new ArrayList<IAtsAbstractReview>());
- hours = HoursSpentUtil.getHoursSpentStateReview(teamWf, relatedToState);
+ hours = HoursSpentUtil.getHoursSpentStateReview(teamWf, relatedToState, services);
Assert.assertEquals(0.0, hours, 0);
}
@@ -176,7 +172,7 @@ public class HoursSpentUtilTest {
when(prStateMgr.getHoursSpent("In-Work")).thenReturn(0.0);
when(prStateMgr.getHoursSpent("Complete")).thenReturn(15.0);
- double hours = HoursSpentUtil.getHoursSpentReview(teamWf);
+ double hours = HoursSpentUtil.getHoursSpentReview(teamWf, services);
Assert.assertEquals(15.0, hours, 0);
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_JT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_JT_Suite.java
index 744079870a7..30bed3a96c0 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_JT_Suite.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_JT_Suite.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.workdef;
-import org.eclipse.osee.ats.core.workdef.provider.AtsCore_WorkDefProvider_JT_Suite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
AtsWorkDefinitionAdminImplTest.class,
- AtsCore_WorkDefProvider_JT_Suite.class,
WorkDefinitionMatchTest.class,
WorkDefinitionSheetTest.class,
StateEventTypeTest.class,
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/BooleanDefUtilTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/BooleanDefUtilTest.java
deleted file mode 100644
index acec7f022f8..00000000000
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/BooleanDefUtilTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.workdef.provider;
-
-import org.junit.Assert;
-import org.eclipse.osee.ats.dsl.BooleanDefUtil;
-import org.eclipse.osee.ats.dsl.atsDsl.BooleanDef;
-import org.junit.Test;
-
-/**
- * Test case for {@link BooleanDefUtil}
- *
- * @author Donald G. Dunne
- */
-public class BooleanDefUtilTest {
-
- @Test
- public void testConstructor() {
- new BooleanDefUtil();
- }
-
- @Test
- public void testGet() {
- Assert.assertFalse(BooleanDefUtil.get(BooleanDef.NONE, false));
- Assert.assertTrue(BooleanDefUtil.get(BooleanDef.NONE, true));
-
- Assert.assertFalse(BooleanDefUtil.get(BooleanDef.FALSE, false));
- Assert.assertFalse(BooleanDefUtil.get(BooleanDef.FALSE, true));
-
- Assert.assertTrue(BooleanDefUtil.get(BooleanDef.TRUE, false));
- Assert.assertTrue(BooleanDefUtil.get(BooleanDef.TRUE, true));
-
- Assert.assertTrue(BooleanDefUtil.get(null, true));
-
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/UserRefUtilTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/UserRefUtilTest.java
deleted file mode 100644
index c3dad38b006..00000000000
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/UserRefUtilTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.workdef.provider;
-
-import java.util.Set;
-import org.junit.Assert;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.osee.ats.dsl.UserRefUtil;
-import org.eclipse.osee.ats.dsl.atsDsl.AtsDslPackage;
-import org.eclipse.osee.ats.dsl.atsDsl.UserByName;
-import org.eclipse.osee.ats.dsl.atsDsl.UserByUserId;
-import org.eclipse.osee.ats.dsl.atsDsl.UserRef;
-import org.eclipse.osee.ats.dsl.atsDsl.impl.AtsDslFactoryImpl;
-import org.eclipse.osee.ats.dsl.atsDsl.impl.TeamDefImpl;
-import org.junit.Test;
-
-/**
- * @author Donald G. Dunne
- */
-public class UserRefUtilTest {
-
- @Test
- public void testConstructor() {
- new UserRefUtil();
- }
-
- @Test
- public void testGetUserIds() {
-
- TeamDefImpl teamDef = (TeamDefImpl) AtsDslFactoryImpl.init().createTeamDef();
-
- EList<UserRef> lead =
- new EObjectContainmentEList<UserRef>(UserRef.class, teamDef, AtsDslPackage.TEAM_DEF__MEMBER);
-
- UserByUserId userRef = AtsDslFactoryImpl.init().createUserByUserId();
- userRef.setUserId("asdf");
- lead.add(userRef);
-
- UserByUserId userRef2 = AtsDslFactoryImpl.init().createUserByUserId();
- userRef2.setUserId("qwer");
- lead.add(userRef2);
-
- UserByName userRef3 = AtsDslFactoryImpl.init().createUserByName();
- userRef3.setUserName("name");
- lead.add(userRef3);
-
- Set<String> userIds = UserRefUtil.getUserIds(lead);
- Assert.assertEquals(2, userIds.size());
- Assert.assertTrue(userIds.contains("asdf"));
- Assert.assertTrue(userIds.contains("qwer"));
- }
-
- @Test
- public void testGetUserNames() {
- TeamDefImpl teamDef = (TeamDefImpl) AtsDslFactoryImpl.init().createTeamDef();
-
- EList<UserRef> lead =
- new EObjectContainmentEList<UserRef>(UserRef.class, teamDef, AtsDslPackage.TEAM_DEF__MEMBER);
-
- UserByName userRef = AtsDslFactoryImpl.init().createUserByName();
- userRef.setUserName("asdf");
- lead.add(userRef);
-
- UserByName userRef2 = AtsDslFactoryImpl.init().createUserByName();
- userRef2.setUserName("qwer");
- lead.add(userRef2);
-
- UserByUserId userRef3 = AtsDslFactoryImpl.init().createUserByUserId();
- userRef3.setUserId("name");
- lead.add(userRef3);
-
- Set<String> userIds = UserRefUtil.getUserNames(lead);
- Assert.assertEquals(2, userIds.size());
- Assert.assertTrue(userIds.contains("asdf"));
- Assert.assertTrue(userIds.contains("qwer"));
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
index d92c060f4a9..2fb11740b87 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java
@@ -14,6 +14,7 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+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;
@@ -24,6 +25,7 @@ import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
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.log.IAtsLogFactory;
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.AtsWorkStateFactory;
@@ -55,6 +57,8 @@ public class StateManagerUtilityTest {
@Mock IAtsStateManager stateMgr;
@Mock IAtsWorkStateFactory workStateFactory;
@Mock IAtsUserService userService;
+ @Mock IAtsLogFactory logFactory;
+ @Mock IAtsServices services;
// @formatter:on
@Before
@@ -77,7 +81,7 @@ public class StateManagerUtilityTest {
@Test
public void testInitializeStateMachine() {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
TestState state = new TestState("Analyze", StateType.Working);
StateManagerUtility.initializeStateMachine(stateMgr, state, Arrays.asList(Joe, Kay), Joe, changes);
Assert.assertEquals("Analyze", stateMgr.getCurrentStateName());
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
index c1eb0b441a2..0495acdf640 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java
@@ -14,10 +14,12 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.api.workflow.transition.ITransitionListener;
@@ -43,6 +45,7 @@ public class TransitionHelperAdapterTest {
@Mock IAtsUser Joe, Kay;
@Mock IAtsUserService userService;
@Mock IAtsBranchService branchService;
+ @Mock IAttributeResolver attrResolver;
// @formatter:on
TestTransitionHelper helper = null;
@@ -96,7 +99,7 @@ public class TransitionHelperAdapterTest {
private class TestTransitionHelper extends TransitionHelperAdapter {
public TestTransitionHelper() {
- super(userService, branchService);
+ super(null);
}
@Override
@@ -139,5 +142,10 @@ public class TransitionHelperAdapterTest {
return null;
}
+ @Override
+ public IAtsServices getServices() {
+ return null;
+ }
+
}
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperTest.java
index 5a59ac22bd1..0b67d9b9fd4 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperTest.java
@@ -13,10 +13,12 @@ package org.eclipse.osee.ats.core.workflow.transition;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.Collection;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
@@ -47,6 +49,8 @@ public class TransitionHelperTest {
@Mock IAtsWorkItemService workItemService;
@Mock IAtsUserService userService;
@Mock IAtsBranchService branchService;
+ @Mock IAtsServices services;
+ @Mock IAttributeResolver attrResolver;
// @formatter:on
TransitionHelper helper = null;
@@ -55,9 +59,14 @@ public class TransitionHelperTest {
public void setup() throws OseeCoreException {
MockitoAnnotations.initMocks(this);
+ when(services.getAttributeResolver()).thenReturn(attrResolver);
+ when(services.getBranchService()).thenReturn(branchService);
+ when(services.getUserService()).thenReturn(userService);
+ when(services.getWorkItemService()).thenReturn(workItemService);
+
helper =
new TransitionHelper("test", Arrays.asList(workItem, workItem2), "Completed", Arrays.asList(Joe, Kay),
- "cancel reason", changes, workItemService, userService, branchService, TransitionOption.None);
+ "cancel reason", changes, services, TransitionOption.None);
}
@Test
@@ -66,8 +75,7 @@ public class TransitionHelperTest {
TransitionHelper helper =
new TransitionHelper("test", Arrays.asList(workItem, workItem2), "Completed", Arrays.asList(Joe, Kay),
- "cancel reason", changes, workItemService, userService, branchService,
- TransitionOption.PrivilegedEditEnabled);
+ "cancel reason", changes, services, TransitionOption.PrivilegedEditEnabled);
Assert.assertTrue(helper.isPrivilegedEditEnabled());
}
@@ -78,8 +86,7 @@ public class TransitionHelperTest {
TransitionHelper helper =
new TransitionHelper("test", Arrays.asList(workItem, workItem2), "Completed", Arrays.asList(Joe, Kay),
- "cancel reason", changes, workItemService, userService, branchService,
- TransitionOption.OverrideTransitionValidityCheck);
+ "cancel reason", changes, services, TransitionOption.OverrideTransitionValidityCheck);
Assert.assertTrue(helper.isOverrideTransitionValidityCheck());
}
@@ -90,8 +97,7 @@ public class TransitionHelperTest {
TransitionHelper helper =
new TransitionHelper("test", Arrays.asList(workItem, workItem2), "Completed", Arrays.asList(Joe, Kay),
- "cancel reason", changes, workItemService, userService, branchService,
- TransitionOption.OverrideAssigneeCheck);
+ "cancel reason", changes, services, TransitionOption.OverrideAssigneeCheck);
Assert.assertTrue(helper.isOverrideAssigneeCheck());
}
@@ -120,7 +126,7 @@ public class TransitionHelperTest {
TransitionHelper helper2 =
new TransitionHelper("test", Arrays.asList(workItem, workItem2), "Completed", Arrays.asList(Joe, Kay), null,
- changes, workItemService, userService, branchService, TransitionOption.OverrideAssigneeCheck);
+ changes, services, TransitionOption.OverrideAssigneeCheck);
reason = helper2.getCompleteOrCancellationReason();
Assert.assertEquals("", reason.getText());
diff --git a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
index b6c2ab2bd7a..ba79d3cb97a 100644
--- a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
@@ -6,12 +6,6 @@ Bundle-Version: 0.19.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.google.inject,
- org.eclipse.emf.common,
- org.eclipse.emf.common.util,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.resource,
- org.eclipse.emf.ecore.resource.impl,
- org.eclipse.emf.ecore.xmi.impl,
org.eclipse.osee.ats.api,
org.eclipse.osee.ats.api.ai,
org.eclipse.osee.ats.api.commit,
@@ -63,10 +57,10 @@ Export-Package: org.eclipse.osee.ats.core,
org.eclipse.osee.ats.core.util,
org.eclipse.osee.ats.core.validator,
org.eclipse.osee.ats.core.workdef,
- org.eclipse.osee.ats.core.workdef.provider,
org.eclipse.osee.ats.core.workflow,
org.eclipse.osee.ats.core.workflow.log,
org.eclipse.osee.ats.core.workflow.state,
org.eclipse.osee.ats.core.workflow.transition
Bundle-Activator: org.eclipse.osee.ats.core.internal.Activator
Service-Component: OSGI-INF/*.xml
+
diff --git a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.core.service.xml b/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.core.service.xml
deleted file mode 100644
index a0b945aa447..00000000000
--- a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.core.service.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" name="org.eclipse.osee.ats.core.internal.AtsCoreService">
- <implementation class="org.eclipse.osee.ats.core.internal.AtsCoreService"/>
- <reference bind="setAtsAttributeResolver" cardinality="1..1" interface="org.eclipse.osee.ats.api.workdef.IAttributeResolver" name="IAttributeResolver" policy="static"/>
- <reference bind="setAtsWorkDefService" cardinality="1..1" interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService" name="IAtsWorkDefinitionService" policy="static"/>
- <reference bind="setAtsUserService" cardinality="1..1" interface="org.eclipse.osee.ats.api.user.IAtsUserService" name="IAtsUserService" policy="static"/>
- <reference bind="setAtsWorkItemServiceProvider" cardinality="1..1" interface="org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider" name="IAtsWorkItemServiceProvider" policy="static"/>
- <reference bind="setAtsReviewServiceProvider" cardinality="1..1" interface="org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider" name="IAtsReviewServiceProvider" policy="static"/>
- <reference bind="setAtsBranchServiceProvider" cardinality="1..1" interface="org.eclipse.osee.ats.api.workflow.IAtsBranchServiceProvider" name="IAtsBranchServiceProvider" policy="static"/>
- <reference bind="setAtsConfigProvider" cardinality="1..1" interface="org.eclipse.osee.ats.core.config.IAtsConfigProvider" name="IAtsConfigProvider" policy="static"/>
-</scr:component>
diff --git a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.earned.value.ref.xml b/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.earned.value.ref.xml
deleted file mode 100644
index 49c3c46166d..00000000000
--- a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.earned.value.ref.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.internal.AtsEarnedValueService">
- <implementation class="org.eclipse.osee.ats.core.internal.AtsEarnedValueService"/>
- <reference bind="setEarnedValueServiceProvider" cardinality="1..1" interface="org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider" name="IAtsEarnedValueServiceProvider" policy="static"/>
-</scr:component>
diff --git a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.version.provider.ref.xml b/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.version.provider.ref.xml
deleted file mode 100644
index 9700fda7311..00000000000
--- a/plugins/org.eclipse.osee.ats.core/OSGI-INF/ats.version.provider.ref.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.config.AtsVersionService">
- <implementation class="org.eclipse.osee.ats.core.config.AtsVersionService"/>
- <reference bind="setAtsVersionServiceProvider" cardinality="1..1" interface="org.eclipse.osee.ats.api.version.IAtsVersionServiceProvider" name="IAtsVersionServiceProvider" policy="static"/>
-</scr:component>
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java
index 9c33771fc12..97c07973d7f 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java
@@ -18,7 +18,6 @@ import java.util.Set;
import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -89,10 +88,10 @@ public class ActionableItems {
}
}
- public static Set<IAtsActionableItem> getActionableItems(Collection<String> actionableItemNames) throws OseeCoreException {
+ public static Set<IAtsActionableItem> getActionableItems(Collection<String> actionableItemNames, IAtsConfig config) throws OseeCoreException {
Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>();
for (String actionableItemName : actionableItemNames) {
- for (IAtsActionableItem ai : AtsCoreService.getConfig().get(IAtsActionableItem.class)) {
+ for (IAtsActionableItem ai : config.get(IAtsActionableItem.class)) {
if (ai.getName().equals(actionableItemName)) {
ais.add(ai);
}
@@ -105,24 +104,24 @@ public class ActionableItems {
return TeamDefinitions.getImpactedTeamDefs(ais);
}
- public static List<IAtsActionableItem> getActionableItems(Active active) throws OseeCoreException {
- return Collections.castAll(getActive(AtsCoreService.getConfig().get(IAtsActionableItem.class), active));
+ public static List<IAtsActionableItem> getActionableItems(Active active, IAtsConfig config) throws OseeCoreException {
+ return Collections.castAll(getActive(config.get(IAtsActionableItem.class), active));
}
public static String getNotActionableItemError(IAtsConfigObject configObject) {
return "Action can not be written against " + configObject.getName() + " \"" + configObject + "\" (" + configObject.getGuid() + ").\n\nChoose another item.";
}
- public static IAtsActionableItem getTopActionableItem() throws OseeCoreException {
- return AtsCoreService.getConfig().getSoleByGuid(TopActionableItemGuid, IAtsActionableItem.class);
+ public static IAtsActionableItem getTopActionableItem(IAtsConfig config) throws OseeCoreException {
+ return config.getSoleByGuid(TopActionableItemGuid, IAtsActionableItem.class);
}
- public static List<IAtsActionableItem> getActionableItemsAll() throws OseeCoreException {
- return getActionableItems(Active.Both);
+ public static List<IAtsActionableItem> getActionableItemsAll(IAtsConfig config) throws OseeCoreException {
+ return getActionableItems(Active.Both, config);
}
- public static List<IAtsActionableItem> getTopLevelActionableItems(Active active) throws OseeCoreException {
- IAtsActionableItem topAi = getTopActionableItem();
+ public static List<IAtsActionableItem> getTopLevelActionableItems(Active active, IAtsConfig config) throws OseeCoreException {
+ IAtsActionableItem topAi = getTopActionableItem(config);
if (topAi == null) {
return java.util.Collections.emptyList();
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsVersionService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsVersionService.java
deleted file mode 100644
index 2b3d4633320..00000000000
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsVersionService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.version.IAtsVersionService;
-import org.eclipse.osee.ats.api.version.IAtsVersionServiceProvider;
-import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
-
-/**
- * @author Donald G. Dunne
- */
-public class AtsVersionService {
-
- private static IAtsVersionServiceProvider service;
-
- public static IAtsVersionService get() throws OseeStateException {
- if (AtsVersionService.service == null) {
- throw new IllegalStateException("ATS Version Service has not been activated");
- }
- return AtsVersionService.service.getVersionService();
- }
-
- public void setAtsVersionServiceProvider(IAtsVersionServiceProvider service) {
- AtsVersionService.service = service;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java
index bbddf0a5744..06c5dbdff91 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java
@@ -17,7 +17,6 @@ import java.util.List;
import java.util.Set;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -44,8 +43,8 @@ public class TeamDefinitions {
return guids;
}
- public static List<IAtsTeamDefinition> getTopLevelTeamDefinitions(Active active) throws OseeCoreException {
- IAtsTeamDefinition topTeamDef = getTopTeamDefinition();
+ public static List<IAtsTeamDefinition> getTopLevelTeamDefinitions(Active active, IAtsConfig config) throws OseeCoreException {
+ IAtsTeamDefinition topTeamDef = getTopTeamDefinition(config);
if (topTeamDef == null) {
return java.util.Collections.emptyList();
}
@@ -81,25 +80,25 @@ public class TeamDefinitions {
return children;
}
- public static List<IAtsTeamDefinition> getTeamDefinitions(Active active) throws OseeCoreException {
- return Collections.castAll(getActive(AtsCoreService.getConfig().get(IAtsTeamDefinition.class), active));
+ public static List<IAtsTeamDefinition> getTeamDefinitions(Active active, IAtsConfig config) throws OseeCoreException {
+ return Collections.castAll(getActive(config.get(IAtsTeamDefinition.class), active));
}
- public static List<IAtsTeamDefinition> getTeamTopLevelDefinitions(Active active) throws OseeCoreException {
- IAtsTeamDefinition topTeamDef = getTopTeamDefinition();
+ public static List<IAtsTeamDefinition> getTeamTopLevelDefinitions(Active active, IAtsConfig config) throws OseeCoreException {
+ IAtsTeamDefinition topTeamDef = getTopTeamDefinition(config);
if (topTeamDef == null) {
return java.util.Collections.emptyList();
}
return Collections.castAll(getActive(getChildren(topTeamDef, false), active));
}
- public static IAtsTeamDefinition getTopTeamDefinition() throws OseeCoreException {
- return AtsCoreService.getConfig().getSoleByGuid(TopTeamDefinitionGuid, IAtsTeamDefinition.class);
+ public static IAtsTeamDefinition getTopTeamDefinition(IAtsConfig config) throws OseeCoreException {
+ return config.getSoleByGuid(TopTeamDefinitionGuid, IAtsTeamDefinition.class);
}
- public static Set<IAtsTeamDefinition> getTeamReleaseableDefinitions(Active active) throws OseeCoreException {
+ public static Set<IAtsTeamDefinition> getTeamReleaseableDefinitions(Active active, IAtsConfig config) throws OseeCoreException {
Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>();
- for (IAtsTeamDefinition teamDef : getTeamDefinitions(active)) {
+ for (IAtsTeamDefinition teamDef : getTeamDefinitions(active, config)) {
if (teamDef.getVersions().size() > 0) {
teamDefs.add(teamDef);
}
@@ -130,9 +129,9 @@ public class TeamDefinitions {
}
}
- public static Set<IAtsTeamDefinition> getTeamDefinitions(Collection<String> teamDefNames) throws OseeCoreException {
+ public static Set<IAtsTeamDefinition> getTeamDefinitions(Collection<String> teamDefNames, IAtsConfig config) throws OseeCoreException {
Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>();
- for (IAtsTeamDefinition teamDef : AtsCoreService.getConfig().get(IAtsTeamDefinition.class)) {
+ for (IAtsTeamDefinition teamDef : config.get(IAtsTeamDefinition.class)) {
if (teamDefNames.contains(teamDef.getName())) {
teamDefs.add(teamDef);
}
@@ -140,9 +139,9 @@ public class TeamDefinitions {
return teamDefs;
}
- public static Set<IAtsTeamDefinition> getTeamDefinitionsNameStartsWith(String prefix) throws OseeCoreException {
+ public static Set<IAtsTeamDefinition> getTeamDefinitionsNameStartsWith(String prefix, IAtsConfig config) throws OseeCoreException {
Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>();
- for (IAtsTeamDefinition teamDef : AtsCoreService.getConfig().get(IAtsTeamDefinition.class)) {
+ for (IAtsTeamDefinition teamDef : config.get(IAtsTeamDefinition.class)) {
if (teamDef.getName().startsWith(prefix)) {
teamDefs.add(teamDef);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java
index 3d5b85ce3ba..a97ec1e9580 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java
@@ -17,6 +17,7 @@ import java.util.Set;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.version.IAtsVersion;
+import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.core.internal.Activator;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -37,14 +38,13 @@ public class Versions {
return names;
}
- public static String getTargetedVersionStr(Object object) throws OseeCoreException {
+ public static String getTargetedVersionStr(Object object, IAtsVersionService versionService) throws OseeCoreException {
if (object instanceof IAtsWorkItem) {
IAtsTeamWorkflow teamWf = ((IAtsWorkItem) object).getParentTeamWorkflow();
if (teamWf != null) {
- IAtsVersion version = AtsVersionService.get().getTargetedVersion(object);
+ IAtsVersion version = versionService.getTargetedVersion(object);
if (version != null) {
- if (!teamWf.getStateMgr().getStateType().isCompletedOrCancelled() && AtsVersionService.get().isReleased(
- teamWf)) {
+ if (!teamWf.getStateMgr().getStateType().isCompletedOrCancelled() && versionService.isReleased(teamWf)) {
String errStr =
"Workflow " + teamWf.getAtsId() + " targeted for released version, but not completed: " + version;
// only log error once
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsCoreService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsCoreService.java
deleted file mode 100644
index 3a1e5eb9d57..00000000000
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsCoreService.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.internal;
-
-import org.eclipse.osee.ats.api.review.IAtsReviewService;
-import org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider;
-import org.eclipse.osee.ats.api.user.IAtsUserService;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
-import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService;
-import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
-import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
-import org.eclipse.osee.ats.api.workflow.IAtsBranchServiceProvider;
-import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
-import org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider;
-import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
-import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
-import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
-import org.eclipse.osee.ats.core.column.IAtsColumnUtilities;
-import org.eclipse.osee.ats.core.config.IAtsConfig;
-import org.eclipse.osee.ats.core.config.IAtsConfigProvider;
-import org.eclipse.osee.ats.core.internal.column.ev.AtsColumnUtilities;
-import org.eclipse.osee.ats.core.internal.log.AtsLogFactory;
-import org.eclipse.osee.ats.core.internal.state.AtsStateFactory;
-import org.eclipse.osee.ats.core.internal.state.AtsWorkStateFactory;
-import org.eclipse.osee.ats.core.internal.util.AtsUtilService;
-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.Conditions;
-
-/**
- * @author Donald G. Dunne
- */
-public class AtsCoreService {
-
- public static final String PLUGIN_ID = "org.eclipse.osee.ats.core";
- private static IAtsColumnUtilities columnUtilities;
- private static IAtsLogFactory logFactory;
- private static IAtsStateFactory stateFactory;
- private static IAttributeResolver attrResolver;
- private static IAtsWorkDefinitionService workDefService;
- private static IAtsUserService userService;
- private static Boolean started = null;
- private static IAtsWorkItemServiceProvider workItemServiceProvider;
- private static IAtsBranchServiceProvider branchServiceProvider;
- private static IAtsReviewServiceProvider reviewServiceProvider;
- private static AtsWorkStateFactory workStateFactory;
- private static IAtsConfigProvider atsConfigProvider;
- private static IAtsUtilService utilService;
-
- public void setAtsConfigProvider(IAtsConfigProvider atsConfigProvider) {
- AtsCoreService.atsConfigProvider = atsConfigProvider;
- }
-
- public void setAtsUserService(IAtsUserService userService) {
- AtsCoreService.userService = userService;
- }
-
- public static void setAtsWorkDefService(IAtsWorkDefinitionService workDefService) {
- AtsCoreService.workDefService = workDefService;
- }
-
- public static void setAtsWorkItemServiceProvider(IAtsWorkItemServiceProvider workItemServiceProvider) {
- AtsCoreService.workItemServiceProvider = workItemServiceProvider;
- }
-
- public static void setAtsAttributeResolver(IAttributeResolver attrResolver) {
- AtsCoreService.attrResolver = attrResolver;
- }
-
- public static void setAtsBranchServiceProvider(IAtsBranchServiceProvider branchServiceProvider) {
- AtsCoreService.branchServiceProvider = branchServiceProvider;
- }
-
- public static void setAtsReviewServiceProvider(IAtsReviewServiceProvider reviewServiceProvider) {
- AtsCoreService.reviewServiceProvider = reviewServiceProvider;
- }
-
- public void start() throws OseeCoreException {
- Conditions.checkNotNull(userService, "IAtsUserService");
- Conditions.checkNotNull(workDefService, "IAtsWorkDefinitionService");
- Conditions.checkNotNull(workItemServiceProvider, "IAtsWorkItemServiceProvider");
- Conditions.checkNotNull(attrResolver, "IAttributeResolver");
- Conditions.checkNotNull(branchServiceProvider, "IAtsBranchServiceProvider");
- Conditions.checkNotNull(reviewServiceProvider, "IAtsReviewServiceProvider");
-
- utilService = new AtsUtilService(attrResolver);
-
- System.out.println("ATS - AtsCore started");
- started = true;
- }
-
- public static IAttributeResolver getAttributeResolver() throws OseeStateException {
- checkStarted();
- return attrResolver;
- }
-
- private static void checkStarted() throws OseeStateException {
- if (started == null) {
- throw new OseeStateException("AtsCore did not start");
- }
- }
-
- public static IAtsWorkItemService getWorkItemService() throws OseeStateException {
- checkStarted();
- return workItemServiceProvider.getWorkItemService();
- }
-
- public static IAtsWorkDefinitionService getWorkDefService() throws OseeStateException {
- checkStarted();
- return workDefService;
- }
-
- public static IAtsUserService getUserService() throws OseeStateException {
- checkStarted();
- return userService;
- }
-
- public static IAtsColumnUtilities getColumnUtilities() {
- if (columnUtilities == null) {
- columnUtilities =
- new AtsColumnUtilities(getReviewService(), getWorkItemService(),
- AtsEarnedValueService.getEarnedValueServiceProvider());
- }
- return columnUtilities;
- }
-
- public static IAtsStateFactory getStateFactory() {
- if (stateFactory == null) {
- stateFactory = new AtsStateFactory(attrResolver, getWorkStateFactory());
- }
- return stateFactory;
- }
-
- public static IAtsWorkStateFactory getWorkStateFactory() {
- if (workStateFactory == null) {
- workStateFactory = new AtsWorkStateFactory(getUserService());
- }
- return workStateFactory;
- }
-
- public static IAtsLogFactory getLogFactory() {
- if (logFactory == null) {
- logFactory = new AtsLogFactory();
- }
- return logFactory;
- }
-
- public static IAtsConfig getConfig() throws OseeStateException {
- return atsConfigProvider.getConfig();
- }
-
- public static IAtsBranchService getBranchService() throws OseeCoreException {
- return branchServiceProvider.getBranchService();
- }
-
- public static IAtsReviewService getReviewService() throws OseeCoreException {
- return reviewServiceProvider.getReviewService();
- }
-
- public static IAtsConfigProvider getConfigProvider() {
- return atsConfigProvider;
- }
-
- public static IAtsUtilService getUtilService() {
- return utilService;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsEarnedValueService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsEarnedValueService.java
deleted file mode 100644
index 00695ae53cb..00000000000
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/AtsEarnedValueService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.internal;
-
-import org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider;
-
-/**
- * @author Donald G. Dunne
- */
-public class AtsEarnedValueService {
-
- private static IAtsEarnedValueServiceProvider earnedValueServiceProvider;
-
- public void setEarnedValueServiceProvider(IAtsEarnedValueServiceProvider earnedValueProvider) {
- AtsEarnedValueService.earnedValueServiceProvider = earnedValueProvider;
- }
-
- public static IAtsEarnedValueServiceProvider getEarnedValueServiceProvider() {
- return earnedValueServiceProvider;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
index a19b5e5a842..65e0a692ccf 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java
@@ -20,7 +20,6 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.api.workflow.log.LogType;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -38,7 +37,7 @@ public class AtsLog implements IAtsLog {
try {
return org.eclipse.osee.framework.jdk.core.util.Collections.toString("\n", getLogItems());
} catch (Exception ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(AtsLog.class, Level.SEVERE, ex);
return ex.getLocalizedMessage();
}
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriter.java
index 6db58665d50..8a1bdc89476 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriter.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLogWriter.java
@@ -15,7 +15,6 @@ import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.api.workflow.log.ILogStorageProvider;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.util.xml.Jaxp;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -55,13 +54,14 @@ public class AtsLogWriter {
element.setAttribute("msg", item.getMsg());
rootElement.appendChild(element);
}
- Result result = storageProvider.saveLogXml(Jaxp.getDocumentXml(doc), changes);
+ String documentXml = Jaxp.getDocumentXml(doc);
+ Result result = storageProvider.saveLogXml(documentXml, changes);
if (result.isFalse()) {
- OseeLog.log(AtsCoreService.class, OseeLevel.SEVERE_POPUP,
+ OseeLog.log(AtsLogWriter.class, OseeLevel.SEVERE_POPUP,
"Can't create ats log document: " + result.getText());
}
} catch (Exception ex) {
- OseeLog.log(AtsCoreService.class, OseeLevel.SEVERE_POPUP, "Can't create ats log document", ex);
+ OseeLog.log(AtsLogWriter.class, OseeLevel.SEVERE_POPUP, "Can't create ats log document", ex);
}
atsLog.setDirty(false);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java
index 9cc25fd3971..862d96721fb 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.internal.state;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
+import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
@@ -24,17 +25,19 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
*/
public class AtsStateFactory implements IAtsStateFactory {
- private final IAttributeResolver attrResolver;
private final IAtsWorkStateFactory workStateFactory;
+ private final IAtsLogFactory logFactory;
+ private final IAtsServices services;
- public AtsStateFactory(IAttributeResolver attrResolver, IAtsWorkStateFactory workStateFactory) {
- this.attrResolver = attrResolver;
+ public AtsStateFactory(IAtsServices services, IAtsWorkStateFactory workStateFactory, IAtsLogFactory logFactory) {
+ this.services = services;
this.workStateFactory = workStateFactory;
+ this.logFactory = logFactory;
}
@Override
public IAtsStateManager getStateManager(IAtsWorkItem workItem) {
- StateManager stateMgr = new StateManager(workItem);
+ StateManager stateMgr = new StateManager(workItem, logFactory, services);
return stateMgr;
}
@@ -42,20 +45,20 @@ public class AtsStateFactory implements IAtsStateFactory {
public IAtsStateManager getStateManager(IAtsWorkItem workItem, boolean load) throws OseeCoreException {
IAtsStateManager stateMgr = getStateManager(workItem);
if (load) {
- StateManagerStore.load(workItem, stateMgr, attrResolver, workStateFactory);
+ StateManagerStore.load(workItem, stateMgr, services.getAttributeResolver(), workStateFactory);
}
return stateMgr;
}
@Override
public void writeToStore(IAtsUser asUser, IAtsWorkItem workItem, IAtsChangeSet changes) throws OseeCoreException {
- StateManagerStore.writeToStore(asUser, workItem, (StateManager) workItem.getStateMgr(), attrResolver, changes,
- workStateFactory);
+ StateManagerStore.writeToStore(asUser, workItem, (StateManager) workItem.getStateMgr(),
+ services.getAttributeResolver(), changes, workStateFactory);
}
@Override
public void load(IAtsWorkItem workItem, IAtsStateManager stateMgr) {
- StateManagerStore.load(workItem, stateMgr, attrResolver, workStateFactory);
+ StateManagerStore.load(workItem, stateMgr, services.getAttributeResolver(), workStateFactory);
}
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java
index 805ca5084e0..51f153a3cd3 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java
@@ -20,7 +20,6 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IAtsUserService;
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.AtsCoreService;
import org.eclipse.osee.ats.core.model.impl.WorkStateImpl;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -106,7 +105,7 @@ public class AtsWorkStateFactory implements IAtsWorkStateFactory {
Conditions.checkNotNull(u, "userById " + uId);
users.add(u);
} catch (Exception ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(AtsWorkStateFactory.class, Level.SEVERE, ex);
}
}
return users;
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 4ffd6f7c3cb..10fa05f2e20 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
@@ -20,18 +20,19 @@ import java.util.LinkedList;
import java.util.List;
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.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.WorkState;
+import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.api.workflow.log.LogType;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.api.workflow.state.WorkStateFactory;
import org.eclipse.osee.ats.core.internal.Activator;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.model.impl.WorkStateImpl;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.util.AtsObjects;
@@ -61,9 +62,13 @@ public class StateManager implements IAtsStateManager {
private final List<IAtsUser> initialAssignees = new ArrayList<IAtsUser>();
private boolean dirty = false;
private final String instanceGuid;
+ private final IAtsLogFactory logFactory;
+ private final IAtsServices services;
- public StateManager(IAtsWorkItem workItem) {
+ public StateManager(IAtsWorkItem workItem, IAtsLogFactory logFactory, IAtsServices services) {
this.workItem = workItem;
+ this.logFactory = logFactory;
+ this.services = services;
this.factory = this;
this.instanceGuid = GUID.create();
}
@@ -111,7 +116,7 @@ public class StateManager implements IAtsStateManager {
setHoursSpent(state.getName(), remaining);
}
- if (AtsCoreService.getWorkDefService().isStateWeightingEnabled(workItem.getWorkDefinition())) {
+ if (services.getWorkDefService().isStateWeightingEnabled(workItem.getWorkDefinition())) {
setPercentComplete(state.getName(), percentComplete);
} else {
this.percentCompleteValue = percentComplete;
@@ -123,20 +128,15 @@ public class StateManager implements IAtsStateManager {
}
protected void logMetrics(IStateToken state, IAtsUser user, Date date) throws OseeCoreException {
- String hoursSpent = AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal(workItem));
- logMetrics(workItem, PercentCompleteTotalUtil.getPercentCompleteTotal(workItem) + "", hoursSpent, state, user,
- date);
+ String hoursSpent = AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal(workItem, services));
+ logMetrics(services, logFactory, workItem,
+ PercentCompleteTotalUtil.getPercentCompleteTotal(workItem, services) + "", hoursSpent, state, user, date);
}
- public static void logMetrics(IAtsWorkItem workItem, String percent, String hours, IStateToken state, IAtsUser user, Date date) throws OseeCoreException {
+ public static void logMetrics(IAtsServices services, IAtsLogFactory logFactory, IAtsWorkItem workItem, String percent, String hours, IStateToken state, IAtsUser user, Date date) throws OseeCoreException {
IAtsLogItem logItem =
- AtsCoreService.getLogFactory().newLogItem(
- LogType.Metrics,
- date,
- user,
- state.getName(),
- String.format("Percent %s Hours %s", PercentCompleteTotalUtil.getPercentCompleteTotal(workItem),
- Double.parseDouble(hours)));
+ logFactory.newLogItem(LogType.Metrics, date, user, state.getName(), String.format("Percent %s Hours %s",
+ PercentCompleteTotalUtil.getPercentCompleteTotal(workItem, services), Double.parseDouble(hours)));
workItem.getLog().addLogItem(logItem);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerStore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerStore.java
index 6e51ca29359..35d0204b82b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerStore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManagerStore.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.ats.api.util.IExecuteListener;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
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.AtsCoreService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -54,7 +53,7 @@ public class StateManagerStore {
postPersistNotifyReset(asUser, workItem, stateMgr, assigneesAdded, attrResolver, workStateFactory,
changes);
} catch (OseeCoreException ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(StateManagerStore.class, Level.SEVERE, ex);
}
}
};
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java
index 8fd9f9bcdd5..e582009146b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java
@@ -17,7 +17,7 @@ import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -39,7 +39,7 @@ public class UsersByIds {
return sb.toString();
}
- public List<IAtsUser> getUsers(String sorageString) {
+ public List<IAtsUser> getUsers(String sorageString, IAtsUserService userService) {
List<IAtsUser> users = new ArrayList<IAtsUser>();
Matcher m = userPattern.matcher(sorageString);
while (m.find()) {
@@ -48,10 +48,10 @@ public class UsersByIds {
throw new IllegalArgumentException("Blank userId specified.");
}
try {
- IAtsUser u = AtsCoreService.getUserService().getUserById(m.group(1));
+ IAtsUser u = userService.getUserById(m.group(1));
users.add(u);
} catch (Exception ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(UsersByIds.class, Level.SEVERE, ex);
}
}
return users;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java
index 711840d5662..62a9c33821b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java
@@ -15,7 +15,7 @@ import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -57,10 +57,10 @@ public final class AtsUsersUtility {
return false;
}
- public static Collection<? extends IAtsUser> getUsers(Collection<String> userIds) {
+ public static Collection<? extends IAtsUser> getUsers(Collection<String> userIds, IAtsUserService userService) {
Set<IAtsUser> users = new HashSet<IAtsUser>();
for (String userId : userIds) {
- users.add(AtsCoreService.getUserService().getUserById(userId));
+ users.add(userService.getUserById(userId));
}
return users;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java
index 2cc1da743a5..94c6a08e70d 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.util;
+import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider;
import org.eclipse.osee.ats.api.review.IAtsReviewService;
import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsUtilService;
@@ -19,7 +21,6 @@ import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory;
import org.eclipse.osee.ats.core.column.IAtsColumnUtilities;
-import org.eclipse.osee.ats.core.internal.AtsEarnedValueService;
import org.eclipse.osee.ats.core.internal.column.ev.AtsColumnUtilities;
import org.eclipse.osee.ats.core.internal.log.AtsLogFactory;
import org.eclipse.osee.ats.core.internal.state.AtsStateFactory;
@@ -35,17 +36,16 @@ public final class AtsCoreFactory {
//
}
- public static IAtsStateFactory newStateFactory(IAttributeResolver attrResolver, IAtsUserService userService) {
- return new AtsStateFactory(attrResolver, new AtsWorkStateFactory(userService));
+ public static IAtsStateFactory newStateFactory(IAtsServices services, IAtsLogFactory logFactory) {
+ return new AtsStateFactory(services, new AtsWorkStateFactory(services.getUserService()), logFactory);
}
public static IAtsLogFactory newLogFactory() {
return new AtsLogFactory();
}
- public static IAtsColumnUtilities getColumnUtilities(IAtsReviewService reviewService, IAtsWorkItemService workItemService) {
- return new AtsColumnUtilities(reviewService, workItemService,
- AtsEarnedValueService.getEarnedValueServiceProvider());
+ public static IAtsColumnUtilities getColumnUtilities(IAtsReviewService reviewService, IAtsWorkItemService workItemService, IAtsEarnedValueServiceProvider earnedValueServiceProvider) {
+ return new AtsColumnUtilities(reviewService, workItemService, earnedValueServiceProvider);
}
public static IAtsWorkStateFactory getWorkStateFactory(IAtsUserService userService) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/HoursSpentUtil.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/HoursSpentUtil.java
index 851f3112d62..1bf888942cd 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/HoursSpentUtil.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/HoursSpentUtil.java
@@ -1,6 +1,7 @@
package org.eclipse.osee.ats.core.util;
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.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.workdef.IStateToken;
@@ -8,7 +9,6 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.workflow.state.SimpleTeamState;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -20,17 +20,17 @@ public class HoursSpentUtil {
/**
* Return hours spent working states, reviews and tasks (not children SMAs)
*/
- public static double getHoursSpentTotal(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentTotal(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsAction) {
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams((IAtsAction) atsObject)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams((IAtsAction) atsObject)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- hours += getHoursSpentTotal(team);
+ hours += getHoursSpentTotal(team, services);
}
}
} else if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- hours = getHoursSpentTotal(workItem, AtsCoreService.getWorkItemService().getCurrentState(workItem));
+ hours = getHoursSpentTotal(workItem, services.getWorkItemService().getCurrentState(workItem), services);
}
return hours;
}
@@ -38,12 +38,13 @@ public class HoursSpentUtil {
/**
* Return hours spent working all states, reviews and tasks (not children SMAs)
*/
- public static double getHoursSpentTotal(IAtsObject atsObject, IStateToken state) throws OseeCoreException {
+ public static double getHoursSpentTotal(IAtsObject atsObject, IStateToken state, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
hours =
- getHoursSpentTotalSMAState(hours, workItem) + getHoursSpentFromTasks(atsObject) + getHoursSpentReview(atsObject);
+ getHoursSpentTotalSMAState(hours, workItem) + getHoursSpentFromTasks(atsObject, services) + getHoursSpentReview(
+ atsObject, services);
}
return hours;
}
@@ -62,17 +63,17 @@ public class HoursSpentUtil {
/**
* Return hours spent working SMA state, state tasks and state reviews (not children SMAs)
*/
- public static double getHoursSpentStateTotal(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentStateTotal(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsAction) {
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams((IAtsAction) atsObject)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams((IAtsAction) atsObject)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- hours += getHoursSpentStateTotal(team);
+ hours += getHoursSpentStateTotal(team, services);
}
}
} else if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- hours = getHoursSpentStateTotal(workItem, AtsCoreService.getWorkItemService().getCurrentState(workItem));
+ hours = getHoursSpentStateTotal(workItem, services.getWorkItemService().getCurrentState(workItem), services);
}
return hours;
}
@@ -80,13 +81,13 @@ public class HoursSpentUtil {
/**
* Return hours spent working SMA state, state tasks and state reviews (not children SMAs)
*/
- public static double getHoursSpentStateTotal(IAtsObject atsObject, IStateToken state) throws OseeCoreException {
+ public static double getHoursSpentStateTotal(IAtsObject atsObject, IStateToken state, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
hours =
- getHoursSpentSMAState(workItem, state) + getHoursSpentFromStateTasks(workItem, state) + getHoursSpentStateReview(
- workItem, state);
+ getHoursSpentSMAState(workItem, state) + getHoursSpentFromStateTasks(workItem, state, services) + getHoursSpentStateReview(
+ workItem, state, services);
}
return hours;
}
@@ -94,17 +95,17 @@ public class HoursSpentUtil {
/**
* Return hours spent working ONLY the SMA stateName (not children SMAs)
*/
- public static double getHoursSpentStateReview(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentStateReview(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsAction) {
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams((IAtsAction) atsObject)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams((IAtsAction) atsObject)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- hours += getHoursSpentStateReview(team);
+ hours += getHoursSpentStateReview(team, services);
}
}
} else if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- hours = getHoursSpentStateReview(workItem, AtsCoreService.getWorkItemService().getCurrentState(workItem));
+ hours = getHoursSpentStateReview(workItem, services.getWorkItemService().getCurrentState(workItem), services);
}
return hours;
}
@@ -112,11 +113,10 @@ public class HoursSpentUtil {
/**
* Return hours spent working ONLY the SMA stateName (not children SMAs)
*/
- public static double getHoursSpentStateReview(IAtsObject atsObject, IStateToken state) throws OseeCoreException {
+ public static double getHoursSpentStateReview(IAtsObject atsObject, IStateToken state, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsTeamWorkflow) {
- for (IAtsAbstractReview review : AtsCoreService.getWorkItemService().getReviews((IAtsTeamWorkflow) atsObject,
- state)) {
+ for (IAtsAbstractReview review : services.getWorkItemService().getReviews((IAtsTeamWorkflow) atsObject, state)) {
hours += review.getStateMgr().getHoursSpent(state.getName());
}
}
@@ -126,11 +126,11 @@ public class HoursSpentUtil {
/**
* Return hours spent for all reviews
*/
- public static double getHoursSpentReview(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentReview(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsTeamWorkflow) {
- for (IAtsAbstractReview review : AtsCoreService.getWorkItemService().getReviews((IAtsTeamWorkflow) atsObject)) {
- hours += HoursSpentUtil.getHoursSpentTotal(review);
+ for (IAtsAbstractReview review : services.getWorkItemService().getReviews((IAtsTeamWorkflow) atsObject)) {
+ hours += HoursSpentUtil.getHoursSpentTotal(review, services);
}
}
return hours;
@@ -139,17 +139,17 @@ public class HoursSpentUtil {
/**
* Return hours spent working ONLY the SMA stateName (not children SMAs)
*/
- public static double getHoursSpentSMAState(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentSMAState(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsAction) {
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams((IAtsAction) atsObject)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams((IAtsAction) atsObject)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- hours += getHoursSpentSMAState(team);
+ hours += getHoursSpentSMAState(team, services);
}
}
} else if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- hours = getHoursSpentSMAState(workItem, AtsCoreService.getWorkItemService().getCurrentState(workItem));
+ hours = getHoursSpentSMAState(workItem, services.getWorkItemService().getCurrentState(workItem));
}
return hours;
}
@@ -169,17 +169,18 @@ public class HoursSpentUtil {
/**
* Return hours spent working ONLY on tasks related to stateName
*/
- public static double getHoursSpentFromStateTasks(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentFromStateTasks(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsAction) {
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams((IAtsAction) atsObject)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams((IAtsAction) atsObject)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- hours += getHoursSpentFromStateTasks(team);
+ hours += getHoursSpentFromStateTasks(team, services);
}
}
} else if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- hours = getHoursSpentFromStateTasks(workItem, AtsCoreService.getWorkItemService().getCurrentState(workItem));
+ hours =
+ getHoursSpentFromStateTasks(workItem, services.getWorkItemService().getCurrentState(workItem), services);
}
return hours;
}
@@ -190,12 +191,11 @@ public class HoursSpentUtil {
* @param relatedToState state name of parent workflow's state
* @return Returns the Hours Spent
*/
- public static double getHoursSpentFromStateTasks(IAtsObject atsObject, IStateToken relatedToState) throws OseeCoreException {
+ public static double getHoursSpentFromStateTasks(IAtsObject atsObject, IStateToken relatedToState, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsTeamWorkflow) {
- for (IAtsTask taskArt : AtsCoreService.getWorkItemService().getTasks((IAtsTeamWorkflow) atsObject,
- relatedToState)) {
- hours += HoursSpentUtil.getHoursSpentTotal(taskArt);
+ for (IAtsTask taskArt : services.getWorkItemService().getTasks((IAtsTeamWorkflow) atsObject, relatedToState)) {
+ hours += HoursSpentUtil.getHoursSpentTotal(taskArt, services);
}
}
return hours;
@@ -206,11 +206,11 @@ public class HoursSpentUtil {
*
* @return Returns the Hours Spent
*/
- public static double getHoursSpentFromTasks(IAtsObject atsObject) throws OseeCoreException {
+ public static double getHoursSpentFromTasks(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
double hours = 0.0;
if (atsObject instanceof IAtsTeamWorkflow) {
- for (IAtsTask taskArt : AtsCoreService.getWorkItemService().getTasks((IAtsTeamWorkflow) atsObject)) {
- hours += HoursSpentUtil.getHoursSpentTotal(taskArt);
+ for (IAtsTask taskArt : services.getWorkItemService().getTasks((IAtsTeamWorkflow) atsObject)) {
+ hours += HoursSpentUtil.getHoursSpentTotal(taskArt, services);
}
}
return hours;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/PercentCompleteTotalUtil.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/PercentCompleteTotalUtil.java
index 39847da5855..e90d4f8d85e 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/PercentCompleteTotalUtil.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/PercentCompleteTotalUtil.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.core.util;
import java.util.Collection;
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.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
@@ -20,7 +21,6 @@ import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -33,22 +33,22 @@ public class PercentCompleteTotalUtil {
* <br>
* percent = all state's percents / number of states (minus completed/canceled)
*/
- public static int getPercentCompleteTotal(IAtsObject atsObject) throws OseeCoreException {
+ public static int getPercentCompleteTotal(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
int percent = 0;
if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
- if (AtsCoreService.getWorkDefService().isStateWeightingEnabled(workItem.getWorkDefinition())) {
+ if (services.getWorkDefService().isStateWeightingEnabled(workItem.getWorkDefinition())) {
// Calculate total percent using configured weighting
for (IAtsStateDefinition stateDef : workItem.getWorkDefinition().getStates()) {
if (!stateDef.getStateType().isCompletedState() && !stateDef.getStateType().isCancelledState()) {
double stateWeightInt = stateDef.getStateWeight();
double weight = stateWeightInt / 100;
- int percentCompleteForState = getPercentCompleteSMAStateTotal(workItem, stateDef);
+ int percentCompleteForState = getPercentCompleteSMAStateTotal(workItem, stateDef, services);
percent += weight * percentCompleteForState;
}
}
} else {
- percent = getPercentCompleteSMASinglePercent(workItem);
+ percent = getPercentCompleteSMASinglePercent(workItem, services);
if (percent == 0) {
if (workItem.getStateMgr().getStateType().isCompletedOrCancelled()) {
percent = 100;
@@ -56,7 +56,7 @@ public class PercentCompleteTotalUtil {
int numStates = 0;
for (IAtsStateDefinition state : workItem.getWorkDefinition().getStates()) {
if (!state.getStateType().isCompletedState() && !state.getStateType().isCancelledState()) {
- percent += getPercentCompleteSMAStateTotal(workItem, state);
+ percent += getPercentCompleteSMAStateTotal(workItem, state, services);
numStates++;
}
}
@@ -82,22 +82,22 @@ public class PercentCompleteTotalUtil {
/**
* Add percent represented by percent attribute, percent for reviews and tasks divided by number of objects.
*/
- private static int getPercentCompleteSMASinglePercent(IAtsObject atsObject) throws OseeCoreException {
+ private static int getPercentCompleteSMASinglePercent(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
int percent = 0;
if (atsObject instanceof IAtsWorkItem) {
IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
int numObjects = 1;
percent =
- AtsCoreService.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.PercentComplete, 0);
+ services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.PercentComplete, 0);
if (workItem instanceof IAtsTeamWorkflow) {
- for (IAtsAbstractReview revArt : AtsCoreService.getWorkItemService().getReviews((IAtsTeamWorkflow) workItem)) {
- percent += getPercentCompleteTotal(revArt);
+ for (IAtsAbstractReview revArt : services.getWorkItemService().getReviews((IAtsTeamWorkflow) workItem)) {
+ percent += getPercentCompleteTotal(revArt, services);
numObjects++;
}
}
if (workItem instanceof IAtsTeamWorkflow) {
- for (IAtsTask taskArt : AtsCoreService.getWorkItemService().getTasks(((IAtsTeamWorkflow) workItem))) {
- percent += getPercentCompleteTotal(taskArt);
+ for (IAtsTask taskArt : services.getWorkItemService().getTasks(((IAtsTeamWorkflow) workItem))) {
+ percent += getPercentCompleteTotal(taskArt, services);
numObjects++;
}
}
@@ -113,12 +113,14 @@ public class PercentCompleteTotalUtil {
/**
* Return Percent Complete on all things (including children SMAs) related to stateName. Total Percent for state,
* tasks and reviews / 1 + # Tasks + # Reviews
+ *
+ * @param services JavaTip
*/
- public static int getPercentCompleteSMAStateTotal(IAtsObject atsObject, IStateToken state) throws OseeCoreException {
- return getStateMetricsData(atsObject, state).getResultingPercent();
+ public static int getPercentCompleteSMAStateTotal(IAtsObject atsObject, IStateToken state, IAtsServices services) throws OseeCoreException {
+ return getStateMetricsData(atsObject, state, services).getResultingPercent();
}
- private static StateMetricsData getStateMetricsData(IAtsObject atsObject, IStateToken teamState) throws OseeCoreException {
+ private static StateMetricsData getStateMetricsData(IAtsObject atsObject, IStateToken teamState, IAtsServices services) throws OseeCoreException {
if (!(atsObject instanceof IAtsWorkItem)) {
return null;
}
@@ -129,10 +131,9 @@ public class PercentCompleteTotalUtil {
// Add percent for each task and bump objects for each task
if (workItem instanceof IAtsTeamWorkflow) {
- Collection<IAtsTask> tasks =
- AtsCoreService.getWorkItemService().getTasks((IAtsTeamWorkflow) workItem, teamState);
+ Collection<IAtsTask> tasks = services.getWorkItemService().getTasks((IAtsTeamWorkflow) workItem, teamState);
for (IAtsTask taskArt : tasks) {
- percent += getPercentCompleteTotal(taskArt);
+ percent += getPercentCompleteTotal(taskArt, services);
}
numObjects += tasks.size();
}
@@ -140,9 +141,9 @@ public class PercentCompleteTotalUtil {
// Add percent for each review and bump objects for each review
if (workItem instanceof IAtsTeamWorkflow) {
Collection<IAtsAbstractReview> reviews =
- AtsCoreService.getWorkItemService().getReviews((IAtsTeamWorkflow) workItem, teamState);
+ services.getWorkItemService().getReviews((IAtsTeamWorkflow) workItem, teamState);
for (IAtsAbstractReview reviewArt : reviews) {
- percent += getPercentCompleteTotal(reviewArt);
+ percent += getPercentCompleteTotal(reviewArt, services);
}
numObjects += reviews.size();
}
@@ -171,17 +172,17 @@ public class PercentCompleteTotalUtil {
/**
* Return Percent Complete working ONLY the current state (not children SMAs)
*/
- public static int getPercentCompleteSMAState(IAtsObject atsObject) throws OseeCoreException {
+ public static int getPercentCompleteSMAState(IAtsObject atsObject, IAtsServices services) throws OseeCoreException {
int percent = 0;
if (atsObject instanceof IAtsAction) {
IAtsAction action = (IAtsAction) atsObject;
- if (AtsCoreService.getWorkItemService().getTeams(action).size() == 1) {
- return getPercentCompleteSMAState(AtsCoreService.getWorkItemService().getFirstTeam(action));
+ if (services.getWorkItemService().getTeams(action).size() == 1) {
+ return getPercentCompleteSMAState(services.getWorkItemService().getFirstTeam(action), services);
} else {
int items = 0;
- for (IAtsTeamWorkflow team : AtsCoreService.getWorkItemService().getTeams(action)) {
+ for (IAtsTeamWorkflow team : services.getWorkItemService().getTeams(action)) {
if (!team.getStateMgr().getStateType().isCancelled()) {
- percent += getPercentCompleteSMAState(team);
+ percent += getPercentCompleteSMAState(team, services);
items++;
}
}
@@ -192,7 +193,7 @@ public class PercentCompleteTotalUtil {
}
} else if (atsObject instanceof IAtsWorkItem) {
return getPercentCompleteSMAState(atsObject,
- AtsCoreService.getWorkItemService().getCurrentState((IAtsWorkItem) atsObject));
+ services.getWorkItemService().getCurrentState((IAtsWorkItem) atsObject));
}
return percent;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
index f53a04846b4..6929ea2596b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCore.java
@@ -14,10 +14,10 @@ import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.RuleDefinitionOption;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -26,8 +26,8 @@ import org.eclipse.osee.framework.logging.OseeLog;
*/
public class WorkflowManagerCore {
- public static boolean isEditable(IAtsUser user, IAtsWorkItem workItem, IAtsStateDefinition stateDef, boolean privilegedEditEnabled) throws OseeCoreException {
- return isEditable(workItem, stateDef, privilegedEditEnabled, user, AtsCoreService.getUserService().isAtsAdmin(user));
+ public static boolean isEditable(IAtsUser user, IAtsWorkItem workItem, IAtsStateDefinition stateDef, boolean privilegedEditEnabled, IAtsUserService userService) throws OseeCoreException {
+ return isEditable(workItem, stateDef, privilegedEditEnabled, user, userService.isAtsAdmin(user));
}
public static boolean isEditable(IAtsWorkItem workItem, IAtsStateDefinition stateDef, boolean privilegedEditEnabled, IAtsUser currentUser, boolean isAtsAdmin) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogStoreProvider.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogStoreProvider.java
index 9e469855e53..4c04c19c2ab 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogStoreProvider.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogStoreProvider.java
@@ -16,7 +16,6 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.log.ILogStorageProvider;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -39,7 +38,7 @@ public class AtsLogStoreProvider implements ILogStorageProvider {
try {
return attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.Log, "");
} catch (OseeCoreException ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(AtsLogStoreProvider.class, Level.SEVERE, ex);
return "getLogXml exception " + ex.getLocalizedMessage();
}
}
@@ -50,7 +49,7 @@ public class AtsLogStoreProvider implements ILogStorageProvider {
attrResolver.setSoleAttributeValue(workItem, AtsAttributeTypes.Log, xml, changes);
return Result.TrueResult;
} catch (OseeCoreException ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(AtsLogStoreProvider.class, Level.SEVERE, ex);
return new Result("saveLogXml exception " + ex.getLocalizedMessage());
}
}
@@ -60,7 +59,7 @@ public class AtsLogStoreProvider implements ILogStorageProvider {
try {
return "History for \"" + workItem.getArtifactTypeName() + "\" - " + getLogId() + " - titled \"" + workItem.getName() + "\"";
} catch (OseeCoreException ex) {
- OseeLog.log(AtsCoreService.class, Level.SEVERE, ex);
+ OseeLog.log(AtsLogStoreProvider.class, Level.SEVERE, ex);
return "getLogTitle exception " + ex.getLocalizedMessage();
}
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogUtility.java
index ff0177db813..08b7d2016d9 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogUtility.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/log/AtsLogUtility.java
@@ -11,10 +11,10 @@
package org.eclipse.osee.ats.core.workflow.log;
import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.api.workflow.log.ILogStorageProvider;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.internal.log.AtsLogHtml;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
@@ -24,25 +24,25 @@ import org.eclipse.osee.framework.jdk.core.util.DateUtil;
*/
public class AtsLogUtility {
- public static String getHtml(IAtsLog atsLog, ILogStorageProvider storageProvider) throws OseeCoreException {
- return getHtml(atsLog, storageProvider, true);
+ public static String getHtml(IAtsLog atsLog, ILogStorageProvider storageProvider, IAtsUserService userService) throws OseeCoreException {
+ return getHtml(atsLog, storageProvider, true, userService);
}
- public static String getHtml(IAtsLog atsLog, ILogStorageProvider storageProvider, boolean showLogTitle) throws OseeCoreException {
- return (new AtsLogHtml(atsLog, storageProvider, AtsCoreService.getUserService(), showLogTitle)).get();
+ public static String getHtml(IAtsLog atsLog, ILogStorageProvider storageProvider, boolean showLogTitle, IAtsUserService userService) throws OseeCoreException {
+ return (new AtsLogHtml(atsLog, storageProvider, userService, showLogTitle)).get();
}
- public static String getTable(IAtsLog atsLog, ILogStorageProvider storageProvider) throws OseeCoreException {
- return (new AtsLogHtml(atsLog, storageProvider, AtsCoreService.getUserService(), true)).getTable();
+ public static String getTable(IAtsLog atsLog, ILogStorageProvider storageProvider, IAtsUserService userService) throws OseeCoreException {
+ return (new AtsLogHtml(atsLog, storageProvider, userService, true)).getTable();
}
- public static String getToStringUser(IAtsLogItem item) {
- IAtsUser user = AtsCoreService.getUserService().getUserById(item.getUserId());
+ public static String getToStringUser(IAtsLogItem item, IAtsUserService userService) {
+ IAtsUser user = userService.getUserById(item.getUserId());
return user == null ? "unknown" : user.getName();
}
- public static String toString(IAtsLogItem item) {
- IAtsUser user = AtsCoreService.getUserService().getUserById(item.getUserId());
+ public static String toString(IAtsLogItem item, IAtsUserService userService) {
+ IAtsUser user = userService.getUserById(item.getUserId());
return String.format("%s (%s)%s by %s on %s", getToStringMsg(item), item.getType(), getToStringState(item),
user.getName(), DateUtil.getMMDDYYHHMM(item.getDate()));
}
@@ -55,9 +55,9 @@ public class AtsLogUtility {
return item.getMsg().isEmpty() ? "" : item.getMsg();
}
- public static String getUserName(String userId) {
+ public static String getUserName(String userId, IAtsUserService userService) {
String name = "unknown (" + userId + ")";
- IAtsUser user = AtsCoreService.getUserService().getUserById(userId);
+ IAtsUser user = userService.getUserById(userId);
if (user != null) {
name = user.getName();
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionFactory.java
index 9ea87531597..3c3bd622398 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionFactory.java
@@ -10,14 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.workflow.transition;
-import org.eclipse.osee.ats.api.review.IAtsReviewService;
-import org.eclipse.osee.ats.api.user.IAtsUserService;
-import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService;
-import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
-import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
import org.eclipse.osee.ats.api.workflow.transition.IAtsTransitionManager;
import org.eclipse.osee.ats.api.workflow.transition.ITransitionHelper;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
/**
* @author Donald G. Dunne
@@ -25,13 +19,7 @@ import org.eclipse.osee.ats.core.internal.AtsCoreService;
public class TransitionFactory {
public static IAtsTransitionManager getTransitionManager(ITransitionHelper helper) {
- return getTransitionManager(helper, AtsCoreService.getUserService(), AtsCoreService.getReviewService(),
- AtsCoreService.getWorkItemService(), AtsCoreService.getWorkDefService(), AtsCoreService.getAttributeResolver());
- }
-
- public static IAtsTransitionManager getTransitionManager(ITransitionHelper helper, IAtsUserService userService, IAtsReviewService reviewService, IAtsWorkItemService workItemService, IAtsWorkDefinitionService workDefService, IAttributeResolver attrResolver) {
- return new TransitionManager(helper, AtsCoreService.getUserService(), AtsCoreService.getReviewService(),
- AtsCoreService.getWorkItemService(), AtsCoreService.getWorkDefService(), AtsCoreService.getAttributeResolver());
+ return new TransitionManager(helper);
}
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java
index a4e5972e30e..4de268c5b29 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java
@@ -13,16 +13,14 @@ package org.eclipse.osee.ats.core.workflow.transition;
import java.util.Collection;
import java.util.List;
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.user.IAtsUser;
-import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService;
import org.eclipse.osee.ats.api.workflow.transition.ITransitionListener;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
import org.eclipse.osee.ats.core.internal.Activator;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -43,10 +41,12 @@ public class TransitionHelper extends TransitionHelperAdapter {
private final IAtsChangeSet changes;
private boolean executeChanges = false;
private final IAtsWorkItemService workItemService;
+ private final IAtsServices services;
- public TransitionHelper(String name, Collection<? extends IAtsWorkItem> workItems, String toStateName, Collection<? extends IAtsUser> toAssignees, String cancellationReason, IAtsChangeSet changes, IAtsWorkItemService workItemService, IAtsUserService userService, IAtsBranchService branchService, TransitionOption... transitionOption) {
- super(userService, branchService);
- this.workItemService = workItemService;
+ public TransitionHelper(String name, Collection<? extends IAtsWorkItem> workItems, String toStateName, Collection<? extends IAtsUser> toAssignees, String cancellationReason, IAtsChangeSet changes, IAtsServices services, TransitionOption... transitionOption) {
+ super(services);
+ this.services = services;
+ this.workItemService = services.getWorkItemService();
this.name = name;
this.workItems = workItems;
this.toStateName = toStateName;
@@ -56,11 +56,6 @@ public class TransitionHelper extends TransitionHelperAdapter {
this.transitionOption = transitionOption;
}
- public TransitionHelper(String name, Collection<? extends IAtsWorkItem> workItems, String toStateName, Collection<? extends IAtsUser> toAssignees, String cancellationReason, IAtsChangeSet changes, TransitionOption... transitionOption) {
- this(name, workItems, toStateName, toAssignees, cancellationReason, changes, AtsCoreService.getWorkItemService(),
- AtsCoreService.getUserService(), AtsCoreService.getBranchService(), transitionOption);
- }
-
@Override
public boolean isPrivilegedEditEnabled() {
return Collections.getAggregate(transitionOption).contains(TransitionOption.PrivilegedEditEnabled);
@@ -152,4 +147,9 @@ public class TransitionHelper extends TransitionHelperAdapter {
}
return java.util.Collections.emptyList();
}
+
+ @Override
+ public IAtsServices getServices() {
+ return services;
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
index e0d1ada3795..6b7d95c3ef8 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapter.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.workflow.transition;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.ats.api.user.IAtsUserService;
-import org.eclipse.osee.ats.api.workflow.IAtsBranchService;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.transition.ITransitionHelper;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -26,19 +24,13 @@ import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
*/
public abstract class TransitionHelperAdapter implements ITransitionHelper {
- private final IAtsUserService userService;
- private final IAtsBranchService branchService;
+ private final IAtsServices services;
+ private IAtsUser transitionUser;
- public TransitionHelperAdapter(IAtsUserService userService, IAtsBranchService branchService) {
- this.userService = userService;
- this.branchService = branchService;
+ public TransitionHelperAdapter(IAtsServices services) {
+ this.services = services;
}
- public TransitionHelperAdapter() {
- this(AtsCoreService.getUserService(), AtsCoreService.getBranchService());
- }
- IAtsUser transitionUser;
-
@Override
public boolean isPrivilegedEditEnabled() {
return false;
@@ -56,12 +48,12 @@ public abstract class TransitionHelperAdapter implements ITransitionHelper {
@Override
public boolean isWorkingBranchInWork(IAtsTeamWorkflow teamWf) throws OseeCoreException {
- return branchService.isWorkingBranchInWork(teamWf);
+ return services.getBranchService().isWorkingBranchInWork(teamWf);
}
@Override
public boolean isBranchInCommit(IAtsTeamWorkflow teamWf) throws OseeCoreException {
- return branchService.isBranchInCommit(teamWf);
+ return services.getBranchService().isBranchInCommit(teamWf);
}
@Override
@@ -84,7 +76,7 @@ public abstract class TransitionHelperAdapter implements ITransitionHelper {
public IAtsUser getTransitionUser() throws OseeStateException, OseeCoreException {
IAtsUser user = transitionUser;
if (user == null) {
- user = userService.getCurrentUser();
+ user = services.getUserService().getCurrentUser();
}
return user;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
index 4f7b8679507..cd24fb2f429 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java
@@ -42,8 +42,6 @@ import org.eclipse.osee.ats.api.workflow.transition.ITransitionHelper;
import org.eclipse.osee.ats.api.workflow.transition.ITransitionListener;
import org.eclipse.osee.ats.api.workflow.transition.TransitionResult;
import org.eclipse.osee.ats.api.workflow.transition.TransitionResults;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
-import org.eclipse.osee.ats.core.internal.AtsCoreService;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.workflow.WorkflowManagerCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
@@ -67,13 +65,13 @@ public class TransitionManager implements IAtsTransitionManager {
private final IAtsWorkDefinitionService workDefService;
private final IAttributeResolver attrResolver;
- public TransitionManager(ITransitionHelper helper, IAtsUserService userService, IAtsReviewService reviewService, IAtsWorkItemService workItemService, IAtsWorkDefinitionService workDefService, IAttributeResolver attrResolver) {
+ public TransitionManager(ITransitionHelper helper) {
this.helper = helper;
- this.userService = userService;
- this.reviewService = reviewService;
- this.workItemService = workItemService;
- this.workDefService = workDefService;
- this.attrResolver = attrResolver;
+ this.userService = helper.getServices().getUserService();
+ this.reviewService = helper.getServices().getReviewService();
+ this.workItemService = helper.getServices().getWorkItemService();
+ this.workDefService = helper.getServices().getWorkDefService();
+ this.attrResolver = helper.getServices().getAttributeResolver();
}
@Override
@@ -139,7 +137,7 @@ public class TransitionManager implements IAtsTransitionManager {
String errStr =
String.format("Work Definition [%s] is not configured to transition from \"[%s]\" to \"[%s]\"",
toStateDef.getName(), fromStateDef.getName(), toStateDef.getName());
- OseeLog.log(AtsCoreService.class, Level.SEVERE, errStr);
+ OseeLog.log(TransitionManager.class, Level.SEVERE, errStr);
results.addResult(workItem, new TransitionResult(errStr));
continue;
}
@@ -375,7 +373,7 @@ public class TransitionManager implements IAtsTransitionManager {
// Only check this if TeamWorkflow, not for reviews
if (workItem.isTeamWorkflow() && (teamDefRequiresTargetedVersion || pageRequiresTargetedVersion) && //
- !AtsVersionService.get().hasTargetedVersion(workItem) && //
+ !helper.getServices().getVersionService().hasTargetedVersion(workItem) && //
!toStateDef.getStateType().isCancelledState()) {
results.addResult(workItem, TransitionResult.MUST_BE_TARGETED_FOR_VERSION);
}
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/.classpath b/plugins/org.eclipse.osee.ats.dsl.integration.test/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/.project b/plugins/org.eclipse.osee.ats.dsl.integration.test/.project
new file mode 100644
index 00000000000..026a56aad40
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.ats.dsl.integration.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.dsl.integration.test/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..18f827a44ea
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ATS DSL Integration Test
+Bundle-SymbolicName: org.eclipse.osee.ats.dsl.integration.test
+Bundle-Version: 0.18.0.qualifier
+Fragment-Host: org.eclipse.osee.ats.dsl.integration
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: Eclipse Open System Engineering Environment
+Require-Bundle: org.junit;bundle-version="4.11.0"
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/build.properties b/plugins/org.eclipse.osee.ats.dsl.integration.test/build.properties
new file mode 100644
index 00000000000..34d2e4d2dad
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/pom.xml b/plugins/org.eclipse.osee.ats.dsl.integration.test/pom.xml
new file mode 100644
index 00000000000..8ceedcd07ab
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/pom.xml
@@ -0,0 +1,31 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osee</groupId>
+ <artifactId>org.eclipse.osee.x.ats.parent</artifactId>
+ <version>0.18.0-SNAPSHOT</version>
+ <relativePath>../../plugins/org.eclipse.osee.x.ats.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osee.ats.dsl.integration.test</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+ <name>OSEE ATS DSL Itegration Test (Incubation)</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.osee.ats.dsl.integration</testSuite>
+ <testClass>org.eclipse.osee.ats.dsl.integration.internal.AtsDsl_Internal_JT_Suite</testClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/AtsCore_WorkDefProvider_JT_Suite.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/AtsDsl_Internal_JT_Suite.java
index 185cad32f72..3c3d74b992e 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/provider/AtsCore_WorkDefProvider_JT_Suite.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/AtsDsl_Internal_JT_Suite.java
@@ -8,18 +8,17 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.core.workdef.provider;
+package org.eclipse.osee.ats.dsl.integration.internal;
+import org.eclipse.osee.ats.dsl.integration.internal.model.AtsDsl_Internal_Model_JT_Suite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
-@RunWith(Suite.class)
-@Suite.SuiteClasses({BooleanDefUtilTest.class, UserRefUtilTest.class})
/**
- * This test suite contains tests that can be run as stand-alone JUnit tests (JT)
- *
* @author Donald G. Dunne
*/
-public class AtsCore_WorkDefProvider_JT_Suite {
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsDsl_Internal_Model_JT_Suite.class, ConvertWorkDefinitionToAtsDslTest.class})
+public class AtsDsl_Internal_JT_Suite {
// Test Suite
}
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDslTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java
index 3bea5ba35b6..b47181df175 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDslTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef;
+package org.eclipse.osee.ats.dsl.integration.internal;
import java.util.ArrayList;
import java.util.List;
@@ -31,22 +31,23 @@ import org.eclipse.osee.ats.dsl.atsDsl.StateDef;
import org.eclipse.osee.ats.dsl.atsDsl.WidgetDef;
import org.eclipse.osee.ats.dsl.atsDsl.WorkflowEventType;
import org.eclipse.osee.ats.dsl.atsDsl.impl.AtsDslFactoryImpl;
-import org.eclipse.osee.ats.impl.internal.AtsWorkDefinitionServiceImpl;
-import org.eclipse.osee.ats.impl.internal.workdef.model.CompositeLayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewOption;
-import org.eclipse.osee.ats.impl.internal.workdef.model.LayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.PeerReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.StateDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WorkDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.AtsWorkDefinitionServiceImpl;
+import org.eclipse.osee.ats.dsl.integration.internal.ConvertWorkDefinitionToAtsDsl;
+import org.eclipse.osee.ats.dsl.integration.internal.model.CompositeLayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewOption;
+import org.eclipse.osee.ats.dsl.integration.internal.model.LayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.PeerReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.StateDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WorkDefinition;
import org.eclipse.osee.framework.core.util.XResultData;
import org.junit.Assert;
import org.junit.Test;
/**
* Test case for {@link ConvertWorkDefinitionToAtsDsl}
- *
+ *
* @author Donald G. Dunne
*/
public class ConvertWorkDefinitionToAtsDslTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/AbstractWorkDefItemTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItemTest.java
index 29e1799e2b9..48690398da2 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/AbstractWorkDefItemTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItemTest.java
@@ -8,15 +8,15 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
-import org.eclipse.osee.ats.impl.internal.workdef.model.AbstractWorkDefItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.AbstractWorkDefItem;
import org.junit.Assert;
import org.junit.Test;
/**
* Test case for {@link AbstractWorkDefItem}
- *
+ *
* @author Donald G. Dunne
*/
public class AbstractWorkDefItemTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelTestSuite.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AtsDsl_Internal_Model_JT_Suite.java
index 77fa287a9d4..9134e662e99 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelTestSuite.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/AtsDsl_Internal_Model_JT_Suite.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -33,6 +33,6 @@ import org.junit.runners.Suite;
*
* @author Donald G. Dunne
*/
-public class ModelTestSuite {
+public class AtsDsl_Internal_Model_JT_Suite {
// Test Suite
}
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/CompositeStateItemTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeStateItemTest.java
index ec621a06521..8bb2b317cee 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/CompositeStateItemTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeStateItemTest.java
@@ -8,10 +8,10 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.eclipse.osee.ats.api.workdef.IAtsCompositeLayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.CompositeLayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.CompositeLayoutItem;
import org.junit.Assert;
import org.junit.Test;
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinitionTest.java
index d93eafd3ec3..6cdc25b9e3c 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewDefinitionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinitionTest.java
@@ -8,18 +8,18 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workdef.StateEventType;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewOption;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewOption;
import org.junit.Test;
/**
* Test case for {@link DecisionReviewDefinition}
- *
+ *
* @author Donald G. Dunne
*/
public class DecisionReviewDefinitionTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewOptionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOptionTest.java
index e42d78a516f..78bd38a3538 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/DecisionReviewOptionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOptionTest.java
@@ -8,12 +8,12 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.Arrays;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.IAtsDecisionReviewOption;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewOption;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewOption;
import org.junit.Test;
/**
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelUtilTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/ModelUtilTest.java
index 0482e08c090..d12d3f64ec8 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/ModelUtilTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/ModelUtilTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.io.File;
import java.io.FileOutputStream;
@@ -20,17 +20,17 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.dsl.IResourceProvider;
import org.eclipse.osee.ats.dsl.ModelUtil;
import org.eclipse.osee.ats.dsl.atsDsl.AtsDsl;
-import org.eclipse.osee.ats.impl.internal.workdef.ConvertWorkDefinitionToAtsDsl;
-import org.eclipse.osee.ats.impl.internal.workdef.model.StateDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WorkDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.ConvertWorkDefinitionToAtsDsl;
+import org.eclipse.osee.ats.dsl.integration.internal.model.StateDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WorkDefinition;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.junit.Test;
/**
* Test case for {@link ModelUtil}
- *
+ *
* @author Donald G. Dunne
*/
public class ModelUtilTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/PeerReviewDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinitionTest.java
index 52c1119da83..633a0e20df2 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/PeerReviewDefinitionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinitionTest.java
@@ -8,17 +8,17 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
import org.eclipse.osee.ats.api.workdef.StateEventType;
-import org.eclipse.osee.ats.impl.internal.workdef.model.PeerReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.PeerReviewDefinition;
import org.junit.Test;
/**
* Test case for {@link PeerReviewDefinition}
- *
+ *
* @author Donald G. Dunne
*/
public class PeerReviewDefinitionTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/StateDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinitionTest.java
index 5d9cee09efa..83c2c2201f2 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/StateDefinitionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinitionTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.IAtsCompositeLayoutItem;
@@ -16,14 +16,14 @@ import org.eclipse.osee.ats.api.workdef.IAtsWidgetDefinition;
import org.eclipse.osee.ats.api.workdef.RuleDefinitionOption;
import org.eclipse.osee.ats.api.workdef.StateColor;
import org.eclipse.osee.ats.api.workdef.StateType;
-import org.eclipse.osee.ats.impl.internal.AtsWorkDefinitionServiceImpl;
-import org.eclipse.osee.ats.impl.internal.workdef.model.CompositeLayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.LayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.PeerReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.StateDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WorkDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.AtsWorkDefinitionServiceImpl;
+import org.eclipse.osee.ats.dsl.integration.internal.model.CompositeLayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.LayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.PeerReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.StateDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WorkDefinition;
import org.junit.Test;
public class StateDefinitionTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionTest.java
index 0d3a8ed6438..ba2a8c091ad 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetDefinitionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionTest.java
@@ -8,16 +8,16 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.WidgetOption;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinition;
import org.junit.Test;
/**
* Test case for {@link WidgetDefinition}
- *
+ *
* @author Donald G. Dunne
*/
public class WidgetDefinitionTest {
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionHandlerTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionHandlerTest.java
index fe33e49570b..f0c930acf2d 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionHandlerTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionHandlerTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.Arrays;
import java.util.Collection;
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionTest.java
index 7df37ecafee..04ccce3d1e6 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WidgetOptionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetOptionTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.junit.Assert;
import org.eclipse.osee.ats.api.workdef.WidgetOption;
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WorkDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java
index 5aa1aa4336f..6526986f9eb 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/model/WorkDefinitionTest.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.Arrays;
import java.util.LinkedList;
@@ -16,15 +16,15 @@ import java.util.List;
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.impl.internal.AtsWorkDefinitionServiceImpl;
-import org.eclipse.osee.ats.impl.internal.workdef.model.StateDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WorkDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.AtsWorkDefinitionServiceImpl;
+import org.eclipse.osee.ats.dsl.integration.internal.model.StateDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WorkDefinition;
import org.junit.Assert;
import org.junit.Test;
/**
* Test case for {@link WorkDefinition}
- *
+ *
* @author Donald G. Dunne
*/
public class WorkDefinitionTest {
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/.classpath b/plugins/org.eclipse.osee.ats.dsl.integration/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/.project b/plugins/org.eclipse.osee.ats.dsl.integration/.project
new file mode 100644
index 00000000000..23ad5f67bf6
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.ats.dsl.integration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.dsl.integration/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..409bc2ea329
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ATS DSL Integration
+Bundle-SymbolicName: org.eclipse.osee.ats.dsl.integration;singleton:=true
+Bundle-Version: 0.18.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Service-Component: OSGI-INF/*.xml
+Bundle-Vendor: Eclipse Open System Engineering Environment
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.emf.common.util,
+ org.eclipse.emf.ecore,
+ org.eclipse.osee.ats.api,
+ org.eclipse.osee.ats.api.review,
+ org.eclipse.osee.ats.api.team,
+ org.eclipse.osee.ats.api.user,
+ org.eclipse.osee.ats.api.workdef,
+ org.eclipse.osee.ats.api.workflow,
+ org.eclipse.osee.ats.api.workflow.state,
+ org.eclipse.osee.ats.dsl,
+ org.eclipse.osee.ats.dsl.atsDsl,
+ org.eclipse.osee.ats.dsl.atsDsl.impl,
+ org.eclipse.osee.framework.core.util,
+ org.eclipse.osee.framework.jdk.core.type,
+ org.eclipse.osee.framework.jdk.core.util,
+ org.eclipse.osee.framework.logging
diff --git a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.workdef.service.xml b/plugins/org.eclipse.osee.ats.dsl.integration/OSGI-INF/ats.workdef.service.xml
index aa6e8f54dcb..862782456ca 100644
--- a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.workdef.service.xml
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/OSGI-INF/ats.workdef.service.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" name="org.eclipse.osee.ats.impl.internal.AtsWorkDefinitionServiceImpl">
- <implementation class="org.eclipse.osee.ats.impl.internal.AtsWorkDefinitionServiceImpl"/>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start">
+ <implementation class="org.eclipse.osee.ats.dsl.integration.internal.AtsWorkDefinitionServiceImpl"/>
<service>
<provide interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService"/>
</service>
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/build.properties b/plugins/org.eclipse.osee.ats.dsl.integration/build.properties
new file mode 100644
index 00000000000..c58ea2178c3
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/
diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/pom.xml b/plugins/org.eclipse.osee.ats.dsl.integration/pom.xml
new file mode 100644
index 00000000000..a450d9e12bf
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/pom.xml
@@ -0,0 +1,35 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osee</groupId>
+ <artifactId>org.eclipse.osee.x.ats.parent</artifactId>
+ <version>0.18.0-SNAPSHOT</version>
+ <relativePath>../../plugins/org.eclipse.osee.x.ats.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osee.ats.dsl.integration</artifactId>
+ <packaging>eclipse-plugin</packaging>
+ <name>OSEE ATS DSL Integration (Incubation)</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsWorkDefinitionServiceImpl.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java
index 63191c1d6d0..91eb82dd702 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsWorkDefinitionServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal;
+package org.eclipse.osee.ats.dsl.integration.internal;
import java.io.OutputStream;
import java.util.ArrayList;
@@ -32,8 +32,6 @@ import org.eclipse.osee.ats.api.workdef.RuleDefinitionOption;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.dsl.ModelUtil;
import org.eclipse.osee.ats.dsl.atsDsl.AtsDsl;
-import org.eclipse.osee.ats.impl.internal.workdef.ConvertAtsDslToWorkDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.ConvertWorkDefinitionToAtsDsl;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.Pair;
@@ -44,7 +42,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
/**
* Provides new and stored Work Definitions
- *
+ *
* @author Donald G. Dunne
*/
public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService {
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertAtsDslToWorkDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java
index d5bb3c1c0bf..3f5c87f68e9 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertAtsDslToWorkDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef;
+package org.eclipse.osee.ats.dsl.integration.internal;
import java.util.ArrayList;
import java.util.Collection;
@@ -57,16 +57,16 @@ import org.eclipse.osee.ats.dsl.atsDsl.UserRef;
import org.eclipse.osee.ats.dsl.atsDsl.WidgetDef;
import org.eclipse.osee.ats.dsl.atsDsl.WidgetRef;
import org.eclipse.osee.ats.dsl.atsDsl.WorkDef;
-import org.eclipse.osee.ats.impl.internal.workdef.model.CompositeLayoutItem;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.DecisionReviewOption;
-import org.eclipse.osee.ats.impl.internal.workdef.model.PeerReviewDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.StateDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinition;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinitionFloatMinMaxConstraint;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinitionIntMinMaxConstraint;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WidgetDefinitionListMinMaxSelectedConstraint;
-import org.eclipse.osee.ats.impl.internal.workdef.model.WorkDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.CompositeLayoutItem;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.DecisionReviewOption;
+import org.eclipse.osee.ats.dsl.integration.internal.model.PeerReviewDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.StateDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinition;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinitionFloatMinMaxConstraint;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinitionIntMinMaxConstraint;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WidgetDefinitionListMinMaxSelectedConstraint;
+import org.eclipse.osee.ats.dsl.integration.internal.model.WorkDefinition;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDsl.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java
index 67ba5b57228..df665f41cea 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/ConvertWorkDefinitionToAtsDsl.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef;
+package org.eclipse.osee.ats.dsl.integration.internal;
import java.util.Arrays;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/AbstractWorkDefItem.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItem.java
index 21ea41a3e06..c86686395b1 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/AbstractWorkDefItem.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/AbstractWorkDefItem.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
/**
* @author Donald G. Dunne
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/CompositeLayoutItem.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java
index 1a32444280b..b9de6638c94 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/CompositeLayoutItem.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java
index d6e696c0ed2..7e53200b0bc 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewOption.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java
index 94cc01ec055..6bace5a8806 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/DecisionReviewOption.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.LinkedList;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/LayoutItem.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/LayoutItem.java
index fc4762e85d9..2d8a1509e92 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/LayoutItem.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/LayoutItem.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.eclipse.osee.ats.api.workdef.IAtsLayoutItem;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/PeerReviewDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java
index cc091c8337b..e39902a1036 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/PeerReviewDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/RuleManager.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java
index 675980deae9..f9627e4e3ed 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/RuleManager.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/StateDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java
index c95ac389f45..5c85d016455 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/StateDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
@@ -162,7 +162,7 @@ public class StateDefinition extends AbstractWorkDefItem implements IAtsStateDef
/**
* Set how much (of 100%) this state's percent complete will contribute to the full percent complete of work
* definitions.
- *
+ *
* @param percentWeight int value where all stateWeights in workdefinition == 100
*/
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java
index 0bfdf3fe12b..55f0906ce13 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionFloatMinMaxConstraint.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionFloatMinMaxConstraint.java
index eebbad1d932..a7970ffece2 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionFloatMinMaxConstraint.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionFloatMinMaxConstraint.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.eclipse.osee.ats.api.workdef.IAtsWidgetDefinitionFloatMinMaxConstraint;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionIntMinMaxConstraint.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionIntMinMaxConstraint.java
index fc8b7e726fb..1d3e215d592 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionIntMinMaxConstraint.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionIntMinMaxConstraint.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.eclipse.osee.ats.api.workdef.IAtsWidgetDefinitionIntMinMaxConstraint;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionListMinMaxSelectedConstraint.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionListMinMaxSelectedConstraint.java
index ec5d5ca6799..d7b63d2be44 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WidgetDefinitionListMinMaxSelectedConstraint.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinitionListMinMaxSelectedConstraint.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import org.eclipse.osee.ats.api.workdef.IAtsWidgetDefinitionListMinMaxSelectedConstraint;
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WorkDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java
index 7a4485a8210..94997a26460 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/model/WorkDefinition.java
+++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.impl.internal.workdef.model;
+package org.eclipse.osee.ats.dsl.integration.internal.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/AllAtsImplTestSuite.java b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/AllAtsImplTestSuite.java
index 505daf8f210..3c793b4ba7b 100644
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/AllAtsImplTestSuite.java
+++ b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/AllAtsImplTestSuite.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.impl;
-import org.eclipse.osee.ats.impl.internal.model.ModelTestSuite;
import org.eclipse.osee.ats.impl.internal.notify.AtsImpl_Notify_Suite;
-import org.eclipse.osee.ats.impl.internal.workdef.WorkDefTestSuite;
+import org.eclipse.osee.ats.impl.internal.util.AtsUtilServerTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,7 +19,7 @@ import org.junit.runners.Suite;
* @author Donald G. Dunne
*/
@RunWith(Suite.class)
-@Suite.SuiteClasses({WorkDefTestSuite.class, ModelTestSuite.class, AtsImpl_Notify_Suite.class})
+@Suite.SuiteClasses({AtsUtilServerTest.class, AtsImpl_Notify_Suite.class})
public class AllAtsImplTestSuite {
// Test Suite
}
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/util/AtsUtilServerTest.java b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/util/AtsUtilServerTest.java
new file mode 100644
index 00000000000..67470d01d14
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/util/AtsUtilServerTest.java
@@ -0,0 +1,39 @@
+/*
+ * Created on Aug 12, 2014
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.impl.internal.util;
+
+import static org.mockito.Mockito.when;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
+import org.eclipse.osee.orcs.data.ArtifactReadable;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+public class AtsUtilServerTest {
+
+ // @formatter:off
+ @Mock private IAtsTeamWorkflow teamWf;
+ @Mock private ArtifactReadable teamArt;
+ // @formatter:on
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testGetAtsId() {
+ when(teamWf.getStoreObject()).thenReturn(teamArt);
+ when(teamArt.getSoleAttributeAsString(AtsAttributeTypes.AtsId, AtsUtilCore.DEFAULT_ATS_ID_VALUE)).thenReturn(
+ "ATS123");
+
+ Assert.assertEquals("ATS123", AtsUtilServer.getAtsId(teamWf));
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/WorkDefTestSuite.java b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/WorkDefTestSuite.java
deleted file mode 100644
index affab760ec6..00000000000
--- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/workdef/WorkDefTestSuite.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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.impl.internal.workdef;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * @author Donald G. Dunne
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ConvertWorkDefinitionToAtsDslTest.class})
-public class WorkDefTestSuite {
- // Test Suite
-}
diff --git a/plugins/org.eclipse.osee.ats.impl/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.impl/META-INF/MANIFEST.MF
index 3a1ce89f5fa..9d8ee1cff1a 100644
--- a/plugins/org.eclipse.osee.ats.impl/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.impl/META-INF/MANIFEST.MF
@@ -8,11 +8,6 @@ Import-Package: com.google.inject,
javax.ws.rs;version="2.0.0",
javax.ws.rs.core;version="2.0.0",
javax.ws.rs.ext;version="2.0.0",
- org.eclipse.emf.common,
- org.eclipse.emf.common.util,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.resource,
- org.eclipse.emf.ecore.resource.impl,
org.eclipse.osee.ats.api,
org.eclipse.osee.ats.api.ai,
org.eclipse.osee.ats.api.commit,
@@ -41,9 +36,6 @@ Import-Package: com.google.inject,
org.eclipse.osee.ats.core.workflow,
org.eclipse.osee.ats.core.workflow.state,
org.eclipse.osee.ats.core.workflow.transition,
- org.eclipse.osee.ats.dsl,
- org.eclipse.osee.ats.dsl.atsDsl,
- org.eclipse.osee.ats.dsl.atsDsl.impl,
org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.exception,
@@ -61,8 +53,6 @@ Import-Package: com.google.inject,
org.eclipse.osee.orcs.search,
org.eclipse.osee.orcs.transaction,
org.eclipse.osee.template.engine,
- org.eclipse.xtext,
- org.eclipse.xtext.resource,
org.json,
org.osgi.framework
Service-Component: OSGI-INF/*.xml
diff --git a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.attribute.resolver.xml b/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.attribute.resolver.xml
index e0e90842db8..f1426e333ae 100644
--- a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.attribute.resolver.xml
+++ b/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.attribute.resolver.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" name="org.eclipse.osee.ats.impl.internal.util.AtsAttributeResolverServiceImpl">
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start">
<implementation class="org.eclipse.osee.ats.impl.internal.util.AtsAttributeResolverServiceImpl"/>
<service>
<provide interface="org.eclipse.osee.ats.api.workdef.IAttributeResolver"/>
diff --git a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.server.service.xml b/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.server.service.xml
index bb6aa5118fc..43197766e97 100644
--- a/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.server.service.xml
+++ b/plugins/org.eclipse.osee.ats.impl/OSGI-INF/ats.server.service.xml
@@ -3,14 +3,10 @@
<implementation class="org.eclipse.osee.ats.impl.internal.AtsServerImpl"/>
<reference bind="setOrcsApi" cardinality="1..1" interface="org.eclipse.osee.orcs.OrcsApi" name="OrcsApi" policy="static"/>
<reference bind="setWorkDefService" cardinality="1..1" interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService" name="IAtsWorkDefinitionService" policy="static"/>
- <reference bind="setUserService" cardinality="1..1" interface="org.eclipse.osee.ats.api.user.IAtsUserService" name="IAtsUserService" policy="static"/>
<service>
- <provide interface="org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.api.workflow.IAtsBranchServiceProvider"/>
- <provide interface="org.eclipse.osee.ats.core.config.IAtsConfigProvider"/>
<provide interface="org.eclipse.osee.ats.impl.IAtsServer"/>
</service>
<reference bind="setDatabaseService" cardinality="1..1" interface="org.eclipse.osee.framework.database.IOseeDatabaseService" name="IOseeDatabaseService" policy="static"/>
<reference bind="addNotifier" cardinality="1..n" interface="org.eclipse.osee.ats.impl.internal.notify.IAtsNotifierServer" name="IAtsNotifierServer" policy="dynamic" unbind="removeNotifier"/>
+ <reference bind="setLogger" cardinality="1..1" interface="org.eclipse.osee.logger.Log" name="Log" policy="static"/>
</scr:component>
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 7c8aacc0514..77682442cd3 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
@@ -12,18 +12,17 @@ package org.eclipse.osee.ats.impl;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.notify.IAtsNotifier;
import org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider;
import org.eclipse.osee.ats.api.team.IAtsConfigItemFactory;
import org.eclipse.osee.ats.api.team.IAtsConfigItemFactoryProvider;
import org.eclipse.osee.ats.api.team.IAtsWorkItemFactory;
-import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsDatabaseConversion;
import org.eclipse.osee.ats.api.util.IAtsStoreFactory;
import org.eclipse.osee.ats.api.util.IAtsUtilService;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionAdmin;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionServiceProvider;
-import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.IAtsBranchServiceProvider;
import org.eclipse.osee.ats.api.workflow.IAtsWorkItemServiceProvider;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
@@ -41,14 +40,12 @@ import org.eclipse.osee.orcs.search.QueryBuilder;
/**
* @author Donald G Dunne
*/
-public interface IAtsServer extends IAtsNotifier, IAtsConfigItemFactoryProvider, IAtsConfigProvider, IAtsReviewServiceProvider, IAtsBranchServiceProvider, IAtsWorkItemServiceProvider, IAtsWorkDefinitionServiceProvider, IArtifactProvider {
+public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFactoryProvider, IAtsConfigProvider, IAtsReviewServiceProvider, IAtsBranchServiceProvider, IAtsWorkItemServiceProvider, IAtsWorkDefinitionServiceProvider, IArtifactProvider {
OrcsApi getOrcsApi() throws OseeCoreException;
IAtsWorkItemFactory getWorkItemFactory() throws OseeCoreException;
- IAtsUserService getUserService() throws OseeCoreException;
-
@Override
ArtifactReadable getArtifact(IAtsObject atsObject) throws OseeCoreException;
@@ -56,8 +53,6 @@ public interface IAtsServer extends IAtsNotifier, IAtsConfigItemFactoryProvider,
ArtifactReadable getArtifactByGuid(String guid);
- IAttributeResolver getAttributeResolver();
-
IAtsStoreFactory getStoreFactory();
@Override
@@ -87,4 +82,6 @@ public interface IAtsServer extends IAtsNotifier, IAtsConfigItemFactoryProvider,
String getConfigValue(String key);
-}
+ IAtsServices getServices();
+
+} \ No newline at end of file
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 40ea26c53f5..86e99f5548a 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
@@ -14,7 +14,9 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.notify.AtsNotificationCollector;
import org.eclipse.osee.ats.api.review.IAtsReviewService;
import org.eclipse.osee.ats.api.team.IAtsConfigItemFactory;
@@ -23,6 +25,7 @@ import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsDatabaseConversion;
import org.eclipse.osee.ats.api.util.IAtsStoreFactory;
import org.eclipse.osee.ats.api.util.IAtsUtilService;
+import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionAdmin;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
@@ -44,12 +47,12 @@ import org.eclipse.osee.ats.impl.internal.notify.AtsNotificationEventProcessor;
import org.eclipse.osee.ats.impl.internal.notify.AtsNotifierServiceImpl;
import org.eclipse.osee.ats.impl.internal.notify.IAtsNotifierServer;
import org.eclipse.osee.ats.impl.internal.notify.WorkItemNotificationProcessor;
+import org.eclipse.osee.ats.impl.internal.user.AtsUserServiceImpl;
import org.eclipse.osee.ats.impl.internal.util.AtsArtifactConfigCache;
import org.eclipse.osee.ats.impl.internal.util.AtsAttributeResolverServiceImpl;
import org.eclipse.osee.ats.impl.internal.util.AtsBranchServiceImpl;
import org.eclipse.osee.ats.impl.internal.util.AtsReviewServiceImpl;
import org.eclipse.osee.ats.impl.internal.util.AtsStoreFactoryImpl;
-import org.eclipse.osee.ats.impl.internal.util.AtsUtilServer;
import org.eclipse.osee.ats.impl.internal.util.AtsWorkDefinitionCacheProvider;
import org.eclipse.osee.ats.impl.internal.util.TeamWorkflowProvider;
import org.eclipse.osee.ats.impl.internal.workitem.ActionableItemManager;
@@ -75,12 +78,12 @@ import org.eclipse.osee.orcs.search.QueryBuilder;
public class AtsServerImpl implements IAtsServer {
public static String PLUGIN_ID = "org.eclipse.osee.ats.rest";
- private static OrcsApi orcsApi;
+ private OrcsApi orcsApi;
private Log logger;
- private static IAtsWorkItemFactory workItemFactory;
- private static AtsServerImpl instance;
- private static IAtsWorkDefinitionService workDefService;
- private static IAtsUserService userService;
+ private IAtsWorkItemFactory workItemFactory;
+ private IAtsWorkDefinitionService workDefService;
+ private IAtsUserService userService;
+ private AtsNotifierServiceImpl notifyService;
private IAtsWorkItemService workItemService;
private IAtsBranchService branchService;
private IAtsReviewService reviewService;
@@ -104,10 +107,7 @@ public class AtsServerImpl implements IAtsServer {
private WorkItemNotificationProcessor workItemNotificationProcessor;
private AtsNotificationEventProcessor notificationEventProcessor;
- public static AtsServerImpl get() {
- checkStarted();
- return instance;
- }
+ private IAtsVersionService versionService;
public void setLogger(Log logger) {
this.logger = logger;
@@ -123,15 +123,11 @@ public class AtsServerImpl implements IAtsServer {
}
public void setOrcsApi(OrcsApi orcsApi) {
- AtsServerImpl.orcsApi = orcsApi;
+ this.orcsApi = orcsApi;
}
public void setWorkDefService(IAtsWorkDefinitionService workDefService) {
- AtsServerImpl.workDefService = workDefService;
- }
-
- public void setUserService(IAtsUserService userService) {
- AtsServerImpl.userService = userService;
+ this.workDefService = workDefService;
}
public void addNotifier(IAtsNotifierServer notifier) {
@@ -143,7 +139,8 @@ public class AtsServerImpl implements IAtsServer {
}
public void start() throws OseeCoreException {
- instance = this;
+
+ notifyService = new AtsNotifierServiceImpl();
workItemFactory = new WorkItemFactory(logger, this);
configItemFactory = new ConfigItemFactory(logger, this);
@@ -159,18 +156,20 @@ public class AtsServerImpl implements IAtsServer {
new AtsWorkDefinitionAdminImpl(workDefCacheProvider, workItemService, workDefService, teamWorkflowProvider,
attributeResolverService);
+ userService = new AtsUserServiceImpl();
+
atsLogFactory = AtsCoreFactory.newLogFactory();
- atsStateFactory = AtsCoreFactory.newStateFactory(attributeResolverService, userService);
- atsStoreFactory = new AtsStoreFactoryImpl(this);
+ atsStateFactory = AtsCoreFactory.newStateFactory(getServices(), atsLogFactory);
+ atsStoreFactory = new AtsStoreFactoryImpl(orcsApi, atsStateFactory, atsLogFactory, this);
utilService = AtsCoreFactory.getUtilService(attributeResolverService);
sequenceProvider = new AtsSequenceProvider(dbService);
- config = new AtsArtifactConfigCache(this, orcsApi);
+ config = new AtsArtifactConfigCache(configItemFactory, orcsApi);
actionableItemManager = new ActionableItemManager(config);
workItemPage = new WorkItemPage(logger, this);
actionFactory =
new ActionFactory(orcsApi, workItemFactory, utilService, sequenceProvider, workItemService,
- actionableItemManager, userService, attributeResolverService, atsStateFactory);
+ actionableItemManager, userService, attributeResolverService, atsStateFactory, config);
System.out.println("ATS - AtsServerImpl started");
started = true;
@@ -202,14 +201,20 @@ public class AtsServerImpl implements IAtsServer {
@Override
public IAtsUserService getUserService() throws OseeCoreException {
- checkStarted();
return userService;
}
@Override
public ArtifactReadable getArtifact(IAtsObject atsObject) throws OseeCoreException {
checkStarted();
- return AtsUtilServer.getArtifact(orcsApi, atsObject);
+ ArtifactReadable result = null;
+ if (atsObject.getStoreObject() != null) {
+ result = (ArtifactReadable) atsObject.getStoreObject();
+ } else {
+ result =
+ orcsApi.getQueryFactory(null).fromBranch(AtsUtilCore.getAtsBranch()).andGuid(atsObject.getGuid()).getResults().getAtMostOneOrNull();
+ }
+ return result;
}
@Override
@@ -231,12 +236,12 @@ public class AtsServerImpl implements IAtsServer {
@Override
public ArtifactReadable getArtifactByGuid(String guid) throws OseeCoreException {
checkStarted();
- return AtsUtilServer.getArtifactByGuid(orcsApi, guid);
+ return orcsApi.getQueryFactory(null).fromBranch(AtsUtilCore.getAtsBranch()).andGuid(guid).getResults().getExactlyOne();
}
@Override
public ArtifactReadable getArtifactByAtsId(String id) {
- return AtsUtilServer.getArtifactByAtsId(orcsApi, id);
+ return orcsApi.getQueryFactory(null).fromBranch(AtsUtilCore.getAtsBranch()).and(AtsAttributeTypes.AtsId, id).getResults().getOneOrNull();
}
@Override
@@ -340,19 +345,26 @@ public class AtsServerImpl implements IAtsServer {
}
@Override
+ public IAtsServices getServices() {
+ return this;
+ }
+
+ @Override
public void sendNotifications(AtsNotificationCollector notifications) {
- if (notificationEventProcessor == null) {
+ if (notifiers.isEmpty() || !isProduction()) {
+ OseeLog.log(AtsServerImpl.class, Level.INFO, "Osee Notification Disabled");
+ } else {
workItemNotificationProcessor =
new WorkItemNotificationProcessor(this, workItemFactory, userService, attributeResolverService);
notificationEventProcessor =
new AtsNotificationEventProcessor(workItemNotificationProcessor, userService,
getConfigValue("NoReplyEmail"));
- }
- if (notifiers.isEmpty() || !isProduction()) {
- OseeLog.log(AtsNotifierServiceImpl.class, Level.INFO, "Osee Notification Disabled");
- return;
- } else {
notificationEventProcessor.sendNotifications(notifications, notifiers);
}
}
+
+ @Override
+ public IAtsVersionService getVersionService() {
+ return null;
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
index f316b9aa84a..41b3de8786d 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/action/ActionFactory.java
@@ -39,6 +39,7 @@ import org.eclipse.osee.ats.api.workflow.INewActionListener;
import org.eclipse.osee.ats.api.workflow.log.LogType;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
+import org.eclipse.osee.ats.core.config.IAtsConfig;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility;
import org.eclipse.osee.ats.core.workflow.transition.TransitionManager;
@@ -74,8 +75,9 @@ public class ActionFactory implements IAtsActionFactory {
private final IAtsUserService userService;
private final IAttributeResolver attrResolver;
private final IAtsStateFactory stateFactory;
+ private final IAtsConfig config;
- public ActionFactory(OrcsApi orcsApi, IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, IAtsWorkItemService workItemService, ActionableItemManager actionableItemManager, IAtsUserService userService, IAttributeResolver attrResolver, IAtsStateFactory stateFactory) {
+ public ActionFactory(OrcsApi orcsApi, IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, IAtsWorkItemService workItemService, ActionableItemManager actionableItemManager, IAtsUserService userService, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsConfig config) {
this.orcsApi = orcsApi;
this.workItemFactory = workItemFactory;
this.utilService = utilService;
@@ -85,6 +87,7 @@ public class ActionFactory implements IAtsActionFactory {
this.userService = userService;
this.attrResolver = attrResolver;
this.stateFactory = stateFactory;
+ this.config = config;
}
@Override
@@ -100,7 +103,7 @@ public class ActionFactory implements IAtsActionFactory {
IAtsAction action = workItemFactory.getAction(actionArt);
changes.add(action);
setArtifactIdentifyData(action, title, desc, changeType, priority, validationRequired, needByDate, changes);
- utilService.setAtsId(sequenceProvider, action, TeamDefinitions.getTopTeamDefinition(), changes);
+ utilService.setAtsId(sequenceProvider, action, TeamDefinitions.getTopTeamDefinition(config), changes);
// Retrieve Team Definitions corresponding to selected Actionable Items
Collection<IAtsTeamDefinition> teamDefs = TeamDefinitions.getImpactedTeamDefs(actionableItems);
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/AtsNotifierServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/AtsNotifierServiceImpl.java
index 4e68b114e0d..549c0cd2b12 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/AtsNotifierServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/AtsNotifierServiceImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.impl.internal.notify;
import java.util.Collection;
import org.eclipse.osee.ats.api.notify.AtsNotificationEvent;
+import org.eclipse.osee.ats.impl.internal.AtsServerService;
import org.eclipse.osee.mail.api.MailService;
/**
@@ -31,7 +32,8 @@ public class AtsNotifierServiceImpl implements IAtsNotifierServer {
@Override
public void sendNotifications(String fromUserEmail, String testingUserEmail, String subject, String body, Collection<? extends AtsNotificationEvent> notificationEvents) {
SendNotificationEvents job =
- new SendNotificationEvents(mailService, fromUserEmail, testingUserEmail, subject, body, notificationEvents);
+ new SendNotificationEvents(mailService, fromUserEmail, testingUserEmail, subject, body, notificationEvents,
+ AtsServerService.get().getUserService());
job.run();
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java
index fb999c9e929..3cb02eb3796 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java
@@ -19,6 +19,7 @@ import java.util.Set;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.notify.AtsNotificationEvent;
import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.core.users.AtsUsersUtility;
import org.eclipse.osee.framework.core.enums.SystemUser;
import org.eclipse.osee.framework.core.util.Result;
@@ -42,14 +43,16 @@ public class SendNotificationEvents {
private final MailService mailService;
private final String fromUserEmail;
private final String testingUserEmail;
+ private final IAtsUserService userService;
- protected SendNotificationEvents(MailService mailService, String fromUserEmail, String testingUserEmail, String subject, String body, Collection<? extends AtsNotificationEvent> notificationEvents) {
+ protected SendNotificationEvents(MailService mailService, String fromUserEmail, String testingUserEmail, String subject, String body, Collection<? extends AtsNotificationEvent> notificationEvents, IAtsUserService userService) {
this.mailService = mailService;
this.fromUserEmail = fromUserEmail;
this.testingUserEmail = testingUserEmail;
this.subject = subject;
this.body = body;
this.notificationEvents = notificationEvents;
+ this.userService = userService;
if (isTesting()) {
OseeLog.log(SendNotificationEvents.class, Level.SEVERE,
"OseeNotifyUsersJob: testing is enabled....turn off for production.");
@@ -60,7 +63,7 @@ public class SendNotificationEvents {
try {
Set<IAtsUser> uniqueUusers = new HashSet<IAtsUser>();
for (AtsNotificationEvent notificationEvent : notificationEvents) {
- uniqueUusers.addAll(AtsUsersUtility.getUsers(notificationEvent.getUserIds()));
+ uniqueUusers.addAll(AtsUsersUtility.getUsers(notificationEvent.getUserIds(), userService));
}
XResultData resultData = new XResultData();
if (isTesting()) {
@@ -70,7 +73,7 @@ public class SendNotificationEvents {
for (IAtsUser user : AtsUsersUtility.getValidEmailUsers(uniqueUusers)) {
List<AtsNotificationEvent> notifyEvents = new ArrayList<AtsNotificationEvent>();
for (AtsNotificationEvent notificationEvent : notificationEvents) {
- if (isTesting() || AtsUsersUtility.getUsers(notificationEvent.getUserIds()).contains(user)) {
+ if (isTesting() || AtsUsersUtility.getUsers(notificationEvent.getUserIds(), userService).contains(user)) {
notifyEvents.add(notificationEvent);
}
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsArtifactConfigCache.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsArtifactConfigCache.java
index 5bb872a540c..d6a75c232b1 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsArtifactConfigCache.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsArtifactConfigCache.java
@@ -12,10 +12,9 @@ package org.eclipse.osee.ats.impl.internal.util;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsConfigObject;
+import org.eclipse.osee.ats.api.team.IAtsConfigItemFactory;
import org.eclipse.osee.ats.core.config.AtsConfigCache;
import org.eclipse.osee.ats.core.config.IAtsConfig;
-import org.eclipse.osee.ats.impl.IAtsServer;
-import org.eclipse.osee.ats.impl.internal.AtsServerImpl;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -29,10 +28,10 @@ public class AtsArtifactConfigCache implements IAtsConfig {
private final OrcsApi orcsApi;
private final AtsConfigCache cache;
- private final IAtsServer server;
+ private final IAtsConfigItemFactory configItemFactory;
- public AtsArtifactConfigCache(IAtsServer server, OrcsApi orcsApi) {
- this.server = server;
+ public AtsArtifactConfigCache(IAtsConfigItemFactory configItemFactory, OrcsApi orcsApi) {
+ this.configItemFactory = configItemFactory;
this.orcsApi = orcsApi;
cache = new AtsConfigCache();
}
@@ -60,7 +59,7 @@ public class AtsArtifactConfigCache implements IAtsConfig {
ArtifactReadable artifact =
orcsApi.getQueryFactory(null).fromBranch(AtsUtilServer.getAtsBranch()).andGuid(guid).getResults().getOneOrNull();
if (artifact != null) {
- result = (A) server.getConfigItemFactory().getConfigObject(artifact);
+ result = (A) configItemFactory.getConfigObject(artifact);
if (result != null) {
cache.cache(result);
}
@@ -76,7 +75,7 @@ public class AtsArtifactConfigCache implements IAtsConfig {
ArtifactReadable artifact =
orcsApi.getQueryFactory(null).fromBranch(AtsUtilServer.getAtsBranch()).andGuid(guid).getResults().getOneOrNull();
if (artifact != null) {
- result = AtsServerImpl.get().getConfigItemFactory().getConfigObject(artifact);
+ result = configItemFactory.getConfigObject(artifact);
if (result != null) {
cache.cache(result);
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java
index c6bfb104087..e6e0334534a 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java
@@ -12,12 +12,14 @@ package org.eclipse.osee.ats.impl.internal.util;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.notify.IAtsNotifier;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IExecuteListener;
import org.eclipse.osee.ats.api.workflow.IAttribute;
+import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
+import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.util.AbstractAtsChangeSet;
-import org.eclipse.osee.ats.impl.IAtsServer;
import org.eclipse.osee.ats.impl.internal.AtsServerService;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
@@ -25,6 +27,7 @@ import org.eclipse.osee.framework.core.data.IRelationTypeSide;
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.orcs.OrcsApi;
import org.eclipse.osee.orcs.data.ArtifactId;
import org.eclipse.osee.orcs.data.ArtifactReadable;
import org.eclipse.osee.orcs.transaction.TransactionBuilder;
@@ -35,18 +38,23 @@ import org.eclipse.osee.orcs.transaction.TransactionBuilder;
public class AtsChangeSet extends AbstractAtsChangeSet {
private TransactionBuilder transaction;
- private final IAtsServer atsServer;
+ private final OrcsApi orcsApi;
+ private final IAtsStateFactory stateFactory;
+ private final IAtsLogFactory logFactory;
+ private final IAtsNotifier notifier;
- public AtsChangeSet(IAtsServer atsServer, String comment, IAtsUser user) {
+ public AtsChangeSet(OrcsApi orcsApi, IAtsStateFactory stateFactory, IAtsLogFactory logFactory, String comment, IAtsUser user, IAtsNotifier notifier) {
super(comment, user);
- this.atsServer = atsServer;
+ this.orcsApi = orcsApi;
+ this.stateFactory = stateFactory;
+ this.logFactory = logFactory;
+ this.notifier = notifier;
}
public TransactionBuilder getTransaction() throws OseeCoreException {
if (transaction == null) {
transaction =
- atsServer.getOrcsApi().getTransactionFactory(null).createTransaction(AtsUtilServer.getAtsBranch(),
- getUser(user), comment);
+ orcsApi.getTransactionFactory(null).createTransaction(AtsUtilServer.getAtsBranch(), getUser(user), comment);
}
return transaction;
}
@@ -55,8 +63,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
if (user.getStoreObject() instanceof ArtifactReadable) {
return (ArtifactReadable) user.getStoreObject();
}
- return atsServer.getOrcsApi().getQueryFactory(null).fromBranch(AtsUtilServer.getAtsBranch()).andGuid(
- user.getGuid()).getResults().getExactlyOne();
+ return orcsApi.getQueryFactory(null).fromBranch(AtsUtilServer.getAtsBranch()).andGuid(user.getGuid()).getResults().getExactlyOne();
}
@Override
@@ -70,10 +77,10 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
IAtsWorkItem workItem = (IAtsWorkItem) obj;
IAtsStateManager stateMgr = workItem.getStateMgr();
if (stateMgr.isDirty()) {
- atsServer.getStateFactory().writeToStore(user, workItem, this);
+ stateFactory.writeToStore(user, workItem, this);
}
if (workItem.getLog().isDirty()) {
- atsServer.getLogFactory().writeToStore(workItem, AtsServerService.get().getAttributeResolver(), this);
+ logFactory.writeToStore(workItem, AtsServerService.get().getAttributeResolver(), this);
}
}
}
@@ -89,16 +96,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
for (IExecuteListener listener : listeners) {
listener.changesStored(this);
}
- atsServer.sendNotifications(getNotifications());
- }
-
- public static void execute(IAtsServer atsServer, String comment, IAtsUser user, Object object, Object... objects) throws OseeCoreException {
- AtsChangeSet changes = new AtsChangeSet(atsServer, comment, user);
- changes.add(object);
- for (Object obj : objects) {
- changes.add(obj);
- }
- changes.execute();
+ notifier.sendNotifications(getNotifications());
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreFactoryImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreFactoryImpl.java
index 213c0c4bd82..3e890ca0881 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreFactoryImpl.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreFactoryImpl.java
@@ -10,25 +10,34 @@
*******************************************************************************/
package org.eclipse.osee.ats.impl.internal.util;
+import org.eclipse.osee.ats.api.notify.IAtsNotifier;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreFactory;
-import org.eclipse.osee.ats.impl.IAtsServer;
+import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
+import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
+import org.eclipse.osee.orcs.OrcsApi;
/**
* @author Donald G. Dunne
*/
public class AtsStoreFactoryImpl implements IAtsStoreFactory {
- private final IAtsServer atsServer;
+ private final OrcsApi orcsApi;
+ private final IAtsStateFactory stateFactory;
+ private final IAtsLogFactory logFactory;
+ private final IAtsNotifier notifier;
- public AtsStoreFactoryImpl(IAtsServer atsServer) {
- this.atsServer = atsServer;
+ public AtsStoreFactoryImpl(OrcsApi orcsApi, IAtsStateFactory stateFactory, IAtsLogFactory logFactory, IAtsNotifier notifier) {
+ this.logFactory = logFactory;
+ this.stateFactory = stateFactory;
+ this.orcsApi = orcsApi;
+ this.notifier = notifier;
}
@Override
public IAtsChangeSet createAtsChangeSet(String comment, IAtsUser user) {
- return new AtsChangeSet(atsServer, comment, user);
+ return new AtsChangeSet(orcsApi, stateFactory, logFactory, comment, user, notifier);
}
}
diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
index 45e064494a6..8034169c217 100644
--- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
+++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java
@@ -80,7 +80,7 @@ public class BurndownSelectionDialog extends SelectionDialog {
List<Object> objs = new ArrayList<Object>();
try {
Set<IAtsTeamDefinition> teamReleaseableDefinitions =
- TeamDefinitions.getTeamReleaseableDefinitions(this.active);
+ TeamDefinitions.getTeamReleaseableDefinitions(this.active, AtsClientService.get().getConfig());
for (IAtsTeamDefinition teamDef : teamReleaseableDefinitions) {
Artifact artifact = AtsClientService.get().getConfigArtifact(teamDef);
objs.add(artifact);
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java
index f8a9a26cd88..d68b89b36b5 100644
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java
@@ -66,7 +66,7 @@ public class VersionEfficiency {
double actual = 0;
for (TeamWorkFlowArtifact twa : teams.get(teamName)) {
estimated += twa.getEstimatedHoursTotal();
- actual += HoursSpentUtil.getHoursSpentTotal(twa);
+ actual += HoursSpentUtil.getHoursSpentTotal(twa, AtsClientService.get().getServices());
}
if (actual != 0) {
this.efficiency.put(teamName, estimated / actual);
diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java
index 2017b432725..2919e362579 100644
--- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java
+++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java
@@ -13,6 +13,7 @@ import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.reports.AtsReport;
import org.eclipse.osee.ats.reports.ReportTabFactory;
import org.eclipse.osee.ats.reports.efficiency.internal.Activator;
+import org.eclipse.osee.ats.reports.efficiency.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.operation.IOperation;
@@ -43,7 +44,7 @@ public class EfficiencyAtsReport implements AtsReport<IAtsTeamDefinition, Object
IAtsTeamDefinition atsTeamDefinition = null;
TeamDefinitionDialog dlg =
new TeamDefinitionDialog("Team Efficiency Report", "Please Select the Team Definition");
- dlg.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both));
+ dlg.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both, AtsClientService.get().getConfig()));
int open = dlg.open();
if (open == 0) {
Object[] result = dlg.getResult();
diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java
index c4fa9a8ff22..0398b46335a 100644
--- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java
+++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java
@@ -11,6 +11,7 @@ import java.util.Map;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+import org.eclipse.osee.ats.reports.split.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -49,7 +50,7 @@ public class TeamDistributionEntry {
if (this.teamSplitMap.containsKey(teamName)) {
work = this.teamSplitMap.get(teamName);
}
- double hoursSpent = HoursSpentUtil.getHoursSpentTotal(workflow);
+ double hoursSpent = HoursSpentUtil.getHoursSpentTotal(workflow, AtsClientService.get().getServices());
this.teamSplitMap.put(teamName, work + hoursSpent);
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
index bd5eb494dd5..5003284695a 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
@@ -206,7 +206,7 @@ public final class CpaResource {
TransitionHelper helper =
new TransitionHelper("Transition " + teamWf.getAtsId(), Arrays.asList(teamWf),
- TeamState.Analyze.getName(), teamWf.getAssignees(), "", changes,
+ TeamState.Analyze.getName(), teamWf.getAssignees(), "", changes, atsServer.getServices(),
TransitionOption.OverrideAssigneeCheck);
helper.setTransitionUser(AtsCoreUsers.SYSTEM_USER);
IAtsTransitionManager mgr = TransitionFactory.getTransitionManager(helper);
@@ -221,7 +221,8 @@ public final class CpaResource {
TransitionHelper helper =
new TransitionHelper("Transition " + teamWf.getAtsId(), Arrays.asList(teamWf),
- TeamState.Completed.getName(), null, "", changes, TransitionOption.OverrideAssigneeCheck);
+ TeamState.Completed.getName(), null, "", changes, atsServer.getServices(),
+ TransitionOption.OverrideAssigneeCheck);
helper.setTransitionUser(AtsCoreUsers.SYSTEM_USER);
IAtsTransitionManager mgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = mgr.handleAll();
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/resources/StateResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/resources/StateResource.java
index 5f2de9ae4b2..c9d9536acce 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/resources/StateResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/resources/StateResource.java
@@ -106,7 +106,7 @@ public final class StateResource {
atsServer.getStoreFactory().createAtsChangeSet("Transition Action - Server", transitionUser);
TransitionHelper helper =
new TransitionHelper("Transition " + guid, Collections.singleton(workItem), toState,
- workItem.getAssignees(), reason, changes, TransitionOption.None);
+ 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/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
index 8d7e752b2ac..e2c9d999410 100644
--- a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
@@ -115,7 +115,6 @@ Import-Package: com.google.gson,
org.eclipse.osee.ats.core.client.workflow.transition,
org.eclipse.osee.ats.core.column,
org.eclipse.osee.ats.core.workdef,
- org.eclipse.osee.ats.core.workdef.provider,
org.eclipse.osee.ats.core.workflow,
org.eclipse.osee.ats.dsl,
org.eclipse.osee.ats.dsl.atsDsl,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
index 8882f67b645..486ee9e98d3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ConvertActionableItemsAction.java
@@ -28,6 +28,7 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.AICheckTreeDialog;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
@@ -108,7 +109,7 @@ public class ConvertActionableItemsAction extends Action {
//
"You will be prompted to confirm this conversion.", Active.Both);
- diag.setInput(ActionableItems.getTopLevelActionableItems(Active.Both));
+ diag.setInput(ActionableItems.getTopLevelActionableItems(Active.Both, AtsClientService.get().getConfig()));
if (diag.open() != 0) {
return Result.FalseResult;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
index 474375a26ea..4814f233955 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewAction.java
@@ -15,6 +15,7 @@ import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.actions.wizard.NewActionWizard;
import org.eclipse.osee.ats.core.config.ActionableItems;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.ui.PlatformUI;
@@ -42,7 +43,8 @@ public class NewAction extends AbstractAtsAction {
public void runWithException() throws OseeCoreException {
NewActionWizard wizard = new NewActionWizard();
if (actionableItem != null) {
- wizard.setInitialAias(ActionableItems.getActionableItems(Arrays.asList(actionableItem)));
+ wizard.setInitialAias(ActionableItems.getActionableItems(Arrays.asList(actionableItem),
+ AtsClientService.get().getConfig()));
}
if (initialDescription != null) {
wizard.setInitialDescription(initialDescription);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
index 59b24364407..047219b86f1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/OpenVersionArtifactAction.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.ats.actions;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -35,9 +34,9 @@ public class OpenVersionArtifactAction extends AbstractAtsAction {
@Override
public void runWithException() throws OseeCoreException {
- if (AtsVersionService.get().hasTargetedVersion(sma)) {
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(sma)) {
RendererManager.open(
- AtsClientService.get().getConfigArtifact(AtsVersionService.get().getTargetedVersion(sma)),
+ AtsClientService.get().getConfigArtifact(AtsClientService.get().getVersionService().getTargetedVersion(sma)),
PresentationType.DEFAULT_OPEN);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java
index 05485241cd6..04603b818b8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java
@@ -121,7 +121,8 @@ public class NewActionPage1 extends WizardPage {
treeViewer.getViewer().setContentProvider(new AITreeContentProvider(Active.Active));
treeViewer.getViewer().setLabelProvider(new AtsObjectLabelProvider());
try {
- treeViewer.getViewer().setInput(ActionableItems.getTopLevelActionableItems(Active.Active));
+ treeViewer.getViewer().setInput(
+ ActionableItems.getTopLevelActionableItems(Active.Active, AtsClientService.get().getConfig()));
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
}
@@ -178,8 +179,8 @@ public class NewActionPage1 extends WizardPage {
((XText) getXWidget("Title")).set("tt");
if (atsAi == null) {
atsAi =
- AtsClientService.get().getConfig().getSoleByGuid(
- ATS_Actionable_Item_Guid_For_Training_And_Demos, IAtsActionableItem.class);
+ AtsClientService.get().getConfig().getSoleByGuid(ATS_Actionable_Item_Guid_For_Training_And_Demos,
+ IAtsActionableItem.class);
if (atsAi != null) {
treeViewer.getViewer().setSelection(new StructuredSelection(Arrays.asList(atsAi)));
treeViewer.setInitalChecked(Arrays.asList(atsAi));
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java
index b05c5120139..a08fbe59938 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java
@@ -182,7 +182,7 @@ public final class GoalManager {
goalArt.initializeNewStateMachine(Arrays.asList(AtsClientService.get().getUserService().getCurrentUser()),
new Date(), AtsClientService.get().getUserService().getCurrentUser(), changes);
AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), goalArt,
- TeamDefinitions.getTopTeamDefinition(), changes);
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()), changes);
changes.add(goalArt);
return goalArt;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowLabelProvider.java
index fb50fdf544c..320bbf4be88 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowLabelProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowLabelProvider.java
@@ -11,9 +11,9 @@
package org.eclipse.osee.ats.artifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.Versions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -28,8 +28,8 @@ public class TeamWorkflowLabelProvider extends ArtifactLabelProvider {
public String getText(Object element) {
TeamWorkFlowArtifact teamWf = (TeamWorkFlowArtifact) element;
try {
- if (AtsVersionService.get().hasTargetedVersion(teamWf)) {
- return "[" + teamWf.getTeamName() + "][" + Versions.getTargetedVersionStr(teamWf) + "] - " + teamWf.getName();
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(teamWf)) {
+ return "[" + teamWf.getTeamName() + "][" + Versions.getTargetedVersionStr(teamWf, AtsClientService.get().getVersionService()) + "] - " + teamWf.getName();
} else {
return "[" + teamWf.getTeamName() + "] - " + teamWf.getName();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java
index c6025887420..8e59b23d3c5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java
@@ -32,7 +32,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowManager;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.client.workflow.ChangeTypeUtil;
import org.eclipse.osee.ats.core.client.workflow.PriorityUtil;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
import org.eclipse.osee.ats.core.workflow.WorkflowManagerCore;
@@ -60,7 +59,7 @@ public class WorkflowManager {
awa.isAccessControlWrite() && //
(WorkflowManagerCore.isEditable(AtsClientService.get().getUserService().getCurrentUser(), awa,
- awa.getStateDefinition(), privilegedEditEnabled) || //
+ awa.getStateDefinition(), privilegedEditEnabled, AtsClientService.get().getUserService()) || //
// page is define to allow anyone to edit
awa.getStateDefinition().hasRule(RuleDefinitionOption.AllowAssigneeToAll.name()) ||
// awa is child of TeamWorkflow that has AllowAssigneeToAll rule
@@ -209,7 +208,7 @@ public class WorkflowManager {
public static Double getHoursSpent(Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException {
Double hoursSpent = 0.0;
for (AbstractWorkflowArtifact awa : artifacts) {
- hoursSpent += HoursSpentUtil.getHoursSpentTotal(awa);
+ hoursSpent += HoursSpentUtil.getHoursSpentTotal(awa, AtsClientService.get().getServices());
}
return hoursSpent;
}
@@ -284,10 +283,10 @@ public class WorkflowManager {
if (awa.getParentTeamWorkflow() == null) {
continue;
}
- if (!AtsVersionService.get().hasTargetedVersion(awa)) {
+ if (!AtsClientService.get().getVersionService().hasTargetedVersion(awa)) {
continue;
}
- if (versionArts.contains(AtsVersionService.get().getTargetedVersion(awa))) {
+ if (versionArts.contains(AtsClientService.get().getVersionService().getTargetedVersion(awa))) {
returnawas.add(awa);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java
index 8ce50ff4880..27827e5f4c8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java
@@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsAttributeValueColumn;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -77,7 +77,7 @@ public abstract class AbstractWorkflowVersionDateColumn extends XViewerAtsAttrib
public static Date getDateFromTargetedVersion(IAttributeType attributeType, Object object) throws OseeCoreException {
if (Artifacts.isOfType(object, AtsArtifactTypes.TeamWorkflow)) {
TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) object;
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
if (verArt != null) {
if (attributeType == AtsAttributeTypes.ReleaseDate) {
return verArt.getReleaseDate();
@@ -107,7 +107,7 @@ public abstract class AbstractWorkflowVersionDateColumn extends XViewerAtsAttrib
String versionDate = getDateStrFromTargetedVersion(attributeType, artifact);
if (Strings.isValid(workflowDate) && Strings.isValid(versionDate)) {
return String.format("%s; [%s - %s]", workflowDate,
- AtsVersionService.get().getTargetedVersion(artifact), versionDate);
+ AtsClientService.get().getVersionService().getTargetedVersion(artifact), versionDate);
} else if (Strings.isValid(workflowDate)) {
return workflowDate;
} else if (Strings.isValid(versionDate)) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java
index 10946cf597a..ed105b15eb6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java
@@ -25,8 +25,8 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.client.workflow.ChangeTypeUtil;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsAttributeValueColumn;
import org.eclipse.osee.ats.workflow.ChangeTypeDialog;
import org.eclipse.osee.ats.workflow.ChangeTypeToSwtImage;
@@ -79,7 +79,8 @@ public class ChangeTypeColumn extends XViewerAtsAttributeValueColumn {
try {
for (TeamWorkFlowArtifact team : teams) {
- if (AtsVersionService.get().isReleased(team) || AtsVersionService.get().isVersionLocked(team)) {
+ if (AtsClientService.get().getVersionService().isReleased(team) || AtsClientService.get().getVersionService().isVersionLocked(
+ team)) {
AWorkbench.popup("ERROR",
"Team Workflow\n \"" + team.getName() + "\"\n version is locked or already released.");
return false;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentSMAStateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentSMAStateColumn.java
index 31d3459cd51..a9d14ce64c9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentSMAStateColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentSMAStateColumn.java
@@ -15,6 +15,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -52,7 +53,8 @@ public class HoursSpentSMAStateColumn extends XViewerAtsColumn implements IXView
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentSMAState((IAtsWorkItem) element));
+ return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentSMAState((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateReviewColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateReviewColumn.java
index d4f463c7cf6..6c2f2a3cffc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateReviewColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateReviewColumn.java
@@ -15,6 +15,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -53,7 +54,8 @@ public class HoursSpentStateReviewColumn extends XViewerAtsColumn implements IXV
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentStateReview((IAtsWorkItem) element));
+ return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentStateReview((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTasksColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTasksColumn.java
index f67c6d7ce42..11ba6dbee16 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTasksColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTasksColumn.java
@@ -15,6 +15,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -53,7 +54,8 @@ public class HoursSpentStateTasksColumn extends XViewerAtsColumn implements IXVi
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentFromStateTasks((IAtsWorkItem) element));
+ return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentFromStateTasks((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTotalColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTotalColumn.java
index 95de4a7eefc..09ed4c47266 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTotalColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentStateTotalColumn.java
@@ -15,6 +15,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -52,7 +53,8 @@ public class HoursSpentStateTotalColumn extends XViewerAtsColumn implements IXVi
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentStateTotal((IAtsWorkItem) element));
+ return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentStateTotal((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentTotalColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentTotalColumn.java
index 6ced08438ad..6251cd775f5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentTotalColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/HoursSpentTotalColumn.java
@@ -15,6 +15,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -52,7 +53,8 @@ public class HoursSpentTotalColumn extends XViewerAtsColumn implements IXViewerV
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal((IAtsWorkItem) element));
+ return AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PercentCompleteTotalColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PercentCompleteTotalColumn.java
index 818596a9153..b5b52f6ef8b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PercentCompleteTotalColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PercentCompleteTotalColumn.java
@@ -14,6 +14,7 @@ import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
+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.osee.framework.jdk.core.type.OseeCoreException;
@@ -51,7 +52,8 @@ public class PercentCompleteTotalColumn extends XViewerAtsColumn implements IXVi
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof IAtsWorkItem) {
- return String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal((IAtsWorkItem) element));
+ return String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal((IAtsWorkItem) element,
+ AtsClientService.get().getServices()));
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java
index 0d556570463..a7b02de7db4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java
@@ -20,8 +20,8 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.PromptChangeUtil;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsAttributeValueColumn;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -64,7 +64,8 @@ public class PriorityColumn extends XViewerAtsAttributeValueColumn {
try {
for (TeamWorkFlowArtifact team : teams) {
- if (AtsVersionService.get().isReleased(team) || AtsVersionService.get().isVersionLocked(team)) {
+ if (AtsClientService.get().getVersionService().isReleased(team) || AtsClientService.get().getVersionService().isVersionLocked(
+ team)) {
AWorkbench.popup("ERROR",
"Team Workflow\n \"" + team.getName() + "\"\n version is locked or already released.");
return false;
@@ -98,7 +99,7 @@ public class PriorityColumn extends XViewerAtsAttributeValueColumn {
return false;
}
TeamWorkFlowArtifact team = (TeamWorkFlowArtifact) useArt;
- if (AtsVersionService.get().isReleased(team) || AtsVersionService.get().isVersionLocked(team)) {
+ if (AtsClientService.get().getVersionService().isReleased(team) || AtsClientService.get().getVersionService().isVersionLocked(team)) {
AWorkbench.popup("ERROR",
"Team Workflow\n \"" + team.getName() + "\"\n version is locked or already released.");
return false;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java
index cde373e5b29..c0e5bd171d8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java
@@ -31,9 +31,9 @@ import org.eclipse.osee.ats.core.client.action.ActionManager;
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.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.Versions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.VersionListDialog;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
import org.eclipse.osee.ats.world.WorldXViewerFactory;
@@ -128,7 +128,8 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
AWorkbench.popup("ERROR", "Team \"" + teamArt.getTeamDefinition().getName() + "\" doesn't use versions.");
return false;
}
- if (AtsVersionService.get().isReleased(teamArt) || AtsVersionService.get().isVersionLocked(teamArt)) {
+ if (AtsClientService.get().getVersionService().isReleased(teamArt) || AtsClientService.get().getVersionService().isVersionLocked(
+ teamArt)) {
String error =
"Team Workflow\n \"" + teamArt.getName() + "\"\n targeted version is locked or already released.";
if (AtsUtilClient.isAtsAdmin() && !MessageDialog.openConfirm(Displays.getActiveShell(), "Change Version",
@@ -155,9 +156,9 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
final VersionListDialog vld =
new VersionListDialog("Select Version", "Select Version", teamDefHoldingVersions.getVersions(
versionReleaseType, versionLockType));
- if (awas.size() == 1 && AtsVersionService.get().hasTargetedVersion(teamArt)) {
+ if (awas.size() == 1 && AtsClientService.get().getVersionService().hasTargetedVersion(teamArt)) {
Object[] objs = new Object[1];
- objs[0] = AtsVersionService.get().getTargetedVersion(teamArt);
+ objs[0] = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
vld.setInitialSelections(objs);
}
int result = vld.open();
@@ -178,7 +179,7 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
}
for (TeamWorkFlowArtifact teamArt1 : awas) {
- AtsVersionService.get().setTargetedVersionAndStore(teamArt1, newVersion);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamArt1, newVersion);
}
Artifacts.persistInTransaction("ATS Prompt Change Version", awas);
return true;
@@ -190,7 +191,7 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) {
Set<String> strs = new HashSet<String>();
for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) {
- String str = Versions.getTargetedVersionStr(team);
+ String str = Versions.getTargetedVersionStr(team, AtsClientService.get().getVersionService());
if (Strings.isValid(str)) {
strs.add(str);
}
@@ -198,7 +199,7 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
return Collections.toString(";", strs);
} else {
- return Versions.getTargetedVersionStr(element);
+ return Versions.getTargetedVersionStr(element, AtsClientService.get().getVersionService());
}
} catch (OseeCoreException ex) {
return LogUtil.getCellExceptionString(ex);
@@ -218,7 +219,8 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV
}
}
- promptChangeVersion(awas, AtsUtilClient.isAtsAdmin() ? VersionReleaseType.Both : VersionReleaseType.UnReleased,
+ promptChangeVersion(awas,
+ AtsUtilClient.isAtsAdmin() ? VersionReleaseType.Both : VersionReleaseType.UnReleased,
AtsUtilClient.isAtsAdmin() ? VersionLockedType.Both : VersionLockedType.UnLocked);
getXViewer().update(awas.toArray(), null);
return;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
index be92f715cca..589391f8864 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java
@@ -28,7 +28,6 @@ import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
import org.eclipse.osee.ats.api.workdef.IWorkDefinitionMatch;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
@@ -125,7 +124,7 @@ public class AtsConfigOperation extends AbstractOperation {
IAtsTeamDefinition teamDef = AtsClientService.get().createTeamDefinition(GUID.create(), teamDefName);
teamDef.getLeads().add(AtsClientService.get().getUserService().getCurrentUser());
teamDef.getMembers().add(AtsClientService.get().getUserService().getCurrentUser());
- TeamDefinitions.getTopTeamDefinition().getChildrenTeamDefinitions().add(teamDef);
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()).getChildrenTeamDefinitions().add(teamDef);
AtsClientService.get().storeConfigObject(teamDef, changes);
return teamDef;
}
@@ -162,7 +161,7 @@ public class AtsConfigOperation extends AbstractOperation {
IAtsVersion version = AtsClientService.get().createVersion(name);
teamDef.getVersions().add(version);
AtsClientService.get().storeConfigObject(version, changes);
- AtsVersionService.get().setTeamDefinition(version, teamDef);
+ AtsClientService.get().getVersionService().setTeamDefinition(version, teamDef);
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/ConfigData.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/ConfigData.java
index 34635b0a5b3..8e3489d36b5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/ConfigData.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/ConfigData.java
@@ -15,6 +15,7 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -94,7 +95,7 @@ public class ConfigData {
if (teamDef.getParentTeamDef() != null) {
parentTeamDef = teamDef.getParentTeamDef();
} else {
- parentTeamDef = TeamDefinitions.getTopTeamDefinition();
+ parentTeamDef = TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig());
}
return parentTeamDef;
}
@@ -106,7 +107,7 @@ public class ConfigData {
if (fromAias.size() == 1) {
parentActionableItem = fromAias.iterator().next().getParentActionableItem();
} else {
- parentActionableItem = ActionableItems.getTopActionableItem();
+ parentActionableItem = ActionableItems.getTopActionableItem(AtsClientService.get().getConfig());
}
return parentActionableItem;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java
index f12201960bc..44e29da7040 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
@@ -37,8 +38,8 @@ public class AtsConfigResultsEditorNavigateItem extends XNavigateItemAction {
@Override
public void run(TableLoadOption... tableLoadOptions) throws Exception {
final List<IAtsConfigObject> objs = new ArrayList<IAtsConfigObject>();
- objs.add(TeamDefinitions.getTopTeamDefinition());
- objs.add(ActionableItems.getTopActionableItem());
+ objs.add(TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()));
+ objs.add(ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()));
Job job = new Job("ATS Config Viewer") {
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
index 34bc4901814..67e0c71c3e9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
@@ -35,8 +35,8 @@ import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.navigate.VisitedItems;
import org.eclipse.osee.ats.task.IXTaskViewer;
import org.eclipse.osee.ats.task.TaskComposite;
@@ -618,7 +618,7 @@ public class SMAEditor extends AbstractArtifactEditor implements IWorldEditor, I
@Override
public IAtsVersion getMetricsVersionArtifact() throws OseeCoreException {
- return AtsVersionService.get().getTargetedVersion(awa);
+ return AtsClientService.get().getVersionService().getTargetedVersion(awa);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPercentCompleteHeader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPercentCompleteHeader.java
index e0eb835d140..c60718c6cd1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPercentCompleteHeader.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPercentCompleteHeader.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -107,7 +108,7 @@ public class SMAPercentCompleteHeader extends Composite {
public String getPercentCompleteStr() throws OseeCoreException {
int awaPercent = awa.getSoleAttributeValue(AtsAttributeTypes.PercentComplete, 0);
- int totalPecent = PercentCompleteTotalUtil.getPercentCompleteTotal(awa);
+ int totalPecent = PercentCompleteTotalUtil.getPercentCompleteTotal(awa, AtsClientService.get().getServices());
if (awaPercent != totalPecent) {
return String.format("%d | %d", awaPercent, totalPecent);
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
index 730f0bd87b6..646c9e17b90 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
@@ -117,7 +117,8 @@ public class SMAPrint extends Action {
}
resultData.addRaw(AHTML.newline());
resultData.addRaw(AtsLogUtility.getHtml(sma.getLog(),
- AtsClientService.get().getLogFactory().getLogProvider(sma, AtsClientService.get().getAttributeResolver())));
+ AtsClientService.get().getLogFactory().getLogProvider(sma, AtsClientService.get().getAttributeResolver()),
+ AtsClientService.get().getUserService()));
XResultData rd = new XResultData();
rd.addRaw(AHTML.beginMultiColumnTable(100, 1));
@@ -148,8 +149,8 @@ public class SMAPrint extends Action {
art.getName(),
art.getStateMgr().getCurrentStateName().replaceAll("(Task|State)", ""),
AssigneeColumn.instance.getAssigneeStr(art),
- PercentCompleteTotalUtil.getPercentCompleteTotal(art) + "",
- HoursSpentUtil.getHoursSpentTotal(art) + "",
+ PercentCompleteTotalUtil.getPercentCompleteTotal(art, AtsClientService.get().getServices()) + "",
+ HoursSpentUtil.getHoursSpentTotal(art, AtsClientService.get().getServices()) + "",
art.getSoleAttributeValue(AtsAttributeTypes.Resolution, ""),
art.getAtsId()}));
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMATargetedVersionHeader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMATargetedVersionHeader.java
index 6536dc13815..9661d9f50bd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMATargetedVersionHeader.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMATargetedVersionHeader.java
@@ -16,8 +16,8 @@ import org.eclipse.osee.ats.api.version.VersionReleaseType;
import org.eclipse.osee.ats.column.TargetedVersionColumn;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -101,8 +101,8 @@ public class SMATargetedVersionHeader extends Composite {
private void updateLabel(AbstractWorkflowArtifact sma) throws OseeCoreException {
if (Widgets.isAccessible(valueLabel)) {
String value = "Not Set";
- if (AtsVersionService.get().hasTargetedVersion(sma)) {
- value = AtsVersionService.get().getTargetedVersion(sma).getName();
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(sma)) {
+ value = AtsClientService.get().getVersionService().getTargetedVersion(sma).getName();
}
valueLabel.setText(value);
valueLabel.getParent().layout();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
index 699c81df6c6..b558efb1be3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
@@ -86,7 +86,7 @@ public class SMAWorkFlowSection extends SectionPart {
isEditable =
WorkflowManagerCore.isEditable(AtsClientService.get().getUserService().getCurrentUser(), sma,
- page.getStateDefinition(), editor.isPrivilegedEditModeEnabled());
+ page.getStateDefinition(), editor.isPrivilegedEditModeEnabled(), AtsClientService.get().getUserService());
isGlobalEditable = !sma.isReadOnly() && sma.isAccessControlWrite() && editor.isPrivilegedEditModeEnabled();
isCurrentState = sma.isInState(page);
// parent.setBackground(Displays.getSystemColor(SWT.COLOR_CYAN));
@@ -369,7 +369,7 @@ public class SMAWorkFlowSection extends SectionPart {
IAtsLogItem item = sma.getStateMgr().getStateStartedData(statePageName);
if (item != null) {
sb.append(" by ");
- sb.append(AtsLogUtility.getUserName(item.getUserId()));
+ sb.append(AtsLogUtility.getUserName(item.getUserId(), AtsClientService.get().getUserService()));
}
} else if (sma.isCancelled()) {
if (!sma.getCurrentStateName().equals(StateType.Cancelled.toString())) {
@@ -380,7 +380,7 @@ public class SMAWorkFlowSection extends SectionPart {
IAtsLogItem item = sma.getStateMgr().getStateStartedData(statePageName);
if (item != null) {
sb.append(" by ");
- sb.append(AtsLogUtility.getUserName(item.getUserId()));
+ sb.append(AtsLogUtility.getUserName(item.getUserId(), AtsClientService.get().getUserService()));
}
}
if (sma.getStateMgr().getAssignees().size() > 0) {
@@ -399,7 +399,7 @@ public class SMAWorkFlowSection extends SectionPart {
if (item != null) {
sb.append(item.getDate(DateUtil.MMDDYYHHMM));
sb.append(" by ");
- sb.append(AtsLogUtility.getUserName(item.getUserId()));
+ sb.append(AtsLogUtility.getUserName(item.getUserId(), AtsClientService.get().getUserService()));
}
}
return sb.toString();
@@ -433,7 +433,7 @@ public class SMAWorkFlowSection extends SectionPart {
sma.getStateDefinition(),
sma,
WorkflowManagerCore.isEditable(AtsClientService.get().getUserService().getCurrentUser(), sma,
- sma.getStateDefinition(), false));
+ sma.getStateDefinition(), false, AtsClientService.get().getUserService()));
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkflowMetricsHeader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkflowMetricsHeader.java
index c609ac4f14c..084fe3f0453 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkflowMetricsHeader.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkflowMetricsHeader.java
@@ -83,13 +83,15 @@ public class SMAWorkflowMetricsHeader extends Composite {
totalPercentHeader.refresh();
}
if (percentLabel != null && !percentLabel.isDisposed()) {
- percentLabel.setText(String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal(awa)));
+ percentLabel.setText(String.valueOf(PercentCompleteTotalUtil.getPercentCompleteTotal(awa,
+ AtsClientService.get().getServices())));
}
if (estimatedHoursHeader != null) {
estimatedHoursHeader.refresh();
}
if (hoursSpentLabel != null && !hoursSpentLabel.isDisposed()) {
- hoursSpentLabel.setText(String.valueOf(AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal(awa))));
+ hoursSpentLabel.setText(String.valueOf(AtsUtilCore.doubleToI18nString(HoursSpentUtil.getHoursSpentTotal(
+ awa, AtsClientService.get().getServices()))));
}
if (hoursSpentLabel != null && !hoursSpentLabel.isDisposed()) {
Result result = RemainingHoursColumn.isRemainingHoursValid(awa);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java
index 3c07b011130..93a3c51ea01 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
@@ -193,7 +194,7 @@ public class WETransitionComposite extends Composite {
final List<IAtsWorkItem> workItems = Arrays.asList((IAtsWorkItem) awa);
final IAtsStateDefinition toStateDef = (IAtsStateDefinition) transitionToStateCombo.getSelected();
final IAtsStateDefinition fromStateDef = awa.getStateDefinition();
- ITransitionHelper helper = new TransitionHelperAdapter() {
+ ITransitionHelper helper = new TransitionHelperAdapter(AtsClientService.get().getServices()) {
private AtsChangeSet changes;
@@ -293,6 +294,11 @@ public class WETransitionComposite extends Composite {
return java.util.Collections.emptyList();
}
+ @Override
+ public IAtsServices getServices() {
+ return AtsClientService.get().getServices();
+ }
+
};
final TransitionToOperation operation = new TransitionToOperation(helper);
Operations.executeAsJob(operation, true, Job.SHORT, new JobChangeAdapter() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/log/column/LogAuthorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/log/column/LogAuthorColumn.java
index 9432b2b14eb..ee139f947b2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/log/column/LogAuthorColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/log/column/LogAuthorColumn.java
@@ -14,6 +14,7 @@ import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerValueColumn;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogItem;
import org.eclipse.osee.ats.core.workflow.log.AtsLogUtility;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.swt.SWT;
/**
@@ -44,7 +45,7 @@ public class LogAuthorColumn extends XViewerValueColumn {
@Override
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
if (element instanceof IAtsLogItem) {
- return AtsLogUtility.getUserName(((IAtsLogItem) element).getUserId());
+ return AtsLogUtility.getUserName(((IAtsLogItem) element).getUserId(), AtsClientService.get().getUserService());
}
return "";
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
index e02568219bb..26c60fde40c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
@@ -318,7 +318,8 @@ public class ReviewInfoXWidget extends XLabelValueBase {
AtsChangeSet changes = new AtsChangeSet("Admin Auto-Complete Reviews");
TransitionHelper helper =
new TransitionHelper("ATS Auto Complete Reviews", awas, TeamState.Completed.getName(), null,
- null, changes, TransitionOption.OverrideTransitionValidityCheck, TransitionOption.None);
+ null, changes, AtsClientService.get().getServices(),
+ TransitionOption.OverrideTransitionValidityCheck, TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAllAndPersist();
if (!results.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
index e13e7a5cc48..dfb0aba2ecb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.core.util.HoursSpentUtil;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.editor.SMAPromptChangeStatus;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.workdef.StateXWidgetPage;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -86,7 +87,7 @@ public class StateHoursSpentXWidget extends XHyperlinkLabelValueSelection {
boolean breakoutNeeded = false;
if (sma instanceof AbstractTaskableArtifact && ((AbstractTaskableArtifact) sma).hasTaskArtifacts()) {
sb.append(String.format("\n Task Hours: %5.2f",
- HoursSpentUtil.getHoursSpentFromStateTasks(sma, page)));
+ HoursSpentUtil.getHoursSpentFromStateTasks(sma, page, AtsClientService.get().getServices())));
breakoutNeeded = true;
}
if (sma.isTeamWorkflow() && ReviewManager.hasReviews((TeamWorkFlowArtifact) sma)) {
@@ -96,7 +97,8 @@ public class StateHoursSpentXWidget extends XHyperlinkLabelValueSelection {
}
if (breakoutNeeded) {
setToolTip(sb.toString());
- return String.format("%5.2f", HoursSpentUtil.getHoursSpentStateTotal(sma, page));
+ return String.format("%5.2f",
+ HoursSpentUtil.getHoursSpentStateTotal(sma, page, AtsClientService.get().getServices()));
} else {
return String.format("%5.2f", sma.getStateMgr().getHoursSpent(page.getName()));
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
index c20bc7ca2ba..8884c2368e5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.editor.SMAPromptChangeStatus;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.workdef.StateXWidgetPage;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -98,7 +99,8 @@ public class StatePercentCompleteXWidget extends XHyperlinkLabelValueSelection {
if (!getControl().isDisposed()) {
setToolTip(sb.toString() + "\n" + TOOLTIP);
}
- return String.valueOf(PercentCompleteTotalUtil.getPercentCompleteSMAStateTotal(sma, page));
+ return String.valueOf(PercentCompleteTotalUtil.getPercentCompleteSMAStateTotal(sma, page,
+ AtsClientService.get().getServices()));
} else {
return String.valueOf(sma.getStateMgr().getPercentComplete(page.getName()));
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
index a1bb9e87782..45cee49dfd9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
@@ -137,6 +137,7 @@ public class TaskInfoXWidget extends XLabelValueBase {
TransitionHelper helper =
new TransitionHelper("Transition to Completed", Arrays.asList(taskArt),
TaskStates.Completed.getName(), null, null, changes,
+ AtsClientService.get().getServices(),
TransitionOption.OverrideTransitionValidityCheck, TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAll();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index 5dcbabce1d1..ac05961ba68 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -49,7 +49,6 @@ import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsTaskCache;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.util.AtsObjects;
@@ -638,7 +637,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
if (parentBranchUuid > 0) {
validateBranchUuid(version, parentBranchUuid, results);
}
- if (AtsVersionService.get().getTeamDefinition(version) == null) {
+ if (AtsClientService.get().getVersionService().getTeamDefinition(version) == null) {
results.log(artifact, "testVersionArtifacts",
"Error: " + version.toStringWithId() + " not related to Team Definition");
}
@@ -993,7 +992,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
}
// Test that targeted version belongs to teamDefHoldingVersion
else {
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
if (verArt != null && teamArt.getTeamDefinition().getTeamDefinitionHoldingVersions() != null) {
if (!teamArt.getTeamDefinition().getTeamDefinitionHoldingVersions().getVersions().contains(verArt)) {
results.log(
@@ -1023,7 +1022,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
try {
if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) {
TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) artifact;
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
if (verArt != null && teamArt.getTeamDefinition().getTeamDefinitionHoldingVersions() != null) {
if (!teamArt.getTeamDefinition().getTeamDefinitionHoldingVersions().getVersions().contains(verArt)) {
results.log(
@@ -1210,7 +1209,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
AtsLogUtility.getHtml(
awa.getLog(),
AtsClientService.get().getLogFactory().getLogProvider(awa,
- AtsClientService.get().getAttributeResolver()), true);
+ AtsClientService.get().getAttributeResolver()), true, AtsClientService.get().getUserService());
// Verify that all users are resolved
for (IAtsLogItem logItem : awa.getLog().getLogItems()) {
if (logItem.getUserId() == null) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java
index 067bce5d0e6..74d72353b84 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java
@@ -148,7 +148,8 @@ public class AtsOseeCmService implements IOseeCmService {
if (cType == null) {
cType = ChangeType.Improvement;
}
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(productNames);
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(productNames, AtsClientService.get().getConfig());
if (aias.isEmpty()) {
throw new OseeArgumentException("Can not resolve productNames to Actionable Items");
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
index 620fbcd1348..a8880a807e3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
@@ -32,7 +32,6 @@ import org.eclipse.osee.ats.core.client.action.ActionManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.ChangeTypeUtil;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.core.workflow.transition.TransitionFactory;
@@ -197,7 +196,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
TransitionHelper helper =
new TransitionHelper("Remote Event Test", Arrays.asList(teamArt), TeamState.Analyze.getName(),
Collections.singleton(AtsClientService.get().getUserService().getCurrentUser()), null, changes,
- TransitionOption.None);
+ AtsClientService.get().getServices(), TransitionOption.None);
IAtsTransitionManager transitionMgr = TransitionFactory.getTransitionManager(helper);
TransitionResults results = transitionMgr.handleAllAndPersist();
if (!results.isEmpty()) {
@@ -207,7 +206,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
private void makeChanges6(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
// Make changes and transition
- AtsVersionService.get().setTargetedVersionAndStore(teamArt, getVersion257());
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamArt, getVersion257());
teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "false");
teamArt.persist("Remote Event Test");
}
@@ -225,13 +224,13 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
teamArt.setSoleAttributeFromString(AtsAttributeTypes.Description, "description 4");
ChangeTypeUtil.setChangeType(teamArt, ChangeType.Support);
teamArt.setSoleAttributeFromString(AtsAttributeTypes.PriorityType, "3");
- AtsVersionService.get().setTargetedVersionAndStore(teamArt, getVersion258());
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamArt, getVersion258());
teamArt.persist("Remote Event Test");
}
private void makeChanges3(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
// Make changes and persist
- AtsVersionService.get().setTargetedVersionAndStore(teamArt, getVersion257());
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamArt, getVersion257());
teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "false");
teamArt.persist(getClass().getSimpleName());
}
@@ -249,20 +248,20 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
ChangeTypeUtil.setChangeType(teamArt, ChangeType.Problem);
teamArt.setSoleAttributeFromString(AtsAttributeTypes.PriorityType, "2");
teamArt.setSoleAttributeFromString(AtsAttributeTypes.ValidationRequired, "true");
- AtsVersionService.get().setTargetedVersionAndStore(teamArt, getVersion256());
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(teamArt, getVersion256());
teamArt.persist("Remote Event Test");
}
private IAtsVersion getVersion256() throws OseeCoreException {
- return AtsVersionService.get().getById(Version_2_5_6);
+ return AtsClientService.get().getVersionService().getById(Version_2_5_6);
}
private IAtsVersion getVersion257() throws OseeCoreException {
- return AtsVersionService.get().getById(Version_2_5_7);
+ return AtsClientService.get().getVersionService().getById(Version_2_5_7);
}
private IAtsVersion getVersion258() throws OseeCoreException {
- return AtsVersionService.get().getById(Version_2_5_8);
+ return AtsClientService.get().getVersionService().getById(Version_2_5_8);
}
private void validateActionAtStart(Artifact actionArt) throws OseeCoreException {
@@ -298,7 +297,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
testEquals("Validation Required", "false",
String.valueOf(teamArt.getSoleAttributeValue(AtsAttributeTypes.ValidationRequired, null)));
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(teamArt);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(teamArt);
String expectedTargetedVersion;
if (verArt != null) {
expectedTargetedVersion = verArt.toString();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FirstTimeQualityMetricReportItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FirstTimeQualityMetricReportItem.java
index 407c67e8863..9270d8fc1b5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FirstTimeQualityMetricReportItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FirstTimeQualityMetricReportItem.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.ats.core.client.workflow.PriorityUtil;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
import org.eclipse.osee.ats.version.VersionMetrics;
import org.eclipse.osee.ats.version.VersionTeamMetrics;
@@ -65,7 +66,8 @@ public class FirstTimeQualityMetricReportItem extends XNavigateItemAction {
Set<IAtsTeamDefinition> teamReleaseableDefinitions = null;
try {
- teamReleaseableDefinitions = TeamDefinitions.getTeamReleaseableDefinitions(Active.Both);
+ teamReleaseableDefinitions =
+ TeamDefinitions.getTeamReleaseableDefinitions(Active.Both, AtsClientService.get().getConfig());
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading team definitions", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ActionTeamDateListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ActionTeamDateListDialog.java
index f768b177333..038fa69f028 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ActionTeamDateListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ActionTeamDateListDialog.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.team.ChangeType;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.ats.util.widgets.dialog.AtsObjectNameSorter;
import org.eclipse.osee.ats.workflow.ChangeTypeLabelProvider;
@@ -147,7 +148,8 @@ public class ActionTeamDateListDialog extends SelectionDialog {
}
Set<Object> objs = new HashSet<Object>();
try {
- for (IAtsTeamDefinition teamDef : TeamDefinitions.getTeamDefinitions(Active.Both)) {
+ for (IAtsTeamDefinition teamDef : TeamDefinitions.getTeamDefinitions(Active.Both,
+ AtsClientService.get().getConfig())) {
objs.add(teamDef);
}
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java
index c942075be4a..86b0b15af63 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.ats.core.client.workflow.ChangeTypeUtil;
import org.eclipse.osee.ats.core.config.Versions;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
@@ -169,7 +170,8 @@ public class ExtendedStatusReportJob extends Job {
} else if (col == Columns.Date_Created) {
values.add(CreatedDateColumn.getDateStr(sma));
} else if (col == Columns.Version) {
- values.add((!Strings.isValid(Versions.getTargetedVersionStr(sma)) ? "." : Versions.getTargetedVersionStr(sma)));
+ values.add((!Strings.isValid(Versions.getTargetedVersionStr(sma, AtsClientService.get().getVersionService())) ? "." : Versions.getTargetedVersionStr(
+ sma, AtsClientService.get().getVersionService())));
}
}
sb.append(AHTML.addRowMultiColumnTable(values.toArray(new String[values.size()])));
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/PublishFullVersionReportItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/PublishFullVersionReportItem.java
index 8c411f5491d..f04eeccdd6a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/PublishFullVersionReportItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/PublishFullVersionReportItem.java
@@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
import org.eclipse.osee.ats.version.VersionReportJob;
import org.eclipse.osee.framework.core.enums.Active;
@@ -69,7 +70,7 @@ public class PublishFullVersionReportItem extends XNavigateItemAction {
if (useTeamDef == null) {
List<IAtsTeamDefinition> teamDefinitions = null;
try {
- teamDefinitions = TeamDefinitions.getTeamDefinitions(Active.Both);
+ teamDefinitions = TeamDefinitions.getTeamDefinitions(Active.Both, AtsClientService.get().getConfig());
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading team definitions", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java
index 57b386352c9..c864d3bea5d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java
@@ -621,7 +621,8 @@ public class DetailedTestStatusBlam extends AbstractBlam {
reqTaskMap.put(requirementName, legacyId, requirementStatus);
}
- int percentComplete = PercentCompleteTotalUtil.getPercentCompleteTotal(task);
+ int percentComplete =
+ PercentCompleteTotalUtil.getPercentCompleteTotal(task, AtsClientService.get().getServices());
requirementStatus.addPartitionStatus(percentComplete, taskNameMatcher.group(1), task.getCurrentStateName());
requirementStatus.setTestPocs(task.getImplementers());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
index 6147e49d512..89fec087421 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java
@@ -547,7 +547,8 @@ public class DetailedTestStatusOld extends AbstractBlam {
reqTaskMap.put(requirementName, legacyId, requirementStatus);
}
- int percentComplete = PercentCompleteTotalUtil.getPercentCompleteTotal(task);
+ int percentComplete =
+ PercentCompleteTotalUtil.getPercentCompleteTotal(task, AtsClientService.get().getServices());
requirementStatus.addPartitionStatus(percentComplete, taskNameMatcher.group(1), task.getCurrentStateName());
requirementStatus.setTestPocs(task.getImplementers());
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java
index 2aa6bda3c95..e8b68d305d0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java
@@ -242,7 +242,8 @@ public class ModifyActionableItemsBlam extends AbstractBlam {
}
otherTree.getViewer().setInput(ais);
- newTree.getViewer().setInput(ActionableItems.getTopLevelActionableItems(Active.Active));
+ newTree.getViewer().setInput(
+ ActionableItems.getTopLevelActionableItems(Active.Active, AtsClientService.get().getConfig()));
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
index 8b81d82e3cc..a4784904cf1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
@@ -132,7 +132,8 @@ public class TaskMetrics extends AbstractBlam {
assignees = ImplementersColumn.instance.getImplementers(task);
}
for (IAtsUser user : assignees) {
- int percentComplete = PercentCompleteTotalUtil.getPercentCompleteTotal(task);
+ int percentComplete =
+ PercentCompleteTotalUtil.getPercentCompleteTotal(task, AtsClientService.get().getServices());
if (percentComplete == COMPLETED_CANCELLED_PERCENT) {
if (task.getStateMgr().getStateType().isCompletedOrCancelledState()) {
metrics.put(user, COMPLETED_CANCELLED_PERCENT);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java
index 11f1162615c..c2f3c9287f1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java
@@ -31,10 +31,10 @@ 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.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.config.ActionableItems;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.world.search.WorldUISearchItem;
import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -166,7 +166,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem {
// don't include if version specified and workflow's not targeted for version
if (versionArt != null) {
TeamWorkFlowArtifact team = awa.getParentTeamWorkflow();
- IAtsVersion version = AtsVersionService.get().getTargetedVersion(team);
+ IAtsVersion version = AtsClientService.get().getVersionService().getTargetedVersion(team);
if (team != null && (version == null || !version.equals(versionArt))) {
return false;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
index cdb6b8c94e2..8f9904a2de3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
@@ -26,9 +26,9 @@ import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.world.AtsMetricsComposite;
import org.eclipse.osee.ats.world.IAtsMetricsProvider;
@@ -325,8 +325,8 @@ public class TaskEditor extends AbstractArtifactEditor implements IAtsMetricsPro
@Override
public IAtsVersion getMetricsVersionArtifact() throws OseeCoreException {
for (TaskArtifact taskArt : tasks) {
- if (AtsVersionService.get().hasTargetedVersion(taskArt)) {
- return AtsVersionService.get().getTargetedVersion(taskArt);
+ if (AtsClientService.get().getVersionService().hasTargetedVersion(taskArt)) {
+ return AtsClientService.get().getVersionService().getTargetedVersion(taskArt);
}
}
return null;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java
index 858df3a3505..d8302caa86f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java
@@ -65,7 +65,8 @@ public class CreateActionUsingAllActionableItems extends XNavigateItemAction {
public static ActionArtifact createActionWithAllAis() throws OseeCoreException {
Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>();
- for (IAtsActionableItem aia : ActionableItems.getActionableItems(Active.Active)) {
+ for (IAtsActionableItem aia : ActionableItems.getActionableItems(Active.Active,
+ AtsClientService.get().getConfig())) {
if (aia.isActionable()) {
aias.add(aia);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
index 31b16c3dd27..b9b8cb07135 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
@@ -44,7 +44,6 @@ import org.eclipse.osee.ats.core.client.artifact.GoalArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.config.ActionableItems;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
@@ -182,14 +181,16 @@ public class ExcelAtsActionArtifactExtractor {
if (actionArt == null) {
actionArt =
ActionManager.createAction(null, aData.title, aData.desc, ChangeType.getChangeType(aData.changeType),
- aData.priorityStr, false, null, ActionableItems.getActionableItems(aData.actionableItems),
+ aData.priorityStr, false, null,
+ ActionableItems.getActionableItems(aData.actionableItems, AtsClientService.get().getConfig()),
createdDate, createdBy, null, changes);
newTeamArts = ActionManager.getTeams(actionArt);
addToGoal(newTeamArts, changes);
actionNameToAction.put(aData.title, actionArt);
actionArts.add(actionArt);
} else {
- Set<IAtsActionableItem> aias = ActionableItems.getActionableItems(aData.actionableItems);
+ Set<IAtsActionableItem> aias =
+ ActionableItems.getActionableItems(aData.actionableItems, AtsClientService.get().getConfig());
Map<IAtsTeamDefinition, Collection<IAtsActionableItem>> teamDefToAias = getTeamDefToAias(aias);
for (Entry<IAtsTeamDefinition, Collection<IAtsActionableItem>> entry : teamDefToAias.entrySet()) {
@@ -213,7 +214,7 @@ public class ExcelAtsActionArtifactExtractor {
throw new OseeArgumentException("No version [%s] configured for Team Definition [%s]",
aData.version, team.getTeamDefinition());
}
- AtsVersionService.get().setTargetedVersionAndStore(team, version);
+ AtsClientService.get().getVersionService().setTargetedVersionAndStore(team, version);
}
}
if (aData.estimatedHours != null) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
index 3d1221103d4..091d83b6945 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
@@ -257,7 +257,7 @@ public class Overview {
AtsLogUtility.getTable(
artifactLog,
AtsClientService.get().getLogFactory().getLogProvider(artifact,
- AtsClientService.get().getAttributeResolver()));
+ AtsClientService.get().getAttributeResolver()), AtsClientService.get().getUserService());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java
index 42b938d310f..bb7845011ae 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.client.workflow.EstimatedHoursUtil;
import org.eclipse.osee.ats.core.util.HoursSpentUtil;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
@@ -119,9 +120,10 @@ public class WorkflowMetrics {
for (AbstractWorkflowArtifact team : awas) {
hrsRemainFromEstimates += RemainingHoursColumn.getRemainingHours(team);
estHours += EstimatedHoursUtil.getEstimatedHours(team);
- hrsSpent += HoursSpentUtil.getHoursSpentTotal(team);
+ hrsSpent += HoursSpentUtil.getHoursSpentTotal(team, AtsClientService.get().getServices());
manDaysNeeded += WorkDaysNeededColumn.getWorldViewManDaysNeeded(team);
- cummulativeWorkflowPercentComplete += PercentCompleteTotalUtil.getPercentCompleteTotal(team);
+ cummulativeWorkflowPercentComplete +=
+ PercentCompleteTotalUtil.getPercentCompleteTotal(team, AtsClientService.get().getServices());
}
if (hrsRemainFromEstimates != 0) {
manDaysNeeded = hrsRemainFromEstimates / manHoursPerDay;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java
index 9aa3c1980b5..0dd2bcdd3fb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.core.config.ActionableItemSorter;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -45,7 +46,7 @@ public class XActionableItemCombo extends XComboViewer {
Collection<IAtsActionableItem> teamDefs = null;
try {
- teamDefs = ActionableItems.getActionableItems(Active.Active);
+ teamDefs = ActionableItems.getActionableItems(Active.Active, AtsClientService.get().getConfig());
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading actionable items", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
index ec224449749..abdf982d8df 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitionSorter;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -46,7 +47,7 @@ public class XTeamDefinitionCombo extends XComboViewer {
Collection<IAtsTeamDefinition> teamDefs = null;
try {
- teamDefs = TeamDefinitions.getTeamDefinitions(Active.Active);
+ teamDefs = TeamDefinitions.getTeamDefinitions(Active.Active, AtsClientService.get().getConfig());
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading team definitions", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AICheckTreeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AICheckTreeDialog.java
index 5a37d519479..fdb1220eb18 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AICheckTreeDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/AICheckTreeDialog.java
@@ -20,6 +20,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.util.Result;
@@ -59,7 +60,8 @@ public class AICheckTreeDialog extends OSEECheckedFilteredTreeDialog {
protected Control createDialogArea(Composite container) {
Control comp = super.createDialogArea(container);
try {
- getTreeViewer().getViewer().setInput(ActionableItems.getTopLevelActionableItems(active));
+ getTreeViewer().getViewer().setInput(
+ ActionableItems.getTopLevelActionableItems(active, AtsClientService.get().getConfig()));
getTreeViewer().getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionActionableItemListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionActionableItemListDialog.java
index e7302d0918f..9eb4009a1f2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionActionableItemListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionActionableItemListDialog.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.util.widgets.dialog;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -43,7 +44,7 @@ public class ActionActionableItemListDialog extends OSEECheckedFilteredTreeDialo
super("Select Actionable Items", "Select Actionable Items", new AITreeContentProvider(active),
new AtsObjectLabelProvider(), new AtsObjectNameSorter());
try {
- setInput(ActionableItems.getTopLevelActionableItems(active));
+ setInput(ActionableItems.getTopLevelActionableItems(active, AtsClientService.get().getConfig()));
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionTeamListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionTeamListDialog.java
index b817a85bb77..453d7392529 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionTeamListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionTeamListDialog.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -58,7 +59,7 @@ public class ActionTeamListDialog extends ListDialog {
setMessage("Select Team(s)");
ArrayList<IAtsTeamDefinition> arts = new ArrayList<IAtsTeamDefinition>();
try {
- for (IAtsTeamDefinition prod : TeamDefinitions.getTeamDefinitions(active)) {
+ for (IAtsTeamDefinition prod : TeamDefinitions.getTeamDefinitions(active, AtsClientService.get().getConfig())) {
arts.add(prod);
}
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java
index 17baf17c021..d46c2e5ec95 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java
@@ -15,6 +15,7 @@ import java.util.Set;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -31,7 +32,7 @@ public class ActionableItemListDialog extends OSEECheckedFilteredTreeDialog {
super("Select Actionable Item(s)", "Select Actionable Item(s)", new AITreeContentProvider(active),
new AtsObjectLabelProvider(), new ArtifactNameSorter());
try {
- setInput(ActionableItems.getTopLevelActionableItems(active));
+ setInput(ActionableItems.getTopLevelActionableItems(active, AtsClientService.get().getConfig()));
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java
index 907f57d3a85..1008221937c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java
@@ -16,6 +16,7 @@ import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.core.config.ActionableItems;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -40,7 +41,7 @@ public class ActionableItemTreeWithChildrenDialog extends OSEECheckedFilteredTre
protected Composite dialogComp;
public ActionableItemTreeWithChildrenDialog(Active active) throws OseeCoreException {
- this(active, ActionableItems.getTopLevelActionableItems(active));
+ this(active, ActionableItems.getTopLevelActionableItems(active, AtsClientService.get().getConfig()));
}
public ActionableItemTreeWithChildrenDialog(Active active, Collection<IAtsActionableItem> actionableItems) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionCheckTreeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionCheckTreeDialog.java
index 019f1be22c6..a293a61a36c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionCheckTreeDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionCheckTreeDialog.java
@@ -19,6 +19,7 @@ import java.util.Set;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.util.Result;
@@ -60,7 +61,8 @@ public class TeamDefinitionCheckTreeDialog extends OSEECheckedFilteredTreeDialog
protected Control createDialogArea(Composite container) {
Control comp = super.createDialogArea(container);
try {
- getTreeViewer().getViewer().setInput(TeamDefinitions.getTopLevelTeamDefinitions(active));
+ getTreeViewer().getViewer().setInput(
+ TeamDefinitions.getTopLevelTeamDefinitions(active, AtsClientService.get().getConfig()));
if (getInitialTeamDefs() != null) {
getTreeViewer().setInitalChecked(getInitialTeamDefs());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java
index 3d897250c4a..d137cf1dda1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java
@@ -16,6 +16,7 @@ import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -39,7 +40,7 @@ public class TeamDefinitionTreeWithChildrenDialog extends OSEECheckedFilteredTre
protected Composite dialogComp;
public TeamDefinitionTreeWithChildrenDialog(Active active) throws OseeCoreException {
- this(active, TeamDefinitions.getTeamTopLevelDefinitions(active));
+ this(active, TeamDefinitions.getTeamTopLevelDefinitions(active, AtsClientService.get().getConfig()));
}
public TeamDefinitionTreeWithChildrenDialog(Active active, Collection<IAtsTeamDefinition> TeamDefinitions) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
index 102fdd0ab20..b44e509bd80 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.api.version.VersionLockedType;
import org.eclipse.osee.ats.api.version.VersionReleaseType;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsObjectLabelProvider;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -66,7 +67,8 @@ public class TeamVersionListDialog extends SelectionDialog {
ArrayList<Object> objs = new ArrayList<Object>();
try {
- for (IAtsTeamDefinition art : TeamDefinitions.getTeamReleaseableDefinitions(active)) {
+ for (IAtsTeamDefinition art : TeamDefinitions.getTeamReleaseableDefinitions(active,
+ AtsClientService.get().getConfig())) {
objs.add(art);
}
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java
index 8e332dfe681..580f039bd77 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java
@@ -140,7 +140,7 @@ public class CreateNewVersionItem extends XNavigateItemAction {
return teamDefHoldingVersions;
}
TeamDefinitionDialog ld = new TeamDefinitionDialog("Select Team", "Select Team");
- ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active));
+ ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active, AtsClientService.get().getConfig()));
int result = ld.open();
if (result == 0) {
return (IAtsTeamDefinition) ld.getResult()[0];
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/GenerateFullVersionReportItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/GenerateFullVersionReportItem.java
index af5fcaebddd..8766aef09c3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/GenerateFullVersionReportItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/GenerateFullVersionReportItem.java
@@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.widgets.dialog.TeamDefinitionDialog;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.util.XResultData;
@@ -71,7 +72,8 @@ public class GenerateFullVersionReportItem extends XNavigateItemAction {
if (teamDef == null) {
Set<IAtsTeamDefinition> teamDefinitions = null;
try {
- teamDefinitions = TeamDefinitions.getTeamReleaseableDefinitions(Active.Active);
+ teamDefinitions =
+ TeamDefinitions.getTeamReleaseableDefinitions(Active.Active, AtsClientService.get().getConfig());
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading team definitions", ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/MassEditTeamVersionItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/MassEditTeamVersionItem.java
index 6ec88968de2..309648583f4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/MassEditTeamVersionItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/MassEditTeamVersionItem.java
@@ -57,7 +57,7 @@ public class MassEditTeamVersionItem extends XNavigateItemAction {
return teamDef;
}
TeamDefinitionDialog ld = new TeamDefinitionDialog("Select Team", "Select Team");
- ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active));
+ ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active, AtsClientService.get().getConfig()));
int result = ld.open();
if (result == 0) {
return (IAtsTeamDefinition) ld.getResult()[0];
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/ReleaseVersionItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/ReleaseVersionItem.java
index 7ab0c847de1..80942fb11c8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/ReleaseVersionItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/ReleaseVersionItem.java
@@ -20,7 +20,6 @@ import org.eclipse.osee.ats.api.version.VersionReleaseType;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.util.AtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.ats.internal.AtsClientService;
@@ -69,7 +68,7 @@ public class ReleaseVersionItem extends XNavigateItemAction {
IAtsVersion verArt = (IAtsVersion) ld.getResult()[0];
// Validate team lead status
- if (!AtsUtilClient.isAtsAdmin() && !AtsVersionService.get().getTeamDefinition(verArt).getLeads().contains(
+ if (!AtsUtilClient.isAtsAdmin() && !AtsClientService.get().getVersionService().getTeamDefinition(verArt).getLeads().contains(
AtsClientService.get().getUserService().getCurrentUser())) {
AWorkbench.popup("ERROR", "Only lead can release version.");
return;
@@ -125,7 +124,7 @@ public class ReleaseVersionItem extends XNavigateItemAction {
return teamDefHoldingVersions;
}
TeamDefinitionDialog ld = new TeamDefinitionDialog("Select Team", "Select Team");
- ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active));
+ ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active, AtsClientService.get().getConfig()));
int result = ld.open();
if (result == 0) {
return (IAtsTeamDefinition) ld.getResult()[0];
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerView.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerView.java
index ae20fe4f5e2..58789b4f0c0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerView.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerView.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.editor.SMAEditor;
import org.eclipse.osee.ats.help.ui.AtsHelpContext;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.walker.action.ActionWalkerLayoutAction;
import org.eclipse.osee.ats.walker.action.ActionWalkerRefreshAction;
@@ -384,7 +385,7 @@ public class ActionWalkerView extends GenericViewPart implements IPartListener,
private String getTargetedVersion(Artifact artifact) {
try {
if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) {
- String str = Versions.getTargetedVersionStr(artifact);
+ String str = Versions.getTargetedVersionStr(artifact, AtsClientService.get().getVersionService());
return str.isEmpty() ? "" : str;
}
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
index 75e04635888..133c3266acb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
@@ -67,10 +67,14 @@ public class ImportAIsAndTeamDefinitionsToDb {
public void execute() throws OseeCoreException {
importUserDefinitions(atsDsl.getUserDef());
- importTeamDefinitions(atsDsl.getTeamDef(),
- AtsClientService.get().getConfigArtifact(TeamDefinitions.getTopTeamDefinition()));
- importActionableItems(atsDsl.getActionableItemDef(),
- AtsClientService.get().getConfigArtifact(ActionableItems.getTopActionableItem()));
+ importTeamDefinitions(
+ atsDsl.getTeamDef(),
+ AtsClientService.get().getConfigArtifact(
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig())));
+ importActionableItems(
+ atsDsl.getActionableItemDef(),
+ AtsClientService.get().getConfigArtifact(
+ ActionableItems.getTopActionableItem(AtsClientService.get().getConfig())));
}
private void importUserDefinitions(EList<UserDef> userDefs) throws OseeCoreException {
@@ -275,9 +279,13 @@ public class ImportAIsAndTeamDefinitionsToDb {
AtsChangeSet changes = new AtsChangeSet(getClass().getSimpleName());
if (parent == null) {
if (isTeamDef) {
- parent = AtsClientService.get().storeConfigObject(TeamDefinitions.getTopTeamDefinition(), changes);
+ parent =
+ AtsClientService.get().storeConfigObject(
+ TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()), changes);
} else {
- parent = AtsClientService.get().storeConfigObject(ActionableItems.getTopActionableItem(), changes);
+ parent =
+ AtsClientService.get().storeConfigObject(
+ ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()), changes);
}
changes.execute();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java
index 35814d21065..638806a2d29 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.ats.dsl.atsDsl.UserByName;
import org.eclipse.osee.ats.dsl.atsDsl.VersionDef;
import org.eclipse.osee.ats.dsl.atsDsl.impl.AtsDslFactoryImpl;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -53,11 +54,13 @@ public class ConvertAIsAndTeamsToAtsDsl {
try {
// Add all TeamDef definitions
- TeamDef topTeam = convertTeamDef(TeamDefinitions.getTopTeamDefinition(), null);
+ TeamDef topTeam =
+ convertTeamDef(TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig()), null);
atsDsl.getTeamDef().add(topTeam);
// Add all AI definitions
- ActionableItemDef topAi = convertAIDef(ActionableItems.getTopActionableItem(), null);
+ ActionableItemDef topAi =
+ convertAIDef(ActionableItems.getTopActionableItem(AtsClientService.get().getConfig()), null);
atsDsl.getActionableItemDef().add(topAi);
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
index ee60fd6eb5d..ec6ce31d19b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.osee.ats.AtsImage;
+import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -128,7 +129,7 @@ public class TransitionToMenu {
}
private static void handleTransitionToSelected(final String toStateName, final Set<IAtsWorkItem> workItems) {
- final ITransitionHelper helper = new TransitionHelperAdapter() {
+ final ITransitionHelper helper = new TransitionHelperAdapter(AtsClientService.get().getServices()) {
private AtsChangeSet changes;
@@ -260,6 +261,11 @@ public class TransitionToMenu {
return java.util.Collections.emptyList();
}
+ @Override
+ public IAtsServices getServices() {
+ return AtsClientService.get().getServices();
+ }
+
};
final TransitionToOperation operation = new TransitionToOperation(helper);
Operations.executeAsJob(operation, true, Job.SHORT, new JobChangeAdapter() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
index 5f1c778c133..1ed7e395df4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
@@ -22,9 +22,9 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.WorkflowMetrics;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
@@ -164,7 +164,7 @@ public class AtsMetricsComposite extends ScrolledComposite {
// Try to find an estimated release date from one of the workflows
for (Artifact art : iAtsMetricsProvider.getMetricsArtifacts()) {
if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) {
- IAtsVersion verArt = AtsVersionService.get().getTargetedVersion(art);
+ IAtsVersion verArt = AtsClientService.get().getVersionService().getTargetedVersion(art);
if (verArt != null) {
Date estRelDate = verArt.getEstimatedReleaseDate();
if (estRelDate != null) {
@@ -277,7 +277,9 @@ public class AtsMetricsComposite extends ScrolledComposite {
if (sMet.getUserToAssignedSmas().getValues(user) != null) {
for (Artifact awa : sMet.getUserToAssignedSmas().getValues(user)) {
if (!processedArts.contains(awa) && !sMet.getUserToCompletedSmas().containsValue(awa)) {
- cummulativePercentComplete += PercentCompleteTotalUtil.getPercentCompleteTotal((IAtsWorkItem) awa);
+ cummulativePercentComplete +=
+ PercentCompleteTotalUtil.getPercentCompleteTotal((IAtsWorkItem) awa,
+ AtsClientService.get().getServices());
processedArts.add(awa);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
index 17209524096..044e70c4fb6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
@@ -19,9 +19,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.help.ui.AtsHelpContext;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -245,8 +245,9 @@ public class WorldEditor extends FormEditor implements IWorldEditor, IDirtiableE
return verArt;
}
for (Artifact artifact : getLoadedArtifacts()) {
- if (artifact instanceof AbstractWorkflowArtifact && AtsVersionService.get().hasTargetedVersion(artifact)) {
- return AtsVersionService.get().getTargetedVersion(artifact);
+ if (artifact instanceof AbstractWorkflowArtifact && AtsClientService.get().getVersionService().hasTargetedVersion(
+ artifact)) {
+ return AtsClientService.get().getVersionService().getTargetedVersion(artifact);
}
}
return null;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java
index 02d4d471051..01d6f5f8997 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java
@@ -106,7 +106,7 @@ public class NextVersionSearchItem extends WorldUISearchItem {
}
try {
TeamDefinitionDialog ld = new TeamDefinitionDialog("Select Team", "Select Team");
- ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active));
+ ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Active, AtsClientService.get().getConfig()));
int result = ld.open();
if (result == 0) {
selectedTeamDef = (IAtsTeamDefinition) ld.getResult()[0];
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
index cd055560ab3..77b46716063 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
@@ -27,7 +27,6 @@ import org.eclipse.osee.ats.api.version.VersionReleaseType;
import org.eclipse.osee.ats.core.client.task.AbstractTaskableArtifact;
import org.eclipse.osee.ats.core.client.task.TaskArtifact;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.Versions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
@@ -127,7 +126,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
}
Set<TaskArtifact> removeTaskArts = new HashSet<TaskArtifact>();
for (TaskArtifact taskArt : userTaskArts) {
- if (verArt != null && !verArt.equals(AtsVersionService.get().getTargetedVersion(
+ if (verArt != null && !verArt.equals(AtsClientService.get().getVersionService().getTargetedVersion(
taskArt.getParentTeamWorkflow()))) {
removeTaskArts.add(taskArt);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
index 704d7b1e8a7..a90a189fafd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
@@ -28,11 +28,11 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.artifact.WorkflowManager;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.AtsVersionService;
import org.eclipse.osee.ats.core.config.TeamDefinitions;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -153,7 +153,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
// don't include if version specified and workflow's not targeted for version
if (versionArt != null) {
TeamWorkFlowArtifact team = awa.getParentTeamWorkflow();
- if (team != null && (!AtsVersionService.get().hasTargetedVersion(team) || !AtsVersionService.get().getTargetedVersion(
+ if (team != null && (!AtsClientService.get().getVersionService().hasTargetedVersion(team) || !AtsClientService.get().getVersionService().getTargetedVersion(
team).equals(versionArt))) {
continue;
}
@@ -163,7 +163,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
TeamWorkFlowArtifact team = awa.getParentTeamWorkflow();
if (team != null) {
// skip if released is desired and version artifact is not set
- IAtsVersion setVerArt = AtsVersionService.get().getTargetedVersion(team);
+ IAtsVersion setVerArt = AtsClientService.get().getVersionService().getTargetedVersion(team);
if (setVerArt == null && releasedOption == ReleasedOption.Released) {
continue;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java
index 3e8212692ed..cf0d71246a8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java
@@ -113,7 +113,7 @@ public class VersionTargetedForTeamSearchItem extends WorldUISearchItem {
IAtsTeamDefinition selectedTeamDef = teamDef;
if (versionArt == null && selectedTeamDef == null) {
TeamDefinitionDialog ld = new TeamDefinitionDialog("Select Team", "Select Team");
- ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both));
+ ld.setInput(TeamDefinitions.getTeamReleaseableDefinitions(Active.Both, AtsClientService.get().getConfig()));
int result = ld.open();
if (result == 0) {
selectedTeamDef = (IAtsTeamDefinition) ld.getResult()[0];
diff --git a/plugins/org.eclipse.osee.x.ats.parent/pom.xml b/plugins/org.eclipse.osee.x.ats.parent/pom.xml
index 201eb9d4b2e..039e28915b3 100644
--- a/plugins/org.eclipse.osee.x.ats.parent/pom.xml
+++ b/plugins/org.eclipse.osee.x.ats.parent/pom.xml
@@ -18,7 +18,10 @@
<modules>
<module>../../plugins/org.eclipse.osee.ats.api</module>
+
<module>../../plugins/org.eclipse.osee.ats.dsl</module>
+ <module>../../plugins/org.eclipse.osee.ats.dsl.integration</module>
+ <module>../../plugins/org.eclipse.osee.ats.dsl.integration.test</module>
<module>../../plugins/org.eclipse.osee.ats.core</module>
<module>../../plugins/org.eclipse.osee.ats.core.test</module>

Back to the top