Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-05-11 18:14:22 +0000
committerdonald.g.dunne2016-05-11 18:14:22 +0000
commit35dda22ff4c8ffd41bbc8718e6a1647f1df63abe (patch)
tree6e5a386dc4c99b09ad0e5fcaa60458546a5a54cb /plugins
parent38437532280db829e658d7814693659cecb7fb56 (diff)
downloadorg.eclipse.osee-35dda22ff4c8ffd41bbc8718e6a1647f1df63abe.tar.gz
org.eclipse.osee-35dda22ff4c8ffd41bbc8718e6a1647f1df63abe.tar.xz
org.eclipse.osee-35dda22ff4c8ffd41bbc8718e6a1647f1df63abe.zip
refactor: Use BranchId instead of Long
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java14
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java2
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/SafetyReportGenerator.java13
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsStreamingOutput.java9
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsSwReqAndCodeResource.java25
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java5
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java8
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyStreamingOutput.java9
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SystemSafetyResource.java11
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/util/ComponentUtil.java9
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java19
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java12
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java23
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java87
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventPayload.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java39
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java16
24 files changed, 154 insertions, 187 deletions
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java
index eac5d240eb7..d201e9a389d 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java
@@ -58,8 +58,8 @@ public class ReportResource {
@GET
@Produces(MediaType.APPLICATION_OCTET_STREAM)
- public Response getTypeCount(@QueryParam("branchUuid") long branchUuid, @QueryParam("artTypes") List<Long> artTypes, @QueryParam("attrTypes") List<Long> attrTypes) throws OseeCoreException {
- List<ChangeItem> changes = getChanges(branchUuid);
+ public Response getTypeCount(@QueryParam("branchUuid") BranchId branch, @QueryParam("artTypes") List<Long> artTypes, @QueryParam("attrTypes") List<Long> attrTypes) throws OseeCoreException {
+ List<ChangeItem> changes = getChanges(branch);
Set<Long> newArts = new HashSet<>();
Set<Long> modArts = new HashSet<>();
Set<Long> deletedArts = new HashSet<>();
@@ -76,7 +76,7 @@ public class ReportResource {
@Override
public void write(OutputStream outputStream) throws WebApplicationException, IOException {
- writer.write(branchUuid, newArts, modArts, deletedArts, artTypes, attrTypes, outputStream);
+ writer.write(branch, newArts, modArts, deletedArts, artTypes, attrTypes, outputStream);
outputStream.flush();
}
};
@@ -149,15 +149,13 @@ public class ReportResource {
return toReturn;
}
- private List<ChangeItem> getChanges(long branchUuid) {
+ private List<ChangeItem> getChanges(BranchId branch) {
TransactionQuery transactionQuery2 = orcsApi.getQueryFactory().transactionQuery();
TransactionQuery transactionQuery3 = orcsApi.getQueryFactory().transactionQuery();
- BranchId branchReadable =
- orcsApi.getQueryFactory().branchQuery().andUuids(branchUuid).getResults().getExactlyOne();
- BranchId parentBranch = atsServer.getBranchService().getParentBranch(branchReadable);
+ BranchId parentBranch = atsServer.getBranchService().getParentBranch(branch);
- TransactionReadable startTx = transactionQuery2.andIsHead(branchReadable).getResults().getExactlyOne();
+ TransactionReadable startTx = transactionQuery2.andIsHead(branch).getResults().getExactlyOne();
TransactionReadable endTx = transactionQuery3.andIsHead(parentBranch).getResults().getExactlyOne();
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java
index 3c3d18fe3c7..2be9b9208d0 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java
@@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -36,7 +37,7 @@ public class TypeCountWriter {
this.orcsApi = orcsApi;
}
- public void write(long branchUuid, Set<Long> newArts, Set<Long> modifiedArts, Set<Long> deletedArts, List<Long> artTypes, List<Long> attrTypes, OutputStream outputStream) {
+ public void write(BranchId branch, Set<Long> newArts, Set<Long> modifiedArts, Set<Long> deletedArts, List<Long> artTypes, List<Long> attrTypes, OutputStream outputStream) {
try {
Writer writer = new OutputStreamWriter(outputStream, "UTF-8");
ExcelXmlWriter sheetWriter = new ExcelXmlWriter(writer);
@@ -51,8 +52,7 @@ public class TypeCountWriter {
if (!newArts.isEmpty()) {
ResultSet<ArtifactReadable> newArtifacts =
- orcsApi.getQueryFactory().fromBranch(branchUuid).andTypeEquals(artifactTypes).andUuids(
- newArts).getResults();
+ orcsApi.getQueryFactory().fromBranch(branch).andTypeEquals(artifactTypes).andUuids(newArts).getResults();
for (ArtifactReadable art : newArtifacts) {
String[] row = new String[columns];
int index = 0;
@@ -70,7 +70,7 @@ public class TypeCountWriter {
if (!modifiedArts.isEmpty()) {
ResultSet<ArtifactReadable> modifiedArtifacts =
- orcsApi.getQueryFactory().fromBranch(branchUuid).andTypeEquals(artifactTypes).andUuids(
+ orcsApi.getQueryFactory().fromBranch(branch).andTypeEquals(artifactTypes).andUuids(
modifiedArts).getResults();
for (ArtifactReadable art : modifiedArtifacts) {
String[] row = new String[columns];
@@ -88,7 +88,7 @@ public class TypeCountWriter {
if (!deletedArts.isEmpty()) {
ResultSet<ArtifactReadable> deletedArtifacts =
- orcsApi.getQueryFactory().fromBranch(branchUuid).andTypeEquals(artifactTypes).andUuids(
+ orcsApi.getQueryFactory().fromBranch(branch).andTypeEquals(artifactTypes).andUuids(
deletedArts).getResults();
for (ArtifactReadable art : deletedArtifacts) {
String[] row = new String[columns];
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
index 02123e68a91..a1804c8f21c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
@@ -473,7 +473,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I
BranchId branch = teamArt.getBranch();
if (branch != null) {
AccessTopicEventPayload accessEvent = EventUtil.getTopicJson(event, AccessTopicEventPayload.class);
- if (branch.getUuid().equals(accessEvent.getBranchUuid())) {
+ if (branch.equals(accessEvent.getBranch())) {
refreshOnBranchEvent();
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
index 6986e3d5ada..ab8592a4201 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
@@ -132,7 +132,7 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple
BranchId branch = getTeamArt().getWorkingBranch();
if (branch != null) {
AccessTopicEventPayload accessEvent = EventUtil.getTopicJson(event, AccessTopicEventPayload.class);
- if (branch.getUuid().equals(accessEvent.getBranchUuid())) {
+ if (branch.equals(accessEvent.getBranch())) {
refreshWorkingBranchWidget();
}
}
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/SafetyReportGenerator.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/SafetyReportGenerator.java
index 17636bc353c..3897e90af3f 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/SafetyReportGenerator.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/SafetyReportGenerator.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.define.report.internal.SafetyInformationAccumulator;
import org.eclipse.osee.define.report.internal.TraceAccumulator;
import org.eclipse.osee.define.report.internal.TraceMatch;
import org.eclipse.osee.define.report.internal.util.ComponentUtil;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -37,7 +38,6 @@ public class SafetyReportGenerator {
private ComponentUtil componentUtil;
private final TraceMatch match = new TraceMatch("\\^SRS\\s*([^;]+);?", "\\[?(\\{[^\\}]+\\})(.*)");
private final TraceAccumulator traces = new TraceAccumulator(".*\\.(java|ada|ads|adb|c|h)", match);
- private long branchUuid;
private final Log logger;
public static int SYSTEM_REQUIREMENT_INDEX = 8;
@@ -80,17 +80,16 @@ public class SafetyReportGenerator {
this.logger = logger;
}
- private void init(OrcsApi orcsApi, long branchUuid, ISheetWriter writer) {
+ private void init(OrcsApi orcsApi, BranchId branchId, ISheetWriter writer) {
accumulator = new SafetyInformationAccumulator(this, writer);
queryFactory = orcsApi.getQueryFactory();
- this.branchUuid = branchUuid;
- componentUtil = new ComponentUtil(branchUuid, orcsApi);
+ componentUtil = new ComponentUtil(branchId, orcsApi);
}
- public void runOperation(OrcsApi providedOrcs, long branchUuid, String codeRoot, Writer providedWriter) throws IOException {
+ public void runOperation(OrcsApi providedOrcs, BranchId branchId, String codeRoot, Writer providedWriter) throws IOException {
ISheetWriter writer = new ExcelXmlWriter(providedWriter);
- init(providedOrcs, branchUuid, writer);
+ init(providedOrcs, branchId, writer);
boolean doTracability = false;
if (codeRoot != null && codeRoot.isEmpty() != true) {
@@ -102,7 +101,7 @@ public class SafetyReportGenerator {
traces.extractTraces(root);
}
ArtifactReadable functionsFolder =
- queryFactory.fromBranch(branchUuid).andIsOfType(CoreArtifactTypes.Folder).andNameEquals(
+ queryFactory.fromBranch(branchId).andIsOfType(CoreArtifactTypes.Folder).andNameEquals(
"System Functions").getResults().getExactlyOne();
processSystemFunctions(functionsFolder, writer);
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsStreamingOutput.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsStreamingOutput.java
index 89d48b8a1b0..8ddb9e20bba 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsStreamingOutput.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsStreamingOutput.java
@@ -24,7 +24,9 @@ import java.util.List;
import java.util.Map;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.StreamingOutput;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -34,7 +36,6 @@ import org.eclipse.osee.framework.jdk.core.util.io.xml.ExcelXmlWriter;
import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.OrcsApi;
import org.eclipse.osee.orcs.data.ArtifactReadable;
-import org.eclipse.osee.orcs.data.BranchReadable;
import org.eclipse.osee.orcs.search.BranchQuery;
import org.eclipse.osee.orcs.search.QueryBuilder;
import org.eclipse.osee.orcs.search.QueryFactory;
@@ -44,7 +45,7 @@ import org.eclipse.osee.orcs.search.QueryFactory;
*/
public final class DataRightsStreamingOutput implements StreamingOutput {
private final QueryFactory queryFactory;
- private final BranchReadable branch;
+ private final IOseeBranch branch;
private final String codeRoot;
private final TraceAccumulator traceAccumulator;
private final Map<CaseInsensitiveString, ArtifactReadable> nameToReqMap =
@@ -54,10 +55,10 @@ public final class DataRightsStreamingOutput implements StreamingOutput {
private final Log logger;
private static final IArtifactType WCAFE = TokenFactory.createArtifactType(204509162766367L, "WCAFE");
- public DataRightsStreamingOutput(OrcsApi orcsApi, long branchUuid, String codeRoot, TraceAccumulator traceAccumulator, Log logger) {
+ public DataRightsStreamingOutput(OrcsApi orcsApi, BranchId branch, String codeRoot, TraceAccumulator traceAccumulator, Log logger) {
this.queryFactory = orcsApi.getQueryFactory();
BranchQuery branchQuery = orcsApi.getQueryFactory().branchQuery();
- this.branch = branchQuery.andUuids(branchUuid).getResults().getExactlyOne();
+ this.branch = branchQuery.andIds(branch).getResults().getExactlyOne();
this.codeRoot = codeRoot.trim();
this.traceAccumulator = traceAccumulator;
this.logger = logger;
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsSwReqAndCodeResource.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsSwReqAndCodeResource.java
index 1afff55c1cb..8c91832cb49 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsSwReqAndCodeResource.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightsSwReqAndCodeResource.java
@@ -25,6 +25,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.StreamingOutput;
import org.eclipse.osee.app.OseeAppletPage;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.TokenFactory;
@@ -67,11 +68,11 @@ public final class DataRightsSwReqAndCodeResource {
*/
@GET
@Produces(MediaType.APPLICATION_XML)
- public Response getDataRightspReport(@QueryParam("branch") Long branchUuid, @QueryParam("code_root") String codeRoot) {
+ public Response getDataRightspReport(@QueryParam("branch") BranchId branch, @QueryParam("code_root") String codeRoot) {
TraceMatch match = new TraceMatch("\\^SRS\\s*([^;]+);?", null);
TraceAccumulator traceAccumulator = new TraceAccumulator(".*\\.(java|ada|ads|adb|c|h)", match);
StreamingOutput streamingOutput =
- new DataRightsStreamingOutput(orcsApi, branchUuid, codeRoot, traceAccumulator, logger);
+ new DataRightsStreamingOutput(orcsApi, branch, codeRoot, traceAccumulator, logger);
ResponseBuilder builder = Response.ok(streamingOutput);
String fileName = "Req_Code_Data_Rights_Trace_Report.xml";
@@ -104,7 +105,7 @@ public final class DataRightsSwReqAndCodeResource {
@Path("validate")
@GET
@Produces(MediaType.TEXT_HTML)
- public String check(@QueryParam("branchId") Long branchId) {
+ public String check(@QueryParam("branchId") BranchId branchId) {
ResultSet<ArtifactReadable> results =
queryFactory.fromBranch(branchId).andIsOfType(CoreArtifactTypes.AbstractSoftwareRequirement).getResults();
@@ -118,8 +119,8 @@ public final class DataRightsSwReqAndCodeResource {
String subsystem = art.getSoleAttributeValue(CoreAttributeTypes.Subsystem, "");
String sme = art.getSoleAttributeValue(CoreAttributeTypes.SubjectMatterExpert, "");
if (subsystem.equals("Controls and Displays") || subsystem.equals(
- "Mission System Management") || subsystem.equals("Data Management") || subsystem.equals(
- "Unmanned Systems Management")) {
+ "Mission System Management") || subsystem.equals(
+ "Data Management") || subsystem.equals("Unmanned Systems Management")) {
if (classification.isEmpty()) {
appendDetails("missing classification", strb, art, subsystem, classification);
}
@@ -145,8 +146,8 @@ public final class DataRightsSwReqAndCodeResource {
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_PLAIN)
public Response copySWReqDataRights(@Context HttpHeaders httpHeaders, //
- @FormParam("sourceBranch") Long sourceBranch, //
- @FormParam("destinationBranch") Long destinationBranch) throws Exception {
+ @FormParam("sourceBranch") BranchId sourceBranch, //
+ @FormParam("destinationBranch") BranchId destinationBranch) throws Exception {
return copyDataRights(sourceBranch, destinationBranch, CoreArtifactTypes.AbstractSoftwareRequirement);
}
@@ -163,17 +164,17 @@ public final class DataRightsSwReqAndCodeResource {
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_PLAIN)
public Response copySSDDataRights(@Context HttpHeaders httpHeaders, //
- @FormParam("sourceBranch") Long sourceBranch, //
- @FormParam("destinationBranch") Long destinationBranch) throws Exception {
+ @FormParam("sourceBranch") BranchId sourceBranch, //
+ @FormParam("destinationBranch") BranchId destinationBranch) throws Exception {
return copyDataRights(sourceBranch, destinationBranch, CoreArtifactTypes.SubsystemDesign);
}
- private Response copyDataRights(long sourceBranch, long destinationBranch, IArtifactType artifactType) throws Exception {
+ private Response copyDataRights(BranchId sourceBranch, BranchId destinationBranch, IArtifactType artifactType) throws Exception {
ResultSet<ArtifactReadable> results =
queryFactory.fromBranch(destinationBranch).andIsOfType(artifactType).getResults();
String branchName =
- orcsApi.getQueryFactory().branchQuery().andUuids(sourceBranch).getResults().getExactlyOne().getName();
+ orcsApi.getQueryFactory().branchQuery().andIds(sourceBranch).getResults().getExactlyOne().getName();
String txMsg = "Copy data rights for " + artifactType + " from " + branchName;
TransactionBuilder txBuilder = createTxBuilder(txMsg, destinationBranch);
@@ -213,7 +214,7 @@ public final class DataRightsSwReqAndCodeResource {
msg + "|" + subsystem + "|" + classification + " |" + art.getArtifactType() + "| " + art.getName() + "| " + art.getLocalId() + "| " + art.getLastModifiedTransaction() + "<br />");
}
- private TransactionBuilder createTxBuilder(String comment, long branchId) {
+ private TransactionBuilder createTxBuilder(String comment, BranchId branchId) {
TransactionFactory txFactory = orcsApi.getTransactionFactory();
ArtifactReadable userArtifact =
orcsApi.getQueryFactory().fromBranch(CoreBranches.COMMON).andUuid(50).getResults().getExactlyOne();
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java
index 20e710ecef0..abf944e0ee9 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java
@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.StringTokenizer;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.StreamingOutput;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -59,11 +60,11 @@ public final class PublishLowHighReqStreamingOutput implements StreamingOutput {
private final String ALLOCATION_TRACE_TYPE = "Allocation Trace";
private final Map<String, IArtifactType> allTypesMap = new HashMap<>();
- public PublishLowHighReqStreamingOutput(Log logger, OrcsApi orcsApi, long branchUuid, String selectedTypes) {
+ public PublishLowHighReqStreamingOutput(Log logger, OrcsApi orcsApi, BranchId branch, String selectedTypes) {
this.logger = logger;
this.queryApi = orcsApi.getQueryFactory();
BranchQuery query = orcsApi.getQueryFactory().branchQuery();
- this.branch = query.andUuids(branchUuid).getResults().getExactlyOne();
+ this.branch = query.andIds(branch).getResults().getExactlyOne();
this.types = orcsApi.getOrcsTypes();
includeOnlyArtifactTypes = convertStringTypes(selectedTypes);
}
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java
index 02ef4876327..9dc7d1a1da0 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java
@@ -21,6 +21,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.StreamingOutput;
import org.eclipse.osee.app.OseeAppletPage;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
@@ -53,12 +54,11 @@ public final class PublishLowHighReqTraceabilityResource {
*/
@GET
@Produces(MediaType.APPLICATION_XML)
- public Response getLowHighReqReport(@QueryParam("branch") long branchUuid, @QueryParam("selected_types") String selectedTypes) {
- Conditions.checkNotNull(branchUuid, "branch query param");
+ public Response getLowHighReqReport(@QueryParam("branch") BranchId branch, @QueryParam("selected_types") String selectedTypes) {
+ Conditions.checkNotNull(branch, "branch query param");
Conditions.checkNotNull(selectedTypes, "selected_types query param");
- StreamingOutput streamingOutput =
- new PublishLowHighReqStreamingOutput(logger, orcsApi, branchUuid, selectedTypes);
+ StreamingOutput streamingOutput = new PublishLowHighReqStreamingOutput(logger, orcsApi, branch, selectedTypes);
String fileName = "Requirement_Trace_Report.xml";
ResponseBuilder builder = Response.ok(streamingOutput);
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyStreamingOutput.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyStreamingOutput.java
index ca477fb1cb9..293ccb2d243 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyStreamingOutput.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyStreamingOutput.java
@@ -16,6 +16,7 @@ import java.io.Writer;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.StreamingOutput;
import org.eclipse.osee.define.report.SafetyReportGenerator;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.OrcsApi;
@@ -25,14 +26,14 @@ import org.eclipse.osee.orcs.OrcsApi;
*/
public final class SafetyStreamingOutput implements StreamingOutput {
private final OrcsApi orcsApi;
- private final long branchUuid;
+ private final BranchId branchId;
private final String codeRoot;
private final Log logger;
- public SafetyStreamingOutput(Log logger, OrcsApi orcsApi, long branchUuid, String codeRoot) {
+ public SafetyStreamingOutput(Log logger, OrcsApi orcsApi, BranchId branchId, String codeRoot) {
this.logger = logger;
this.orcsApi = orcsApi;
- this.branchUuid = branchUuid;
+ this.branchId = branchId;
this.codeRoot = codeRoot;
}
@@ -41,7 +42,7 @@ public final class SafetyStreamingOutput implements StreamingOutput {
try {
Writer writer = new OutputStreamWriter(output);
SafetyReportGenerator safetyReport = new SafetyReportGenerator(logger);
- safetyReport.runOperation(orcsApi, branchUuid, codeRoot, writer);
+ safetyReport.runOperation(orcsApi, branchId, codeRoot, writer);
} catch (Exception ex) {
throw new WebApplicationException(ex);
}
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SystemSafetyResource.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SystemSafetyResource.java
index 67136eaf014..45074b248f3 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SystemSafetyResource.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SystemSafetyResource.java
@@ -19,6 +19,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.StreamingOutput;
import org.eclipse.osee.app.OseeAppletPage;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.OrcsApi;
@@ -41,16 +42,16 @@ public final class SystemSafetyResource {
/**
* Produce the System Safety Report
- *
- * @param branchUuid The Branch to run the System Safety Report on.
+ *
+ * @param branchId The Branch to run the System Safety Report on.
* @param codeRoot The root directory accessible on the server for the code traces.
* @return Produces a streaming xml file containing the System Safety Report
*/
@Path("safety")
@GET
@Produces(MediaType.APPLICATION_XML)
- public Response getSystemSafetyReport(@QueryParam("branch") Long branchUuid, @QueryParam("code_root") String codeRoot) {
- StreamingOutput streamingOutput = new SafetyStreamingOutput(logger, orcsApi, branchUuid, codeRoot);
+ public Response getSystemSafetyReport(@QueryParam("branch") BranchId branchId, @QueryParam("code_root") String codeRoot) {
+ StreamingOutput streamingOutput = new SafetyStreamingOutput(logger, orcsApi, branchId, codeRoot);
ResponseBuilder builder = Response.ok(streamingOutput);
builder.header("Content-Disposition", "attachment; filename=" + "Safety_Report.xml");
return builder.build();
@@ -58,7 +59,7 @@ public final class SystemSafetyResource {
/**
* Provides the user interface for the System Safety Report
- *
+ *
* @return Returns the html page for the System Safety Report
*/
@Path("ui/safety")
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/util/ComponentUtil.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/util/ComponentUtil.java
index 3c43fa682ad..474ec191fd1 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/util/ComponentUtil.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/util/ComponentUtil.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.define.report.internal.util;
import static org.eclipse.osee.framework.core.enums.CoreRelationTypes.Allocation__Component;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.jdk.core.type.ResultSet;
import org.eclipse.osee.orcs.OrcsApi;
@@ -21,15 +22,15 @@ import org.eclipse.osee.orcs.data.ArtifactReadable;
* @author Ryan D. Brooks
*/
public class ComponentUtil {
- private final long branchUuid;
+ private final BranchId branchId;
private final OrcsApi orcsApi;
private ArtifactReadable mpCsci;
private Collection<ArtifactReadable> mpComponents;
private boolean wasLoaded;
- public ComponentUtil(long branchUuid, OrcsApi providedOrcs) {
+ public ComponentUtil(BranchId branchId, OrcsApi providedOrcs) {
super();
- this.branchUuid = branchUuid;
+ this.branchId = branchId;
this.mpComponents = null;
this.wasLoaded = false;
this.mpCsci = null;
@@ -38,7 +39,7 @@ public class ComponentUtil {
private synchronized void load() {
wasLoaded = true;
- mpCsci = orcsApi.getQueryFactory().fromBranch(branchUuid).andIsOfType(CoreArtifactTypes.Component).andNameEquals(
+ mpCsci = orcsApi.getQueryFactory().fromBranch(branchId).andIsOfType(CoreArtifactTypes.Component).andNameEquals(
"MP CSCI").getResults().getExactlyOne();
mpComponents = mpCsci.getDescendants();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
index 8d8b0a55667..02c848fd5f7 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.disposition.rest.internal;
import static org.eclipse.osee.disposition.rest.DispoConstants.DISPO_ARTIFACT;
import static org.eclipse.osee.framework.core.enums.CoreAttributeTypes.UriGeneralStringData;
+import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
@@ -37,7 +38,6 @@ import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.enums.SystemUser;
@@ -71,13 +71,9 @@ public class OrcsStorageImpl implements Storage {
this.orcsApi = orcsApi;
}
- private BranchId getAdminBranch() {
- return CoreBranches.COMMON;
- }
-
@SuppressWarnings("unchecked")
private ArtifactReadable getDispoUser() throws OseeCoreException {
- return getQuery().fromBranch(getAdminBranch()).andIds(SystemUser.OseeSystem).getResults().getExactlyOne();
+ return getQuery().fromBranch(COMMON).andIds(SystemUser.OseeSystem).getResults().getExactlyOne();
}
private QueryFactory getQuery() {
@@ -97,7 +93,7 @@ public class OrcsStorageImpl implements Storage {
}
private ResultSet<ArtifactReadable> getDispoTypesArtifact() throws OseeCoreException {
- return getQuery().fromBranch(getAdminBranch()).andUuid(DISPO_ARTIFACT.getUuid()).andTypeEquals(
+ return getQuery().fromBranch(COMMON).andUuid(DISPO_ARTIFACT.getUuid()).andTypeEquals(
DISPO_ARTIFACT.getArtifactType()).getResults();
}
@@ -114,8 +110,7 @@ public class OrcsStorageImpl implements Storage {
@Override
public void storeTypes(IResource resource) {
- TransactionBuilder tx =
- getTxFactory().createTransaction(getAdminBranch(), getDispoUser(), "Initialize Dispo Types");
+ TransactionBuilder tx = getTxFactory().createTransaction(COMMON, getDispoUser(), "Initialize Dispo Types");
ArtifactId artifactId = tx.createArtifact(DISPO_ARTIFACT);
InputStream stream = null;
try {
@@ -131,17 +126,17 @@ public class OrcsStorageImpl implements Storage {
@SuppressWarnings("unchecked")
@Override
public ArtifactReadable findUser() {
- return getQuery().fromBranch(getAdminBranch()).andIds(SystemUser.OseeSystem).getResults().getExactlyOne();
+ return getQuery().fromBranch(COMMON).andIds(SystemUser.OseeSystem).getResults().getExactlyOne();
}
@Override
public ArtifactReadable findUser(String userId) {
- return getQuery().fromBranch(getAdminBranch()).andGuid(userId).getResults().getExactlyOne();
+ return getQuery().fromBranch(COMMON).andGuid(userId).getResults().getExactlyOne();
}
@Override
public ArtifactReadable findUnassignedUser() {
- return getQuery().fromBranch(getAdminBranch()).andNameEquals("UnAssigned").andTypeEquals(
+ return getQuery().fromBranch(COMMON).andNameEquals("UnAssigned").andTypeEquals(
CoreArtifactTypes.User).getResults().getExactlyOne();
}
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
index 85ae5b8e0ba..308b1bb8ac7 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
@@ -475,7 +475,7 @@ public class AccessControlService implements IAccessControlService {
ArtifactAccessObject artifactAccessObject = (ArtifactAccessObject) data.getObject();
AccessTopicEventPayload event = new AccessTopicEventPayload();
- event.setBranchUuid(artifactAccessObject.getBranchId());
+ event.setBranch(artifactAccessObject.getBranch());
persistPermissionForArtifact(data, artifactAccessObject, recurse, event);
cacheAccessControlData(data);
@@ -490,7 +490,7 @@ public class AccessControlService implements IAccessControlService {
cacheAccessControlData(data);
AccessTopicEventPayload event = new AccessTopicEventPayload();
- event.setBranchUuid(branchAccessObject.getBranchId());
+ event.setBranch(branchAccessObject.getBranch());
OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_BRANCH_MODIFIED);
}
@@ -645,7 +645,7 @@ public class AccessControlService implements IAccessControlService {
deCacheAccessControlData(data);
AccessTopicEventPayload event = new AccessTopicEventPayload();
- event.setBranchUuid(accessControlledObject.getBranchId());
+ event.setBranch(accessControlledObject.getBranch());
if (isArtifact) {
event.addArtifact(((ArtifactAccessObject) accessControlledObject).getArtId());
}
@@ -691,7 +691,7 @@ public class AccessControlService implements IAccessControlService {
Conditions.checkNotNullOrEmpty(objects, "objects");
ensurePopulated();
AccessArtifactLockTopicEvent event = new AccessArtifactLockTopicEvent();
- event.setBranchUuid(objects.iterator().next().getBranchId());
+ event.setBranch(objects.iterator().next().getBranch());
event.setLocked(true);
Set<Artifact> lockedArts = new HashSet<>();
for (Artifact object : objects) {
@@ -717,7 +717,7 @@ public class AccessControlService implements IAccessControlService {
public void unLockObjects(Collection<Artifact> objects, Artifact subject) throws OseeCoreException, OseeAuthenticationRequiredException {
ensurePopulated();
AccessArtifactLockTopicEvent event = new AccessArtifactLockTopicEvent();
- event.setBranchUuid(objects.iterator().next().getBranchId());
+ event.setBranch(objects.iterator().next().getBranch());
event.setLocked(false);
Set<Artifact> lockedArts = new HashSet<>();
for (Artifact object : objects) {
@@ -746,7 +746,7 @@ public class AccessControlService implements IAccessControlService {
try {
AccessTopicEventPayload event = new AccessTopicEventPayload();
- event.setBranchUuid(branch.getUuid());
+ event.setBranch(branch);
OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_BRANCH_MODIFIED);
} catch (Exception ex) {
OseeLog.log(AccessControlHelper.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java
index c45834e5967..b631868c79d 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java
@@ -51,7 +51,7 @@ public class BranchAccessObject extends AccessObject {
ConnectionHandler.runPreparedUpdate(DELETE_BRANCH_ACL, subjectId, branch);
}
- public static BranchAccessObject getBranchAccessObject(BranchId branch) throws OseeCoreException {
+ public static BranchAccessObject getBranchAccessObject(BranchId branch) {
BranchAccessObject branchAccessObject;
if (cache.containsKey(branch)) {
branchAccessObject = cache.get(branch);
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
index a4c61ac50b8..9dde10d85e0 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java
@@ -41,8 +41,8 @@ public class Branch extends NamedId implements IOseeBranch, Adaptable {
private Branch parent;
private ArtifactId associatedArtifact;
- public Branch(Long uuid, String name, BranchType branchType, BranchState branchState, boolean isArchived, boolean inheritsAccessControl) {
- super(uuid, name);
+ public Branch(Long id, String name, BranchType branchType, BranchState branchState, boolean isArchived, boolean inheritsAccessControl) {
+ super(id, name);
this.branchType = branchType;
this.branchState = branchState;
this.isArchived = isArchived;
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
index db9c43ea85f..7dca872a463 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.model.event;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IRelationType;
/**
@@ -18,13 +19,13 @@ import org.eclipse.osee.framework.core.data.IRelationType;
public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
private DefaultBasicGuidArtifact parentArt;
- private Long branchId;
+ private BranchId branch;
private Long relTypeUuid;
private RelationOrderModType modType;
- public DefaultBasicUuidRelationReorder(RelationOrderModType modType, Long branchUuid, Long relTypeUuid, DefaultBasicGuidArtifact artA) {
+ public DefaultBasicUuidRelationReorder(RelationOrderModType modType, BranchId branch, Long relTypeUuid, DefaultBasicGuidArtifact artA) {
this.modType = modType;
- this.branchId = branchUuid;
+ this.branch = branch;
this.relTypeUuid = relTypeUuid;
this.parentArt = artA;
}
@@ -35,8 +36,8 @@ public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
}
@Override
- public Long getBranchId() {
- return branchId;
+ public BranchId getBranch() {
+ return branch;
}
@Override
@@ -48,8 +49,8 @@ public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
this.parentArt = artA;
}
- public void setBranchId(Long branchId) {
- this.branchId = branchId;
+ public void setBranch(BranchId branch) {
+ this.branch = branch;
}
public void setRelTypeGuid(Long relTypeGuid) {
@@ -61,7 +62,7 @@ public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
final int prime = 31;
int result = 1;
result = prime * result + (parentArt == null ? 0 : parentArt.hashCode());
- result = prime * result + (branchId == null ? 0 : branchId.hashCode());
+ result = prime * result + branch.hashCode();
result = prime * result + (relTypeUuid == null ? 0 : relTypeUuid.hashCode());
return result;
}
@@ -85,11 +86,7 @@ public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
} else if (!parentArt.equals(other.getParentArt())) {
return false;
}
- if (branchId == null) {
- if (other.getBranchId() != null) {
- return false;
- }
- } else if (!isOnSameBranch(other)) {
+ if (!isOnSameBranch(other)) {
return false;
}
if (relTypeUuid == null) {
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 ae9546bd263..9a079f4476e 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
@@ -50,8 +50,6 @@ import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.OperationBuilder;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Conditions;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects;
@@ -421,8 +419,8 @@ public final class BranchManager {
String creationComment = String.format("New Merge Branch from %s(%s) and %s", sourceBranch.getName(),
parentTx.getId(), destBranch.getName());
String branchName = "Merge " + sourceBranch.getShortName() + " <=> " + destBranch.getShortName();
- branch = createBranch(BranchType.MERGE, parentTx, branchName, Lib.generateUuid(), UserManager.getUser(),
- creationComment, joinQuery.getQueryId(), destBranch);
+ branch = createBranch(BranchType.MERGE, parentTx, branchName, UserManager.getUser(), creationComment,
+ joinQuery.getQueryId(), destBranch);
} finally {
joinQuery.delete();
}
@@ -433,20 +431,6 @@ public final class BranchManager {
return mergeBranch;
}
- public static IOseeBranch createWorkingBranch(TransactionToken parentTransactionId, String childBranchName, ArtifactId associatedArtifact) throws OseeCoreException {
- return createWorkingBranch(parentTransactionId, childBranchName, Lib.generateUuid(), associatedArtifact);
- }
-
- public static IOseeBranch createWorkingBranch(TransactionToken parentTransactionId, String childBranchName, Long childBranchUuid, ArtifactId associatedArtifact) throws OseeCoreException {
- Conditions.notNull(childBranchUuid, "childBranchUuid");
- String creationComment =
- String.format("New Branch from %s (%s)", getBranchName(parentTransactionId), parentTransactionId.getId());
-
- final String truncatedName = Strings.truncate(childBranchName, 195, true);
- return createBranch(BranchType.WORKING, parentTransactionId, truncatedName, childBranchUuid, associatedArtifact,
- creationComment);
- }
-
/**
* Creates a new Branch based on the most recent transaction on the parent branch.
*/
@@ -454,10 +438,8 @@ public final class BranchManager {
String creationComment = String.format("New branch, copy of %s from transaction %s",
getBranchName(parentTransactionId), parentTransactionId.getId());
- final String truncatedName = Strings.truncate(childBranchName, 195, true);
-
CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(BranchType.WORKING,
- parentTransactionId, truncatedName, Lib.generateUuid(), associatedArtifact, creationComment);
+ parentTransactionId, TokenFactory.createBranch(childBranchName), associatedArtifact, creationComment);
operation.setTxCopyBranchType(true);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
@@ -467,10 +449,8 @@ public final class BranchManager {
String creationComment = String.format("New port branch, copy of %s from transaction %s",
getBranchName(parentTransactionId), parentTransactionId.getId());
- final String truncatedName = Strings.truncate(childBranchName, 195, true);
-
CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(BranchType.PORT,
- parentTransactionId, truncatedName, Lib.generateUuid(), associatedArtifact, creationComment);
+ parentTransactionId, TokenFactory.createBranch(childBranchName), associatedArtifact, creationComment);
operation.setTxCopyBranchType(true);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
@@ -481,59 +461,52 @@ public final class BranchManager {
}
public static IOseeBranch createWorkingBranch(BranchId parentBranch, String childBranchName, ArtifactId associatedArtifact) throws OseeCoreException {
- Conditions.checkNotNull(parentBranch, "Parent Branch");
- Conditions.checkNotNull(childBranchName, "Child Branch Name");
- Conditions.checkNotNull(associatedArtifact, "Associated Artifact");
TransactionToken parentTransactionId = TransactionManager.getHeadTransaction(parentBranch);
- return createWorkingBranch(parentTransactionId, childBranchName, Lib.generateUuid(), associatedArtifact);
+ return createWorkingBranch(parentTransactionId, childBranchName, associatedArtifact);
}
- public static IOseeBranch createWorkingBranch(BranchId parentBranch, IOseeBranch childBranch) throws OseeCoreException {
- return createWorkingBranch(parentBranch, childBranch, OseeSystem);
+ public static IOseeBranch createWorkingBranch(BranchId parentBranch, IOseeBranch childBranch) {
+ TransactionToken parentTransactionId = TransactionManager.getHeadTransaction(parentBranch);
+ return createBranch(BranchType.WORKING, parentTransactionId, childBranch, OseeSystem);
}
- public static IOseeBranch createWorkingBranch(BranchId parentBranch, IOseeBranch childBranch, ArtifactId associatedArtifact) throws OseeCoreException {
- TransactionToken parentTransactionId = TransactionManager.getHeadTransaction(parentBranch);
- return createWorkingBranch(parentTransactionId, childBranch.getName(), childBranch.getUuid(), associatedArtifact);
+ public static IOseeBranch createWorkingBranch(TransactionToken parentTransaction, String branchName, ArtifactId associatedArtifact) throws OseeCoreException {
+ return createBranch(BranchType.WORKING, parentTransaction, TokenFactory.createBranch(branchName),
+ associatedArtifact);
}
- /**
- * Creates a new Branch based on the most recent transaction on the parent branch.
- */
public static BranchId createBaselineBranch(BranchId parentBranch, IOseeBranch childBranch) throws OseeCoreException {
return createBaselineBranch(parentBranch, childBranch, OseeSystem);
}
- public static BranchId createBaselineBranch(BranchId parentBranch, IOseeBranch childBranch, ArtifactId associatedArtifact) throws OseeCoreException {
- TransactionToken parentTransactionId = TransactionManager.getHeadTransaction(parentBranch);
- String creationComment = String.format("Branch Creation for %s", childBranch.getName());
- return createBranch(BranchType.BASELINE, parentTransactionId, childBranch.getName(), childBranch.getUuid(),
- associatedArtifact, creationComment);
+ public static BranchId createTopLevelBranch(IOseeBranch branch) throws OseeCoreException {
+ return createBaselineBranch(SYSTEM_ROOT, branch, OseeSystem);
}
- private static IOseeBranch createBranch(BranchType branchType, TransactionToken parentTransaction, String branchName, long branchUuid, ArtifactId associatedArtifact, String creationComment) {
- return createBranch(branchType, parentTransaction, branchName, branchUuid, associatedArtifact, creationComment,
- -1, BranchId.SENTINEL);
+ private static BranchId createBaselineBranch(BranchId parentBranch, IOseeBranch childBranch, ArtifactId associatedArtifact) throws OseeCoreException {
+ TransactionToken parentTransaction = TransactionManager.getHeadTransaction(parentBranch);
+ return createBranch(BranchType.BASELINE, parentTransaction, childBranch, associatedArtifact);
}
- private static IOseeBranch createBranch(BranchType branchType, TransactionToken parentTransaction, String branchName, long branchUuid, ArtifactId associatedArtifact, String creationComment, int mergeAddressingQueryId, BranchId destinationBranch) throws OseeCoreException {
+ public static BranchId createTopLevelBranch(final String branchName) throws OseeCoreException {
+ return createTopLevelBranch(TokenFactory.createBranch(branchName));
+ }
+
+ private static IOseeBranch createBranch(BranchType branchType, TransactionToken parentTransaction, IOseeBranch childBranch, ArtifactId associatedArtifact) {
+ String creationComment =
+ String.format("New Branch from %s (%s)", getBranchName(parentTransaction), parentTransaction.getId());
CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(branchType, parentTransaction,
- branchName, branchUuid, associatedArtifact, creationComment, mergeAddressingQueryId, destinationBranch);
+ childBranch, associatedArtifact, creationComment);
Operations.executeWorkAndCheckStatus(operation);
return operation.getNewBranch();
}
- /**
- * Creates a new root branch, imports skynet types and initializes.
- *
- * @param initializeArtifacts adds common artifacts needed by most normal root branches
- */
- public static BranchId createTopLevelBranch(IOseeBranch branch) throws OseeCoreException {
- return createBaselineBranch(SYSTEM_ROOT, branch, OseeSystem);
- }
-
- public static BranchId createTopLevelBranch(final String branchName) throws OseeCoreException {
- return createTopLevelBranch(TokenFactory.createBranch(branchName));
+ private static IOseeBranch createBranch(BranchType branchType, TransactionToken parentTransaction, String branchName, Artifact associatedArtifact, String creationComment, int mergeAddressingQueryId, BranchId destinationBranch) {
+ CreateBranchHttpRequestOperation operation =
+ new CreateBranchHttpRequestOperation(branchType, parentTransaction, TokenFactory.createBranch(branchName),
+ associatedArtifact, creationComment, mergeAddressingQueryId, destinationBranch);
+ Operations.executeWorkAndCheckStatus(operation);
+ return operation.getNewBranch();
}
public static List<? extends IOseeBranch> getBaselineBranches() throws OseeCoreException {
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 5cc2418acf0..b9b2fdea132 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,6 +14,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.TokenFactory;
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.RelationOrderModType;
@@ -179,8 +180,8 @@ public final class FrameworkEventUtil {
public static DefaultBasicUuidRelationReorder getDefaultBasicGuidRelationReorder(RemoteBasicGuidRelationReorder1 guidRelOrder) {
DefaultBasicUuidRelationReorder guidArt =
new DefaultBasicUuidRelationReorder(RelationOrderModType.getType(guidRelOrder.getModTypeGuid()),
- getBranchUuidFromRemoteEvent(guidRelOrder.getBranchGuid()), guidRelOrder.getRelTypeGuid(),
- getBasicGuidArtifact(guidRelOrder.getParentArt()));
+ TokenFactory.createBranch(getBranchUuidFromRemoteEvent(guidRelOrder.getBranchGuid())),
+ guidRelOrder.getRelTypeGuid(), getBasicGuidArtifact(guidRelOrder.getParentArt()));
return guidArt;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventPayload.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventPayload.java
index 3cadd62289f..6ba36930c53 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventPayload.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventPayload.java
@@ -17,6 +17,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.BranchId;
/**
* Payload for the Access Topic Event
@@ -27,15 +28,15 @@ import org.eclipse.osee.framework.core.data.ArtifactToken;
public class AccessTopicEventPayload implements ISerializeableTopicPayload {
@JsonSerialize(using = ToStringSerializer.class)
- long branchUuid;
+ BranchId branch;
List<String> artifactUuids = new ArrayList<>();
- public long getBranchUuid() {
- return branchUuid;
+ public BranchId getBranch() {
+ return branch;
}
- public void setBranchUuid(long branchUuid) {
- this.branchUuid = branchUuid;
+ public void setBranch(BranchId branch) {
+ this.branch = branch;
}
public List<String> getArtifactUuids() {
@@ -63,7 +64,7 @@ public class AccessTopicEventPayload implements ISerializeableTopicPayload {
*/
public boolean matches(ArtifactToken artifact) {
if (!artifactUuids.isEmpty()) {
- return artifact.getBranchId().equals(branchUuid) && artifactUuids.contains(String.valueOf(artifact.getUuid()));
+ return artifact.getBranchId().equals(branch) && artifactUuids.contains(String.valueOf(artifact.getUuid()));
}
return false;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
index 5e5c788661b..01fd59933eb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java
@@ -20,8 +20,8 @@ import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.BranchType;
+import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -32,7 +32,6 @@ import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
import org.eclipse.osee.jaxrs.client.JaxRsExceptions;
-import org.eclipse.osee.orcs.rest.client.OseeClient;
import org.eclipse.osee.orcs.rest.model.BranchEndpoint;
import org.eclipse.osee.orcs.rest.model.NewBranch;
@@ -50,19 +49,18 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation {
private final BranchId destinationBranch;
private IOseeBranch newBranch;
private boolean txCopyBranchType;
- private final long branchUuid;
+ private final BranchId branch;
- public CreateBranchHttpRequestOperation(BranchType branchType, TransactionToken parentTransaction, String branchName, long branchUuid, ArtifactId associatedArtifact, String creationComment) {
- this(branchType, parentTransaction, branchName, branchUuid, associatedArtifact, creationComment, -1,
- BranchId.SENTINEL);
+ public CreateBranchHttpRequestOperation(BranchType branchType, TransactionToken parentTransaction, IOseeBranch branch, ArtifactId associatedArtifact, String creationComment) {
+ this(branchType, parentTransaction, branch, associatedArtifact, creationComment, -1, BranchId.SENTINEL);
}
- public CreateBranchHttpRequestOperation(BranchType branchType, TransactionToken parentTransaction, String branchName, long branchUuid, ArtifactId associatedArtifact, String creationComment, int mergeAddressingQueryId, BranchId destinationBranch) {
- super("Create branch " + branchName, Activator.PLUGIN_ID);
+ public CreateBranchHttpRequestOperation(BranchType branchType, TransactionToken parentTransaction, IOseeBranch branch, ArtifactId associatedArtifact, String creationComment, int mergeAddressingQueryId, BranchId destinationBranch) {
+ super("Create branch " + branch.getName(), Activator.PLUGIN_ID);
this.branchType = branchType;
this.parentTransaction = parentTransaction;
- this.branchName = branchName;
- this.branchUuid = branchUuid;
+ this.branchName = branch.getName();
+ this.branch = branch;
this.associatedArtifact = associatedArtifact;
this.creationComment = creationComment;
this.mergeAddressingQueryId = mergeAddressingQueryId;
@@ -72,12 +70,7 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation {
@Override
protected void doWork(IProgressMonitor monitor) throws OseeCoreException {
- if (branchUuid <= 0) {
- throw new OseeArgumentException("branchUuid [%d] uuid must be > 0", branchUuid);
- }
-
- OseeClient client = ServiceUtil.getOseeClient();
- BranchEndpoint proxy = client.getBranchEndpoint();
+ BranchEndpoint proxy = ServiceUtil.getOseeClient().getBranchEndpoint();
NewBranch data = new NewBranch();
data.setAssociatedArtifact(associatedArtifact.isValid() ? associatedArtifact : OseeSystem);
@@ -92,10 +85,9 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation {
data.setTxCopyBranchType(isTxCopyBranchType());
try {
- Response response = proxy.createBranchWithId(BranchId.valueOf(branchUuid), data);
+ Response response = branch.isValid() ? proxy.createBranchWithId(branch, data) : proxy.createBranch(data);
if (Status.CREATED.getStatusCode() == response.getStatus()) {
- long branchId = getBranchUuid(response);
- newBranch = BranchManager.getBranch(branchId); // can't use TokenFactory here because some places assume branch will be cached such as getBranchesByName
+ newBranch = getBranchUuid(response); // can't use TokenFactory here because some places assume branch will be cached such as getBranchesByName
OseeEventManager.kickBranchEvent(getClass(), new BranchEvent(BranchEventType.Added, newBranch));
}
} catch (Exception ex) {
@@ -103,8 +95,8 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation {
}
}
- private long getBranchUuid(Response response) {
- long toReturn = -1;
+ private Branch getBranchUuid(Response response) {
+ Long toReturn = -1L;
if (response.hasEntity()) {
org.eclipse.osee.orcs.rest.model.Branch branch =
response.readEntity(org.eclipse.osee.orcs.rest.model.Branch.class);
@@ -117,12 +109,13 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation {
if (index > 0 && index < path.length()) {
String value = path.substring(index);
if (Strings.isNumeric(value)) {
- toReturn = Integer.parseInt(value);
+ toReturn = Long.parseLong(value);
}
}
}
}
- return toReturn;
+ // can't use TokenFactory here because some places assume branch will be cached such as getBranchesByName
+ return BranchManager.getBranch(toReturn);
}
public IOseeBranch getNewBranch() {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java
index 17189063e4e..35182746e20 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java
@@ -125,7 +125,7 @@ public class RelationOrderData {
new DefaultBasicGuidArtifact(branch, artifact.getArtifactTypeId().getId(), artifact.getGuid());
DefaultBasicUuidRelationReorder reorder =
- new DefaultBasicUuidRelationReorder(relationOrderModType, branch.getUuid(), type.getGuid(), guidArtifact);
+ new DefaultBasicUuidRelationReorder(relationOrderModType, branch, type.getGuid(), guidArtifact);
accessor.store(artifact, this, reorder);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
index 19d6cc51183..d20cc3b0bd5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
@@ -256,7 +256,7 @@ public class PolicyDialog extends Dialog {
boolean isArtifactLockedAfterDialog = AccessControlManager.hasLock(artifact);
if (isArtifactLockedAfterDialog != isArtifactLockedBeforeDialog) {
AccessArtifactLockTopicEvent event = new AccessArtifactLockTopicEvent();
- event.setBranchUuid(artifact.getBranchId());
+ event.setBranch(artifact.getBranch());
event.addArtifact(artifact.getUuid());
OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED);
System.err.println("kicked access control event " + event);
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java
index 0ff7a6a8212..908fcd2f83a 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java
@@ -252,9 +252,9 @@ public class BranchEndpointImpl implements BranchEndpoint {
}
@Override
- public CompareResults compareBranches(BranchId branchUuid, BranchId branchUuid2) {
- TransactionToken sourceTx = newTxQuery().andIsHead(branchUuid).getResults().getExactlyOne();
- TransactionToken destinationTx = newTxQuery().andIsHead(branchUuid2).getResults().getExactlyOne();
+ public CompareResults compareBranches(BranchId branch, BranchId branch2) {
+ TransactionToken sourceTx = newTxQuery().andIsHead(branch).getResults().getExactlyOne();
+ TransactionToken destinationTx = newTxQuery().andIsHead(branch2).getResults().getExactlyOne();
Callable<List<ChangeItem>> op = getBranchOps().compareBranch(sourceTx, destinationTx);
List<ChangeItem> changes = executeCallable(op);
@@ -273,7 +273,7 @@ public class BranchEndpointImpl implements BranchEndpoint {
@Override
public Response createBranch(NewBranch data) {
- return createBranchWithId(TokenFactory.createBranch(), data);
+ return createBranch(new CreateBranchData(), data);
}
@Override
@@ -283,6 +283,10 @@ public class BranchEndpointImpl implements BranchEndpoint {
}
CreateBranchData createData = new CreateBranchData(branch);
+ return createBranch(createData, data);
+ }
+
+ private Response createBranch(CreateBranchData createData, NewBranch data) {
createData.setName(data.getBranchName());
createData.setBranchType(data.getBranchType());
createData.setCreationComment(data.getCreationComment());
@@ -308,8 +312,8 @@ public class BranchEndpointImpl implements BranchEndpoint {
activityLog.createEntry(Activity.BRANCH_OPERATION, ActivityLog.INITIAL_STATUS,
String.format(
"Branch Operation Create Branch {branchUUID: %s, branchName: %s accountId: %s serverId: %s clientId: %s}",
- branch, data.getBranchName(), RestUtil.getAccountId(httpHeaders), RestUtil.getServerId(httpHeaders),
- RestUtil.getClientId(httpHeaders)));
+ createData.getBranch(), data.getBranchName(), RestUtil.getAccountId(httpHeaders),
+ RestUtil.getServerId(httpHeaders), RestUtil.getClientId(httpHeaders)));
} catch (OseeCoreException ex) {
OseeLog.log(ActivityLog.class, OseeLevel.SEVERE_POPUP, ex);
}

Back to the top