Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-08-14 23:37:50 -0400
committerRyan D. Brooks2017-08-15 14:51:05 -0400
commitd63c40192ed6fa75a0a7daa7d57d29dcbd7a6e6c (patch)
treeb4acbfd13b688b7de98e56b4a17f64c98ab28c14
parent3048776708330cbadbd18e4450172dd64635b112 (diff)
downloadorg.eclipse.osee-d63c40192ed6fa75a0a7daa7d57d29dcbd7a6e6c.tar.gz
org.eclipse.osee-d63c40192ed6fa75a0a7daa7d57d29dcbd7a6e6c.tar.xz
org.eclipse.osee-d63c40192ed6fa75a0a7daa7d57d29dcbd7a6e6c.zip
refactor: Use ArtifactTypeId in RemoteBasicGuidArtifact1
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java4
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java11
4 files changed, 16 insertions, 9 deletions
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
index f494532b16..b74747be44 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
@@ -348,7 +348,7 @@ public class ArtifactEventTest {
RemoteBasicGuidArtifact1 remGuidArt = new RemoteBasicGuidArtifact1();
remGuidArt.setModTypeGuid(EventModType.Modified.getGuid());
remGuidArt.setBranch(COMMON);
- remGuidArt.setArtTypeGuid(CoreArtifactTypes.GeneralData.getGuid());
+ remGuidArt.setArtifactType(CoreArtifactTypes.GeneralData);
remGuidArt.setArtGuid(modifiedArt.getGuid());
remoteEvent.getArtifacts().add(remGuidArt);
@@ -603,7 +603,7 @@ public class ArtifactEventTest {
RemoteBasicGuidArtifact1 parentRemGuidArt = new RemoteBasicGuidArtifact1();
parentRemGuidArt.setModTypeGuid(EventModType.Modified.getGuid());
parentRemGuidArt.setBranch(COMMON);
- parentRemGuidArt.setArtTypeGuid(CoreArtifactTypes.GeneralData.getGuid());
+ parentRemGuidArt.setArtifactType(CoreArtifactTypes.GeneralData);
parentRemGuidArt.setArtGuid(GUID.create());
remoteReorder.setParentArt(parentRemGuidArt);
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java
index 85744da8bd..a3a5526600 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/FrameworkEventToRemoteEventListenerTest.java
@@ -119,7 +119,7 @@ public class FrameworkEventToRemoteEventListenerTest {
RemoteBasicGuidArtifact1 remGuidArt = new RemoteBasicGuidArtifact1();
remGuidArt.setModTypeGuid(EventModType.Modified.getGuid());
remGuidArt.setBranch(BRANCH);
- remGuidArt.setArtTypeGuid(modifiedArt.getArtifactTypeId().getId());
+ remGuidArt.setArtifactType(modifiedArt.getArtifactTypeId());
remGuidArt.setArtGuid(modifiedArt.getGuid());
remoteEvent.getArtifacts().add(remGuidArt);
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java
index 883339260e..19377e5358 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java
@@ -116,6 +116,10 @@ public class RemoteBasicGuidArtifact1 extends RemoteEvent {
return ArtifactTypeId.valueOf(artTypeGuid);
}
+ public void setArtifactType(ArtifactTypeId type) {
+ this.artTypeGuid = type.getId();
+ }
+
/**
* Sets the value of the artTypeGuid property.
*/
@@ -174,6 +178,10 @@ public class RemoteBasicGuidArtifact1 extends RemoteEvent {
return ArtifactTypeId.valueOf(toArtTypeGuid);
}
+ public void setToArtifactType(ArtifactTypeId type) {
+ this.toArtTypeGuid = type.getId();
+ }
+
/**
* Sets the value of the toArtTypeGuid property.
*/
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
index ba47882177..3844e9416f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
@@ -14,7 +14,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
-import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.DefaultBasicUuidRelationReorder;
@@ -127,8 +126,8 @@ public final class FrameworkEventUtil {
EventChangeTypeBasicGuidArtifact changeGuidArt = (EventChangeTypeBasicGuidArtifact) guidArt;
RemoteBasicGuidArtifact1 remGuidArt =
getRemoteBasicGuidArtifact(guidArt.getModType().getGuid(), guidArt, null);
- remGuidArt.setArtTypeGuid(changeGuidArt.getFromArtTypeGuid().getId());
- remGuidArt.setToArtTypeGuid(changeGuidArt.getArtifactType().getId());
+ remGuidArt.setArtifactType(changeGuidArt.getFromArtTypeGuid());
+ remGuidArt.setToArtifactType(changeGuidArt.getArtifactType());
event.getArtifacts().add(remGuidArt);
} else {
event.getArtifacts().add(getRemoteBasicGuidArtifact(guidArt.getModType().getGuid(), guidArt, null));
@@ -201,7 +200,7 @@ public final class FrameworkEventUtil {
public static RemoteBasicGuidArtifact1 getRemoteBasicGuidArtifact(DefaultBasicGuidArtifact guidArt) {
RemoteBasicGuidArtifact1 event = new RemoteBasicGuidArtifact1();
event.setBranch(guidArt.getBranch());
- event.setArtTypeGuid(guidArt.getArtifactType().getId());
+ event.setArtifactType(guidArt.getArtifactType());
event.setArtGuid(guidArt.getGuid());
return event;
}
@@ -262,7 +261,7 @@ public final class FrameworkEventUtil {
}
public static DefaultBasicGuidArtifact getBasicGuidArtifact(RemoteBasicGuidArtifact1 remGuidArt) {
- return new DefaultBasicGuidArtifact(remGuidArt.getBranch(), ArtifactTypeId.valueOf(remGuidArt.getArtTypeGuid()),
+ return new DefaultBasicGuidArtifact(remGuidArt.getBranch(), remGuidArt.getArtifactType(),
remGuidArt.getArtGuid());
}
@@ -270,7 +269,7 @@ public final class FrameworkEventUtil {
RemoteBasicGuidArtifact1 remoteGuidArt = new RemoteBasicGuidArtifact1();
remoteGuidArt.setArtGuid(guidArt.getGuid());
remoteGuidArt.setBranch(guidArt.getBranch());
- remoteGuidArt.setArtTypeGuid(guidArt.getArtifactType().getId());
+ remoteGuidArt.setArtifactType(guidArt.getArtifactType());
remoteGuidArt.setModTypeGuid(modTypeGuid);
if (attributeChanges != null) {
for (AttributeChange attrChg : attributeChanges) {

Back to the top