Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2018-08-17 02:07:09 -0400
committerRyan D. Brooks2018-08-17 03:42:34 -0400
commitb2cc2e959c6bcb27acc9d17c9fdf931c9b934fcd (patch)
treedbc9a41c441e950b5071c9f00def4bdae6ce74ba
parenta66a8f42a98b6bb62233055f890e3604483d5631 (diff)
downloadorg.eclipse.osee-b2cc2e959c6bcb27acc9d17c9fdf931c9b934fcd.tar.gz
org.eclipse.osee-b2cc2e959c6bcb27acc9d17c9fdf931c9b934fcd.tar.xz
org.eclipse.osee-b2cc2e959c6bcb27acc9d17c9fdf931c9b934fcd.zip
refactor: Use IArtifactType in ArtifactToken
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java6
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/TokenSearchOperations.java3
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractAtsArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractWorkflowArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsArtifactFactory.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/CollectorArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/AbstractReviewArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/DecisionReviewArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/PeerToPeerReviewArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/sprint/SprintArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/teamwf/TeamWorkFlowArtifact.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/ArtifactToken.java28
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IArtifactType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java9
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/UserToken.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/NamedIdBase.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java21
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataModuleFactory.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/QueryModule.java5
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryEngineImpl.java8
37 files changed, 124 insertions, 97 deletions
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 ca60543844..93eeb59a39 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
@@ -22,10 +22,10 @@ import org.eclipse.osee.ats.api.user.IAtsUser;
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.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttribute;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -70,11 +70,11 @@ public interface IAtsChangeSet {
boolean isAttributeTypeValid(IAtsWorkItem workItem, AttributeTypeId attributeType);
- ArtifactToken createArtifact(ArtifactTypeId artifactType, String name);
+ ArtifactToken createArtifact(IArtifactType artifactType, String name);
void deleteAttributes(IAtsObject atsObject, AttributeTypeId attributeType);
- ArtifactToken createArtifact(ArtifactTypeId artifactType, String name, Long artifactId);
+ ArtifactToken createArtifact(IArtifactType artifactType, String name, Long artifactId);
void relate(Object object1, RelationTypeSide relationSide, Object object2);
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
index 2bc240598a..67f7dac844 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/IAtsActionFactory.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinition;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
/**
* @author Donald G. Dunne
@@ -33,7 +33,7 @@ public interface IAtsActionFactory {
IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<IAtsUser> assignees, IAtsChangeSet changes, Date createdDate, IAtsUser createdBy, INewActionListener newActionListener, CreateTeamOption... createTeamOption);
- IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, ArtifactTypeId artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption);
+ IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption);
/**
* Auto-add actions to a goal configured with relations to the given ActionableItem or Team Definition
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index dca43628a2..15561e196e 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -60,7 +60,6 @@ import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility;
import org.eclipse.osee.ats.core.workflow.transition.TransitionManager;
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.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -396,7 +395,7 @@ public class ActionFactory implements IAtsActionFactory {
}
@Override
- public IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, ArtifactTypeId artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) {
+ public IAtsTeamWorkflow createTeamWorkflow(IAtsAction action, IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, IArtifactType artifactType, INewActionListener newActionListener, IAtsChangeSet changes, CreateTeamOption... createTeamOption) {
if (!Arrays.asList(createTeamOption).contains(CreateTeamOption.Duplicate_If_Exists)) {
// Make sure team doesn't already exist
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 78882e1cd2..fd90a8ccd8 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
@@ -98,8 +98,8 @@ import org.eclipse.osee.ats.rest.internal.query.TokenSearchOperations;
import org.eclipse.osee.ats.rest.internal.world.WorldResource;
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.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.util.JsonUtil;
@@ -229,7 +229,7 @@ public class AgileEndpointImpl implements AgileEndpointApi {
return result;
}
- private JaxProgramBaseItem updateProgramItem(IAgileProgram program, JaxProgramBaseItem newItem, String itemName, ArtifactTypeId artifactType, ArtifactToken parentArtifact) {
+ private JaxProgramBaseItem updateProgramItem(IAgileProgram program, JaxProgramBaseItem newItem, String itemName, IArtifactType artifactType, ArtifactToken parentArtifact) {
if (newItem.getType().equals(UpdateType.New)) {
if (!Strings.isValid(newItem.getTitle())) {
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/TokenSearchOperations.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/TokenSearchOperations.java
index 33754e7676..dad6a02345 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/TokenSearchOperations.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/TokenSearchOperations.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.sql.OseeSql;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
@@ -74,7 +75,7 @@ public class TokenSearchOperations {
chStmt.runPreparedQuery(query);
while (chStmt.next()) {
Long artId = chStmt.getLong("art_id");
- ArtifactTypeId artTypeId = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
+ IArtifactType artTypeId = orcsApi.getOrcsTypes().getArtifactTypes().get(chStmt.getLong("art_type_id"));
String name = chStmt.getString("value");
ArtifactToken token = ArtifactToken.valueOf(artId, name, branch, artTypeId);
Long artIdLong = isSideA ? artAIdToArtBId.get(artId) : artBIdToArtAId.get(artId);
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 a9994ce395..d1c1c66de6 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
@@ -28,10 +28,10 @@ import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.core.util.AbstractAtsChangeSet;
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.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttribute;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -169,14 +169,14 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
}
@Override
- public ArtifactToken createArtifact(ArtifactTypeId artifactType, String name) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name) {
ArtifactToken artifact = getTransaction().createArtifact(artifactType, name);
add(artifact);
return artifact;
}
@Override
- public ArtifactToken createArtifact(ArtifactTypeId artifactType, String name, Long artifactId) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, Long artifactId) {
ArtifactToken artifact = getTransaction().createArtifact(artifactType, name, artifactId);
add(artifact);
return artifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
index 794abb3cba..30a2195acc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
@@ -32,10 +32,10 @@ import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.search.AtsArtifactQuery;
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.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttribute;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -271,7 +271,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
}
@Override
- public ArtifactToken createArtifact(ArtifactTypeId artifactType, String name, Long artifactId) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name, Long artifactId) {
Artifact artifact =
ArtifactTypeManager.addArtifact(artifactType, AtsClientService.get().getAtsBranch(), name, artifactId);
add(artifact);
@@ -279,7 +279,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
}
@Override
- public ArtifactToken createArtifact(ArtifactTypeId artifactType, String name) {
+ public ArtifactToken createArtifact(IArtifactType artifactType, String name) {
Artifact artifact = ArtifactTypeManager.addArtifact(artifactType, AtsClientService.get().getAtsBranch(), name);
add(artifact);
return artifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractAtsArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractAtsArtifact.java
index eec57d895b..300e83e6f2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractAtsArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractAtsArtifact.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.workflow;
import org.eclipse.osee.ats.api.IAtsObject;
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.core.data.IArtifactType;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
@@ -21,7 +21,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
*/
public abstract class AbstractAtsArtifact extends Artifact implements IAtsObject {
- public AbstractAtsArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public AbstractAtsArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractWorkflowArtifact.java
index 9a8a009809..8406b5c68e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AbstractWorkflowArtifact.java
@@ -40,8 +40,8 @@ import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.review.AbstractReviewArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.services.CmAccessControl;
@@ -72,7 +72,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
private IAtsLog atsLog;
private TransactionId atsLogTx;
- public AbstractWorkflowArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public AbstractWorkflowArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsArtifactFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsArtifactFactory.java
index 63fe5b1d12..9705b8e628 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsArtifactFactory.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsArtifactFactory.java
@@ -45,6 +45,7 @@ import org.eclipse.osee.ats.workflow.task.TaskArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -79,7 +80,7 @@ public class AtsArtifactFactory extends ArtifactFactory {
}
@Override
- public Artifact getArtifactInstance(Long id, String guid, BranchId branch, ArtifactTypeId artifactType, boolean inDataStore) {
+ public Artifact getArtifactInstance(Long id, String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) {
Artifact toReturn;
if (artifactType.equals(Task)) {
toReturn = new TaskArtifact(id, guid, branch, artifactType);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/CollectorArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/CollectorArtifact.java
index f3667d232e..a281ab9fc3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/CollectorArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/CollectorArtifact.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.workflow;
import static org.eclipse.osee.framework.core.enums.RelationSorter.USER_DEFINED;
import org.eclipse.osee.ats.workflow.goal.HasMembers;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -25,7 +25,7 @@ public abstract class CollectorArtifact extends AbstractWorkflowArtifact impleme
private final RelationTypeSide membersRelationType;
- public CollectorArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType, RelationTypeSide membersRelationType) {
+ public CollectorArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType, RelationTypeSide membersRelationType) {
super(id, guid, branch, artifactType);
this.membersRelationType = membersRelationType;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalArtifact.java
index c987f45138..afee4cdcad 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalArtifact.java
@@ -18,8 +18,8 @@ import org.eclipse.osee.ats.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.workflow.CollectorArtifact;
import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
@@ -27,7 +27,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
*/
public class GoalArtifact extends CollectorArtifact implements IAtsGoal {
- public GoalArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public GoalArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType, AtsRelationTypes.Goal_Member);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/AbstractReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/AbstractReviewArtifact.java
index 49cb59690a..aab05dccf6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/AbstractReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/AbstractReviewArtifact.java
@@ -26,8 +26,8 @@ import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.ats.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -36,7 +36,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
*/
public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact implements IAtsAbstractReview {
- public AbstractReviewArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public AbstractReviewArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/DecisionReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/DecisionReviewArtifact.java
index feee36c45d..2dbfcfb1ce 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/DecisionReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/DecisionReviewArtifact.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.workflow.review;
import org.eclipse.osee.ats.api.review.DecisionOptions;
import org.eclipse.osee.ats.api.review.IAtsDecisionReview;
import org.eclipse.osee.ats.internal.AtsClientService;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
/**
@@ -24,7 +24,7 @@ public class DecisionReviewArtifact extends AbstractReviewArtifact implements IA
public DecisionOptions decisionOptions;
- public DecisionReviewArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public DecisionReviewArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
decisionOptions = new DecisionOptions(this, AtsClientService.get());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/PeerToPeerReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/PeerToPeerReviewArtifact.java
index a5b5952da1..09506b445e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/PeerToPeerReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/PeerToPeerReviewArtifact.java
@@ -13,8 +13,8 @@ package org.eclipse.osee.ats.workflow.review;
import org.eclipse.osee.ats.api.review.IAtsPeerReviewRoleManager;
import org.eclipse.osee.ats.api.review.IAtsPeerToPeerReview;
import org.eclipse.osee.ats.internal.AtsClientService;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
/**
@@ -22,7 +22,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
*/
public class PeerToPeerReviewArtifact extends AbstractReviewArtifact implements IATSStateMachineArtifact, IAtsPeerToPeerReview {
- public PeerToPeerReviewArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public PeerToPeerReviewArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/sprint/SprintArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/sprint/SprintArtifact.java
index ec504fe6ca..f5c08c1cae 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/sprint/SprintArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/sprint/SprintArtifact.java
@@ -19,8 +19,8 @@ import org.eclipse.osee.ats.workflow.CollectorArtifact;
import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -30,7 +30,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
*/
public class SprintArtifact extends CollectorArtifact implements IAgileSprint {
- public SprintArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public SprintArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType, AtsRelationTypes.AgileSprintToItem_AtsItem);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskArtifact.java
index 44e3cd04fa..b7fe49c96f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskArtifact.java
@@ -18,8 +18,8 @@ import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
@@ -30,7 +30,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
public class TaskArtifact extends AbstractWorkflowArtifact implements IAtsTask, IATSStateMachineArtifact {
Set<Long> taskHasNoParent = new HashSet<>();
- public TaskArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public TaskArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/teamwf/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/teamwf/TeamWorkFlowArtifact.java
index 93e9d89e08..adb605b65d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/teamwf/TeamWorkFlowArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/teamwf/TeamWorkFlowArtifact.java
@@ -32,8 +32,8 @@ import org.eclipse.osee.ats.workflow.action.ActionArtifact;
import org.eclipse.osee.ats.workflow.action.ActionArtifactRollup;
import org.eclipse.osee.ats.workflow.review.ReviewManager;
import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -55,11 +55,11 @@ public class TeamWorkFlowArtifact extends AbstractWorkflowArtifact implements IA
private boolean creatingWorkingBranch = false;
private boolean committingWorkingBranch = false;
- public TeamWorkFlowArtifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactType) {
+ public TeamWorkFlowArtifact(Long id, String guid, BranchId branch, IArtifactType artifactType) {
super(id, guid, branch, artifactType);
}
- public TeamWorkFlowArtifact(ArtifactTypeId artifactType) {
+ public TeamWorkFlowArtifact(IArtifactType artifactType) {
super(Lib.generateId(), null, CoreBranches.COMMON, artifactType);
}
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 903d791580..a54a171553 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
@@ -30,8 +30,8 @@ public interface ArtifactToken extends ArtifactId, HasBranch, NamedId, Identity<
throw new UnsupportedOperationException("getGuid() is not supported");
}
- default ArtifactTypeId getArtifactTypeId() {
- return ArtifactTypeId.SENTINEL;
+ default IArtifactType getArtifactTypeId() {
+ return IArtifactType.SENTINEL;
}
default boolean isTypeEqual(ArtifactTypeId artifactType) {
@@ -39,18 +39,18 @@ public interface ArtifactToken extends ArtifactId, HasBranch, NamedId, Identity<
}
public static ArtifactToken valueOf(Id id, BranchId branch) {
- return valueOf(id.getId(), GUID.create(), null, branch, ArtifactTypeId.SENTINEL);
+ return valueOf(id.getId(), GUID.create(), null, branch, IArtifactType.SENTINEL);
}
public static ArtifactToken valueOf(ArtifactId id, String name) {
- return valueOf(id.getId(), GUID.create(), name, BranchId.SENTINEL, ArtifactTypeId.SENTINEL);
+ return valueOf(id.getId(), GUID.create(), name, BranchId.SENTINEL, IArtifactType.SENTINEL);
}
public static ArtifactToken valueOf(ArtifactId id, BranchId branch) {
if (id instanceof ArtifactToken) {
return valueOf((ArtifactToken) id, branch);
}
- return valueOf(id.getId(), GUID.create(), "", branch, ArtifactTypeId.SENTINEL);
+ return valueOf(id.getId(), GUID.create(), "", branch, IArtifactType.SENTINEL);
}
public static ArtifactToken valueOf(ArtifactToken token, BranchId branch) {
@@ -64,32 +64,32 @@ public interface ArtifactToken extends ArtifactId, HasBranch, NamedId, Identity<
}
public static ArtifactToken valueOf(long id, BranchId branch) {
- return valueOf(id, GUID.create(), "", branch, ArtifactTypeId.SENTINEL);
+ return valueOf(id, GUID.create(), "", branch, IArtifactType.SENTINEL);
}
public static ArtifactToken valueOf(long id, String name, BranchId branch) {
- return valueOf(id, GUID.create(), name, branch, ArtifactTypeId.SENTINEL);
+ return valueOf(id, GUID.create(), name, branch, IArtifactType.SENTINEL);
}
public static ArtifactToken valueOf(long id, String name) {
- return valueOf(id, GUID.create(), name, BranchId.SENTINEL, ArtifactTypeId.SENTINEL);
+ return valueOf(id, GUID.create(), name, BranchId.SENTINEL, IArtifactType.SENTINEL);
}
- public static ArtifactToken valueOf(long id, String name, ArtifactTypeId artifactType) {
+ public static ArtifactToken valueOf(long id, String name, IArtifactType artifactType) {
return valueOf(id, GUID.create(), name, BranchId.SENTINEL, artifactType);
}
- public static ArtifactToken valueOf(long id, String name, BranchId branch, ArtifactTypeId artifactType) {
+ public static ArtifactToken valueOf(long id, String name, BranchId branch, IArtifactType artifactType) {
return valueOf(id, GUID.create(), name, branch, artifactType);
}
- public static ArtifactToken valueOf(long id, String guid, String name, BranchId branch, ArtifactTypeId artifactType) {
+ public static ArtifactToken valueOf(long id, String guid, String name, BranchId branch, IArtifactType artifactType) {
final class ArtifactTokenImpl extends NamedIdBase implements ArtifactToken {
private final BranchId branch;
- private final ArtifactTypeId artifactType;
+ private final IArtifactType artifactType;
private final String guid;
- public ArtifactTokenImpl(Long id, String guid, String name, BranchId branch, ArtifactTypeId artifactType) {
+ public ArtifactTokenImpl(Long id, String guid, String name, BranchId branch, IArtifactType artifactType) {
super(id, name);
this.branch = branch;
this.artifactType = artifactType;
@@ -97,7 +97,7 @@ public interface ArtifactToken extends ArtifactId, HasBranch, NamedId, Identity<
}
@Override
- public ArtifactTypeId getArtifactTypeId() {
+ public IArtifactType getArtifactTypeId() {
return artifactType;
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IArtifactType.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IArtifactType.java
index 8e9d8c0561..fd0cb4848b 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IArtifactType.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IArtifactType.java
@@ -16,5 +16,7 @@ import org.eclipse.osee.framework.jdk.core.type.NamedId;
* @author Ryan D. Brooks
*/
public interface IArtifactType extends NamedId, ArtifactTypeId {
+ IArtifactType SENTINEL = TokenFactory.createArtifactType();
+
Long getGuid();
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java
index f88bf1f5b8..c6c37d4c57 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java
@@ -26,6 +26,10 @@ public final class TokenFactory {
return new ArtifactTypeToken(guid, name);
}
+ public static IArtifactType createArtifactType() {
+ return new ArtifactTypeToken();
+ }
+
/**
* @param token as [name]-[uuid]
*/
@@ -44,6 +48,11 @@ public final class TokenFactory {
}
private final static class ArtifactTypeToken extends NamedIdBase implements IArtifactType {
+
+ public ArtifactTypeToken() {
+ super();
+ }
+
public ArtifactTypeToken(Long id, String name) {
super(id, name);
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/UserToken.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/UserToken.java
index d561eb31f3..94cb6ed97b 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/UserToken.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/UserToken.java
@@ -47,7 +47,7 @@ public interface UserToken extends ArtifactToken, UserId {
}
@Override
- public ArtifactTypeId getArtifactTypeId() {
+ public IArtifactType getArtifactTypeId() {
return CoreArtifactTypes.User;
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/NamedIdBase.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/NamedIdBase.java
index f6039a6691..f75da21967 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/NamedIdBase.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/NamedIdBase.java
@@ -22,6 +22,11 @@ public class NamedIdBase extends BaseId implements NamedId {
this.name = name;
}
+ public NamedIdBase() {
+ super(Id.SENTINEL);
+ this.name = "SENTINEL";
+ }
+
@Override
public String getName() {
return name;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
index b2555dd09c..8e872a8e7f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeSystemArtifacts.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.framework.skynet.core;
import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
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.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTokens;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
@@ -47,7 +47,7 @@ public final class OseeSystemArtifacts {
* @return the artifact specified by type, name, and branch from the cache if available otherwise the datastore is
* accessed, and finally a new artifact is created if it can not be found
*/
- public static Artifact getOrCreateArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch) {
+ public static Artifact getOrCreateArtifact(IArtifactType artifactType, String artifactName, BranchId branch) {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, true);
}
@@ -56,15 +56,15 @@ public final class OseeSystemArtifacts {
artifactToken.getGuid(), artifactToken.getUuid(), true);
}
- public static Artifact getCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch) {
+ public static Artifact getCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch) {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, null, false);
}
- private static Artifact getOrCreateCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch, String guid, boolean create) {
+ private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, boolean create) {
return getOrCreateCachedArtifact(artifactType, artifactName, branch, guid, null, create);
}
- private static Artifact getOrCreateCachedArtifact(ArtifactTypeId artifactType, String artifactName, BranchId branch, String guid, Long uuid, boolean create) {
+ private static Artifact getOrCreateCachedArtifact(IArtifactType artifactType, String artifactName, BranchId branch, String guid, Long uuid, boolean create) {
Artifact artifact = ArtifactQuery.checkArtifactFromTypeAndName(artifactType, artifactName, branch);
if (artifact == null && create) {
if (Strings.isValid(guid) && uuid != null && uuid > 0) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index 924d7b3f46..8a28564bed 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -39,6 +39,7 @@ import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.HasBranch;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
@@ -115,20 +116,20 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
private ModificationType lastValidModType;
private EditState objectEditState;
private boolean useBackingData;
- private ArtifactTypeId artifactTypeId;
+ private IArtifactType artifactTypeId;
private ApplicabilityId applicabilityId;
private final String guid;
- public Artifact(String guid, BranchId branch, ArtifactTypeId artifactTypeId) {
+ public Artifact(String guid, BranchId branch, IArtifactType artifactTypeId) {
this(Lib.generateArtifactIdAsInt(), guid, branch, artifactTypeId);
}
- public Artifact(Long id, BranchId branch, ArtifactTypeId artifactTypeId) {
+ public Artifact(Long id, BranchId branch, IArtifactType artifactTypeId) {
this(id, null, branch, artifactTypeId);
}
- public Artifact(Long id, String guid, BranchId branch, ArtifactTypeId artifactTypeId) {
+ public Artifact(Long id, String guid, BranchId branch, IArtifactType artifactTypeId) {
super(id, null);
this.guid = GUID.checkOrCreate(guid);
this.artifactTypeId = artifactTypeId;
@@ -138,7 +139,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
this.branch = branch;
}
- public Artifact(BranchId branch, ArtifactTypeId artifactType, String name) {
+ public Artifact(BranchId branch, IArtifactType artifactType, String name) {
this((String) null, branch, artifactType);
setName(name);
}
@@ -151,7 +152,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
this(branch, Artifact, name);
}
- public Artifact(BranchId branch, ArtifactTypeId artifactType) {
+ public Artifact(BranchId branch, IArtifactType artifactType) {
this((String) null, branch, artifactType);
}
@@ -468,7 +469,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
addRelation(sorterId, Default_Hierarchical__Child, artifact);
}
- public final Artifact addNewChild(RelationSorter sorterId, ArtifactTypeId artifactType, String name) {
+ public final Artifact addNewChild(RelationSorter sorterId, IArtifactType artifactType, String name) {
Artifact child = ArtifactTypeManager.addArtifact(artifactType, branch);
child.setName(name);
addChild(sorterId, child);
@@ -1432,7 +1433,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
}
@Override
- public final ArtifactTypeId getArtifactTypeId() {
+ public final IArtifactType getArtifactTypeId() {
return artifactTypeId;
}
@@ -1493,7 +1494,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
return duplicate(branch, getArtifactType(), excludeAttributeTypes);
}
- public final Artifact duplicate(BranchId branch, ArtifactTypeId newType, Collection<AttributeTypeId> excludeAttributeTypes) {
+ public final Artifact duplicate(BranchId branch, IArtifactType newType, Collection<AttributeTypeId> excludeAttributeTypes) {
Artifact newArtifact = ArtifactTypeManager.addArtifact(newType, branch);
// we do this because attributes were added on creation to meet the
// minimum attribute requirements
@@ -1575,7 +1576,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
*/
public final void setArtifactType(ArtifactTypeId artifactTypeId) {
if (this.artifactTypeId.notEqual(artifactTypeId)) {
- this.artifactTypeId = artifactTypeId;
+ this.artifactTypeId = ArtifactTypeManager.getType(artifactTypeId);
objectEditState = EditState.ARTIFACT_TYPE_MODIFIED;
if (isInDb()) {
internalSetModType(ModificationType.MODIFIED, false);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
index ad680193d0..3a080fd326 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.GammaId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -43,11 +44,11 @@ public abstract class ArtifactFactory {
/**
* Used to create a new artifact (one that has never been saved into the datastore)
*/
- public Artifact makeNewArtifact(BranchId branch, ArtifactTypeId artifactTypeId, String artifactName, String guid) {
+ public Artifact makeNewArtifact(BranchId branch, IArtifactType artifactTypeId, String artifactName, String guid) {
return makeNewArtifact(branch, artifactTypeId, artifactName, guid, null);
}
- public Artifact makeNewArtifact(BranchId branch, ArtifactTypeId artifactTypeId, String artifactName, String guid, Long uuid) {
+ public Artifact makeNewArtifact(BranchId branch, IArtifactType artifactTypeId, String artifactName, String guid, Long uuid) {
if (guid == null) {
guid = GUID.create();
} else {
@@ -72,7 +73,7 @@ public abstract class ArtifactFactory {
return uuid == null ? ConnectionHandler.getNextSequence(OseeData.ART_ID_SEQ, true) : uuid;
}
- public synchronized Artifact reflectExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) {
+ public synchronized Artifact reflectExisitingArtifact(ArtifactId artId, String guid, IArtifactType artifactType, GammaId gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) {
Artifact toReturn = internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modificationType,
applicabilityId, false, TransactionToken.SENTINEL, true);
ArtifactCache.cache(toReturn);
@@ -82,7 +83,7 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- private Artifact internalExistingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) {
+ private Artifact internalExistingArtifact(ArtifactId artId, String guid, IArtifactType artifactType, GammaId gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) {
Artifact artifact = getArtifactInstance(artId.getId(), guid, branch, artifactType, true);
artifact.internalSetPersistenceData(gammaId, transactionId, modType, applicabilityId, historical, useBackingData);
@@ -93,7 +94,7 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- public synchronized Artifact loadExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) {
+ public synchronized Artifact loadExisitingArtifact(ArtifactId artId, String guid, IArtifactType artifactType, GammaId gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) {
return internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modType, applicabilityId, historical,
transactionId, false);
}
@@ -104,7 +105,7 @@ public abstract class ArtifactFactory {
* this method is used by the persistence manager when it needs a new instance of the class to work with and can not
* come up with it on its own.
*/
- protected abstract Artifact getArtifactInstance(Long id, String guid, BranchId branch, ArtifactTypeId artifactType, boolean inDataStore);
+ protected abstract Artifact getArtifactInstance(Long id, String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore);
@Override
public String toString() {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
index 4c7de2ace6..d59c16a862 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
@@ -25,9 +25,9 @@ import java.util.logging.Level;
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.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.GammaId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -344,7 +344,7 @@ public final class ArtifactLoader {
Artifact artifact = historical ? null : ArtifactCache.getActive(artifactId, branch);
if (artifact == null) {
- ArtifactTypeId artifactType = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
+ IArtifactType artifactType = ArtifactTypeManager.getType(chStmt.getLong("art_type_id"));
ArtifactFactory factory = ArtifactTypeManager.getFactory(artifactType);
artifact = factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
index 6c8c8f8ef7..22d20c7e68 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
@@ -140,30 +141,30 @@ public class ArtifactTypeManager {
/**
* Get a new instance of type artifactTypeName
*/
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch) {
return addArtifact(artifactType, branch, null, null, null);
}
/**
* Get a new instance of type artifactTypeName and set it's name.
*/
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name) {
return addArtifact(artifactType, branch, name, null, null);
}
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, Long artifactId) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, Long artifactId) {
return addArtifact(artifactType, branch, name, null, artifactId);
}
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, ArtifactId artifact) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, ArtifactId artifact) {
return addArtifact(artifactType, branch, name, null, artifact.getId());
}
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, String guid) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid) {
return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid);
}
- public static Artifact addArtifact(ArtifactTypeId artifactType, BranchId branch, String name, String guid, Long uuid) {
+ public static Artifact addArtifact(IArtifactType artifactType, BranchId branch, String name, String guid, Long uuid) {
return getFactory(artifactType).makeNewArtifact(branch, artifactType, name, guid, uuid);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java
index 3eb5e7ca2b..34063361eb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/DefaultArtifactFactory.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.artifact.factory;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
@@ -25,7 +26,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
public final class DefaultArtifactFactory extends ArtifactFactory {
@Override
- public Artifact getArtifactInstance(Long id, String guid, BranchId branch, ArtifactTypeId artifactType, boolean inDataStore) {
+ public Artifact getArtifactInstance(Long id, String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) {
return new Artifact(id, guid, branch, artifactType);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java
index 44100b3fcc..7a804f2680 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/UserArtifactFactory.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.artifact.factory;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -27,7 +28,7 @@ public class UserArtifactFactory extends ArtifactFactory {
}
@Override
- public Artifact getArtifactInstance(Long id, String guid, BranchId branch, ArtifactTypeId artifactType, boolean inDataStore) {
+ public Artifact getArtifactInstance(Long id, String guid, BranchId branch, IArtifactType artifactType, boolean inDataStore) {
return new User(id, guid, branch);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index bc2bb84544..3947cc7933 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -35,6 +35,7 @@ import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.HasBranch;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -574,7 +575,7 @@ public class ArtifactQuery {
return reloadedArts;
}
- public static Artifact getOrCreate(String guid, ArtifactTypeId type, BranchId branch) {
+ public static Artifact getOrCreate(String guid, IArtifactType type, BranchId branch) {
Artifact artifact = ArtifactQuery.checkArtifactFromId(guid, branch, EXCLUDE_DELETED);
if (artifact == null) {
@@ -737,7 +738,7 @@ public class ArtifactQuery {
List<ArtifactToken> tokens = new LinkedList<>();
while (chStmt.next()) {
Long artId = chStmt.getLong("art_id");
- ArtifactTypeId artTypeId = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
+ IArtifactType artTypeId = ArtifactTypeManager.getType(chStmt.getLong("art_type_id"));
String name = chStmt.getString("value");
String guid = chStmt.getString("guid");
ArtifactToken token = ArtifactToken.valueOf(artId, guid, name, branch, artTypeId);
@@ -825,7 +826,8 @@ public class ArtifactQuery {
chStmt.runPreparedQuery(query);
while (chStmt.next()) {
Long artId = chStmt.getLong("art_id");
- ArtifactTypeId artTypeId = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
+
+ IArtifactType artTypeId = ArtifactTypeManager.getType(chStmt.getLong("art_type_id"));
String name = chStmt.getString("value");
ArtifactToken token = ArtifactToken.valueOf(artId, name, branch, artTypeId);
Long artIdLong = isSideA ? artAIdToArtBId.get(artId) : artBIdToArtAId.get(artId);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
index 96a2d481a5..4c1e89b2f5 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
@@ -14,7 +14,6 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Set;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -206,7 +205,7 @@ public class RoughArtifact {
return attributes.getSoleAttributeValue(attributeName);
}
- public ArtifactTypeId getPrimaryArtifactType() {
+ public IArtifactType getPrimaryArtifactType() {
return primaryArtifactType;
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
index 271cc98d6d..eb2e221bbf 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactImpl.java
@@ -107,7 +107,7 @@ public class ArtifactImpl extends AttributeManagerImpl implements Artifact {
}
@Override
- public ArtifactTypeId getArtifactTypeId() {
+ public IArtifactType getArtifactTypeId() {
return getArtifactType();
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
index 00c988dbcb..ed3e341b4b 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java
@@ -99,7 +99,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact> implements A
}
@Override
- public ArtifactTypeId getArtifactTypeId() {
+ public IArtifactType getArtifactTypeId() {
return artifactType;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataModuleFactory.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataModuleFactory.java
index e0ba876eff..ae26d91cc4 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataModuleFactory.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataModuleFactory.java
@@ -70,7 +70,8 @@ public class DataModuleFactory {
SqlObjectLoader sqlObjectLoader =
loaderModule.createSqlObjectLoader(objectFactory, loadProcessor, attributeTypes);
final DataLoaderFactory dataLoaderFactory = loaderModule.createDataLoaderFactory(sqlObjectLoader);
- final QueryEngine queryEngine = queryModule.createQueryEngine(dataLoaderFactory, attributeTypes, sqlObjectLoader);
+ final QueryEngine queryEngine =
+ queryModule.createQueryEngine(dataLoaderFactory, attributeTypes, artifactTypes, sqlObjectLoader);
final BranchDataStore branchDataStore = branchModule.createBranchDataStore(dataLoaderFactory);
final KeyValueStore keyValueStore = keyValueModule.createKeyValueStore();
final TxDataStore txDataStore = txModule.createTransactionStore(dataLoaderFactory, indexer, attributeTypes);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/QueryModule.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/QueryModule.java
index 8958fb2bc5..c18a50f2ed 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/QueryModule.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/QueryModule.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.core.ds.DataLoaderFactory;
import org.eclipse.osee.orcs.core.ds.QueryEngine;
import org.eclipse.osee.orcs.core.ds.QueryEngineIndexer;
+import org.eclipse.osee.orcs.data.ArtifactTypes;
import org.eclipse.osee.orcs.data.AttributeTypes;
import org.eclipse.osee.orcs.db.internal.IdentityLocator;
import org.eclipse.osee.orcs.db.internal.loader.SqlObjectLoader;
@@ -69,7 +70,7 @@ public class QueryModule {
return queryIndexer;
}
- public QueryEngine createQueryEngine(DataLoaderFactory loaderFactory, AttributeTypes attrTypes, SqlObjectLoader sqlObjectLoader) {
+ public QueryEngine createQueryEngine(DataLoaderFactory loaderFactory, AttributeTypes attrTypes, ArtifactTypes artifactTypes, SqlObjectLoader sqlObjectLoader) {
QuerySqlContextFactory artifactSqlContextFactory =
Engines.createArtifactSqlContext(logger, sqlJoinFactory, idService, jdbcClient, taggingEngine);
QueryCallableFactory factory1 = newArtifactQueryEngine(artifactSqlContextFactory, logger, taggingEngine,
@@ -82,6 +83,6 @@ public class QueryModule {
QueryCallableFactory factory4 = newQueryEngine(logger, sqlJoinFactory, idService, jdbcClient, taggingEngine,
executorAdmin, loaderFactory, attrTypes);
return new QueryEngineImpl(factory1, branchSqlContextFactory, txSqlContextFactory, factory4, jdbcClient,
- sqlJoinFactory, artifactSqlContextFactory, sqlObjectLoader);
+ sqlJoinFactory, artifactSqlContextFactory, sqlObjectLoader, artifactTypes);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryEngineImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryEngineImpl.java
index 4a6c67e392..4427137613 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryEngineImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryEngineImpl.java
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.function.Consumer;
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.Branch;
import org.eclipse.osee.framework.core.executor.CancellableCallable;
import org.eclipse.osee.jdbc.JdbcClient;
@@ -27,6 +26,7 @@ import org.eclipse.osee.orcs.core.ds.LoadDataHandler;
import org.eclipse.osee.orcs.core.ds.QueryData;
import org.eclipse.osee.orcs.core.ds.QueryEngine;
import org.eclipse.osee.orcs.core.ds.criteria.CriteriaAttributeKeywords;
+import org.eclipse.osee.orcs.data.ArtifactTypes;
import org.eclipse.osee.orcs.data.TransactionReadable;
import org.eclipse.osee.orcs.db.internal.loader.SqlObjectLoader;
import org.eclipse.osee.orcs.db.internal.search.QueryCallableFactory;
@@ -48,8 +48,9 @@ public class QueryEngineImpl implements QueryEngine {
private final SqlJoinFactory sqlJoinFactory;
private final QuerySqlContextFactory artifactSqlContextFactory;
private final SqlObjectLoader sqlObjectLoader;
+ private final ArtifactTypes artifactTypes;
- public QueryEngineImpl(QueryCallableFactory artifactQueryEngineFactory, QuerySqlContextFactory branchSqlContextFactory, QuerySqlContextFactory txSqlContextFactory, QueryCallableFactory allQueryEngineFactory, JdbcClient jdbcClient, SqlJoinFactory sqlJoinFactory, QuerySqlContextFactory artifactSqlContextFactory, SqlObjectLoader sqlObjectLoader) {
+ public QueryEngineImpl(QueryCallableFactory artifactQueryEngineFactory, QuerySqlContextFactory branchSqlContextFactory, QuerySqlContextFactory txSqlContextFactory, QueryCallableFactory allQueryEngineFactory, JdbcClient jdbcClient, SqlJoinFactory sqlJoinFactory, QuerySqlContextFactory artifactSqlContextFactory, SqlObjectLoader sqlObjectLoader, ArtifactTypes artifactTypes) {
this.artifactQueryEngineFactory = artifactQueryEngineFactory;
this.branchSqlContextFactory = branchSqlContextFactory;
this.txSqlContextFactory = txSqlContextFactory;
@@ -58,6 +59,7 @@ public class QueryEngineImpl implements QueryEngine {
this.sqlJoinFactory = sqlJoinFactory;
this.artifactSqlContextFactory = artifactSqlContextFactory;
this.sqlObjectLoader = sqlObjectLoader;
+ this.artifactTypes = artifactTypes;
}
@Override
@@ -123,7 +125,7 @@ public class QueryEngineImpl implements QueryEngine {
public List<ArtifactToken> loadArtifactTokens(QueryData queryData) {
List<ArtifactToken> tokens = new ArrayList<>(100);
loadArtifactX(queryData, QueryType.TOKEN, stmt -> tokens.add(ArtifactToken.valueOf(stmt.getLong("art_id"),
- stmt.getString("value"), queryData.getBranch(), ArtifactTypeId.valueOf(stmt.getLong("art_type_id")))));
+ stmt.getString("value"), queryData.getBranch(), artifactTypes.get(stmt.getLong("art_type_id")))));
return tokens;
}

Back to the top