Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-07-13 14:43:17 -0400
committerddunne2010-07-13 14:43:17 -0400
commitdb1e03830eef3a71b0739960b1dba6f547333809 (patch)
tree1b0c9482f00936a9503700baed306a8560c0ea13 /plugins/org.eclipse.osee.framework.core.message/src/org
parent14350e61eaf15c6ed2eb7b30f544e0d4d3d2ea93 (diff)
downloadorg.eclipse.osee-db1e03830eef3a71b0739960b1dba6f547333809.tar.gz
org.eclipse.osee-db1e03830eef3a71b0739960b1dba6f547333809.tar.xz
org.eclipse.osee-db1e03830eef3a71b0739960b1dba6f547333809.zip
remove shallow artifact
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java
index 437392743e..2a1683cd47 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java
@@ -18,8 +18,6 @@ import java.util.Map.Entry;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.BranchFactory;
-import org.eclipse.osee.framework.core.model.IArtifactFactory;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.MergeBranch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.IOseeCache;
@@ -45,13 +43,11 @@ public final class BranchCacheUpdateUtil {
private final BranchFactory factory;
private final TransactionCache txCache;
- private final IArtifactFactory<?> artFactory;
- public BranchCacheUpdateUtil(BranchFactory factory, TransactionCache txCache, IArtifactFactory<?> artFactory) {
+ public BranchCacheUpdateUtil(BranchFactory factory, TransactionCache txCache) {
super();
this.factory = factory;
this.txCache = txCache;
- this.artFactory = artFactory;
}
public Collection<Branch> updateCache(AbstractBranchCacheMessage cacheMessage, IOseeCache<Branch> cache) throws OseeCoreException {
@@ -72,7 +68,7 @@ public final class BranchCacheUpdateUtil {
Integer artifactId = branchToAssocArt.get(branchId);
if (artifactId != null) {
- updated.setAssociatedArtifact(artFactory.createArtifact(artifactId));
+ updated.setAssociatedArtifactId(artifactId);
}
}
@@ -115,16 +111,16 @@ public final class BranchCacheUpdateUtil {
}
addTxRecord(message.getBranchToBaseTx(), branchId, br.getBaseTransaction());
addTxRecord(message.getBranchToSourceTx(), branchId, br.getSourceTransaction());
- addAssocArtifact(message.getBranchToAssocArt(), branchId, br.getAssociatedArtifact());
+ addAssocArtifact(message.getBranchToAssocArt(), branchId, br.getAssociatedArtifactId());
if (br.getBranchType().isMergeBranch()) {
addMergeBranches(message.getMergeBranches(), (MergeBranch) br);
}
}
}
- private static void addAssocArtifact(Map<Integer, Integer> map, Integer branchId, IBasicArtifact<?> art) {
- if (art != null) {
- map.put(branchId, art.getArtId());
+ private static void addAssocArtifact(Map<Integer, Integer> map, Integer branchId, Integer artId) {
+ if (artId != null) {
+ map.put(branchId, artId);
} else {
map.put(branchId, -1);
}

Back to the top