Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-10-26 18:25:48 -0400
committerdonald.g.dunne2016-10-26 18:25:48 -0400
commitde4ba34908b069122aa95ecbd602978b9973a888 (patch)
tree8170d84fb2e697341b8a61a65f5f4c86dee964ef
parentbc1a903268825f915fb2a9a87883d15c915611ad (diff)
downloadorg.eclipse.osee-de4ba34908b069122aa95ecbd602978b9973a888.tar.gz
org.eclipse.osee-de4ba34908b069122aa95ecbd602978b9973a888.tar.xz
org.eclipse.osee-de4ba34908b069122aa95ecbd602978b9973a888.zip
refactor: Remove IBasicGuidArtifact
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java2
-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.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java23
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/TokenFactory.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java12
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java19
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/IEventFilter.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java23
15 files changed, 48 insertions, 87 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 8bbe3a802b..31e247ee0a 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
@@ -222,7 +222,7 @@ public class ArtifactEventTest {
DefaultBasicUuidRelationReorder guidReorder = listener.getReorders().iterator().next();
Assert.assertEquals(RelationOrderModType.Absolute, guidReorder.getModType());
Assert.assertEquals(newArt.getGuid(), guidReorder.getParentArt().getGuid());
- Assert.assertEquals(newArt.getArtTypeGuid(), guidReorder.getParentArt().getArtTypeGuid());
+ Assert.assertEquals(newArt.getArtifactTypeId(), guidReorder.getParentArt().getArtifactType());
Assert.assertTrue(newArt.isOnSameBranch(guidReorder));
Assert.assertEquals(CoreRelationTypes.Default_Hierarchical__Child.getGuid(), guidReorder.getRelTypeGuid());
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 84d79d4dec..85744da8bd 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.getArtTypeGuid());
+ remGuidArt.setArtTypeGuid(modifiedArt.getArtifactTypeId().getId());
remGuidArt.setArtGuid(modifiedArt.getGuid());
remoteEvent.getArtifacts().add(remGuidArt);
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java
index dac3f1181a..cb52f49cb5 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicGuidArtifact.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.core.model.event;
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.HasBranch;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.BaseIdentity;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -20,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.util.GUID;
/**
* @author Donald G. Dunne
*/
-public class DefaultBasicGuidArtifact extends BaseIdentity<String> implements IBasicGuidArtifact {
+public class DefaultBasicGuidArtifact extends BaseIdentity<String> implements HasBranch {
private final BranchId branch;
private ArtifactTypeId artifactType;
@@ -43,7 +44,6 @@ public class DefaultBasicGuidArtifact extends BaseIdentity<String> implements IB
return branch;
}
- @Override
public Long getArtTypeGuid() {
return artifactType.getId();
}
@@ -71,8 +71,8 @@ public class DefaultBasicGuidArtifact extends BaseIdentity<String> implements IB
@Override
public boolean equals(Object obj) {
boolean equals = super.equals(obj);
- if (!equals && obj instanceof IBasicGuidArtifact) {
- IBasicGuidArtifact other = (IBasicGuidArtifact) obj;
+ if (!equals && obj instanceof DefaultBasicGuidArtifact) {
+ DefaultBasicGuidArtifact other = (DefaultBasicGuidArtifact) obj;
if (artifactType == null || other.getArtTypeGuid() == null) {
equals = false;
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java
deleted file mode 100644
index cc87872e50..0000000000
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidArtifact.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.model.event;
-
-import org.eclipse.osee.framework.core.data.HasBranch;
-
-/**
- * @author Donald G. Dunne
- */
-public interface IBasicGuidArtifact extends HasBranch {
- public abstract String getGuid();
-
- public abstract Long getArtTypeGuid();
-
-} \ 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 dadb58fbb1..324d7e26ef 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
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.core.data;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.jdk.core.type.FullyNamedIdentity;
import org.eclipse.osee.framework.jdk.core.type.NamedId;
import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
@@ -147,6 +148,11 @@ public final class TokenFactory {
public String getGuid() {
return guid;
}
+
+ @Override
+ public BranchId getBranch() {
+ return CoreBranches.COMMON;
+ }
}
private final static class AccessContextIdToken extends NamedIdentity<String> implements IAccessContextId {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java
index 80aa6d2d3b..ed0e62bb5c 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java
@@ -15,7 +15,6 @@ import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidArtifact;
import org.eclipse.osee.framework.skynet.core.event.model.EventModType;
import org.junit.Assert;
@@ -63,7 +62,7 @@ public class EventBasicGuidArtifactTest {
eventArt2 = new EventBasicGuidArtifact(EventModType.Added, COMMON, Artifact);
- Set<IBasicGuidArtifact> toAdd = new HashSet<>();
+ Set<DefaultBasicGuidArtifact> toAdd = new HashSet<>();
toAdd.add(eventArt2);
toAdd.add(eventArt1);
Assert.assertEquals(2, toAdd.size());
@@ -71,7 +70,7 @@ public class EventBasicGuidArtifactTest {
toAdd.add(eventArt1);
Assert.assertEquals(2, toAdd.size());
- Set<IBasicGuidArtifact> eventArts = new HashSet<>();
+ Set<DefaultBasicGuidArtifact> eventArts = new HashSet<>();
eventArts.add(eventArt2);
eventArts.addAll(toAdd);
Assert.assertEquals(2, toAdd.size());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
index 4bf139cb02..172c352295 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
@@ -18,7 +18,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
+import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidArtifact;
import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidRelation;
@@ -48,7 +48,7 @@ public class BranchUuidEventFilterTest {
EventBasicGuidArtifact guidArtA = new EventBasicGuidArtifact(EventModType.Added, BranchId.create(), Requirement);
EventBasicGuidArtifact guidArtB =
new EventBasicGuidArtifact(EventModType.Added, BranchId.create(), SoftwareRequirement);
- List<IBasicGuidArtifact> arts = new ArrayList<>();
+ List<DefaultBasicGuidArtifact> arts = new ArrayList<>();
arts.add(guidArtB);
arts.add(guidArtA);
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 4e299930e2..d45a1057b9 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
@@ -53,7 +53,6 @@ import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.DefaultBasicUuidRelationReorder;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.core.model.type.RelationType;
@@ -91,7 +90,7 @@ import org.eclipse.osee.framework.skynet.core.types.IArtifact;
* @author Ryan D. Brooks
*/
-public class Artifact extends FullyNamedIdentity<String> implements IArtifact, Adaptable, IBasicGuidArtifact {
+public class Artifact extends FullyNamedIdentity<String> implements IArtifact, Adaptable {
public static final String UNNAMED = "Unnamed";
public static final String BEFORE_GUID_STRING = "/BeforeGUID/PrePend";
public static final String AFTER_GUID_STRING = "/AfterGUID";
@@ -1562,8 +1561,8 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
*/
@Override
public final boolean equals(Object obj) {
- if (obj instanceof IBasicGuidArtifact) {
- IBasicGuidArtifact other = (IBasicGuidArtifact) obj;
+ if (obj instanceof DefaultBasicGuidArtifact) {
+ DefaultBasicGuidArtifact other = (DefaultBasicGuidArtifact) obj;
boolean result = getGuid().equals(other.getGuid());
if (result) {
if (getBranchId() != null && other.getBranchId() != null) {
@@ -1706,11 +1705,6 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return new DefaultBasicGuidArtifact(getBranch(), getArtifactTypeId(), this);
}
- @Override
- public final Long getArtTypeGuid() {
- return getArtifactType().getGuid();
- }
-
public final Set<DefaultBasicUuidRelationReorder> getRelationOrderRecords() {
return relationOrderRecords;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
index e2520169e1..ce2fe030b0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
@@ -21,7 +21,6 @@ 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.core.model.event.DefaultBasicGuidArtifact;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.cache.ArtifactIdCache;
@@ -98,9 +97,9 @@ public final class ArtifactCache {
return artifacts;
}
- public static Collection<Artifact> getActive(Collection<? extends IBasicGuidArtifact> basicGuidArtifacts) throws OseeCoreException {
+ public static Collection<Artifact> getActive(Collection<? extends DefaultBasicGuidArtifact> basicGuidArtifacts) {
Set<Artifact> artifacts = new HashSet<>();
- for (IBasicGuidArtifact guidArt : basicGuidArtifacts) {
+ for (DefaultBasicGuidArtifact guidArt : basicGuidArtifacts) {
Artifact art = ID_CACHE.getByGuid(guidArt.getGuid(), guidArt.getBranch());
if (art != null) {
artifacts.add(art);
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 0a8207bc5d..5bfaa11a8d 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
@@ -47,7 +47,6 @@ import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.enums.RelationSide;
import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -60,7 +59,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactLoader;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidArtifact;
import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
import org.eclipse.osee.framework.skynet.core.utility.ConnectionHandler;
import org.eclipse.osee.jdbc.JdbcStatement;
@@ -91,14 +89,6 @@ public class ArtifactQuery {
return getArtifactFromId(artifactToken.getId(), artifactToken.getBranch());
}
- public static Artifact getArtifactFromToken(EventBasicGuidArtifact guidArt) throws OseeCoreException {
- return getArtifactFromId(guidArt.getGuid(), guidArt.getBranch());
- }
-
- public static Artifact getArtifactFromToken(IBasicGuidArtifact guidArt) throws OseeCoreException {
- return getArtifactFromId(guidArt.getGuid(), guidArt.getBranch());
- }
-
/**
* search for exactly one artifact by one its id - otherwise throw an exception
*
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
index 3a1b03e350..8525cec53c 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.event.filter;
-import java.util.Arrays;
import java.util.List;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
+import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
/**
@@ -22,23 +21,21 @@ import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
*/
public class ArtifactEventFilter implements IEventFilter {
- private final String filterArtifactGuid;
- private final BranchId filterBranch;
+ private final ArtifactToken artifact;
public ArtifactEventFilter(ArtifactToken artifact) {
- filterArtifactGuid = artifact.getGuid();
- filterBranch = artifact.getBranch();
+ this.artifact = artifact;
}
@Override
public boolean isMatch(BranchId branch) {
- return branch.equals(filterBranch);
+ return artifact.isOnBranch(branch);
}
@Override
- public boolean isMatchArtifacts(List<? extends IBasicGuidArtifact> guidArts) {
- for (IBasicGuidArtifact art : guidArts) {
- if (art.getGuid().equals(filterArtifactGuid) && art.isOnBranch(filterBranch)) {
+ public boolean isMatchArtifacts(List<? extends DefaultBasicGuidArtifact> guidArts) {
+ for (DefaultBasicGuidArtifact art : guidArts) {
+ if (art.equals(artifact)) {
return true;
}
}
@@ -48,7 +45,7 @@ public class ArtifactEventFilter implements IEventFilter {
@Override
public boolean isMatchRelationArtifacts(List<? extends IBasicGuidRelation> relations) {
for (IBasicGuidRelation relation : relations) {
- if (isMatchArtifacts(Arrays.asList(relation.getArtA(), relation.getArtB()))) {
+ if (relation.getArtA().equals(artifact) || relation.getArtB().equals(artifact)) {
return true;
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
index 3e21ef30d9..9857194a9b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilter.java
@@ -16,7 +16,7 @@ import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
+import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeProvider;
@@ -47,9 +47,9 @@ public class ArtifactTypeEventFilter implements IEventFilter {
* Return true if any artifact matches any of the desired artifact types
*/
@Override
- public boolean isMatchArtifacts(List<? extends IBasicGuidArtifact> guidArts) {
+ public boolean isMatchArtifacts(List<? extends DefaultBasicGuidArtifact> guidArts) {
try {
- for (IBasicGuidArtifact guidArt : guidArts) {
+ for (DefaultBasicGuidArtifact guidArt : guidArts) {
IArtifactType artType = typeProvider.getTypeByGuid(guidArt.getArtTypeGuid());
for (IArtifactType artifactType : artifactTypes) {
if (typeProvider.inheritsFrom(artType, artifactType)) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java
index 0e7bab55e0..1e05db8d97 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilter.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.event.filter;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
+import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
/**
@@ -38,11 +38,11 @@ public class BranchUuidEventFilter implements IEventFilter {
}
@Override
- public boolean isMatchArtifacts(List<? extends IBasicGuidArtifact> guidArts) {
+ public boolean isMatchArtifacts(List<? extends DefaultBasicGuidArtifact> guidArts) {
if (guidArts.isEmpty()) {
return true;
}
- for (IBasicGuidArtifact guidArt : guidArts) {
+ for (DefaultBasicGuidArtifact guidArt : guidArts) {
if (guidArt.isOnBranch(branchToken)) {
return true;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/IEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/IEventFilter.java
index 2ef5bc369f..d505e67a77 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/IEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/IEventFilter.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.framework.skynet.core.event.filter;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
+import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
/**
@@ -28,7 +28,7 @@ public interface IEventFilter {
/**
* return true if events for this this guid artifact should be passed through to listeners
*/
- public boolean isMatchArtifacts(List<? extends IBasicGuidArtifact> guidArts);
+ public boolean isMatchArtifacts(List<? extends DefaultBasicGuidArtifact> guidArts);
/**
* return true if events for this guid relation should be passed through to listeners
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
index 3d41f52209..cef1ad6afb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
@@ -22,7 +22,6 @@ import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.DefaultBasicUuidRelationReorder;
-import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -106,7 +105,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isRelAddedChangedDeleted(artifact.getBasicGuidArtifact());
}
- private boolean isRelAddedChangedDeleted(IBasicGuidArtifact guidArt) {
+ private boolean isRelAddedChangedDeleted(DefaultBasicGuidArtifact guidArt) {
return isRelChange(guidArt) || isRelAdded(guidArt) || isRelDeletedPurged(guidArt);
}
@@ -114,7 +113,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isHasEvent(artifact.getBasicGuidArtifact());
}
- private boolean isHasEvent(IBasicGuidArtifact guidArt) {
+ private boolean isHasEvent(DefaultBasicGuidArtifact guidArt) {
return isModified(guidArt) || isDeletedPurged(guidArt) || isRelChange(guidArt) || isRelDeletedPurged(
guidArt) || isRelAdded(guidArt);
}
@@ -123,7 +122,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isDeletedPurged(artifact.getBasicGuidArtifact());
}
- private boolean isDeletedPurged(IBasicGuidArtifact guidArt) {
+ private boolean isDeletedPurged(DefaultBasicGuidArtifact guidArt) {
for (EventBasicGuidArtifact gArt : artifacts) {
if (gArt.is(EventModType.Deleted, EventModType.Purged) && gArt.equals(guidArt)) {
return true;
@@ -183,8 +182,8 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return guidArts;
}
- private Collection<IBasicGuidArtifact> getRelationsArts(RelationEventType... eventModTypes) {
- Set<IBasicGuidArtifact> guidArts = new HashSet<>();
+ private Collection<DefaultBasicGuidArtifact> getRelationsArts(RelationEventType... eventModTypes) {
+ Set<DefaultBasicGuidArtifact> guidArts = new HashSet<>();
for (EventBasicGuidRelation guidRel : getRelations(eventModTypes)) {
guidArts.add(guidRel.getArtA());
guidArts.add(guidRel.getArtB());
@@ -208,7 +207,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isReloaded(artifact.getBasicGuidArtifact());
}
- private boolean isReloaded(IBasicGuidArtifact guidArt) {
+ private boolean isReloaded(DefaultBasicGuidArtifact guidArt) {
return get(EventModType.Reloaded).contains(guidArt);
}
@@ -216,7 +215,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isModified(artifact.getBasicGuidArtifact());
}
- private boolean isModified(IBasicGuidArtifact guidArt) {
+ private boolean isModified(DefaultBasicGuidArtifact guidArt) {
return get(EventModType.Modified).contains(guidArt);
}
@@ -224,14 +223,14 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return isModifiedReloaded(artifact.getBasicGuidArtifact());
}
- private boolean isModifiedReloaded(IBasicGuidArtifact guidArt) {
+ private boolean isModifiedReloaded(DefaultBasicGuidArtifact guidArt) {
return get(EventModType.Modified, EventModType.Reloaded).contains(guidArt);
}
/**
* Relation rationale changed
*/
- private boolean isRelChange(IBasicGuidArtifact guidArt) {
+ private boolean isRelChange(DefaultBasicGuidArtifact guidArt) {
for (EventBasicGuidRelation guidRel : getRelations(RelationEventType.ModifiedRationale)) {
if (guidRel.getArtA().equals(guidArt) || guidRel.getArtB().equals(guidArt)) {
return true;
@@ -240,7 +239,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return false;
}
- private boolean isRelDeletedPurged(IBasicGuidArtifact guidArt) {
+ private boolean isRelDeletedPurged(DefaultBasicGuidArtifact guidArt) {
for (EventBasicGuidRelation guidRel : getRelations(RelationEventType.Deleted, RelationEventType.Purged)) {
if (guidRel.getArtA().equals(guidArt) || guidRel.getArtB().equals(guidArt)) {
return true;
@@ -249,7 +248,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
return false;
}
- private boolean isRelAdded(IBasicGuidArtifact guidArt) {
+ private boolean isRelAdded(DefaultBasicGuidArtifact guidArt) {
for (EventBasicGuidRelation guidRel : getRelations(RelationEventType.Added, RelationEventType.Undeleted)) {
if (guidRel.getArtA().equals(guidArt) || guidRel.getArtB().equals(guidArt)) {
return true;

Back to the top