diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
14 files changed, 64 insertions, 63 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 5bdcb86ad22..4bf99190f23 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 @@ -61,20 +61,20 @@ public final class BranchCacheUpdateUtil { preLoadTransactions(cacheMessage); for (BranchRow srcItem : cacheMessage.getBranchRows()) { - long branchId = srcItem.getBranchId(); + long branchUuid = srcItem.getBranchId(); Branch updated = - factory.createOrUpdate(cache, branchId, srcItem.getBranchName(), srcItem.getBranchType(), + factory.createOrUpdate(cache, branchUuid, srcItem.getBranchName(), srcItem.getBranchType(), srcItem.getBranchState(), srcItem.getBranchArchived().isArchived(), srcItem.getStorageState(), srcItem.isInheritAccessControl()); updatedItems.add(updated); - Integer artifactId = branchToAssocArt.get(branchId); + Integer artifactId = branchToAssocArt.get(branchUuid); if (artifactId != null) { updated.setAssociatedArtifactId(artifactId); } - updated.setBaseTransaction(getTx(cacheMessage.getBranchToBaseTx(), branchId)); - updated.setSourceTransaction(getTx(cacheMessage.getBranchToSourceTx(), branchId)); + updated.setBaseTransaction(getTx(cacheMessage.getBranchToBaseTx(), branchUuid)); + updated.setSourceTransaction(getTx(cacheMessage.getBranchToSourceTx(), branchUuid)); } for (Entry<Long, Long> entry : cacheMessage.getChildToParent().entrySet()) { @@ -119,9 +119,9 @@ public final class BranchCacheUpdateUtil { } } - private TransactionRecord getTx(Map<Long, Integer> branchToTx, Long branchId) throws OseeCoreException { + private TransactionRecord getTx(Map<Long, Integer> branchToTx, Long branchUuid) throws OseeCoreException { TransactionRecord tx = null; - Integer txId = branchToTx.get(branchId); + Integer txId = branchToTx.get(branchUuid); if (txId != null && txId > 0) { tx = txCache.getOrLoad(txId); } @@ -130,27 +130,27 @@ public final class BranchCacheUpdateUtil { public static void loadFromCache(AbstractBranchCacheMessage message, Collection<Branch> types) throws OseeCoreException { for (Branch br : types) { - Long branchId = br.getUuid(); + Long branchUuid = br.getUuid(); message.getBranchRows().add( new BranchRow(br.getUuid(), br.getName(), br.getBranchType(), br.getBranchState(), br.getArchiveState(), br.getStorageState(), br.isInheritAccessControl())); if (br.hasParentBranch()) { - message.getChildToParent().put(branchId, br.getParentBranch().getUuid()); + message.getChildToParent().put(branchUuid, br.getParentBranch().getUuid()); } - addTxRecord(message.getBranchToBaseTx(), branchId, br.getBaseTransaction()); - addTxRecord(message.getBranchToSourceTx(), branchId, br.getSourceTransaction()); - addAssocArtifact(message.getBranchToAssocArt(), branchId, br.getAssociatedArtifactId()); + addTxRecord(message.getBranchToBaseTx(), branchUuid, br.getBaseTransaction()); + addTxRecord(message.getBranchToSourceTx(), branchUuid, br.getSourceTransaction()); + addAssocArtifact(message.getBranchToAssocArt(), branchUuid, br.getAssociatedArtifactId()); if (br.getBranchType().isMergeBranch()) { addMergeBranches(message.getMergeBranches(), (MergeBranch) br); } } } - private static void addAssocArtifact(Map<Long, Integer> map, Long branchId, Integer artId) { + private static void addAssocArtifact(Map<Long, Integer> map, Long branchUuid, Integer artId) { if (artId != null) { - map.put(branchId, artId); + map.put(branchUuid, artId); } else { - map.put(branchId, -1); + map.put(branchUuid, -1); } } @@ -162,11 +162,11 @@ public final class BranchCacheUpdateUtil { srcDestMerge.add(new Triplet<Long, Long, Long>(src, dest, merge)); } - private static void addTxRecord(Map<Long, Integer> map, Long branchId, TransactionRecord toAdd) { + private static void addTxRecord(Map<Long, Integer> map, Long branchUuid, TransactionRecord toAdd) { if (toAdd != null) { - map.put(branchId, toAdd.getId()); + map.put(branchUuid, toAdd.getId()); } else { - map.put(branchId, -1); + map.put(branchUuid, -1); } } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationResponse.java index a2fb2968959..5c54306c691 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationResponse.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationResponse.java @@ -15,22 +15,22 @@ package org.eclipse.osee.framework.core.message; */ public class BranchCreationResponse { - private long branchId; + private long branchUuid; - public BranchCreationResponse(long branchId) { - this.branchId = branchId; + public BranchCreationResponse(long branchUuid) { + this.branchUuid = branchUuid; } public long getBranchId() { - return branchId; + return branchUuid; } - public void setBranchId(long branchId) { - this.branchId = branchId; + public void setBranchId(long branchUuid) { + this.branchUuid = branchUuid; } @Override public String toString() { - return "BranchCreationResponse [branchId=" + branchId + "]"; + return "BranchCreationResponse [branchUuid=" + branchUuid + "]"; } } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java index fc3bbe78fed..278a06cfd82 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; import org.eclipse.osee.framework.jdk.core.util.GUID; public final class BranchRow { - private final long branchId; + private final long branchUuid; private final String branchName; private final BranchType branchType; @@ -35,8 +35,8 @@ public final class BranchRow { this.storageState = storageState; } - public BranchRow(long branchId, String branchName, BranchType branchType, BranchState branchState, BranchArchivedState branchArchived, StorageState storageState, boolean inheritAccessControl) { - this.branchId = branchId; + public BranchRow(long branchUuid, String branchName, BranchType branchType, BranchState branchState, BranchArchivedState branchArchived, StorageState storageState, boolean inheritAccessControl) { + this.branchUuid = branchUuid; this.branchName = branchName; this.branchType = branchType; this.branchState = branchState; @@ -46,7 +46,7 @@ public final class BranchRow { } public long getBranchId() { - return branchId; + return branchUuid; } public String getBranchName() { @@ -86,18 +86,19 @@ public final class BranchRow { public static BranchRow fromArray(String[] data) { BranchArchivedState archived = BranchArchivedState.valueOf(data[0]); - long branchId = 0; + long branchUuid = 0; if (GUID.isValid(data[1])) { - branchId = getBranchIdLegacy(data[1]); + branchUuid = getBranchIdLegacy(data[1]); } else { - branchId = Long.valueOf(data[1]); + branchUuid = Long.valueOf(data[1]); } String branchName = data[2]; BranchState branchState = BranchState.valueOf(data[3]); BranchType branchType = BranchType.valueOf(data[4]); StorageState storageState = StorageState.valueOf(data[5]); boolean inheritAccessControl = Boolean.parseBoolean(data[6]); - return new BranchRow(branchId, branchName, branchType, branchState, archived, storageState, inheritAccessControl); + return new BranchRow(branchUuid, branchName, branchType, branchState, archived, storageState, + inheritAccessControl); } // Temporary cache till all code uses branch uuid. Remove after 0.17.0 private static final String SELECT_BRANCH_ID_BY_GUID = "select branch_id from osee_branch where branch_guid = ?"; diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchArchiveStateRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchArchiveStateRequest.java index 87b707c169a..e6e98eba1e1 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchArchiveStateRequest.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchArchiveStateRequest.java @@ -16,17 +16,17 @@ import org.eclipse.osee.framework.core.enums.BranchArchivedState; * @author Megumi Telles */ public class ChangeBranchArchiveStateRequest { - private final long branchId; + private final long branchUuid; private final BranchArchivedState state; - public ChangeBranchArchiveStateRequest(long branchId, BranchArchivedState state) { + public ChangeBranchArchiveStateRequest(long branchUuid, BranchArchivedState state) { super(); - this.branchId = branchId; + this.branchUuid = branchUuid; this.state = state; } public long getBranchId() { - return branchId; + return branchUuid; } public BranchArchivedState getState() { diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchStateRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchStateRequest.java index aac473a230b..0302c1ab935 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchStateRequest.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchStateRequest.java @@ -16,17 +16,17 @@ import org.eclipse.osee.framework.core.enums.BranchState; * @author Megumi Telles */ public class ChangeBranchStateRequest { - private final long branchId; + private final long branchUuid; private final BranchState state; - public ChangeBranchStateRequest(long branchId, BranchState state) { + public ChangeBranchStateRequest(long branchUuid, BranchState state) { super(); - this.branchId = branchId; + this.branchUuid = branchUuid; this.state = state; } public long getBranchId() { - return branchId; + return branchUuid; } public BranchState getState() { diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchTypeRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchTypeRequest.java index 477e4582e24..caf9536f807 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchTypeRequest.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeBranchTypeRequest.java @@ -16,17 +16,17 @@ import org.eclipse.osee.framework.core.enums.BranchType; * @author Megumi Telles */ public class ChangeBranchTypeRequest { - private final long branchId; + private final long branchUuid; private final BranchType type; - public ChangeBranchTypeRequest(long branchId, BranchType type) { + public ChangeBranchTypeRequest(long branchUuid, BranchType type) { super(); - this.branchId = branchId; + this.branchUuid = branchUuid; this.type = type; } public long getBranchId() { - return branchId; + return branchUuid; } public BranchType getType() { diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java index 7b6236bc361..977fef72fc1 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java @@ -15,16 +15,16 @@ package org.eclipse.osee.framework.core.message; * @author Megumi Telles */ public class PurgeBranchRequest { - private final long branchId; + private final long branchUuid; private final boolean recursive; - public PurgeBranchRequest(long branchId, boolean recursive) { - this.branchId = branchId; + public PurgeBranchRequest(long branchUuid, boolean recursive) { + this.branchUuid = branchUuid; this.recursive = recursive; } public long getBranchId() { - return branchId; + return branchUuid; } public boolean isRecursive() { diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeArchivedStateRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeArchivedStateRequestTranslator.java index 8161280484c..1a535d2f84b 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeArchivedStateRequestTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeArchivedStateRequestTranslator.java @@ -27,9 +27,9 @@ public final class BranchChangeArchivedStateRequestTranslator implements ITransl @Override public ChangeBranchArchiveStateRequest convert(PropertyStore propertyStore) { - long branchId = propertyStore.getLong(Entry.BRANCH_ID.name()); + long branchUuid = propertyStore.getLong(Entry.BRANCH_ID.name()); BranchArchivedState state = BranchArchivedState.valueOf(propertyStore.get(Entry.BRANCH_ARCHIVED_STATE.name())); - ChangeBranchArchiveStateRequest data = new ChangeBranchArchiveStateRequest(branchId, state); + ChangeBranchArchiveStateRequest data = new ChangeBranchArchiveStateRequest(branchUuid, state); return data; } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeStateRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeStateRequestTranslator.java index 40f5e28e444..51ea0c219f5 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeStateRequestTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeStateRequestTranslator.java @@ -27,9 +27,9 @@ public final class BranchChangeStateRequestTranslator implements ITranslator<Cha @Override public ChangeBranchStateRequest convert(PropertyStore propertyStore) { - long branchId = propertyStore.getLong(Entry.BRANCH_ID.name()); + long branchUuid = propertyStore.getLong(Entry.BRANCH_ID.name()); BranchState state = BranchState.valueOf(propertyStore.get(Entry.BRANCH_STATE.name())); - ChangeBranchStateRequest data = new ChangeBranchStateRequest(branchId, state); + ChangeBranchStateRequest data = new ChangeBranchStateRequest(branchUuid, state); return data; } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeTypeRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeTypeRequestTranslator.java index 3ffeb7f24c2..3f4244763ea 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeTypeRequestTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchChangeTypeRequestTranslator.java @@ -27,9 +27,9 @@ public final class BranchChangeTypeRequestTranslator implements ITranslator<Chan @Override public ChangeBranchTypeRequest convert(PropertyStore propertyStore) { - long branchId = propertyStore.getLong(Entry.BRANCH_ID.name()); + long branchUuid = propertyStore.getLong(Entry.BRANCH_ID.name()); BranchType type = BranchType.valueOf(propertyStore.get(Entry.BRANCH_TYPE.name())); - ChangeBranchTypeRequest data = new ChangeBranchTypeRequest(branchId, type); + ChangeBranchTypeRequest data = new ChangeBranchTypeRequest(branchUuid, type); return data; } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationResponseTranslator.java index bab7f29c4d7..f6e5e61f8bc 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationResponseTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationResponseTranslator.java @@ -25,8 +25,8 @@ public class BranchCreationResponseTranslator implements ITranslator<BranchCreat @Override public BranchCreationResponse convert(PropertyStore store) { - long branchId = store.getLong(Fields.BRANCH_ID.name()); - return new BranchCreationResponse(branchId); + long branchUuid = store.getLong(Fields.BRANCH_ID.name()); + return new BranchCreationResponse(branchUuid); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java index 69ef66b04b0..235ecb19fdb 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java @@ -26,9 +26,9 @@ public class PurgeBranchRequestTranslator implements ITranslator<PurgeBranchRequ @Override public PurgeBranchRequest convert(PropertyStore propertyStore) { - long branchId = propertyStore.getLong(Entry.BRANCH_ID.name()); + long branchUuid = propertyStore.getLong(Entry.BRANCH_ID.name()); boolean recursive = propertyStore.getBoolean(Entry.RECURSIVE.name()); - PurgeBranchRequest request = new PurgeBranchRequest(branchId, recursive); + PurgeBranchRequest request = new PurgeBranchRequest(branchUuid, recursive); return request; } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionCacheUpdateResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionCacheUpdateResponseTranslator.java index 73dded007cd..55a4d436105 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionCacheUpdateResponseTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionCacheUpdateResponseTranslator.java @@ -93,7 +93,7 @@ public class TransactionCacheUpdateResponseTranslator implements ITranslator<Tra Date timeStamp = new Date(Long.valueOf(data[index++])); int authorArtId = Integer.valueOf(data[index++]); int commitArtId = Integer.valueOf(data[index++]); - long branchId = Long.valueOf(data[index++]); - return factory.create(txId, branchId, comment, timeStamp, authorArtId, commitArtId, txType, branchCache); + long branchUuid = Long.valueOf(data[index++]); + return factory.create(txId, branchUuid, comment, timeStamp, authorArtId, commitArtId, txType, branchCache); } } diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionRecordTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionRecordTranslator.java index 15f474c28ef..471ac1cda54 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionRecordTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/TransactionRecordTranslator.java @@ -51,8 +51,8 @@ public final class TransactionRecordTranslator implements ITranslator<Transactio Date time = new Timestamp(store.getLong(Entry.TRANSACTION_TIMESTAMP.name())); int authorArtId = store.getInt(Entry.TRANSACTION_AUTHOR_ART_ID.name()); int commitArtId = store.getInt(Entry.TRANSACTION_COMMIT_ART_ID.name()); - long branchId = store.getLong(Entry.TRANSACTION_BRANCH.name()); - return txRecordFactory.create(transactionNumber, branchId, comment, time, authorArtId, commitArtId, txType, + long branchUuid = store.getLong(Entry.TRANSACTION_BRANCH.name()); + return txRecordFactory.create(transactionNumber, branchUuid, comment, time, authorArtId, commitArtId, txType, branchCache); } |