Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-05-30 14:41:06 -0400
committerdonald.g.dunne2017-05-31 14:45:30 -0400
commit4eafa0dbcf898628ed073f281ad4357c9d8d817d (patch)
tree6e0b0df14c92bbcbb919db984fbf09440431e005
parent639c0db5aa0c7285546c260ee449e3d445b40465 (diff)
downloadorg.eclipse.osee-4eafa0dbcf898628ed073f281ad4357c9d8d817d.tar.gz
org.eclipse.osee-4eafa0dbcf898628ed073f281ad4357c9d8d817d.tar.xz
org.eclipse.osee-4eafa0dbcf898628ed073f281ad4357c9d8d817d.zip
feature[ats_ATS409234]: HLR - Update ATS id scheme for actions, tasks, and workflows
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsUtilService.java25
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtilTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionResourceTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/PeerToPeerReviewManager.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/util/AtsIdProviderTest.java40
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsIdProvider.java45
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsUtilService.java38
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/AtsReviewServiceImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java16
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreFactory.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/util/DuplicateWorkflowAsIsOperation.java18
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/CreateTasksOperation.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalManager.java2
23 files changed, 115 insertions, 130 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
index 801d9a0fe5..9f071a93e4 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
@@ -35,7 +35,6 @@ import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IArtifactResolver;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
import org.eclipse.osee.ats.api.util.ISequenceProvider;
import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.version.IVersionFactory;
@@ -139,8 +138,6 @@ public interface IAtsServices extends IAtsEarnedValueServiceProvider, IAtsConfig
IAtsCache getCache();
- IAtsUtilService getUtilService();
-
ISequenceProvider getSequenceProvider();
IAtsActionFactory getActionFactory();
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
index 97bae3a4b6..9e2867a18a 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -52,7 +53,7 @@ public interface IAtsStoreService {
boolean isDateType(AttributeTypeId attributeType);
- boolean isOfType(ArtifactId artifact, IArtifactType... artifactType);
+ boolean isOfType(ArtifactId artifact, ArtifactTypeId... artifactType);
IArtifactType getArtifactType(Long artTypeId);
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsUtilService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsUtilService.java
deleted file mode 100644
index 4e4c4e8e26..0000000000
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsUtilService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 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.util;
-
-import org.eclipse.osee.ats.api.IAtsObject;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-
-/**
- * @author Donald G. Dunne
- */
-public interface IAtsUtilService {
-
- void setAtsId(ISequenceProvider sequenceProvider, IAtsObject newObject, IAtsTeamDefinition teamDef, IAtsChangeSet changes);
-
- String getNextAtsId(ISequenceProvider sequenceProvider, IAtsObject newObject, IAtsTeamDefinition teamDef);
-
-}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
index 50bd7e756e..ad99dc189c 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.api.workflow;
import java.util.Collection;
import java.util.Date;
import java.util.List;
+import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.team.ChangeType;
@@ -48,4 +49,6 @@ public interface IAtsActionFactory {
void initializeNewStateMachine(IAtsWorkItem workItem, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, IAtsWorkDefinition workDefinition, IAtsChangeSet changes);
+ void setAtsId(IAtsObject atsObject, IAtsTeamDefinition teamDef, IAtsChangeSet changes);
+
} \ No newline at end of file
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 ec18eabdd8..9435c4563c 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
@@ -54,7 +54,7 @@ public class AtsTestUtilTest extends AtsTestUtil {
Assert.assertNotNull(AtsTestUtil.getTeamWf().getStateDefinition());
Assert.assertNotNull(AtsTestUtil.getTeamWf().getTeamDefinition());
String atsId = AtsTestUtil.getTeamWf().getAtsId();
- Assert.assertTrue(atsId.startsWith("ATS"));
+ Assert.assertTrue(atsId.startsWith("TW"));
AtsTestUtil.cleanup();
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionResourceTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionResourceTest.java
index 33869512e8..83e097c009 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionResourceTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/ActionResourceTest.java
@@ -187,7 +187,7 @@ public class ActionResourceTest extends AbstractRestTest {
String urlStr = response.getLocation().toString();
URL url = new URL(urlStr);
String path = url.getPath();
- Assert.assertTrue(String.format("Invalid url [%s]", url), path.contains("/ats/ui/action/ATS"));
+ Assert.assertTrue(String.format("Invalid url [%s]", url), path.contains("/ats/ui/action/TW"));
String atsId = path.replaceFirst("^.*/", "");
TeamWorkFlowArtifact teamArt =
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 a2bc903155..3673489a97 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
@@ -131,9 +131,8 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
queryService = new AtsQueryServiceImpl(this, jdbcService);
actionableItemManager = new ActionableItemManager(attributeResolverService, storeService, this);
- utilService = AtsCoreFactory.getUtilService(attributeResolverService);
- actionFactory = new ActionFactory(workItemFactory, utilService, getSequenceProvider(), actionableItemManager,
+ actionFactory = new ActionFactory(workItemFactory, getSequenceProvider(), actionableItemManager,
attributeResolverService, stateFactory, getServices());
taskService = new AtsTaskService(this);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
index 7221b40421..92a1a226aa 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
import org.eclipse.osee.ats.core.client.internal.store.AtsChangeSet;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -137,7 +138,7 @@ public class AtsStoreService implements IAtsStoreService {
}
@Override
- public boolean isOfType(ArtifactId artifact, IArtifactType... artifactType) {
+ public boolean isOfType(ArtifactId artifact, ArtifactTypeId... artifactType) {
return ((Artifact) artifact).isOfType(artifactType);
}
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 0ced7e0e2b..04c4cf2a97 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
@@ -182,8 +182,7 @@ public class PeerToPeerReviewManager {
teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, peerToPeerRev);
}
- AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), peerToPeerRev,
- teamDef, changes);
+ AtsClientService.get().getActionFactory().setAtsId(peerToPeerRev, teamDef, changes);
// Initialize state machine
peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.WorkflowDefinition, workDefinition.getId());
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/util/AtsIdProviderTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/util/AtsIdProviderTest.java
index 67ef5161f4..08a31dec5a 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/util/AtsIdProviderTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/util/AtsIdProviderTest.java
@@ -15,6 +15,7 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -29,7 +30,7 @@ import org.mockito.MockitoAnnotations;
/**
* Test Case for {@link AtsIdProvider}
- *
+ *
* @author Donald G. Dunne
*/
public class AtsIdProviderTest {
@@ -66,19 +67,19 @@ public class AtsIdProviderTest {
null);
when(teamDef.getTeamDefinitionHoldingVersions()).thenReturn(null);
- Assert.assertNull(atsIdProvider.getAttrValue(AtsAttributeTypes.AtsIdPrefix));
+ Assert.assertNull(atsIdProvider.getAttrValueFromTeamDef(AtsAttributeTypes.AtsIdPrefix));
when(teamDef.getTeamDefinitionHoldingVersions()).thenReturn(parentTeamDef);
when(attrResolver.getSoleAttributeValueAsString(parentTeamDef, AtsAttributeTypes.AtsIdPrefix,
(String) null)).thenReturn("ATS");
- Assert.assertEquals("ATS", atsIdProvider.getAttrValue(AtsAttributeTypes.AtsIdPrefix));
+ Assert.assertEquals("ATS", atsIdProvider.getAttrValueFromTeamDef(AtsAttributeTypes.AtsIdPrefix));
when(
attrResolver.getSoleAttributeValueAsString(teamDef, AtsAttributeTypes.AtsIdPrefix, (String) null)).thenReturn(
"TEST");
- Assert.assertEquals("TEST", atsIdProvider.getAttrValue(AtsAttributeTypes.AtsIdPrefix));
+ Assert.assertEquals("TEST", atsIdProvider.getAttrValueFromTeamDef(AtsAttributeTypes.AtsIdPrefix));
}
@Test
@@ -94,6 +95,37 @@ public class AtsIdProviderTest {
}
@Test
+ public void testGetNextAtsIdWithPrefixAndSequenceName() {
+ when(
+ attrResolver.getSoleAttributeValueAsString(teamDef, AtsAttributeTypes.AtsIdPrefix, (String) null)).thenReturn(
+ "");
+ when(attrResolver.getSoleAttributeValueAsString(teamDef, AtsAttributeTypes.AtsIdSequenceName,
+ (String) null)).thenReturn("");
+
+ when(sequenceProvider.getNext(AtsIdProvider.DEFAULT_WORKFLOW_SEQ_NAME)).thenReturn(333L);
+ when(newObject.isOfType(AtsArtifactTypes.TeamWorkflow)).thenReturn(true);
+ Assert.assertEquals(AtsIdProvider.DEFAULT_WORKFLOW_ID_PREFIX + "333", atsIdProvider.getNextAtsId());
+
+ when(sequenceProvider.getNext(AtsIdProvider.DEFAULT_ACTION_SEQ_NAME)).thenReturn(333L);
+ when(newObject.isOfType(AtsArtifactTypes.TeamWorkflow)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.Action)).thenReturn(true);
+ Assert.assertEquals(AtsIdProvider.DEFAULT_ACTION_ID_PREFIX + "333", atsIdProvider.getNextAtsId());
+
+ when(sequenceProvider.getNext(AtsIdProvider.DEFAULT_REVIEW_SEQ_NAME)).thenReturn(333L);
+ when(newObject.isOfType(AtsArtifactTypes.TeamWorkflow)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.Action)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.ReviewArtifact)).thenReturn(true);
+ Assert.assertEquals(AtsIdProvider.DEFAULT_REVIEW_ID_PREFIX + "333", atsIdProvider.getNextAtsId());
+
+ when(sequenceProvider.getNext(AtsIdProvider.DEFAULT_TASK_SEQ_NAME)).thenReturn(333L);
+ when(newObject.isOfType(AtsArtifactTypes.TeamWorkflow)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.Action)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.ReviewArtifact)).thenReturn(false);
+ when(newObject.isOfType(AtsArtifactTypes.Task)).thenReturn(true);
+ Assert.assertEquals(AtsIdProvider.DEFAULT_TASK_ID_PREFIX + "333", atsIdProvider.getNextAtsId());
+ }
+
+ @Test
public void testSetAtsId() {
when(attrResolver.getSoleAttributeValueAsString(newObject, AtsAttributeTypes.AtsId, (String) null)).thenReturn(
null);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
index 3cb2e02b2f..a46bbcea63 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
@@ -155,8 +155,8 @@ public class AgileFactory {
ArtifactToken sprintArt = changes.createArtifact(AtsArtifactTypes.AgileSprint, name, guid, uuid);
IAgileSprint sprint = services.getWorkItemFactory().getAgileSprint(sprintArt);
- services.getUtilService().setAtsId(services.getSequenceProvider(), sprint,
- TeamDefinitions.getTopTeamDefinition(services.getQueryService()), changes);
+ services.getActionFactory().setAtsId(sprint, TeamDefinitions.getTopTeamDefinition(services.getQueryService()),
+ changes);
// Initialize state machine
services.getActionFactory().initializeNewStateMachine(sprint, Arrays.asList(AtsCoreUsers.UNASSIGNED_USER),
@@ -185,8 +185,8 @@ public class AgileFactory {
ArtifactToken backlogArt = changes.createArtifact(AtsArtifactTypes.Goal, name, guid, uuid);
IAgileBacklog sprint = services.getWorkItemFactory().getAgileBacklog(backlogArt);
- services.getUtilService().setAtsId(services.getSequenceProvider(), sprint,
- TeamDefinitions.getTopTeamDefinition(services.getQueryService()), changes);
+ services.getActionFactory().setAtsId(sprint, TeamDefinitions.getTopTeamDefinition(services.getQueryService()),
+ changes);
// Initialize state machine
services.getActionFactory().initializeNewStateMachine(sprint, Arrays.asList(AtsCoreUsers.UNASSIGNED_USER),
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsIdProvider.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsIdProvider.java
index c7c2585272..dd0c6232ee 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsIdProvider.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsIdProvider.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.core.internal.util;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -23,12 +24,24 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
/**
* Return or set the configurable ATS Id based on Team Definition attributes. First check related team definition, then
* check team definition holding versions (if any) and last use the default configured sequence and prefix.
- *
+ *
* @author Ryan D. Brooks
* @author Donald G. Dunne
*/
public final class AtsIdProvider {
+ protected static final String DEFAULT_ACTION_SEQ_NAME = "ATS_ACTION_ID_SEQ";
+ protected static final String DEFAULT_ACTION_ID_PREFIX = "ACT";
+
+ protected static final String DEFAULT_TASK_SEQ_NAME = "ATS_TASK_ID_SEQ";
+ protected static final String DEFAULT_TASK_ID_PREFIX = "TSK";
+
+ protected static final String DEFAULT_REVIEW_SEQ_NAME = "ATS_REVIEW_ID_SEQ";
+ protected static final String DEFAULT_REVIEW_ID_PREFIX = "RVW";
+
+ protected static final String DEFAULT_WORKFLOW_SEQ_NAME = "ATS_WORKFLOW_ID_SEQ";
+ protected static final String DEFAULT_WORKFLOW_ID_PREFIX = "TW";
+
protected static final String DEFAULT_SEQ_NAME = "ATS_ID_SEQ";
protected static final String DEFAULT_ID_PREFIX = "ATS";
private final IAtsObject newObject;
@@ -44,13 +57,33 @@ public final class AtsIdProvider {
}
public String getNextAtsId() {
- String seqName = getAttrValue(AtsAttributeTypes.AtsIdSequenceName);
+ String seqName = getAttrValueFromTeamDef(AtsAttributeTypes.AtsIdSequenceName);
if (!Strings.isValid(seqName)) {
- seqName = DEFAULT_SEQ_NAME;
+ if (newObject.isOfType(AtsArtifactTypes.TeamWorkflow)) {
+ seqName = DEFAULT_WORKFLOW_SEQ_NAME;
+ } else if (newObject.isOfType(AtsArtifactTypes.Action)) {
+ seqName = DEFAULT_ACTION_SEQ_NAME;
+ } else if (newObject.isOfType(AtsArtifactTypes.ReviewArtifact)) {
+ seqName = DEFAULT_REVIEW_SEQ_NAME;
+ } else if (newObject.isOfType(AtsArtifactTypes.Task)) {
+ seqName = DEFAULT_TASK_SEQ_NAME;
+ } else {
+ seqName = DEFAULT_SEQ_NAME;
+ }
}
- String prefixName = getAttrValue(AtsAttributeTypes.AtsIdPrefix);
+ String prefixName = getAttrValueFromTeamDef(AtsAttributeTypes.AtsIdPrefix);
if (!Strings.isValid(prefixName)) {
- prefixName = DEFAULT_ID_PREFIX;
+ if (newObject.isOfType(AtsArtifactTypes.TeamWorkflow)) {
+ prefixName = DEFAULT_WORKFLOW_ID_PREFIX;
+ } else if (newObject.isOfType(AtsArtifactTypes.Action)) {
+ prefixName = DEFAULT_ACTION_ID_PREFIX;
+ } else if (newObject.isOfType(AtsArtifactTypes.ReviewArtifact)) {
+ prefixName = DEFAULT_REVIEW_ID_PREFIX;
+ } else if (newObject.isOfType(AtsArtifactTypes.Task)) {
+ prefixName = DEFAULT_TASK_ID_PREFIX;
+ } else {
+ prefixName = DEFAULT_ID_PREFIX;
+ }
}
return getNextId(prefixName, seqName);
}
@@ -67,7 +100,7 @@ public final class AtsIdProvider {
return String.format("%s%d", prefix, sequenceProvider.getNext(seqName));
}
- protected String getAttrValue(AttributeTypeId attrType) {
+ protected String getAttrValueFromTeamDef(AttributeTypeId attrType) {
String attrValue = attrResolver.getSoleAttributeValueAsString(teamDef, attrType, (String) null);
if (!Strings.isValid(attrValue)) {
IAtsTeamDefinition parentTeamDef = teamDef.getTeamDefinitionHoldingVersions();
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsUtilService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsUtilService.java
deleted file mode 100644
index dbfc58c903..0000000000
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/util/AtsUtilService.java
+++ /dev/null
@@ -1,38 +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.util;
-
-import org.eclipse.osee.ats.api.IAtsObject;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
-import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
-import org.eclipse.osee.ats.api.util.ISequenceProvider;
-import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
-
-public class AtsUtilService implements IAtsUtilService {
-
- private final IAttributeResolver attrResolver;
-
- public AtsUtilService(IAttributeResolver attrResolver) {
- this.attrResolver = attrResolver;
- }
-
- @Override
- public void setAtsId(ISequenceProvider sequenceProvider, IAtsObject newObject, IAtsTeamDefinition teamDef, IAtsChangeSet changes) {
- new AtsIdProvider(sequenceProvider, attrResolver, newObject, teamDef).setAtsId(changes);
- }
-
- @Override
- public String getNextAtsId(ISequenceProvider sequenceProvider, IAtsObject newObject, IAtsTeamDefinition teamDef) {
- return new AtsIdProvider(sequenceProvider, attrResolver, newObject, teamDef).getNextAtsId();
- }
-
-}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/AtsReviewServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/AtsReviewServiceImpl.java
index ca0b5d8854..02e5a4f62b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/AtsReviewServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/AtsReviewServiceImpl.java
@@ -176,8 +176,7 @@ public class AtsReviewServiceImpl implements IAtsReviewService {
IAtsDecisionReview decRev = (IAtsDecisionReview) services.getWorkItemFactory().getReview(decRevArt);
changes.relate(teamWf, AtsRelationTypes.TeamWorkflowToReview_Review, decRev);
- services.getUtilService().setAtsId(services.getSequenceProvider(), decRev,
- decRev.getParentTeamWorkflow().getTeamDefinition(), changes);
+ services.getActionFactory().setAtsId(decRev, decRev.getParentTeamWorkflow().getTeamDefinition(), changes);
// Initialize state machine
services.getActionFactory().initializeNewStateMachine(decRev, assignees, createdDate, createdBy, changes);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index 1e95f0e710..c69e3cf9e6 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -33,7 +33,6 @@ import org.eclipse.osee.ats.api.team.IAtsWorkItemFactory;
import org.eclipse.osee.ats.api.team.ITeamWorkflowProvider;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
import org.eclipse.osee.ats.api.util.ISequenceProvider;
import org.eclipse.osee.ats.api.workdef.IAtsStateDefinition;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
@@ -49,6 +48,7 @@ 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.TeamDefinitions;
+import org.eclipse.osee.ats.core.internal.util.AtsIdProvider;
import org.eclipse.osee.ats.core.users.AtsCoreUsers;
import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility;
import org.eclipse.osee.ats.core.workflow.transition.TransitionManager;
@@ -67,7 +67,6 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
public class ActionFactory implements IAtsActionFactory {
private final IAtsWorkItemFactory workItemFactory;
- private final IAtsUtilService utilService;
private final ISequenceProvider sequenceProvider;
private final IAtsActionableItemService actionableItemManager;
private final IAttributeResolver attrResolver;
@@ -75,9 +74,8 @@ public class ActionFactory implements IAtsActionFactory {
private final IAtsServices services;
private IAtsTeamDefinition topTeamDefinition;
- public ActionFactory(IAtsWorkItemFactory workItemFactory, IAtsUtilService utilService, ISequenceProvider sequenceProvider, IAtsActionableItemService actionableItemManager, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsServices atsServices) {
+ public ActionFactory(IAtsWorkItemFactory workItemFactory, ISequenceProvider sequenceProvider, IAtsActionableItemService actionableItemManager, IAttributeResolver attrResolver, IAtsStateFactory stateFactory, IAtsServices atsServices) {
this.workItemFactory = workItemFactory;
- this.utilService = utilService;
this.sequenceProvider = sequenceProvider;
this.actionableItemManager = actionableItemManager;
this.attrResolver = attrResolver;
@@ -94,7 +92,7 @@ public class ActionFactory implements IAtsActionFactory {
Object actionArt = changes.createArtifact(AtsArtifactTypes.Action, title);
IAtsAction action = workItemFactory.getAction((ArtifactId) actionArt);
IAtsTeamDefinition topTeamDefinition = getTopTeamDef();
- utilService.setAtsId(sequenceProvider, action, topTeamDefinition, changes);
+ setAtsId(action, topTeamDefinition, changes);
changes.add(action);
setArtifactIdentifyData(action, title, desc, changeType, priority, validationRequired, needByDate, changes);
@@ -211,7 +209,7 @@ public class ActionFactory implements IAtsActionFactory {
// Relate WorkFlow to Team Definition (by guid due to relation loading issues)
changes.setSoleAttributeValue(teamWf, AtsAttributeTypes.TeamDefinition, AtsUtilCore.getGuid(teamDef));
- utilService.setAtsId(sequenceProvider, teamWf, teamWf.getTeamDefinition(), changes);
+ setAtsId(teamWf, teamWf.getTeamDefinition(), changes);
// If work def id is specified by listener, set as attribute
boolean set = false;
@@ -406,4 +404,10 @@ public class ActionFactory implements IAtsActionFactory {
IAtsAction.class);
}
+ @Override
+ public void setAtsId(IAtsObject newObject, IAtsTeamDefinition teamDef, IAtsChangeSet changes) {
+ new AtsIdProvider(services.getSequenceProvider(), services.getAttributeResolver(), newObject, teamDef).setAtsId(
+ changes);
+ }
+
}
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 b44bc40157..b217461cc3 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
@@ -13,8 +13,6 @@ package org.eclipse.osee.ats.core.util;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.user.IAtsUserService;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
-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.IAtsWorkStateFactory;
@@ -22,7 +20,6 @@ import org.eclipse.osee.ats.core.internal.column.ev.AtsColumnService;
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;
/**
* @author Donald G. Dunne
@@ -53,7 +50,4 @@ public final class AtsCoreFactory {
return new AtsLogFactory();
}
- public static IAtsUtilService getUtilService(IAttributeResolver attrResolver) {
- return new AtsUtilService(attrResolver);
- }
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
index 3760f6bd39..782ce4bb4f 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImpl.java
@@ -40,7 +40,6 @@ import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IArtifactResolver;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
import org.eclipse.osee.ats.api.util.ISequenceProvider;
import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.version.IVersionFactory;
@@ -120,7 +119,6 @@ public abstract class AtsCoreServiceImpl implements IAtsServices {
protected IAtsWorkStateFactory workStateFactory;
protected IAtsLogFactory logFactory;
protected IAtsColumnService columnServices;
- protected IAtsUtilService utilService;
protected IAtsWorkItemFactory workItemFactory;
protected IAtsConfigItemFactory configItemFactory;
protected IAtsActionableItemService actionableItemManager;
@@ -471,11 +469,6 @@ public abstract class AtsCoreServiceImpl implements IAtsServices {
}
@Override
- public IAtsUtilService getUtilService() {
- return utilService;
- }
-
- @Override
public IArtifactResolver getArtifactResolver() {
return artifactResolver;
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
index 6f5cb78d8b..4908220411 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
@@ -35,6 +35,7 @@ import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.model.impl.AtsObject;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.logger.Log;
@@ -314,4 +315,9 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
return this instanceof IAtsPeerToPeerReview;
}
+ @Override
+ public boolean isOfType(ArtifactTypeId... artifactTypes) {
+ return services.getStoreService().isOfType(this.getStoreObject(), artifactTypes);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/util/DuplicateWorkflowAsIsOperation.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/util/DuplicateWorkflowAsIsOperation.java
index dc33a960cc..24e73ca083 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/util/DuplicateWorkflowAsIsOperation.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/util/DuplicateWorkflowAsIsOperation.java
@@ -11,11 +11,8 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.notify.AtsNotificationEventFactory;
import org.eclipse.osee.ats.api.notify.AtsNotifyType;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
-import org.eclipse.osee.ats.api.util.IAtsUtilService;
-import org.eclipse.osee.ats.api.util.ISequenceProvider;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.IAttribute;
@@ -89,7 +86,6 @@ public class DuplicateWorkflowAsIsOperation extends AbstractDuplicateWorkflowOpe
private IAtsWorkItem duplicateWorkItem(IAtsChangeSet changes, IAtsWorkItem workItem) {
ArtifactId newWorkItemArt = changes.createArtifact(
services.getStoreService().getArtifactType(workItem.getStoreObject()), getTitle(workItem));
- changes.setSoleAttributeFromString(newWorkItemArt, AtsAttributeTypes.AtsId, getNexAtsId(workItem));
if (workItem.isTeamWorkflow()) {
changes.relate(newWorkItemArt, AtsRelationTypes.ActionToWorkflow_Action, workItem.getParentAction());
@@ -116,7 +112,9 @@ public class DuplicateWorkflowAsIsOperation extends AbstractDuplicateWorkflowOpe
changes.addAttribute(newWorkItemArt, attr.getAttrType(), attr.getValue());
}
}
- return services.getWorkItemFactory().getWorkItem(newWorkItemArt);
+ IAtsWorkItem newWorkItem = services.getWorkItemFactory().getWorkItem(newWorkItemArt);
+ services.getActionFactory().setAtsId(newWorkItem, workItem.getParentTeamWorkflow().getTeamDefinition(), changes);
+ return newWorkItem;
}
private List<AttributeTypeId> getExcludeTypes() {
@@ -147,14 +145,4 @@ public class DuplicateWorkflowAsIsOperation extends AbstractDuplicateWorkflowOpe
return excludeTypes;
}
- private String getNexAtsId(IAtsWorkItem workItem) {
- IAtsUtilService utilService = services.getUtilService();
- ISequenceProvider sequenceProvider = services.getSequenceProvider();
-
- IAtsTeamDefinition teamDefinition = workItem.getParentTeamWorkflow().getTeamDefinition();
- String nextAtsId = utilService.getNextAtsId(sequenceProvider, null, teamDefinition);
-
- return nextAtsId;
- }
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
index 30e4f8c7a8..584e71fafd 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
@@ -139,10 +139,9 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
storeService =
new AtsStoreServiceImpl(attributeResolverService, this, stateFactory, logFactory, this, jdbcService);
- utilService = AtsCoreFactory.getUtilService(attributeResolverService);
queryService = new AtsQueryServiceImpl(this, jdbcService);
actionableItemManager = new ActionableItemManager(attributeResolverService, storeService, this);
- actionFactory = new ActionFactory(workItemFactory, utilService, getSequenceProvider(), actionableItemManager,
+ actionFactory = new ActionFactory(workItemFactory, getSequenceProvider(), actionableItemManager,
attributeResolverService, stateFactory, getServices());
agileService = new AgileService(logger, this);
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
index 5edecd5503..08407773df 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -126,7 +127,7 @@ public class AtsStoreServiceImpl implements IAtsStoreService {
}
@Override
- public boolean isOfType(ArtifactId artifact, IArtifactType... artifactType) {
+ public boolean isOfType(ArtifactId artifact, ArtifactTypeId... artifactType) {
return ((ArtifactReadable) artifact).isOfType(artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/CreateTasksOperation.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/CreateTasksOperation.java
index 1a1ced6290..cbece9d3d1 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/CreateTasksOperation.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/CreateTasksOperation.java
@@ -258,8 +258,7 @@ public class CreateTasksOperation {
IAtsTask task = atsServer.getWorkItemFactory().getTask(taskArt);
IAtsTeamWorkflow teamWf = uuidToTeamWf.get(newTaskData.getTeamWfUuid());
- atsServer.getUtilService().setAtsId(atsServer.getSequenceProvider(), task, teamWf.getTeamDefinition(),
- changes);
+ atsServer.getActionFactory().setAtsId(task, teamWf.getTeamDefinition(), changes);
changes.relate(teamWf, AtsRelationTypes.TeamWfToTask_Task, taskArt);
List<IAtsUser> assignees = new ArrayList<>();
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 5b3f5101c3..361583cd84 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
@@ -65,7 +65,7 @@ public class GoalManager extends MembersManager<GoalArtifact> {
GoalArtifact goalArt = (GoalArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.Goal,
AtsClientService.get().getAtsBranch(), title);
- AtsClientService.get().getUtilService().setAtsId(AtsClientService.get().getSequenceProvider(), goalArt,
+ AtsClientService.get().getActionFactory().setAtsId(goalArt,
TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getQueryService()), changes);
// Initialize state machine

Back to the top