Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java4
-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/internal/AtsClientImpl.java24
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java15
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java2
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java8
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/BaseConfigEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java9
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileBacklogWriter.java2
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java6
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java4
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java10
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java10
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTaskService.java4
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ConfigItemFactory.java4
-rw-r--r--plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/workitem/CreateTasksOperation.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java16
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsRuleEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java7
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUpdateArtifact.java2
29 files changed, 82 insertions, 99 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 1b2dc13dba..b780ed8477 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
@@ -56,6 +56,8 @@ public interface IAtsServices {
IAtsVersionService getVersionService();
+ ArtifactId getArtifact(Long uuid);
+
ArtifactId getArtifact(ArtifactId artifact) throws OseeCoreException;
ArtifactId getArtifact(IAtsObject atsObject) throws OseeCoreException;
@@ -94,6 +96,6 @@ public interface IAtsServices {
ArtifactId getArtifactByName(IArtifactType artifactType, String name);
- ArtifactId getArtifact(Long uuid);
+ ArtifactId getArtifactByGuid(String workPackageGuid);
}
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 47238cd38a..140d0f6dc1 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
@@ -144,9 +144,8 @@ public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolv
IAtsTeamDefinitionService getTeamDefinitionService();
- Artifact getArtifact(long uuid) throws OseeCoreException;
-
- Artifact getArtifact(String guid);
+ @Override
+ Artifact getArtifact(Long uuid) throws OseeCoreException;
@Override
IAtsClientVersionService getVersionService();
@@ -159,6 +158,7 @@ public interface IAtsClient extends IAtsServices, IAtsNotifier, IAttributeResolv
IVersionFactory getVersionFactory();
+ @Override
Artifact getArtifactByGuid(String guid) throws OseeCoreException;
Artifact getArtifactByAtsId(String id);
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 2fc540ebed..8565d76fdb 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
@@ -498,11 +498,11 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
* @return corresponding Artifact or null if not found
*/
@Override
- public Artifact getArtifact(long uuid) throws OseeCoreException {
+ public Artifact getArtifact(Long uuid) throws OseeCoreException {
Conditions.checkExpressionFailOnTrue(uuid <= 0, "Uuid must be > 0; is %d", uuid);
Artifact result = null;
try {
- result = ArtifactQuery.getArtifactFromId((int) uuid, AtsUtilCore.getAtsBranch());
+ result = ArtifactQuery.getArtifactFromId(uuid.intValue(), AtsUtilCore.getAtsBranch());
} catch (ArtifactDoesNotExist ex) {
// do nothing
}
@@ -695,17 +695,6 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
}
@Override
- public Artifact getArtifact(String guid) {
- Artifact result = null;
- try {
- result = ArtifactQuery.getArtifactFromId(guid, AtsUtilCore.getAtsBranch());
- } catch (ArtifactDoesNotExist ex) {
- // do nothing
- }
- return result;
- }
-
- @Override
public IAtsQueryService getQueryService() {
if (atsQueryService == null) {
atsQueryService = new AtsQueryServiceIimpl(this);
@@ -725,7 +714,7 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
result = getArtifactByGuid(id);
}
if (result == null && Strings.isNumeric(id)) {
- result = (Artifact) getArtifact(Long.valueOf(id));
+ result = getArtifact(Long.valueOf(id));
}
if (result == null) {
result = getArtifactByAtsId(id);
@@ -746,7 +735,7 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
@Override
public Artifact getArtifactByGuid(String guid) throws OseeCoreException {
- return getArtifact(guid);
+ return ArtifactQuery.getArtifactFromId(guid, AtsUtilCore.getAtsBranch());
}
@Override
@@ -821,9 +810,4 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
return ArtifactQuery.getArtifactFromTypeAndNameNoException(artType, name, AtsUtilCore.getAtsBranch());
}
- @Override
- public ArtifactId getArtifact(Long uuid) {
- return ArtifactQuery.getArtifactFromId(uuid, AtsUtilCore.getAtsBranch());
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
index 2fb5a94a60..bbfe1376aa 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
@@ -85,11 +85,11 @@ public class WorkPackageUtilityTest {
assertResult(result, null, false);
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactById("guid")).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(null);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
result = util.getWorkPackageArtifact(services, teamWf);
assertResult(result, workPackageArt, false);
@@ -101,11 +101,11 @@ public class WorkPackageUtilityTest {
@org.junit.Test
public void testGetInsertionActivity() throws Exception {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
- when(services.getArtifactById("guid")).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(null);
Pair<IAtsInsertionActivity, Boolean> result = util.getInsertionActivity(services, teamWf);
assertResult(result, null, false);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(null);
result = util.getInsertionActivity(services, teamWf);
@@ -127,7 +127,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
Pair<IAtsInsertion, Boolean> result = util.getInsertion(services, teamWf);
@@ -149,8 +149,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
- when(factory.getInsertionActivity(activityArt)).thenReturn(null);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,
IAtsInsertion.class)).thenReturn(insertion);
@@ -173,7 +172,7 @@ public class WorkPackageUtilityTest {
when(attributeResolver.getSoleAttributeValue(teamWf, AtsAttributeTypes.WorkPackageGuid, null)).thenReturn("guid");
when(relationResolver.getRelatedOrNull(workPackageArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity)).thenReturn(activityArt);
- when(services.getArtifactById("guid")).thenReturn(workPackageArt);
+ when(services.getArtifactByGuid("guid")).thenReturn(workPackageArt);
when(factory.getInsertionActivity(activityArt)).thenReturn(null);
when(factory.getInsertionActivity(activityArt)).thenReturn(activity);
when(relationResolver.getRelatedOrNull(activity, AtsRelationTypes.InsertionToInsertionActivity_Insertion,
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
index 6c638c808a..dd8f1dc9c4 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java
@@ -99,7 +99,7 @@ public class WorkPackageUtility {
String workPackageGuid =
services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null);
if (Strings.isValid(workPackageGuid)) {
- ArtifactId workPackageArt = services.getArtifactById(workPackageGuid);
+ ArtifactId workPackageArt = services.getArtifactByGuid(workPackageGuid);
if (workPackageArt != null) {
result.setFirst(workPackageArt);
}
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 4514e8eb49..3749f6f18b 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/IAtsServer.java
@@ -35,7 +35,6 @@ import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.core.config.IAtsConfigProvider;
import org.eclipse.osee.ats.core.util.IAtsActionFactory;
-import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.IArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.OrcsApi;
@@ -54,6 +53,7 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa
IAtsWorkDefinitionAdmin getWorkDefAdmin();
+ @Override
ArtifactReadable getArtifactByGuid(String guid);
@Override
@@ -76,9 +76,6 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa
ArtifactReadable getArtifactByAtsId(String id);
- @Override
- ArtifactId getArtifactById(String id);
-
QueryBuilder getQuery();
boolean isProduction();
@@ -97,7 +94,8 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa
IAtsTeamDefinitionService getTeamDefinitionService();
- ArtifactReadable getArtifactByUuid(long uuid);
+ @Override
+ ArtifactReadable getArtifact(Long uuid);
IAgileService getAgileService();
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/BaseConfigEndpointImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/BaseConfigEndpointImpl.java
index ac76b88669..48a5fc8b3e 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/BaseConfigEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/BaseConfigEndpointImpl.java
@@ -71,7 +71,7 @@ public abstract class BaseConfigEndpointImpl<T extends JaxAtsObject> implements
} else if (!Strings.isValid(jaxAtsObject.getName())) {
throw new OseeStateException("Invalid name [%d]");
}
- ArtifactReadable artifact = atsServer.getArtifactByUuid(jaxAtsObject.getUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(jaxAtsObject.getUuid());
if (artifact != null) {
throw new OseeStateException("Artifact with uuid %d already exists", jaxAtsObject.getUuid());
}
@@ -112,7 +112,7 @@ public abstract class BaseConfigEndpointImpl<T extends JaxAtsObject> implements
@Override
@DELETE
public Response delete(@PathParam("uuid") long uuid) throws Exception {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable artifact = atsServer.getArtifact(uuid);
if (artifact == null) {
throw new OseeStateException("Artifact with uuid %d not found", uuid);
}
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 e9eaff2e20..26aaddd963 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
@@ -401,7 +401,7 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
// do nothing
}
if (uuid != null) {
- action = getArtifactByUuid(uuid);
+ action = getArtifact(uuid);
}
if (action == null) {
action = getArtifactByAtsId(id);
@@ -410,7 +410,7 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
}
@Override
- public ArtifactReadable getArtifactByUuid(long uuid) {
+ public ArtifactReadable getArtifact(Long uuid) {
return orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuid(
new Long(uuid).intValue()).getResults().getOneOrNull();
}
@@ -569,11 +569,6 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
}
@Override
- public ArtifactReadable getArtifact(Long uuid) {
- return getArtifactByUuid(uuid);
- }
-
- @Override
public <A extends IAtsConfigObject> A getSoleByUuid(long uuid, Class<A> clazz) throws OseeCoreException {
return getConfig().getSoleByUuid(uuid, clazz);
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileBacklogWriter.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileBacklogWriter.java
index b0e52d1db4..6cfaef6cc5 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileBacklogWriter.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileBacklogWriter.java
@@ -61,7 +61,7 @@ public class AgileBacklogWriter {
// Else validate and relate new team
else {
- ArtifactReadable updateBacklogArt = atsServer.getArtifactByUuid(updatedBacklog.getUuid());
+ ArtifactReadable updateBacklogArt = atsServer.getArtifact(updatedBacklog.getUuid());
IAgileTeam updatedTeam = agileService.getAgileTeam(updatedBacklog.getTeamUuid());
ArtifactReadable updatedTeamArt = (ArtifactReadable) updatedTeam.getStoreObject();
if (!updateBacklogArt.isOfType(AtsArtifactTypes.Goal)) {
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java
index 237ef877d3..5283fe21d1 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java
@@ -51,7 +51,7 @@ public class AgileFactory {
public static IAgileTeam createAgileTeam(Log logger, IAtsServer atsServer, JaxNewAgileTeam newTeam) {
ArtifactReadable userArt = atsServer.getArtifact(atsServer.getUserService().getCurrentUser());
- ArtifactReadable agileTeamArt = atsServer.getArtifactByUuid(newTeam.getUuid());
+ ArtifactReadable agileTeamArt = atsServer.getArtifact(newTeam.getUuid());
if (agileTeamArt == null) {
TransactionBuilder transaction =
@@ -83,7 +83,7 @@ public class AgileFactory {
atsServer.getOrcsApi().getTransactionFactory().createTransaction(AtsUtilCore.getAtsBranch(), userArt,
"Update new Agile Team");
- ArtifactReadable agileTeamArt = atsServer.getArtifactByUuid(team.getUuid());
+ ArtifactReadable agileTeamArt = atsServer.getArtifact(team.getUuid());
if (agileTeamArt == null) {
throw new OseeWebApplicationException(Status.NOT_FOUND, "Agile Team not found with Uuid [%d]", team.getUuid());
}
@@ -103,7 +103,7 @@ public class AgileFactory {
Set<ArtifactReadable> atsTeamArts = new HashSet<>();
for (long atsTeamUuid : team.getAtsTeamUuids()) {
- ArtifactReadable atsTeamArt = atsServer.getArtifactByUuid(atsTeamUuid);
+ ArtifactReadable atsTeamArt = atsServer.getArtifact(atsTeamUuid);
if (atsTeamArt != null && atsTeamArt.isOfType(AtsArtifactTypes.TeamDefinition)) {
atsTeamArts.add(atsTeamArt);
} else {
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java
index fa8abf9322..194fe7230e 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java
@@ -65,7 +65,7 @@ public class AgileItemWriter {
}
if (newItem.isSetSprint()) {
- ArtifactReadable sprintArt = atsServer.getArtifactByUuid(newItem.getSprintUuid());
+ ArtifactReadable sprintArt = atsServer.getArtifact(newItem.getSprintUuid());
IAgileSprint sprint = atsServer.getAgileService().getAgileSprint(sprintArt);
for (ArtifactReadable awa : atsServer.getArtifacts(newItem.getUuids())) {
if (sprint != null) {
@@ -78,7 +78,7 @@ public class AgileItemWriter {
}
if (newItem.isSetBacklog()) {
- ArtifactReadable backlogArt = atsServer.getArtifactByUuid(newItem.getBacklogUuid());
+ ArtifactReadable backlogArt = atsServer.getArtifact(newItem.getBacklogUuid());
IAgileSprint backlog = atsServer.getAgileService().getAgileSprint(backlogArt);
for (ArtifactReadable awa : atsServer.getArtifacts(newItem.getUuids())) {
if (backlog != null) {
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java
index f7b712d098..41f0639736 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java
@@ -67,7 +67,7 @@ public class AgileService implements IAgileService {
@Override
public IAgileTeam getAgileTeam(long uuid) {
IAgileTeam team = null;
- ArtifactReadable teamArt = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable teamArt = atsServer.getArtifact(uuid);
if (teamArt != null) {
team = getAgileTeam(teamArt);
}
@@ -96,7 +96,7 @@ public class AgileService implements IAgileService {
@Override
public void deleteAgileTeam(long uuid) {
- ArtifactReadable team = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable team = atsServer.getArtifact(uuid);
if (!team.isOfType(AtsArtifactTypes.AgileTeam)) {
throw new OseeArgumentException("UUID %d is not a valid Agile Team", uuid);
}
@@ -160,7 +160,7 @@ public class AgileService implements IAgileService {
@Override
public void deleteAgileFeatureGroup(long uuid) {
- ArtifactReadable featureGroup = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable featureGroup = atsServer.getArtifact(uuid);
if (!featureGroup.isOfType(AtsArtifactTypes.AgileFeatureGroup)) {
throw new OseeArgumentException("UUID %d is not a valid Agile Feature Group", uuid);
}
@@ -265,7 +265,7 @@ public class AgileService implements IAgileService {
@Override
public IAgileBacklog getAgileBacklog(long uuid) {
IAgileBacklog backlog = null;
- ArtifactReadable teamArt = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable teamArt = atsServer.getArtifact(uuid);
if (teamArt != null) {
backlog = getAgileBacklog(teamArt);
}
@@ -336,7 +336,7 @@ public class AgileService implements IAgileService {
@Override
public void deleteSprint(long sprintUuid) {
- ArtifactReadable sprint = atsServer.getArtifactByUuid(sprintUuid);
+ ArtifactReadable sprint = atsServer.getArtifact(sprintUuid);
if (sprint != null) {
TransactionBuilder transaction = atsServer.getOrcsApi().getTransactionFactory().createTransaction(
AtsUtilCore.getAtsBranch(), sprint, "Delete Agile Sprint");
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java
index 0864830a4f..39c350ce3d 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsProgramService.java
@@ -110,7 +110,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsProgram getProgram(Long programUuid) {
- return atsServer.getConfigItemFactory().getProgram(atsServer.getArtifactByUuid(programUuid));
+ return atsServer.getConfigItemFactory().getProgram(atsServer.getArtifact(programUuid));
}
@Override
@@ -126,7 +126,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public Collection<IAtsInsertion> getInsertions(IAtsProgram program) {
List<IAtsInsertion> insertions = new ArrayList<>();
- for (ArtifactReadable artifact : atsServer.getArtifactByUuid(program.getUuid()).getRelated(
+ for (ArtifactReadable artifact : atsServer.getArtifact(program.getUuid()).getRelated(
AtsRelationTypes.ProgramToInsertion_Insertion)) {
insertions.add(atsServer.getConfigItemFactory().getInsertion(artifact));
}
@@ -135,13 +135,13 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsInsertion getInsertion(Long insertionUuid) {
- return atsServer.getConfigItemFactory().getInsertion(atsServer.getArtifactByUuid(insertionUuid));
+ return atsServer.getConfigItemFactory().getInsertion(atsServer.getArtifact(insertionUuid));
}
@Override
public Collection<IAtsInsertionActivity> getInsertionActivities(IAtsInsertion insertion) {
List<IAtsInsertionActivity> insertionActivitys = new ArrayList<>();
- for (ArtifactReadable artifact : atsServer.getArtifactByUuid(insertion.getUuid()).getRelated(
+ for (ArtifactReadable artifact : atsServer.getArtifact(insertion.getUuid()).getRelated(
AtsRelationTypes.InsertionToInsertionActivity_InsertionActivity)) {
insertionActivitys.add(atsServer.getConfigItemFactory().getInsertionActivity(artifact));
}
@@ -150,7 +150,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsInsertionActivity getInsertionActivity(Long insertionActivityUuid) {
- return atsServer.getConfigItemFactory().getInsertionActivity(atsServer.getArtifactByUuid(insertionActivityUuid));
+ return atsServer.getConfigItemFactory().getInsertionActivity(atsServer.getArtifact(insertionActivityUuid));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTaskService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTaskService.java
index b037760c5d..88eee934db 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTaskService.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTaskService.java
@@ -58,7 +58,7 @@ public class AtsTaskService extends AbstractAtsTaskService {
}
List<IAtsTask> tasks = new LinkedList<>();
for (JaxAtsTask task : operation.getTasks()) {
- tasks.add(atsServer.getWorkItemFactory().getTask(atsServer.getArtifactByUuid(task.getUuid())));
+ tasks.add(atsServer.getWorkItemFactory().getTask(atsServer.getArtifact(task.getUuid())));
}
return tasks;
}
@@ -77,7 +77,7 @@ public class AtsTaskService extends AbstractAtsTaskService {
}
List<IAtsTask> tasks = new LinkedList<>();
for (JaxAtsTask task : operation.getTasks()) {
- tasks.add(atsServer.getWorkItemFactory().getTask(atsServer.getArtifactByUuid(task.getUuid())));
+ tasks.add(atsServer.getWorkItemFactory().getTask(atsServer.getArtifact(task.getUuid())));
}
return tasks;
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ConfigItemFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ConfigItemFactory.java
index 053c0da176..dcc0b39bba 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ConfigItemFactory.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ConfigItemFactory.java
@@ -273,7 +273,7 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
}
private void deleteConfigObject(long uuid, String comment, IArtifactType type) {
- ArtifactReadable toDelete = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable toDelete = atsServer.getArtifact(uuid);
if (toDelete == null) {
throw new OseeCoreException("No object found for uuid %d", uuid);
}
@@ -308,7 +308,7 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsCountry getCountry(long uuid) {
- return getCountry(atsServer.getArtifactByUuid(uuid));
+ return getCountry(atsServer.getArtifact(uuid));
}
}
diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/workitem/CreateTasksOperation.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/workitem/CreateTasksOperation.java
index 804e18b94a..7be6ffc36c 100644
--- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/workitem/CreateTasksOperation.java
+++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/workitem/CreateTasksOperation.java
@@ -79,7 +79,7 @@ public class CreateTasksOperation {
if (teamWfUuid == null) {
resultData.error("Team Workflow uuid not specified");
}
- ArtifactReadable teamWfArt = atsServer.getArtifactByUuid(teamWfUuid);
+ ArtifactReadable teamWfArt = atsServer.getArtifact(teamWfUuid);
if (teamWfArt == null) {
resultData.errorf("Team Workflow uuid %d does not exist", teamWfUuid);
}
@@ -103,7 +103,7 @@ public class CreateTasksOperation {
for (JaxAtsTask task : newTaskData.getNewTasks()) {
Long taskUuid = task.getUuid();
if (teamWfUuid != null && taskUuid > 0L) {
- ArtifactReadable taskArt = atsServer.getArtifactByUuid(taskUuid);
+ ArtifactReadable taskArt = atsServer.getArtifact(taskUuid);
if (taskArt != null) {
resultData.errorf("Task with uuid %d already exists for %s", taskUuid, task);
}
@@ -270,7 +270,7 @@ public class CreateTasksOperation {
}
public static JaxAtsTask createNewJaxTask(Long uuid, IAtsServer atsServer) {
- ArtifactReadable taskArt = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable taskArt = atsServer.getArtifact(uuid);
if (taskArt != null) {
JaxAtsTask newJaxTask = new JaxAtsTask();
newJaxTask.setName(taskArt.getName());
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
index 056149e6b5..4f156291ee 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
@@ -152,7 +152,7 @@ public class AgileEndpointImpl implements AgileEndpointApi {
@Override
public List<JaxAgileFeatureGroup> getFeatureGroups(long teamUuid) {
List<JaxAgileFeatureGroup> groups = new LinkedList<>();
- ArtifactReadable agileTeamArt = atsServer.getArtifactByUuid(teamUuid);
+ ArtifactReadable agileTeamArt = atsServer.getArtifact(teamUuid);
for (ArtifactReadable child : agileTeamArt.getChildren()) {
if (child.getName().equals(AgileUtil.FEATURE_GROUP_FOLDER_NAME)) {
for (ArtifactReadable subChild : child.getChildren()) {
@@ -327,7 +327,7 @@ public class AgileEndpointImpl implements AgileEndpointApi {
if (uuid == null || uuid <= 0) {
uuid = Lib.generateArtifactIdAsInt();
}
- ArtifactReadable teamArt = atsServer.getArtifactByUuid(newBacklog.getTeamUuid());
+ ArtifactReadable teamArt = atsServer.getArtifact(newBacklog.getTeamUuid());
if (!teamArt.getRelated(AtsRelationTypes.AgileTeamToBacklog_Backlog).isEmpty()) {
new OseeWebApplicationException(Status.BAD_REQUEST, "Backlog already set for team %s",
AtsUtilCore.toStringWithId(teamArt));
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
index b9351d7e35..e7fe014ae9 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java
@@ -230,7 +230,7 @@ public final class AtsConfigEndpointImpl implements AtsConfigEndpointApi {
@Override
public Response storeWorkDef(JaxAtsWorkDef jaxWorkDef) {
TransactionBuilder tx = orcsApi.getTransactionFactory().createTransaction(CoreBranches.COMMON,
- atsServer.getArtifactByUuid(AtsCoreUsers.SYSTEM_USER.getUuid()),
+ atsServer.getArtifact(AtsCoreUsers.SYSTEM_USER.getUuid()),
"Store Work Definition " + jaxWorkDef.getName());
ArtifactReadable workDefArt = orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andIsOfType(
AtsArtifactTypes.WorkDefinition).andNameEquals(jaxWorkDef.getName()).getResults().getAtMostOneOrNull();
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java
index d56a7ba558..5df1f7d1f3 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java
@@ -205,7 +205,7 @@ public class ConfigJsonWriter implements MessageBodyWriter<IAtsConfigObject> {
writer.writeEndObject();
}
writer.writeEndArray();
- ArtifactReadable teamArt = atsServer.getArtifactByUuid(team.getUuid());
+ ArtifactReadable teamArt = atsServer.getArtifact(team.getUuid());
ArtifactReadable backlogArt =
teamArt.getRelated(AtsRelationTypes.AgileTeamToBacklog_Backlog).getAtMostOneOrNull();
writer.writeStringField("Backlog Uuid", (backlogArt != null ? String.valueOf(backlogArt.getUuid()) : ""));
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java
index eb444a2fe8..416df77481 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java
@@ -42,7 +42,7 @@ public class CountryEndpointImpl extends BaseConfigEndpointImpl<JaxCountry> impl
@Override
public Response update(JaxCountry country) throws Exception {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(country.getUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(country.getUuid());
if (artifact == null) {
throw new OseeStateException("Artifact with uuid %d not found", country.getUuid());
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java
index 1f687ec7aa..086b3014b3 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java
@@ -50,7 +50,7 @@ public class InsertionActivityEndpointImpl extends BaseConfigEndpointImpl<JaxIns
@PUT
@Override
public Response update(JaxInsertionActivity activity) throws Exception {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(activity.getUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(activity.getUuid());
if (artifact == null) {
throw new OseeStateException("Artifact with uuid %d not found", activity.getUuid());
}
@@ -85,7 +85,7 @@ public class InsertionActivityEndpointImpl extends BaseConfigEndpointImpl<JaxIns
insertions.add(getConfigObject(art));
}
} else {
- for (ArtifactReadable activityArt : atsServer.getArtifactByUuid(insertionUuid).getRelated(
+ for (ArtifactReadable activityArt : atsServer.getArtifact(insertionUuid).getRelated(
AtsRelationTypes.InsertionToInsertionActivity_InsertionActivity)) {
JaxInsertionActivity activity = getConfigObject(activityArt);
activity.setInsertionUuid(insertionUuid);
@@ -99,7 +99,7 @@ public class InsertionActivityEndpointImpl extends BaseConfigEndpointImpl<JaxIns
protected void create(JaxInsertionActivity jaxInsertionActivity, ArtifactId insertionActivityArtId, IAtsChangeSet changes) {
ArtifactReadable insertionActivityArt = (ArtifactReadable) insertionActivityArtId;
if (insertionActivityArt.getRelatedCount(AtsRelationTypes.InsertionToInsertionActivity_Insertion) == 0) {
- ArtifactReadable insertionArt = atsServer.getArtifactByUuid(jaxInsertionActivity.getInsertionUuid());
+ ArtifactReadable insertionArt = atsServer.getArtifact(jaxInsertionActivity.getInsertionUuid());
changes.relate(insertionArt, AtsRelationTypes.InsertionToInsertionActivity_InsertionActivity,
insertionActivityArt);
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java
index dc7115170a..8f2b81deed 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java
@@ -51,7 +51,7 @@ public class InsertionEndpointImpl extends BaseConfigEndpointImpl<JaxInsertion>
@PUT
@Override
public Response update(JaxInsertion insertion) throws Exception {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(insertion.getUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(insertion.getUuid());
if (artifact == null) {
throw new OseeStateException("Artifact with uuid %d not found", insertion.getUuid());
}
@@ -87,7 +87,7 @@ public class InsertionEndpointImpl extends BaseConfigEndpointImpl<JaxInsertion>
insertions.add(getConfigObject(art));
}
} else {
- for (ArtifactReadable insertionArt : atsServer.getArtifactByUuid(programUuid).getRelated(
+ for (ArtifactReadable insertionArt : atsServer.getArtifact(programUuid).getRelated(
AtsRelationTypes.ProgramToInsertion_Insertion)) {
JaxInsertion insertion = getConfigObject(insertionArt);
insertion.setProgramUuid(programUuid);
@@ -101,7 +101,7 @@ public class InsertionEndpointImpl extends BaseConfigEndpointImpl<JaxInsertion>
protected void create(JaxInsertion jaxInsertion, ArtifactId insertionArtId, IAtsChangeSet changes) {
ArtifactReadable insertionArt = (ArtifactReadable) insertionArtId;
if (insertionArt.getRelatedCount(AtsRelationTypes.ProgramToInsertion_Program) == 0) {
- ArtifactReadable programArt = atsServer.getArtifactByUuid(jaxInsertion.getProgramUuid());
+ ArtifactReadable programArt = atsServer.getArtifact(jaxInsertion.getProgramUuid());
changes.relate(programArt, AtsRelationTypes.ProgramToInsertion_Insertion, insertionArt);
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java
index 788123ba00..646834e683 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java
@@ -51,7 +51,7 @@ public class ProgramEndpointImpl extends BaseConfigEndpointImpl<JaxProgram> impl
@PUT
@Override
public Response update(JaxProgram program) throws Exception {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(program.getUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(program.getUuid());
if (artifact == null) {
throw new OseeStateException("Artifact with uuid %d not found", program.getUuid());
}
@@ -86,7 +86,7 @@ public class ProgramEndpointImpl extends BaseConfigEndpointImpl<JaxProgram> impl
configs.add(getConfigObject(art));
}
} else {
- for (ArtifactReadable art : atsServer.getArtifactByUuid(countryUuid).getRelated(
+ for (ArtifactReadable art : atsServer.getArtifact(countryUuid).getRelated(
AtsRelationTypes.CountryToProgram_Program)) {
JaxProgram program = getConfigObject(art);
program.setCountryUuid(countryUuid);
@@ -100,7 +100,7 @@ public class ProgramEndpointImpl extends BaseConfigEndpointImpl<JaxProgram> impl
protected void create(JaxProgram jaxProgram, ArtifactId programArtId, IAtsChangeSet changes) {
ArtifactReadable programArt = (ArtifactReadable) programArtId;
if (programArt.getRelatedCount(AtsRelationTypes.CountryToProgram_Country) == 0) {
- ArtifactReadable countryArt = atsServer.getArtifactByUuid(jaxProgram.getCountryUuid());
+ ArtifactReadable countryArt = atsServer.getArtifact(jaxProgram.getCountryUuid());
changes.relate(countryArt, AtsRelationTypes.CountryToProgram_Program, programArt);
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java
index 89719e1e7c..b6983d94f2 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java
@@ -62,7 +62,7 @@ public class ProgramResource extends AbstractConfigResource {
@Path("{uuid}/insertion")
@Produces(MediaType.APPLICATION_JSON)
public Response getProgramInsertions(@PathParam("uuid") long uuid) throws Exception {
- ArtifactReadable programArt = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable programArt = atsServer.getArtifact(uuid);
if (programArt == null) {
throw new OseeCoreException("Given uuid not found");
}
@@ -86,7 +86,7 @@ public class ProgramResource extends AbstractConfigResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createInsertion(@PathParam("programUuid") long programUuid, JaxInsertion newInsertion) throws Exception {
- ArtifactReadable programArt = atsServer.getArtifactByUuid(programUuid);
+ ArtifactReadable programArt = atsServer.getArtifact(programUuid);
if (programArt == null) {
throw new OseeCoreException("Given uuid not found");
}
@@ -106,7 +106,7 @@ public class ProgramResource extends AbstractConfigResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response updateInsertion(@PathParam("programUuid") long programUuid, JaxInsertion insertion) {
- ArtifactReadable insertionArt = atsServer.getArtifactByUuid(insertion.getUuid());
+ ArtifactReadable insertionArt = atsServer.getArtifact(insertion.getUuid());
if (insertionArt == null) {
throw new OseeCoreException("Given insertion uuid not found");
}
@@ -127,7 +127,7 @@ public class ProgramResource extends AbstractConfigResource {
@Path("{programUuid}/insertion/{uuid}")
@Produces(MediaType.APPLICATION_JSON)
public Response getInsertionDetails(@PathParam("programUuid") long programUuid, @PathParam("uuid") long uuid) throws Exception {
- ArtifactReadable configArt = atsServer.getArtifactByUuid(uuid);
+ ArtifactReadable configArt = atsServer.getArtifact(uuid);
if (configArt == null) {
throw new OseeCoreException("Given uuid not found");
}
@@ -137,7 +137,7 @@ public class ProgramResource extends AbstractConfigResource {
@DELETE
@Path("{programUuid}/insertion/{insertionUuid}")
public Response deleteInsertion(@PathParam("insertionUuid") long insertionUuid) throws Exception {
- ArtifactReadable insertion = atsServer.getArtifactByUuid(insertionUuid);
+ ArtifactReadable insertion = atsServer.getArtifact(insertionUuid);
if (insertion == null) {
throw new OseeCoreException("Given insertion uuid not found");
}
@@ -149,7 +149,7 @@ public class ProgramResource extends AbstractConfigResource {
@Path("{programUuid}/insertion/{insertionUuid}/activity")
@Produces(MediaType.APPLICATION_JSON)
public Response getInsertionActivitys(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid) throws Exception {
- ArtifactReadable insertion = atsServer.getArtifactByUuid(insertionUuid);
+ ArtifactReadable insertion = atsServer.getArtifact(insertionUuid);
if (insertion == null) {
throw new OseeCoreException("Given insertion uuid not found");
}
@@ -174,7 +174,7 @@ public class ProgramResource extends AbstractConfigResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createInsertionActivity(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid, JaxInsertionActivity newActivity) throws Exception {
- ArtifactReadable insertion = atsServer.getArtifactByUuid(insertionUuid);
+ ArtifactReadable insertion = atsServer.getArtifact(insertionUuid);
if (insertion == null) {
throw new OseeCoreException("Given insertion uuid not found");
}
@@ -194,7 +194,7 @@ public class ProgramResource extends AbstractConfigResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response updateInsertionActivity(@PathParam("programUuid") long programUuid, @PathParam("insertionUuid") long insertionUuid, JaxInsertionActivity newActivity) throws Exception {
- ArtifactReadable insertionActivityArt = atsServer.getArtifactByUuid(newActivity.getUuid());
+ ArtifactReadable insertionActivityArt = atsServer.getArtifact(newActivity.getUuid());
if (insertionActivityArt == null) {
throw new OseeCoreException("Given insertion activity uuid not found");
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java
index e144d0fc18..0153f5cd48 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaDuplicator.java
@@ -44,7 +44,7 @@ public class CpaDuplicator {
public XResultData duplicate() {
XResultData rd = new XResultData(false);
- ArtifactReadable cpaArt = (ArtifactReadable) atsServer.getArtifactById(duplicate.getCpaUuid());
+ ArtifactReadable cpaArt = atsServer.getArtifactByGuid(duplicate.getCpaUuid());
String atsId = cpaArt.getSoleAttributeValue(AtsAttributeTypes.AtsId, null);
String duplicatePcrId = "";
if (!Strings.isValid(atsId)) {
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsRuleEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsRuleEndpointImpl.java
index 7bc603c705..9f34299b7e 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsRuleEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsRuleEndpointImpl.java
@@ -64,7 +64,7 @@ public class AtsRuleEndpointImpl implements AtsRuleEndpointApi {
List<IAtsWorkItem> workItemsCreated = new LinkedList<>();
for (long workflowUuid : runRuleData.getWorkItemUuids()) {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(workflowUuid);
+ ArtifactReadable artifact = atsServer.getArtifact(workflowUuid);
IAtsWorkItem workItem = atsServer.getWorkItemFactory().getWorkItem(artifact);
if (workItem == null) {
throw new OseeArgumentException("Workflow of uuid [%d] does not exist", workflowUuid);
@@ -86,7 +86,7 @@ public class AtsRuleEndpointImpl implements AtsRuleEndpointApi {
@Path("rule")
@Override
public Response addRuleToConfig(AddRuleData setRuleData) {
- ArtifactReadable artifact = atsServer.getArtifactByUuid(setRuleData.getConfigItemUuid());
+ ArtifactReadable artifact = atsServer.getArtifact(setRuleData.getConfigItemUuid());
List<String> ruleList = artifact.getAttributeValues(AtsAttributeTypes.RuleDefinition);
if (!ruleList.contains(setRuleData.getRuleName())) {
IAtsChangeSet changes =
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
index b9377eb49e..e978b64809 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsWorkPackageEndpointImpl.java
@@ -47,7 +47,7 @@ public class AtsWorkPackageEndpointImpl implements AtsWorkPackageEndpointApi {
@Produces({MediaType.APPLICATION_JSON})
@Override
public Collection<IAtsWorkItem> getWorkItems(@PathParam("workPackageId") long workPackageId) {
- ArtifactReadable workPackageArt = atsServer.getArtifactByUuid(workPackageId);
+ ArtifactReadable workPackageArt = atsServer.getArtifact(workPackageId);
if (workPackageArt == null) {
throw new OseeArgumentException("Work Package with id [%s] Not Found", workPackageId);
}
@@ -60,7 +60,7 @@ public class AtsWorkPackageEndpointImpl implements AtsWorkPackageEndpointApi {
@Consumes({MediaType.APPLICATION_JSON})
@Override
public Response setWorkPackage(@PathParam("workPackageId") long workPackageId, JaxWorkPackageData workPackageData) {
- ArtifactReadable workPackageArt = atsServer.getArtifactByUuid(workPackageId);
+ ArtifactReadable workPackageArt = atsServer.getArtifact(workPackageId);
if (workPackageArt == null) {
throw new OseeArgumentException("Work Package with id [%s] Not Found", workPackageId);
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java
index 99491d0e04..0e1a4fe875 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/StateResource.java
@@ -83,7 +83,12 @@ public final class StateResource {
}
if (operation.equals("transition")) {
- ArtifactId action = atsServer.getArtifactById(id);
+ ArtifactId action = null;
+ try {
+ action = atsServer.getArtifactById(id);
+ } catch (Exception ex) {
+ // do nothing
+ }
if (action == null) {
return RestUtil.returnBadRequest(String.format("Action by id [%s] does not exist", id));
}
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUpdateArtifact.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUpdateArtifact.java
index 8b07afc044..984b73416f 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUpdateArtifact.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUpdateArtifact.java
@@ -230,7 +230,7 @@ public class WordUpdateArtifact {
Conditions.checkNotNull(workflowArt, "work flow artifact");
IAtsTeamWorkflow safetyWorkflow = null;
ArtifactReadable safetyActionableItemArt =
- atsServer.getArtifactByUuid(AtsArtifactToken.SafetyActionableItem.getUuid());
+ atsServer.getArtifact(AtsArtifactToken.SafetyActionableItem.getUuid());
IAtsTeamWorkflow teamWf = atsServer.getWorkItemFactory().getTeamWf(workflowArt);
IAtsActionableItem actionableItem = atsServer.getConfigItemFactory().getActionableItem(safetyActionableItemArt);
for (IAtsTeamWorkflow sibling : atsServer.getActionFactory().getSiblingTeamWorkflows(teamWf)) {

Back to the top