Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-09-15 19:42:14 -0400
committerAngel Avila2016-10-04 21:35:07 -0400
commit691ec0169380f98a8e740749c1e254743e94869c (patch)
treecfa6627a74755ce21bd2fc0390f3afd884ae6979
parent45c3ca2cb29ba0bbc80eea6921d2047216389603 (diff)
downloadorg.eclipse.osee-691ec0169380f98a8e740749c1e254743e94869c.tar.gz
org.eclipse.osee-691ec0169380f98a8e740749c1e254743e94869c.tar.xz
org.eclipse.osee-691ec0169380f98a8e740749c1e254743e94869c.zip
refactor: Move getName from ArtifactId to ArtifactToken
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java6
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ev/IAtsEarnedValueService.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/IUserArtLoader.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java8
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsConfigurationsService.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java60
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItemFactory.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinitionFactory.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/VersionFactory.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/WorkItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImplTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/TypeColumn.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItem.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Program.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Version.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/Insertion.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/InsertionActivity.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/WorkPackage.java15
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java12
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ArtifactValueProvider.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java9
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java12
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest.test/src/org/eclipse/osee/ats/rest/internal/notify/WorkItemNotificationProcessorTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java9
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java9
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java7
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ConfigItemFactory.java8
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/model/WorkItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactId.java16
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java7
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java22
-rw-r--r--plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java38
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java7
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java22
58 files changed, 230 insertions, 232 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
index 3ca47f0abe2..57ec35dc1d5 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsObject.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.api;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.HasDescription;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.Named;
@@ -24,11 +24,11 @@ public interface IAtsObject extends Named, Id, HasDescription {
return String.format("[%s][%s]", getName(), getId());
}
- default ArtifactId getStoreObject() {
+ default ArtifactToken getStoreObject() {
return null;
}
- default void setStoreObject(ArtifactId artifact) {
+ default void setStoreObject(ArtifactToken artifact) {
// do nothing
}
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 15464211bf3..e77a0038522 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
@@ -89,7 +89,7 @@ public interface IAtsServices extends IAtsConfigurationProvider, IWorkDefinition
IAtsWorkItemFactory getWorkItemFactory();
- ArtifactId getArtifactById(String id);
+ ArtifactToken getArtifactById(String id);
IAtsConfigItemFactory getConfigItemFactory();
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ev/IAtsEarnedValueService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ev/IAtsEarnedValueService.java
index 73af8a54fe0..5b4f544d59e 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ev/IAtsEarnedValueService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ev/IAtsEarnedValueService.java
@@ -15,7 +15,7 @@ import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity;
import org.eclipse.osee.ats.api.workdef.IStateToken;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -33,7 +33,7 @@ public interface IAtsEarnedValueService {
public void removeWorkPackage(IAtsWorkPackage workPackage, Collection<IAtsWorkItem> workItems);
- public IAtsWorkPackage getWorkPackage(ArtifactId artifact);
+ public IAtsWorkPackage getWorkPackage(ArtifactToken artifact);
public Collection<String> getColorTeams();
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/IUserArtLoader.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/IUserArtLoader.java
index b0cae41b3d9..079f83c912d 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/IUserArtLoader.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/IUserArtLoader.java
@@ -10,13 +10,13 @@
*******************************************************************************/
package org.eclipse.osee.ats.api.user;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
/**
* @author Donald G. Dunne
*/
public interface IUserArtLoader {
- public ArtifactId loadUser(IAtsUser user);
+ public ArtifactToken loadUser(IAtsUser user);
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
index c8114d41901..9e5f0b521e1 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUser.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.api.user;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.eclipse.osee.ats.api.config.JaxAtsObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
/**
* @author Donald G. Dunne
@@ -23,7 +23,7 @@ public class JaxAtsUser extends JaxAtsObject implements IAtsUser {
private String userId;
private String email;
- private ArtifactId storeObject;
+ private ArtifactToken storeObject;
private IUserArtLoader userArtLoader;
@Override
@@ -51,7 +51,7 @@ public class JaxAtsUser extends JaxAtsObject implements IAtsUser {
@Override
@JsonIgnore
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
if (storeObject == null && userArtLoader != null) {
storeObject = userArtLoader.loadUser(this);
}
@@ -59,7 +59,7 @@ public class JaxAtsUser extends JaxAtsObject implements IAtsUser {
}
@Override
- public void setStoreObject(ArtifactId artifact) {
+ public void setStoreObject(ArtifactToken artifact) {
this.storeObject = artifact;
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
index 01c7e40b60b..fe114e76a77 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
@@ -72,9 +72,9 @@ public interface IAtsChangeSet {
void deleteAttributes(IAtsObject atsObject, IAttributeType attributeType);
- ArtifactId createArtifact(IArtifactType artifactType, String name, String guid);
+ ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid);
- ArtifactId createArtifact(IArtifactType artifactType, String name, String guid, Long uuid);
+ ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, Long uuid);
void relate(Object object1, IRelationTypeSide relationSide, Object object2);
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 3b718af7753..08f1feb7692 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
@@ -28,8 +28,6 @@ public interface IAtsStoreService {
boolean isDeleted(IAtsObject atsObject);
- String getTypeName(ArtifactId artifact);
-
String getGuid(IAtsObject atsObject);
boolean isAttributeTypeValid(IAtsObject atsObject, IAttributeType attributeType);
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
index 39438afdb70..def25072634 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
@@ -15,6 +15,7 @@ import java.util.List;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -23,7 +24,7 @@ import org.eclipse.osee.framework.core.enums.DeletionFlag;
*/
public interface IRelationResolver {
- Collection<ArtifactId> getRelated(ArtifactId artifact, IRelationTypeSide relationType);
+ Collection<ArtifactToken> getRelated(ArtifactId artifact, IRelationTypeSide relationType);
<T extends IAtsObject> Collection<T> getRelated(IAtsObject atsObject, IRelationTypeSide relationType, Class<T> clazz);
@@ -43,6 +44,6 @@ public interface IRelationResolver {
List<ArtifactId> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide);
- Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide);
+ Collection<ArtifactToken> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java
index ba7d2d039d8..2796b5c1ce8 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java
@@ -23,9 +23,8 @@ import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -81,7 +80,7 @@ public class ActionArtifact extends Artifact implements IAtsAction {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return this;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java
index e0b0311f940..e8b35602657 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AbstractAtsArtifact.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.ats.core.client.artifact;
import org.eclipse.osee.ats.api.IAtsObject;
-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.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -31,7 +31,7 @@ public abstract class AbstractAtsArtifact extends Artifact implements IAtsObject
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return this;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsConfigurationsService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsConfigurationsService.java
index b83bcc52ca6..5eb772960a9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsConfigurationsService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsConfigurationsService.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.core.client.internal;
+import com.google.common.base.Supplier;
+import com.google.common.base.Suppliers;
import java.util.concurrent.TimeUnit;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.api.config.IAtsConfigurationProvider;
@@ -17,12 +19,10 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IUserArtLoader;
import org.eclipse.osee.ats.api.user.JaxAtsUser;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
/**
* @author Donald G. Dunne
@@ -67,8 +67,8 @@ public class AtsConfigurationsService implements IAtsConfigurationProvider {
private class UserArtLoader implements IUserArtLoader {
@Override
- public ArtifactId loadUser(IAtsUser user) {
- ArtifactId userArt = null;
+ public ArtifactToken loadUser(IAtsUser user) {
+ ArtifactToken userArt = null;
try {
userArt = UserManager.getUserByArtId(user.getId().intValue());
if (userArt == null) {
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 cde0d646289..82b5ea41ba3 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
@@ -84,11 +84,6 @@ public class AtsStoreService implements IAtsStoreService {
return ((Artifact) atsObject.getStoreObject()).getGuid();
}
- @Override
- public String getTypeName(ArtifactId artifact) {
- return ((Artifact) artifact).getArtifactTypeName();
- }
-
/**
* Uses artifact type inheritance to retrieve all TeamWorkflow artifact types
*/
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
index e38e7806fd0..d95916b3d0f 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ConfigItemFactory.java
@@ -83,8 +83,8 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
} else if (artifact.isOfType(AtsArtifactTypes.WorkPackage)) {
configObject = getWorkPackage(artifact);
} else {
- throw new OseeArgumentException("Unhandled artifact type %s for %s", ((Artifact) art).getArtifactTypeName(),
- art.toStringWithId());
+ throw new OseeArgumentException("Unhandled artifact type %s for %s", artifact.getArtifactTypeName(),
+ artifact.toStringWithId());
}
}
return configObject;
@@ -93,8 +93,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsWorkPackage getWorkPackage(ArtifactId artifact) {
IAtsWorkPackage workPackage = null;
- if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.WorkPackage)) {
- workPackage = new WorkPackage(logger, artifact, atsClient.getServices());
+ if (artifact instanceof Artifact) {
+ Artifact art = (Artifact) artifact;
+ if (art.isOfType(AtsArtifactTypes.WorkPackage)) {
+ workPackage = new WorkPackage(logger, art, atsClient.getServices());
+ }
}
return workPackage;
}
@@ -102,8 +105,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsVersion getVersion(ArtifactId artifact) {
IAtsVersion version = null;
- if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.Version)) {
- version = new Version(logger, atsClient, artifact);
+ if (artifact instanceof Artifact) {
+ Artifact art = (Artifact) artifact;
+ if (art.isOfType(AtsArtifactTypes.Version)) {
+ version = new Version(logger, atsClient, art);
+ }
}
return version;
}
@@ -111,8 +117,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsTeamDefinition getTeamDef(ArtifactId artifact) throws OseeCoreException {
IAtsTeamDefinition teamDef = null;
- if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.TeamDefinition)) {
- teamDef = new TeamDefinition(logger, atsClient, artifact);
+ if (artifact instanceof Artifact) {
+ Artifact art = (Artifact) artifact;
+ if (art.isOfType(AtsArtifactTypes.TeamDefinition)) {
+ teamDef = new TeamDefinition(logger, atsClient, art);
+ }
}
return teamDef;
}
@@ -120,8 +129,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsActionableItem getActionableItem(ArtifactId artifact) throws OseeCoreException {
IAtsActionableItem ai = null;
- if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.ActionableItem)) {
- ai = new ActionableItem(logger, atsClient, artifact);
+ if (artifact instanceof Artifact) {
+ Artifact art = (Artifact) artifact;
+ if (art.isOfType(AtsArtifactTypes.ActionableItem)) {
+ ai = new ActionableItem(logger, atsClient, art);
+ }
}
return ai;
}
@@ -131,8 +143,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
IAtsProgram program = null;
if (object instanceof IAtsProgram) {
program = (IAtsProgram) object;
- } else if (object instanceof Artifact && ((Artifact) object).isOfType(AtsArtifactTypes.Program)) {
- program = new Program(logger, atsClient.getServices(), object);
+ } else if (object instanceof Artifact) {
+ Artifact art = (Artifact) object;
+ if (art.isOfType(AtsArtifactTypes.Program)) {
+ program = new Program(logger, atsClient.getServices(), art);
+ }
}
return program;
}
@@ -164,8 +179,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
IAtsInsertion result = null;
if (artifact instanceof IAtsInsertion) {
result = (IAtsInsertion) artifact;
- } else if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.Insertion)) {
- result = new Insertion(logger, atsClient.getServices(), artifact);
+ } else if (artifact instanceof Artifact) {
+ Artifact art = ((Artifact) artifact);
+ if (art.isOfType(AtsArtifactTypes.Insertion)) {
+ result = new Insertion(logger, atsClient.getServices(), art);
+ }
}
return result;
}
@@ -175,8 +193,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
IAtsInsertionActivity result = null;
if (artifact instanceof IAtsInsertionActivity) {
result = (IAtsInsertionActivity) artifact;
- } else if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.InsertionActivity)) {
- result = new InsertionActivity(logger, atsClient.getServices(), artifact);
+ } else if (artifact instanceof Artifact) {
+ Artifact art = ((Artifact) artifact);
+ if (art.isOfType(AtsArtifactTypes.InsertionActivity)) {
+ result = new InsertionActivity(logger, atsClient.getServices(), art);
+ }
}
return result;
}
@@ -221,8 +242,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
IAtsCountry country = null;
if (artifact instanceof IAtsCountry) {
country = (IAtsCountry) artifact;
- } else if (artifact instanceof Artifact && ((Artifact) artifact).isOfType(AtsArtifactTypes.Country)) {
- country = new Country(logger, atsClient.getServices(), artifact);
+ } else if (artifact instanceof Artifact) {
+ Artifact art = ((Artifact) artifact);
+ if (art.isOfType(AtsArtifactTypes.Country)) {
+ country = new Country(logger, atsClient.getServices(), art);
+ }
}
return country;
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItemFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItemFactory.java
index ccb00da8a51..5a22aa21048 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItemFactory.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItemFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.config.ActionableItem;
import org.eclipse.osee.ats.core.config.IActionableItemFactory;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.util.GUID;
/**
@@ -30,7 +30,7 @@ public class ActionableItemFactory implements IActionableItemFactory {
if (guid == null) {
throw new IllegalArgumentException("guid can not be null");
}
- ArtifactId artifact = changes.createArtifact(AtsArtifactTypes.ActionableItem, name, guid, uuid);
+ ArtifactToken artifact = changes.createArtifact(AtsArtifactTypes.ActionableItem, name, guid, uuid);
return new ActionableItem(services.getLogger(), services, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java
index 54a7ec63849..317c721bafb 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.core.client.IAtsClient;
import org.eclipse.osee.ats.core.client.internal.Activator;
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.IAttributeType;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -121,7 +121,7 @@ public abstract class AtsConfigObject extends AtsObject implements IAtsConfigObj
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return artifact != null ? artifact : super.getStoreObject();
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinitionFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinitionFactory.java
index c7b0851c480..b4c4b63df1e 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinitionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinitionFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.config.ITeamDefinitionFactory;
import org.eclipse.osee.ats.core.config.TeamDefinition;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.util.GUID;
/**
@@ -30,7 +30,7 @@ public class TeamDefinitionFactory implements ITeamDefinitionFactory {
if (guid == null) {
throw new IllegalArgumentException("guid can not be null");
}
- ArtifactId artifact = changes.createArtifact(AtsArtifactTypes.TeamDefinition, name, guid, uuid);
+ ArtifactToken artifact = changes.createArtifact(AtsArtifactTypes.TeamDefinition, name, guid, uuid);
return new TeamDefinition(services.getLogger(), services, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/VersionFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/VersionFactory.java
index b7b1d787945..d9467cc1b94 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/VersionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/VersionFactory.java
@@ -17,7 +17,7 @@ import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.api.version.IVersionFactory;
import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.config.Version;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.util.GUID;
/**
@@ -32,7 +32,7 @@ public class VersionFactory implements IVersionFactory {
@Override
public IAtsVersion createVersion(String name, String guid, long uuid, IAtsChangeSet changes, IAtsServices services) {
- ArtifactId artifact = changes.createArtifact(AtsArtifactTypes.Version, name, guid, uuid);
+ ArtifactToken artifact = changes.createArtifact(AtsArtifactTypes.Version, name, guid, uuid);
return new Version(services.getLogger(), services, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
index 04459e5e6e0..ac27aa063b5 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUser.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.ats.core.client.internal.user;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
@@ -101,12 +101,12 @@ public class AtsUser implements IAtsUser {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return user;
}
@Override
- public void setStoreObject(ArtifactId artifact) {
+ public void setStoreObject(ArtifactToken artifact) {
if (artifact instanceof User) {
this.user = (User) artifact;
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
index e685dfbd3de..b11b59e5dec 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.workdef.IRelationResolver;
import org.eclipse.osee.ats.core.client.IAtsClient;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
@@ -37,8 +38,8 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public Collection<ArtifactId> getRelated(ArtifactId artifact, IRelationTypeSide relationType) {
- List<ArtifactId> results = new ArrayList<>();
+ public Collection<ArtifactToken> getRelated(ArtifactId artifact, IRelationTypeSide relationType) {
+ List<ArtifactToken> results = new ArrayList<>();
Artifact useArt = getArtifact(artifact);
if (useArt != null) {
for (Artifact art : useArt.getRelatedArtifacts(relationType)) {
@@ -177,7 +178,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
+ public Collection<ArtifactToken> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
return getRelated(atsObject.getStoreObject(), relationTypeSide);
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/WorkItem.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/WorkItem.java
index 75c593fca6c..d15e6a0f75f 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/WorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/WorkItem.java
@@ -35,7 +35,7 @@ import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.model.impl.AtsObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -218,7 +218,7 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return artifact;
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java
index 2047288447a..473a7990aba 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java
@@ -33,6 +33,7 @@ import org.eclipse.osee.ats.core.util.AtsRelationChange;
import org.eclipse.osee.ats.core.util.AtsRelationChange.RelationOperation;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
@@ -265,12 +266,12 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid) {
return createArtifact(artifactType, name, guid, Lib.generateArtifactIdAsInt());
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid, Long uuid) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, Long uuid) {
Artifact artifact = ArtifactTypeManager.addArtifact(artifactType, AtsUtilCore.getAtsBranch(), name, guid, uuid);
add(artifact);
return artifact;
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
index 7373533ce75..524c35464f4 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ColorTeamColumnTest.java
@@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.IAtsAction;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.junit.Before;
@@ -44,7 +44,7 @@ public class ColorTeamColumnTest {
@Mock private IAtsServices atsServices;
@Mock private IAttributeResolver attributeResolver;
- @Mock private ArtifactId workPackageArt;
+ @Mock private ArtifactToken workPackageArt;
// @formatter:on
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImplTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImplTest.java
index 6bd8926ee4a..c6701284590 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImplTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsCoreServiceImplTest.java
@@ -15,7 +15,7 @@ import static org.mockito.Mockito.when;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@@ -29,7 +29,6 @@ import org.mockito.MockitoAnnotations;
public class AtsCoreServiceImplTest {
// @formatter:off
- @Mock private ArtifactId artifact;
@Mock private IAtsObject atsObject;
@Mock private IAttributeResolver attrResolver;
// @formatter:on
@@ -41,8 +40,8 @@ public class AtsCoreServiceImplTest {
@Test
public void testGetAtsId() {
+ ArtifactToken artifact = ArtifactToken.valueOf(0, "guid", null, null, null);
when(attrResolver.getSoleAttributeValue(artifact, AtsAttributeTypes.AtsId, null)).thenReturn(null);
- when(artifact.getGuid()).thenReturn("guid");
String result = AtsCoreServiceImpl.getAtsId(attrResolver, artifact);
assertEquals(result, "guid");
@@ -58,5 +57,4 @@ public class AtsCoreServiceImplTest {
when(attrResolver.getSoleAttributeValue(artifact, AtsAttributeTypes.AtsId, null)).thenReturn("ATS23");
assertEquals(result, "ATS23");
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
index e1e47c90eaf..88ba56fb368 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
@@ -54,7 +54,7 @@ public class ActionableItemManager implements IAtsActionableItemService {
if (aia == null) {
OseeLog.logf(ActionableItemManager.class, Level.SEVERE,
"Actionable Item Guid [%s] from [%s] doesn't match item in AtsConfigCache", guid,
- AtsUtilCore.toStringWithId(atsObject));
+ atsObject.toStringWithId());
} else {
ais.add(aia);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/TypeColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/TypeColumn.java
index 62b9376c577..6dfb19a4190 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/TypeColumn.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/TypeColumn.java
@@ -29,10 +29,9 @@ public class TypeColumn extends AbstractServicesColumn {
if (atsObject instanceof IAtsTeamWorkflow) {
return ((IAtsTeamWorkflow) atsObject).getTeamDefinition().getName() + " Workflow";
} else {
- return services.getStoreService().getTypeName(atsObject.getStoreObject());
+ return atsObject.getStoreObject().getArtifactType().getName();
}
}
return "(Deleted)";
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItem.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItem.java
index 0cfea840d80..426d25a6217 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItem.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItem.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.logger.Log;
@@ -30,7 +31,7 @@ import org.eclipse.osee.logger.Log;
*/
public class ActionableItem extends AtsConfigObject implements IAtsActionableItem {
- public ActionableItem(Log logger, IAtsServices services, ArtifactId artifact) {
+ public ActionableItem(Log logger, IAtsServices services, ArtifactToken artifact) {
super(logger, services, artifact);
}
@@ -53,7 +54,7 @@ public class ActionableItem extends AtsConfigObject implements IAtsActionableIte
public IAtsActionableItem getParentActionableItem() {
IAtsActionableItem parent = null;
try {
- Collection<ArtifactId> related =
+ Collection<ArtifactToken> related =
services.getRelationResolver().getRelated(artifact, CoreRelationTypes.Default_Hierarchical__Parent);
if (!related.isEmpty()) {
parent = services.getConfigItemFactory().getActionableItem(related.iterator().next());
@@ -68,7 +69,7 @@ public class ActionableItem extends AtsConfigObject implements IAtsActionableIte
public IAtsTeamDefinition getTeamDefinition() {
IAtsTeamDefinition teamDef = null;
try {
- Collection<ArtifactId> related =
+ Collection<ArtifactToken> related =
services.getRelationResolver().getRelated(artifact, AtsRelationTypes.TeamActionableItem_Team);
if (!related.isEmpty()) {
teamDef = services.getConfigItemFactory().getTeamDef(related.iterator().next());
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java
index fd9b71d4e9b..9c1820e3ebf 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Country.java
@@ -14,7 +14,7 @@ import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.country.IAtsCountry;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.logger.Log;
/**
@@ -22,7 +22,7 @@ import org.eclipse.osee.logger.Log;
*/
public class Country extends AtsConfigObject implements IAtsCountry {
- public Country(Log logger, IAtsServices services, ArtifactId artifact) {
+ public Country(Log logger, IAtsServices services, ArtifactToken artifact) {
super(logger, services, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Program.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Program.java
index c283e7b5e35..bf550fa619f 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Program.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Program.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.core.config;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.logger.Log;
/**
@@ -21,7 +21,7 @@ import org.eclipse.osee.logger.Log;
*/
public class Program extends AtsConfigObject implements IAtsProgram {
- public Program(Log logger, IAtsServices services, ArtifactId artifact) {
+ public Program(Log logger, IAtsServices services, ArtifactToken artifact) {
super(logger, services, artifact);
}
@@ -34,5 +34,4 @@ public class Program extends AtsConfigObject implements IAtsProgram {
public Long getId() {
return artifact.getId();
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java
index c6b447baa29..525a29f30c4 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.ats.api.version.VersionLockedType;
import org.eclipse.osee.ats.api.version.VersionReleaseType;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -37,7 +38,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio
private final IAtsServices services;
- public TeamDefinition(Log logger, IAtsServices services, ArtifactId artifact) {
+ public TeamDefinition(Log logger, IAtsServices services, ArtifactToken artifact) {
super(logger, services, artifact);
this.services = services;
}
@@ -66,7 +67,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio
public IAtsTeamDefinition getParentTeamDef() {
IAtsTeamDefinition parent = null;
try {
- Collection<ArtifactId> related =
+ Collection<ArtifactToken> related =
services.getRelationResolver().getRelated(artifact, CoreRelationTypes.Default_Hierarchical__Parent);
if (!related.isEmpty()) {
parent = services.getConfigItemFactory().getTeamDef(related.iterator().next());
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Version.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Version.java
index 820b4acf48c..bab2fb93e81 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Version.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Version.java
@@ -18,7 +18,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -30,7 +30,7 @@ import org.eclipse.osee.logger.Log;
*/
public class Version extends AtsConfigObject implements IAtsVersion {
- public Version(Log logger, IAtsServices services, ArtifactId artifact) {
+ public Version(Log logger, IAtsServices services, ArtifactToken artifact) {
super(logger, services, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/Insertion.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/Insertion.java
index 997c5bf4a94..1dd4b7c3360 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/Insertion.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/Insertion.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.core.insertion;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.insertion.IAtsInsertion;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.logger.Log;
/**
@@ -23,7 +23,7 @@ public class Insertion extends AtsConfigObject implements IAtsInsertion {
private long programUuid;
- public Insertion(Log logger, IAtsServices atsServices, ArtifactId artifact) {
+ public Insertion(Log logger, IAtsServices atsServices, ArtifactToken artifact) {
super(logger, atsServices, artifact);
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/InsertionActivity.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/InsertionActivity.java
index a1fbe8fcde1..a1e1bde6626 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/InsertionActivity.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/insertion/InsertionActivity.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.core.insertion;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.insertion.IAtsInsertionActivity;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.logger.Log;
/**
@@ -23,7 +23,7 @@ public class InsertionActivity extends AtsConfigObject implements IAtsInsertionA
private long insertionUuid;
- public InsertionActivity(Log logger, IAtsServices atsServer, ArtifactId artifact) {
+ public InsertionActivity(Log logger, IAtsServices atsServer, ArtifactToken artifact) {
super(logger, atsServer, artifact);
}
@@ -40,5 +40,4 @@ public class InsertionActivity extends AtsConfigObject implements IAtsInsertionA
public void setInsertionUuid(long insertionUuid) {
this.insertionUuid = insertionUuid;
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/WorkPackage.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/WorkPackage.java
index f56f6ca5880..def7325db99 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/WorkPackage.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/WorkPackage.java
@@ -16,7 +16,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.ev.AtsWorkPackageType;
import org.eclipse.osee.ats.api.ev.IAtsWorkPackage;
import org.eclipse.osee.ats.core.model.impl.AtsConfigObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -31,10 +31,10 @@ import org.eclipse.osee.logger.Log;
*/
public class WorkPackage extends AtsConfigObject implements IAtsWorkPackage {
- private ArtifactId artifact;
+ private ArtifactToken artifact;
private final IAtsServices services;
- public WorkPackage(Log logger, ArtifactId artifact, IAtsServices services) {
+ public WorkPackage(Log logger, ArtifactToken artifact, IAtsServices services) {
super(logger, services, artifact);
this.artifact = artifact;
this.services = services;
@@ -163,12 +163,12 @@ public class WorkPackage extends AtsConfigObject implements IAtsWorkPackage {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return artifact;
}
@Override
- public void setStoreObject(ArtifactId artifact) {
+ public void setStoreObject(ArtifactToken artifact) {
this.artifact = artifact;
}
@@ -179,7 +179,6 @@ public class WorkPackage extends AtsConfigObject implements IAtsWorkPackage {
@Override
public String getTypeName() {
- return services.getStoreService().getTypeName(artifact);
+ return artifact.getArtifactType().getName();
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java
index 1543e3379ad..59e6ac380c5 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -30,11 +31,11 @@ import org.eclipse.osee.logger.Log;
* @author Donald G Dunne
*/
public abstract class AtsConfigObject extends org.eclipse.osee.ats.core.model.impl.AtsObject implements IAtsConfigObject {
- protected final ArtifactId artifact;
+ protected final ArtifactToken artifact;
protected final Log logger;
protected final IAtsServices services;
- public AtsConfigObject(Log logger, IAtsServices services, ArtifactId artifact) {
+ public AtsConfigObject(Log logger, IAtsServices services, ArtifactToken artifact) {
super(artifact.getName(), artifact.getId());
this.logger = logger;
this.services = services;
@@ -118,7 +119,7 @@ public abstract class AtsConfigObject extends org.eclipse.osee.ats.core.model.im
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return artifact != null ? artifact : super.getStoreObject();
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
index ebb8e4522e8..c8017846ff5 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsObject.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.ats.core.model.impl;
import org.eclipse.osee.ats.api.IAtsObject;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.NamedId;
/**
@@ -20,10 +20,10 @@ import org.eclipse.osee.framework.jdk.core.type.NamedId;
public class AtsObject extends NamedId implements IAtsObject {
private String desc;
- private ArtifactId object;
+ private ArtifactToken object;
- public AtsObject(String name, long uuid) {
- super(uuid, name);
+ public AtsObject(String name, long id) {
+ super(id, name);
}
@Override
@@ -36,12 +36,12 @@ public class AtsObject extends NamedId implements IAtsObject {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return object;
}
@Override
- public void setStoreObject(ArtifactId artifact) {
+ public void setStoreObject(ArtifactToken artifact) {
this.object = artifact;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
index c59603684a9..53a08ea99b6 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/program/AtsProgramService.java
@@ -41,6 +41,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.WorkItemType;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -82,7 +83,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsInsertionActivity getInsertionActivity(IAtsWorkPackage workPackage) {
ArtifactId wpArt = services.getArtifact(workPackage.getId());
- Collection<ArtifactId> related = services.getRelationResolver().getRelated(wpArt,
+ Collection<ArtifactToken> related = services.getRelationResolver().getRelated(wpArt,
AtsRelationTypes.InsertionActivityToWorkPackage_InsertionActivity);
if (related.size() > 0) {
return services.getConfigItemFactory().getInsertionActivity(related.iterator().next());
@@ -92,7 +93,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsInsertion getInsertion(IAtsInsertionActivity activity) {
- Collection<ArtifactId> related = services.getRelationResolver().getRelated(activity.getStoreObject(),
+ Collection<ArtifactToken> related = services.getRelationResolver().getRelated(activity.getStoreObject(),
AtsRelationTypes.InsertionToInsertionActivity_Insertion);
if (related.size() > 0) {
return services.getConfigItemFactory().getInsertion(related.iterator().next());
@@ -102,7 +103,7 @@ public class AtsProgramService implements IAtsProgramService {
@Override
public IAtsProgram getProgram(IAtsInsertion insertion) {
- Collection<ArtifactId> related = services.getRelationResolver().getRelated(insertion.getStoreObject(),
+ Collection<ArtifactToken> related = services.getRelationResolver().getRelated(insertion.getStoreObject(),
AtsRelationTypes.ProgramToInsertion_Program);
if (related.size() > 0) {
return services.getConfigItemFactory().getProgram(related.iterator().next());
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ArtifactValueProvider.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ArtifactValueProvider.java
index 8cf9557de73..3e3b356899b 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ArtifactValueProvider.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ArtifactValueProvider.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.util.IValueProvider;
import org.eclipse.osee.ats.api.workdef.IAtsWidgetDefinition;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -26,18 +27,18 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
*/
public class ArtifactValueProvider implements IValueProvider {
- private final ArtifactId artifact;
+ private final ArtifactToken artifact;
private final String attributeTypeName;
private final IAtsServices services;
private IAttributeType attributeType;
- public ArtifactValueProvider(ArtifactId artifact, IAtsWidgetDefinition widgetDef, IAtsServices services) {
+ public ArtifactValueProvider(ArtifactToken artifact, IAtsWidgetDefinition widgetDef, IAtsServices services) {
this.artifact = artifact;
this.services = services;
this.attributeTypeName = widgetDef.getAtrributeName();
}
- public ArtifactValueProvider(ArtifactId artifact, IAttributeType attributeType, IAtsServices services) {
+ public ArtifactValueProvider(ArtifactToken artifact, IAttributeType attributeType, IAtsServices services) {
this.artifact = artifact;
this.services = services;
this.attributeTypeName = attributeType.getName();
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
index a2fe2644e21..e3c117205e8 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.core.model.WorkPackage;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -59,7 +60,7 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi
WorkPackage wpa = null;
String workPackageGuid = getWorkPackageId(workItem);
if (Strings.isValid(workPackageGuid)) {
- ArtifactId workPkgArt = services.getArtifactById(workPackageGuid);
+ ArtifactToken workPkgArt = services.getArtifactById(workPackageGuid);
wpa = new WorkPackage(logger, workPkgArt, services);
}
return wpa;
@@ -78,7 +79,7 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi
IAtsConfigObject configObj = (IAtsConfigObject) object;
ArtifactId artifact = services.getArtifact(configObj);
if (artifact != null) {
- for (ArtifactId workPackageArt : services.getRelationResolver().getRelated(artifact,
+ for (ArtifactToken workPackageArt : services.getRelationResolver().getRelated(artifact,
AtsRelationTypes.WorkPackage_WorkPackage)) {
workPackageOptions.add(new WorkPackage(logger, workPackageArt, services));
}
@@ -115,14 +116,14 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi
}
@Override
- public IAtsWorkPackage getWorkPackage(ArtifactId artifact) {
+ public IAtsWorkPackage getWorkPackage(ArtifactToken artifact) {
return new WorkPackage(logger, artifact, services);
}
@Override
public Collection<IAtsWorkPackage> getWorkPackages(IAtsInsertionActivity insertionActivity) {
List<IAtsWorkPackage> workPackages = new ArrayList<>();
- for (ArtifactId artifact : services.getRelationResolver().getRelated(
+ for (ArtifactToken artifact : services.getRelationResolver().getRelated(
services.getArtifact(insertionActivity.getId()),
AtsRelationTypes.InsertionActivityToWorkPackage_WorkPackage)) {
workPackages.add(new WorkPackage(logger, artifact, services));
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
index 71d822e8d38..95c8b209121 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java
@@ -26,8 +26,6 @@ import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
-import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -119,16 +117,6 @@ public class AtsUtilCore {
}
}
- public static String toStringWithId(Identifiable<String> obj) {
- Conditions.checkNotNull(obj, "object");
- return String.format("[%s][%s]", obj.getGuid(), obj.getName());
- }
-
- public static String toStringWithId(IAtsObject obj) {
- Conditions.checkNotNull(obj, "object");
- return String.format("[%s][%s]", obj.getId(), obj.getName());
- }
-
public static String getGuid(IAtsObject atsObject) {
String guid = uuidToGuidMap.get(atsObject.getId());
if (!Strings.isValid(guid) && atsObject.getStoreObject() != null) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java
index b3e898a81a4..46fd720fd21 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.api.version.IAtsVersionService;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.Identity;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -60,7 +61,7 @@ public abstract class AbstractAtsVersionServiceImpl implements IAtsVersionServic
if (team == null) {
throw new OseeArgumentException("Team Workflow can not be null %s", team);
}
- Collection<ArtifactId> versions = services.getRelationResolver().getRelated(team.getStoreObject(),
+ Collection<ArtifactToken> versions = services.getRelationResolver().getRelated(team.getStoreObject(),
AtsRelationTypes.TeamWorkflowTargetedForVersion_Version);
IAtsVersion version = null;
if (!versions.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.ats.rest.test/src/org/eclipse/osee/ats/rest/internal/notify/WorkItemNotificationProcessorTest.java b/plugins/org.eclipse.osee.ats.rest.test/src/org/eclipse/osee/ats/rest/internal/notify/WorkItemNotificationProcessorTest.java
index bc932ffde7b..a492711d6c6 100644
--- a/plugins/org.eclipse.osee.ats.rest.test/src/org/eclipse/osee/ats/rest/internal/notify/WorkItemNotificationProcessorTest.java
+++ b/plugins/org.eclipse.osee.ats.rest.test/src/org/eclipse/osee/ats/rest/internal/notify/WorkItemNotificationProcessorTest.java
@@ -36,7 +36,7 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.rest.IAtsServer;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.logger.Log;
@@ -55,9 +55,9 @@ public class WorkItemNotificationProcessorTest {
// @formatter:off
@Mock IAtsUser joeSmith_CurrentUser, kay_ValidEmail, jason_ValidEmail, alex_NoValidEmail, inactiveSteve;
- @Mock ArtifactId kayArtifact;
+ @Mock ArtifactToken kayArtifact;
@Mock IAtsTeamWorkflow teamWf;
- @Mock ArtifactId teamWfArt;
+ @Mock ArtifactToken teamWfArt;
@Mock IAtsPeerToPeerReview peerReview;
@Mock IAtsStateManager stateMgr;
@Mock Log logger;
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 bd38ded7274..55a37ca5efc 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
@@ -402,7 +402,7 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
}
@Override
- public ArtifactId getArtifactById(String id) {
+ public ArtifactReadable getArtifactById(String id) {
ArtifactReadable action = null;
if (GUID.isValid(id)) {
action = getArtifactByGuid(id);
@@ -443,7 +443,7 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
for (String id : ids.split(",")) {
id = id.replaceAll("^ +", "");
id = id.replaceAll(" +$", "");
- ArtifactReadable action = (ArtifactReadable) getArtifactById(id);
+ ArtifactReadable action = getArtifactById(id);
if (action != null) {
actions.add(action);
}
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 51e6fc96f8d..8456684b085 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
@@ -39,7 +39,6 @@ import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint;
import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
-import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.jdk.core.type.ClassBasedResourceToken;
@@ -330,7 +329,7 @@ public class AgileEndpointImpl implements AgileEndpointApi {
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));
+ teamArt.toStringWithId());
}
backlog =
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
index 74dbcaf019d..a4b20571e18 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
@@ -311,7 +311,7 @@ public class AgileService implements IAgileService {
items.add(atsServer.getWorkItemFactory().getAgileItem(art));
} else {
throw new OseeStateException("Inavlid artifact [%s] in backlog. Only workflows are allowed, not [%s]",
- AtsUtilCore.toStringWithId(art), art.getArtifactType().getName());
+ art.toStringWithId(), art.getArtifactType().getName());
}
}
return items;
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 6eae0c92f5d..1a762eece33 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
@@ -119,8 +119,8 @@ public final class AtsConfigEndpointImpl implements AtsConfigEndpointApi {
configs.getAtsConfigIds().add(configArtId.getId());
}
// load work definitions
- for (ArtifactId workDefArt : orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andIsOfType(
- AtsArtifactTypes.WorkDefinition).getResults()) {
+ for (ArtifactToken workDefArt : orcsApi.getQueryFactory().fromBranch(
+ AtsUtilCore.getAtsBranch()).andIsOfType(AtsArtifactTypes.WorkDefinition).getResults()) {
String workDefStr = atsServer.getAttributeResolver().getSoleAttributeValueAsString(workDefArt,
AtsAttributeTypes.DslSheet, "");
configs.getWorkDefIdToWorkDef().put(workDefArt.getName(), workDefStr);
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
index f6e6b290085..e45e0070dc6 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/user/AtsUser.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.ats.rest.internal.user;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.eclipse.osee.ats.api.user.IAtsUser;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.data.ArtifactReadable;
@@ -104,12 +104,12 @@ public class AtsUser implements IAtsUser {
@Override
@JsonIgnore
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return user;
}
@Override
- public void setStoreObject(ArtifactId artifact) {
+ public void setStoreObject(ArtifactToken artifact) {
if (artifact instanceof ArtifactReadable) {
this.user = (ArtifactReadable) artifact;
}
@@ -119,5 +119,4 @@ public class AtsUser implements IAtsUser {
public Long getId() {
return this.user.getId();
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
index 5a2d9c68c24..1c4054cad74 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.ats.core.util.AbstractAtsChangeSet;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
@@ -190,15 +191,15 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid) {
- ArtifactId artifact = getTransaction().createArtifact(artifactType, name, guid);
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid) {
+ ArtifactToken artifact = getTransaction().createArtifact(artifactType, name, guid);
add(artifact);
return artifact;
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid, Long uuid) {
- ArtifactId artifact = getTransaction().createArtifact(artifactType, name, guid, uuid);
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, Long uuid) {
+ ArtifactToken artifact = getTransaction().createArtifact(artifactType, name, guid, uuid);
add(artifact);
return artifact;
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
index de324654271..d80dffc0c1a 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.workdef.IRelationResolver;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
@@ -37,8 +38,8 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public Collection<ArtifactId> getRelated(ArtifactId artifact, IRelationTypeSide relationType) {
- List<ArtifactId> results = new ArrayList<>();
+ public Collection<ArtifactToken> getRelated(ArtifactId artifact, IRelationTypeSide relationType) {
+ List<ArtifactToken> results = new ArrayList<>();
if (artifact instanceof ArtifactReadable) {
for (ArtifactReadable art : ((ArtifactReadable) artifact).getRelated(relationType)) {
results.add(art);
@@ -176,7 +177,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public Collection<ArtifactId> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
+ public Collection<ArtifactToken> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide) {
return getRelated(atsObject.getStoreObject(), relationTypeSide);
}
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 8d51b18381a..cf87beabbfc 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
@@ -79,11 +79,6 @@ public class AtsStoreServiceImpl implements IAtsStoreService {
}
@Override
- public String getTypeName(ArtifactId artifact) {
- return ((ArtifactReadable) artifact).getArtifactType().getName();
- }
-
- @Override
public String getGuid(IAtsObject atsObject) {
return ((ArtifactReadable) atsObject.getStoreObject()).getGuid();
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ConfigItemFactory.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ConfigItemFactory.java
index 6ae95b8db16..2c112a168e7 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ConfigItemFactory.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ConfigItemFactory.java
@@ -98,9 +98,11 @@ public class ConfigItemFactory extends AbstractConfigItemFactory {
@Override
public IAtsWorkPackage getWorkPackage(ArtifactId artifact) {
IAtsWorkPackage workPackage = null;
- if (artifact instanceof ArtifactReadable && ((ArtifactReadable) artifact).isOfType(
- AtsArtifactTypes.WorkPackage)) {
- workPackage = new WorkPackage(logger, artifact, atsServer.getServices());
+ if (artifact instanceof ArtifactReadable) {
+ ArtifactReadable art = (ArtifactReadable) artifact;
+ if (art.isOfType(AtsArtifactTypes.WorkPackage)) {
+ workPackage = new WorkPackage(logger, art, atsServer.getServices());
+ }
}
return workPackage;
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/model/WorkItem.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/model/WorkItem.java
index 389a2635796..2001a360f8f 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/model/WorkItem.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/model/WorkItem.java
@@ -31,7 +31,7 @@ import org.eclipse.osee.ats.api.workflow.log.IAtsLog;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateManager;
import org.eclipse.osee.ats.core.model.impl.AtsObject;
import org.eclipse.osee.ats.rest.IAtsServer;
-import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
import org.eclipse.osee.logger.Log;
@@ -211,7 +211,7 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
}
@Override
- public ArtifactId getStoreObject() {
+ public ArtifactToken getStoreObject() {
return artifact;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java
index 99c4149dd80..451701eb473 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java
@@ -32,6 +32,7 @@ import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.util.widgets.dialog.AtsConfigCheckTreeDialog;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -115,7 +116,7 @@ public class ConvertVersionToAgileSprint extends XNavigateItemAction {
IAtsChangeSet changes =
client.getStoreService().createAtsChangeSet(getName(), client.getUserService().getCurrentUser());
- Collection<ArtifactId> teamWfs = client.getRelationResolver().getRelated(version,
+ Collection<ArtifactToken> teamWfs = client.getRelationResolver().getRelated(version,
AtsRelationTypes.TeamWorkflowTargetedForVersion_Workflow);
for (ArtifactId teamWf : teamWfs) {
changes.relate(sprint, AtsRelationTypes.AgileSprintToItem_AtsItem, teamWf);
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactId.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactId.java
index 3c39127bd59..17d4b2dc845 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactId.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactId.java
@@ -10,18 +10,17 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.data;
-import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.eclipse.osee.framework.jdk.core.type.BaseId;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.IdSerializer;
-import org.eclipse.osee.framework.jdk.core.type.Identifiable;
+import org.eclipse.osee.framework.jdk.core.type.Identity;
/**
* @author Megumi Telles
*/
@JsonSerialize(using = IdSerializer.class)
-public interface ArtifactId extends Identifiable<String>, Id {
+public interface ArtifactId extends Identity<String>, Id {
public static final ArtifactId SENTINEL = ArtifactId.valueOf(Id.SENTINEL);
@@ -30,11 +29,9 @@ public interface ArtifactId extends Identifiable<String>, Id {
}
public static ArtifactId valueOf(String id) {
-
return valueOf(Long.valueOf(id));
}
- @JsonCreator
public static ArtifactId valueOf(long id) {
final class ArtifactIdImpl extends BaseId implements ArtifactId {
public ArtifactIdImpl(Long artId) {
@@ -45,19 +42,10 @@ public interface ArtifactId extends Identifiable<String>, Id {
public String getGuid() {
return null;
}
-
- @Override
- public String getName() {
- return null;
- }
}
return new ArtifactIdImpl(id);
}
- default String toStringWithId() {
- return String.format("[%s][%s]", getName(), getUuid());
- }
-
@Override
default Long getId() {
return getUuid();
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java
index 12c368b1581..f4ef5323f49 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.data;
+import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.NamedId;
/**
* @author Ryan D. Brooks
* @author Donald G. Dunne
*/
-public interface ArtifactToken extends ArtifactId, HasArtifactType, HasBranch {
+public interface ArtifactToken extends ArtifactId, HasArtifactType, HasBranch, Named {
default ArtifactTypeId getArtifactTypeId() {
return null;
}
@@ -60,4 +61,8 @@ public interface ArtifactToken extends ArtifactId, HasArtifactType, HasBranch {
}
return new ArtifactTokenImpl(id, guid, name, branch, artifactType);
}
+
+ default String toStringWithId() {
+ return String.format("[%s][%s]", getName(), getId());
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
index cff86ef0807..e0031eff2da 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
@@ -16,9 +16,9 @@ import java.util.Collection;
import org.eclipse.osee.executor.admin.CancellableCallable;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IRelationSorterId;
@@ -87,49 +87,49 @@ public class TransactionBuilderImpl implements TransactionBuilder {
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name) throws OseeCoreException {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name) throws OseeCoreException {
return createArtifact(artifactType, name, null);
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid) throws OseeCoreException {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid) throws OseeCoreException {
return txManager.createArtifact(txData, artifactType, name, guid);
}
@Override
- public ArtifactId createArtifact(IArtifactType artifactType, String name, String guid, long uuid) throws OseeCoreException {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, long uuid) throws OseeCoreException {
Conditions.checkExpressionFailOnTrue(uuid <= 0L, "Invalid Uuid %d. Must be > 0", uuid);
return txManager.createArtifact(txData, artifactType, name, guid, uuid);
}
@Override
- public ArtifactId createArtifact(ArtifactToken token) throws OseeCoreException {
+ public ArtifactToken createArtifact(ArtifactToken token) throws OseeCoreException {
Conditions.checkExpressionFailOnTrue(token.isInvalid(), "Invalid Id %d. Must be > 0", token.getId());
return txManager.createArtifact(txData, token.getArtifactType(), token.getName(), token.getGuid(), token.getId());
}
@Override
- public ArtifactId copyArtifact(ArtifactReadable sourceArtifact) throws OseeCoreException {
+ public ArtifactToken copyArtifact(ArtifactReadable sourceArtifact) throws OseeCoreException {
return copyArtifact(sourceArtifact.getBranch(), sourceArtifact);
}
@Override
- public ArtifactId copyArtifact(BranchId fromBranch, ArtifactId artifactId) throws OseeCoreException {
+ public ArtifactToken copyArtifact(BranchId fromBranch, ArtifactId artifactId) throws OseeCoreException {
return txManager.copyArtifact(txData, fromBranch, artifactId);
}
@Override
- public ArtifactId copyArtifact(ArtifactReadable sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException {
+ public ArtifactToken copyArtifact(ArtifactReadable sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException {
return copyArtifact(sourceArtifact.getBranch(), sourceArtifact, attributesToDuplicate);
}
@Override
- public ArtifactId copyArtifact(BranchId fromBranch, ArtifactId artifactId, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException {
+ public ArtifactToken copyArtifact(BranchId fromBranch, ArtifactId artifactId, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException {
return txManager.copyArtifact(txData, fromBranch, artifactId, attributesToDuplicate);
}
@Override
- public ArtifactId introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException {
+ public ArtifactToken introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException {
checkAreOnDifferentBranches(txData, fromBranch);
ArtifactReadable source = getArtifactReadable(txData.getSession(), query, fromBranch, sourceArtifact);
Conditions.checkNotNull(source, "Source Artifact");
@@ -139,7 +139,7 @@ public class TransactionBuilderImpl implements TransactionBuilder {
}
@Override
- public ArtifactId replaceWithVersion(ArtifactReadable sourceArtifact, ArtifactReadable destination) throws OseeCoreException {
+ public ArtifactToken replaceWithVersion(ArtifactReadable sourceArtifact, ArtifactReadable destination) throws OseeCoreException {
return txManager.replaceWithVersion(txData, sourceArtifact.getBranch(), sourceArtifact, destination);
}
diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java
index 19c19973ebd..13da2b9a482 100644
--- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java
+++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTransactionTest.java
@@ -33,6 +33,7 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.concurrent.Callable;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TokenFactory;
@@ -151,10 +152,10 @@ public class OrcsTransactionTest {
TransactionBuilder tx = txFactory.createTransaction(COMMON, userArtifact, comment);
- ArtifactId artifactId = tx.createArtifact(CoreArtifactTypes.Folder, expectedName);
+ ArtifactToken artifact = tx.createArtifact(CoreArtifactTypes.Folder, expectedName);
- tx.setAttributesFromStrings(artifactId, CoreAttributeTypes.Annotation, expectedAnnotation);
- assertEquals(expectedName, artifactId.getName());
+ tx.setAttributesFromStrings(artifact, CoreAttributeTypes.Annotation, expectedAnnotation);
+ assertEquals(expectedName, artifact.getName());
TransactionReadable newTx = tx.commit();
assertFalse(tx.isCommitInProgress());
@@ -166,14 +167,14 @@ public class OrcsTransactionTest {
TransactionReadable newTxReadable = transactionQuery.andTxId(newTx).getResults().getExactlyOne();
checkTransaction(previousTx, newTxReadable, COMMON, comment, userArtifact);
- ResultSet<ArtifactReadable> result = query.fromBranch(COMMON).andIds(artifactId).getResults();
+ ResultSet<ArtifactReadable> result = query.fromBranch(COMMON).andIds(artifact).getResults();
- ArtifactReadable artifact = result.getExactlyOne();
+ ArtifactReadable artifact1 = result.getExactlyOne();
- assertEquals(expectedAnnotation, artifact.getAttributeValues(CoreAttributeTypes.Annotation).iterator().next());
- assertEquals(expectedName, artifact.getName());
- assertEquals(expectedAnnotation, artifact.getAttributeValues(CoreAttributeTypes.Annotation).iterator().next());
- assertEquals(artifactId.getGuid(), artifact.getGuid());
+ assertEquals(expectedAnnotation, artifact1.getAttributeValues(CoreAttributeTypes.Annotation).iterator().next());
+ assertEquals(expectedName, artifact1.getName());
+ assertEquals(expectedAnnotation, artifact1.getAttributeValues(CoreAttributeTypes.Annotation).iterator().next());
+ assertEquals(artifact1.getGuid(), artifact1.getGuid());
}
@Test
@@ -190,15 +191,15 @@ public class OrcsTransactionTest {
TransactionBuilder tx = txFactory.createTransaction(COMMON, userArtifact, comment);
- ArtifactId artifactId = tx.createArtifact(CoreArtifactTypes.SubsystemRequirementHTML, expectedName);
+ ArtifactToken artifact = tx.createArtifact(CoreArtifactTypes.SubsystemRequirementHTML, expectedName);
- tx.setAttributesFromStrings(artifactId, CoreAttributeTypes.Annotation, expectedAnnotation);
- tx.setAttributesFromStrings(artifactId, CoreAttributeTypes.QualificationMethod, expectedQualifaction);
- assertEquals(expectedName, artifactId.getName());
+ tx.setAttributesFromStrings(artifact, CoreAttributeTypes.Annotation, expectedAnnotation);
+ tx.setAttributesFromStrings(artifact, CoreAttributeTypes.QualificationMethod, expectedQualifaction);
+ assertEquals(expectedName, artifact.getName());
tx.commit();
- ArtifactReadable artifactReadable = query.fromBranch(COMMON).andIds(artifactId).getResults().getExactlyOne();
+ ArtifactReadable artifactReadable = query.fromBranch(COMMON).andIds(artifact).getResults().getExactlyOne();
assertEquals(expectedName, artifactReadable.getName());
assertEquals(expectedQualifaction,
artifactReadable.getSoleAttributeAsString(CoreAttributeTypes.QualificationMethod));
@@ -546,7 +547,8 @@ public class OrcsTransactionTest {
if (artifact != null && art.matches(artifact)) {
assertEquals(1,
art.getAttributeCount(CoreAttributeTypes.GeneralStringData, DeletionFlag.INCLUDE_HARD_DELETED));
- assertEquals(1, art.getAttributeCount(CoreAttributeTypes.PublishInline, DeletionFlag.INCLUDE_HARD_DELETED));
+ assertEquals(1,
+ art.getAttributeCount(CoreAttributeTypes.PublishInline, DeletionFlag.INCLUDE_HARD_DELETED));
} else if (artifact1 != null && art.matches(artifact1)) {
assertEquals(1, art.getAttributeCount(CoreAttributeTypes.Annotation, DeletionFlag.INCLUDE_HARD_DELETED));
} else {
@@ -832,21 +834,21 @@ public class OrcsTransactionTest {
public void testAttributeCommitOnlyAffectNewStripe() throws OseeCoreException {
// create artifact and check exists and name set
TransactionBuilder tx1 = createTx();
- ArtifactId art1 = tx1.createArtifact(Component, "orig name");
+ ArtifactToken art1 = tx1.createArtifact(Component, "orig name");
TransactionId rec1 = tx1.commit();
assertNotNull(rec1);
art1 = query.fromBranch(COMMON).andIds(art1).getResults().getExactlyOne();
assertEquals("orig name", art1.getName());
// change name
- ArtifactId art2 = query.fromBranch(COMMON).andIds(art1).getResults().getExactlyOne();
+ ArtifactToken art2 = query.fromBranch(COMMON).andIds(art1).getResults().getExactlyOne();
TransactionBuilder tx2 = createTx();
tx2.setName(art2, "new name");
TransactionId rec2 = tx2.commit();
assertNotNull(rec2);
// verify that change only exists on new stripe?
- ArtifactId art3 = query.fromBranch(COMMON).andIds(art1).getResults().getExactlyOne();
+ ArtifactToken art3 = query.fromBranch(COMMON).andIds(art1).getResults().getExactlyOne();
assertEquals("orig name", art1.getName());
// this should be same name cause we didn't re-query it and the tx didn't change the model?
assertEquals("orig name", art2.getName());
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
index ca238924c20..5226cb8123e 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/ArtifactReadable.java
@@ -12,8 +12,7 @@ package org.eclipse.osee.orcs.data;
import java.util.Collection;
import java.util.List;
-import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.HasBranch;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.HasLocalId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
@@ -29,12 +28,10 @@ import org.eclipse.osee.framework.jdk.core.type.ResultSet;
* @author Roberto E. Escobar
* @author Andrew M. Finkbeiner
*/
-public interface ArtifactReadable extends ArtifactId, HasLocalId<Integer>, HasTransaction, OrcsReadable, HasBranch {
+public interface ArtifactReadable extends ArtifactToken, HasLocalId<Integer>, HasTransaction, OrcsReadable {
TransactionId getLastModifiedTransaction();
- IArtifactType getArtifactType() throws OseeCoreException;
-
boolean isOfType(IArtifactType... otherTypes) throws OseeCoreException;
////////////////////
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
index 4c59542f206..36159ecfe69 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
@@ -14,9 +14,9 @@ import java.io.InputStream;
import java.util.Collection;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IRelationSorterId;
@@ -50,27 +50,27 @@ public interface TransactionBuilder {
// ARTIFACT
- ArtifactId createArtifact(IArtifactType artifactType, String name) throws OseeCoreException;
+ ArtifactToken createArtifact(IArtifactType artifactType, String name) throws OseeCoreException;
- ArtifactId createArtifact(IArtifactType artifactType, String name, String guid) throws OseeCoreException;
+ ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid) throws OseeCoreException;
- ArtifactId createArtifact(IArtifactType artifactType, String name, String guid, long uuid) throws OseeCoreException;
+ ArtifactToken createArtifact(IArtifactType artifactType, String name, String guid, long uuid) throws OseeCoreException;
- ArtifactId createArtifact(ArtifactToken configsFolder);
+ ArtifactToken createArtifact(ArtifactToken configsFolder);
void deleteArtifact(ArtifactId sourceArtifact) throws OseeCoreException;
- ArtifactId copyArtifact(ArtifactReadable sourceArtifact) throws OseeCoreException;
+ ArtifactToken copyArtifact(ArtifactReadable sourceArtifact) throws OseeCoreException;
- ArtifactId copyArtifact(ArtifactReadable sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException;
+ ArtifactToken copyArtifact(ArtifactReadable sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException;
- ArtifactId copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException;
+ ArtifactToken copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException;
- ArtifactId copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException;
+ ArtifactToken copyArtifact(BranchId fromBranch, ArtifactId sourceArtifact, Collection<? extends IAttributeType> attributesToDuplicate) throws OseeCoreException;
- ArtifactId introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException;
+ ArtifactToken introduceArtifact(BranchId fromBranch, ArtifactId sourceArtifact) throws OseeCoreException;
- ArtifactId replaceWithVersion(ArtifactReadable sourceArtifact, ArtifactReadable destination) throws OseeCoreException;
+ ArtifactToken replaceWithVersion(ArtifactReadable sourceArtifact, ArtifactReadable destination) throws OseeCoreException;
// ATTRIBUTE

Back to the top