Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-04-10 11:54:29 -0400
committerdonald.g.dunne2014-04-10 11:56:48 -0400
commit0748e1ae673255c6e6e008e80b51a37e26a3fbf2 (patch)
tree83c450ce535be3f59730381a96fa8acce10b2052
parent5ddfa7ebe2f06ea2c213eb2834de1b8d0b691eab (diff)
downloadorg.eclipse.osee-0748e1ae673255c6e6e008e80b51a37e26a3fbf2.tar.gz
org.eclipse.osee-0748e1ae673255c6e6e008e80b51a37e26a3fbf2.tar.xz
org.eclipse.osee-0748e1ae673255c6e6e008e80b51a37e26a3fbf2.zip
feature[ats_ATS19845]: Convert IOseeBranch to Identity-Long
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/branch/BranchQueryOptions.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/branch/BranchQueryResource.java10
5 files changed, 15 insertions, 13 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 0e884791ee..04017aca0c 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
@@ -46,6 +46,7 @@ public final class BranchCacheUpdateUtil {
private final BranchFactory factory;
private final TransactionCache txCache;
+ public static final Long DEFAULT_UUID = -1L;
public BranchCacheUpdateUtil(BranchFactory factory, TransactionCache txCache) {
this.factory = factory;
@@ -153,8 +154,9 @@ public final class BranchCacheUpdateUtil {
}
private static void addMergeBranches(List<Triplet<Long, Long, Long>> srcDestMerge, MergeBranch mergeBranch) throws OseeCoreException {
- Long src = mergeBranch.getSourceBranch() != null ? mergeBranch.getSourceBranch().getGuid() : null;
- Long dest = mergeBranch.getDestinationBranch() != null ? mergeBranch.getDestinationBranch().getGuid() : null;
+ Long src = mergeBranch.getSourceBranch() != null ? mergeBranch.getSourceBranch().getGuid() : DEFAULT_UUID;
+ Long dest =
+ mergeBranch.getDestinationBranch() != null ? mergeBranch.getDestinationBranch().getGuid() : DEFAULT_UUID;
Long merge = mergeBranch.getGuid();
srcDestMerge.add(new Triplet<Long, Long, Long>(src, dest, merge));
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
index a8a3df78f6..da2b01470f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
@@ -161,7 +161,7 @@ public class BranchManager {
}
public static long getBranchId(IOseeBranch branch) throws OseeCoreException {
- return getBranch(branch).getId();
+ return branch.getUuid();
}
public static Branch getBranch(IOseeBranch branch) throws OseeCoreException {
@@ -232,7 +232,7 @@ public class BranchManager {
return getCache().get(branchToken) != null;
}
- public static boolean branchExists(Long id) throws OseeCoreException {
+ public static boolean branchExists(long id) throws OseeCoreException {
return getCache().getById(id) != null;
}
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 1b0d1aca60..b29fe111a2 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
@@ -216,7 +216,7 @@ public final class FrameworkEventUtil {
}
public static ArtifactEvent getPersistEvent(RemotePersistEvent1 remEvent) {
- ArtifactEvent event = new ArtifactEvent(Long.valueOf(remEvent.getBranchGuid()));
+ ArtifactEvent event = new ArtifactEvent(getBranchUuidFromRemoteEvent(remEvent.getBranchGuid()));
event.setNetworkSender(getNetworkSender(remEvent.getNetworkSender()));
event.setTransactionId(remEvent.getTransactionId());
for (RemoteBasicGuidArtifact1 remGuidArt : remEvent.getArtifacts()) {
diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/branch/BranchQueryOptions.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/branch/BranchQueryOptions.java
index 97d45aceff..b476a0c661 100644
--- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/branch/BranchQueryOptions.java
+++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/branch/BranchQueryOptions.java
@@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.enums.BranchType;
*/
public class BranchQueryOptions {
- private List<Integer> branchIds;
+ private List<Long> branchIds;
private List<BranchType> branchTypes;
private List<BranchState> branchStates;
private boolean includeDeleted;
@@ -29,11 +29,11 @@ public class BranchQueryOptions {
private Long isChildOf = -1L;
private Long isAncestorOf = -1L;
- public List<Integer> getBranchIds() {
+ public List<Long> getBranchIds() {
return branchIds;
}
- public void setBranchIds(List<Integer> branchIds) {
+ public void setBranchIds(List<Long> branchIds) {
this.branchIds = branchIds;
}
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/branch/BranchQueryResource.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/branch/BranchQueryResource.java
index 98886b18a9..943053234e 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/branch/BranchQueryResource.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/branch/BranchQueryResource.java
@@ -85,9 +85,9 @@ public class BranchQueryResource {
public Response searchBranchesFromQuery(@QueryParam("branchIds") String branchIds, @QueryParam("branchTypes") String branchTypes, @QueryParam("branchStates") String branchStates, @QueryParam("deleted") boolean deleted, @QueryParam("archived") boolean archived, @QueryParam("nameEquals") String nameEquals, @QueryParam("namePattern") String namePattern, @QueryParam("childOf") Long childOf, @QueryParam("ancestorOf") Long ancestorOf, @QueryParam("pretty") boolean pretty) {
BranchQueryOptions options = new BranchQueryOptions();
if (Strings.isValid(branchIds)) {
- List<Integer> branchIdVals = new LinkedList<Integer>();
+ List<Long> branchIdVals = new LinkedList<Long>();
for (String branchId : branchIds.split(",")) {
- branchIdVals.add(Integer.parseInt(branchId));
+ branchIdVals.add(Long.parseLong(branchId));
}
options.setBranchIds(branchIdVals);
}
@@ -169,7 +169,7 @@ public class BranchQueryResource {
private List<BranchReadable> getResultsFromOptions(BranchQueryOptions options) {
BranchQuery query = orcsApi.getQueryFactory(null).branchQuery();
if (Conditions.hasValues(options.getBranchIds())) {
- query.andLocalIds(options.getBranchIds());
+ query.andUuids(options.getBranchIds());
}
List<BranchState> branchStates = options.getBranchStates();
@@ -182,9 +182,9 @@ public class BranchQueryResource {
query.andIsOfType(branchTypes.toArray(new BranchType[branchTypes.size()]));
}
- List<Integer> branchIds = options.getBranchIds();
+ List<Long> branchIds = options.getBranchIds();
if (Conditions.hasValues(branchIds)) {
- query.andLocalIds(branchIds);
+ query.andUuids(branchIds);
}
if (options.isIncludeArchived()) {

Back to the top