Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java')
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
index e2ae2fa7a52..76594e7354a 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsBranchServiceImpl.java
@@ -29,11 +29,13 @@ import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
+import org.eclipse.osee.framework.core.model.change.CompareResults;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.orcs.OrcsApi;
import org.eclipse.osee.orcs.data.BranchReadable;
+import org.eclipse.osee.orcs.data.TransactionReadable;
import org.eclipse.osee.orcs.search.BranchQuery;
import org.eclipse.osee.orcs.search.TransactionQuery;
@@ -180,4 +182,23 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService {
throw new UnsupportedOperationException("Not yet supported on server");
}
+ @Override
+ public CompareResults getChangeData(TransactionToken transaction) {
+ TransactionQuery transQuery = orcsApi.getQueryFactory().transactionQuery();
+ TransactionReadable startTx = transQuery.andIsPriorTx(transaction).getResults().getAtMostOneOrNull();
+ CompareResults results = orcsApi.getTransactionFactory().compareTxs(startTx, transaction);
+ return results;
+ }
+
+ @Override
+ public CompareResults getChangeData(BranchId branch) {
+ TransactionQuery transactionQuery2 = orcsApi.getQueryFactory().transactionQuery();
+ TransactionQuery transactionQuery3 = orcsApi.getQueryFactory().transactionQuery();
+ BranchId parentBranch = services.getBranchService().getParentBranch(branch);
+ TransactionReadable startTx = transactionQuery2.andIsHead(branch).getResults().getExactlyOne();
+ TransactionReadable endTx = transactionQuery3.andIsHead(parentBranch).getResults().getExactlyOne();
+ CompareResults results = orcsApi.getTransactionFactory().compareTxs(startTx, endTx);
+ return results;
+ }
+
}

Back to the top