Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2014-04-14 15:43:31 -0400
committerJohn Misinco2014-04-16 10:40:14 -0400
commit6d5618a83c4f3b3d17624d70e38554c40a39022b (patch)
tree8c2fb9edf2a3fb51513e2f3db43b0d4f29ab5708 /plugins/org.eclipse.osee.framework.core.message/src/org
parentfbffe1b8bb2e7ee2c7c2327695b5654de247e154 (diff)
downloadorg.eclipse.osee-6d5618a83c4f3b3d17624d70e38554c40a39022b.tar.gz
org.eclipse.osee-6d5618a83c4f3b3d17624d70e38554c40a39022b.tar.xz
org.eclipse.osee-6d5618a83c4f3b3d17624d70e38554c40a39022b.zip
feature[ats_ATS40056]: Make inherit branch access control configurable
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCacheUpdateUtil.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchRow.java16
2 files changed, 15 insertions, 6 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 59439590f9..1734a9f290 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
@@ -64,7 +64,8 @@ public final class BranchCacheUpdateUtil {
long branchId = srcItem.getBranchId();
Branch updated =
factory.createOrUpdate(cache, branchId, srcItem.getBranchName(), srcItem.getBranchType(),
- srcItem.getBranchState(), srcItem.getBranchArchived().isArchived(), srcItem.getStorageState());
+ srcItem.getBranchState(), srcItem.getBranchArchived().isArchived(), srcItem.getStorageState(),
+ srcItem.isInheritAccessControl());
updatedItems.add(updated);
Integer artifactId = branchToAssocArt.get(branchId);
@@ -132,7 +133,7 @@ public final class BranchCacheUpdateUtil {
Long branchId = br.getId();
message.getBranchRows().add(
new BranchRow(br.getId(), br.getName(), br.getBranchType(), br.getBranchState(), br.getArchiveState(),
- br.getStorageState()));
+ br.getStorageState(), br.isInheritAccessControl()));
if (br.hasParentBranch()) {
message.getChildToParent().put(branchId, br.getParentBranch().getId());
}
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 f8e17c0814..fc3bbe78fe 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
@@ -28,19 +28,21 @@ public final class BranchRow {
private final BranchState branchState;
private final BranchArchivedState branchArchived;
private StorageState storageState;
+ private final boolean inheritAccessControl;
// TODO remove
public void setStorageState(StorageState storageState) {
this.storageState = storageState;
}
- public BranchRow(long branchId, String branchName, BranchType branchType, BranchState branchState, BranchArchivedState branchArchived, StorageState storageState) {
+ public BranchRow(long branchId, String branchName, BranchType branchType, BranchState branchState, BranchArchivedState branchArchived, StorageState storageState, boolean inheritAccessControl) {
this.branchId = branchId;
this.branchName = branchName;
this.branchType = branchType;
this.branchState = branchState;
this.branchArchived = branchArchived;
this.storageState = storageState;
+ this.inheritAccessControl = inheritAccessControl;
}
public long getBranchId() {
@@ -67,6 +69,10 @@ public final class BranchRow {
return storageState;
}
+ public boolean isInheritAccessControl() {
+ return inheritAccessControl;
+ }
+
public String[] toArray() {
return new String[] {
getBranchArchived().name(),
@@ -74,7 +80,8 @@ public final class BranchRow {
getBranchName(),
getBranchState().name(),
getBranchType().name(),
- getStorageState().name()};
+ getStorageState().name(),
+ Boolean.toString(isInheritAccessControl())};
}
public static BranchRow fromArray(String[] data) {
@@ -89,7 +96,8 @@ public final class BranchRow {
BranchState branchState = BranchState.valueOf(data[3]);
BranchType branchType = BranchType.valueOf(data[4]);
StorageState storageState = StorageState.valueOf(data[5]);
- return new BranchRow(branchId, branchName, branchType, branchState, archived, storageState);
+ boolean inheritAccessControl = Boolean.parseBoolean(data[6]);
+ return new BranchRow(branchId, 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 = ?";
@@ -110,4 +118,4 @@ public final class BranchRow {
return longId;
}
-} \ No newline at end of file
+}

Back to the top