Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.model')
-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/BranchReadable.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java16
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java10
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java20
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java14
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java4
14 files changed, 56 insertions, 50 deletions
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 7da4c644dad..3f591853e74 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
@@ -18,7 +18,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
@@ -259,7 +259,7 @@ public class Branch extends AbstractOseeType implements WriteableBranch, IAdapta
}
@Override
- public boolean isAncestorOf(IOseeBranch branch) throws OseeCoreException {
+ public boolean isAncestorOf(BranchId branch) throws OseeCoreException {
return getChildBranches(true).contains(branch);
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java
index 3eef8f22f73..32c6728222c 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchReadable.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.core.model;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchState;
@@ -47,5 +48,5 @@ public interface BranchReadable extends IOseeBranch {
Collection<? extends BranchReadable> getAncestors() throws OseeCoreException;
- boolean isAncestorOf(IOseeBranch branch) throws OseeCoreException;
+ boolean isAncestorOf(BranchId branch) throws OseeCoreException;
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java
index 9906b42d8a6..b6f9e3b0ba9 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/MergeBranch.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.model;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -40,11 +40,11 @@ public final class MergeBranch extends Branch {
return getFieldValue(BranchField.MERGE_BRANCH_DESTINATION);
}
- public void setSourceBranch(IOseeBranch branch) throws OseeCoreException {
+ public void setSourceBranch(BranchId branch) throws OseeCoreException {
setField(BranchField.MERGE_BRANCH_SOURCE, branch);
}
- public void setDestinationBranch(IOseeBranch branch) throws OseeCoreException {
+ public void setDestinationBranch(BranchId branch) throws OseeCoreException {
setField(BranchField.MERGE_BRANCH_DESTINATION, branch);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java
index 9f92d04fecb..3c961fe3cc0 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.core.model;
import java.util.Date;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.ITransaction;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
@@ -23,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
/**
* @author Jeff C. Phillips
*/
-public class TransactionRecord extends BaseIdentity<Integer>implements ITransaction, IAdaptable {
+public class TransactionRecord extends BaseIdentity<Integer> implements ITransaction, IAdaptable {
private static final int NON_EXISTING_BRANCH = -1;
private final TransactionDetailsType txType;
@@ -59,6 +60,10 @@ public class TransactionRecord extends BaseIdentity<Integer>implements ITransact
return branchUuid;
}
+ public final IOseeBranch getBranchToken() {
+ return getFullBranch();
+ }
+
public Branch getFullBranch() {
Conditions.checkNotNull(branchCache, "BranchCache was not set after construction");
return branchCache.getByUuid(getBranchId());
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
index 017a4b8e890..0872703d16b 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.model;
import java.util.Date;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.model.cache.IOseeTypeFactory;
@@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions;
*/
public class TransactionRecordFactory implements IOseeTypeFactory {
- public TransactionRecord create(int transactionNumber, IOseeBranch branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException {
+ public TransactionRecord create(int transactionNumber, BranchId branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException {
return this.create(transactionNumber, branch.getUuid(), comment, timestamp, authorArtId, commitArtId, txType,
null);
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java
index 4455508075d..68b46b769be 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TypeUtil.java
@@ -5,7 +5,7 @@
*/
package org.eclipse.osee.framework.core.model;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
public class TypeUtil {
@@ -13,8 +13,8 @@ public class TypeUtil {
public static long getId(AbstractOseeType type) {
if (type instanceof AbstractOseeIdType) {
return ((AbstractOseeIdType) type).getId();
- } else if (type instanceof IOseeBranch) {
- return ((IOseeBranch) type).getId();
+ } else if (type instanceof BranchId) {
+ return ((BranchId) type).getId();
}
throw new OseeArgumentException("Unsupported type");
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
index 04c8ae484b4..b8e0d83471e 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessDataQuery.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.framework.core.model.access;
import java.util.Collection;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IRelationTypeSide;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -36,12 +36,12 @@ public class AccessDataQuery {
return accessData.toString();
}
- public void branchMatches(PermissionEnum permissionToMatch, IOseeBranch branchToMatch, PermissionStatus permissionStatus) throws OseeCoreException {
+ public void branchMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, PermissionStatus permissionStatus) throws OseeCoreException {
Collection<AccessDetail<?>> branchAccessDetails = accessData.getAccess(branchToMatch);
setTypePermissionStatus(permissionStatus, permissionToMatch, branchAccessDetails, branchToMatch);
}
- public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, IOseeBranch branchToMatch, IArtifactType artifactType, PermissionStatus permissionStatus) throws OseeCoreException {
+ public void branchArtifactTypeMatches(PermissionEnum permissionToMatch, BranchId branchToMatch, IArtifactType artifactType, PermissionStatus permissionStatus) throws OseeCoreException {
branchMatches(permissionToMatch, branchToMatch, permissionStatus);
if (permissionStatus.matched()) {
Collection<AccessDetail<?>> branchAccessDetails = accessData.getAccess(branchToMatch);
@@ -51,7 +51,7 @@ public class AccessDataQuery {
public void artifactTypeMatches(PermissionEnum permissionToMatch, IBasicArtifact<?> artifact, PermissionStatus permissionStatus) throws OseeCoreException {
IArtifactType typeToMatch = artifact.getArtifactType();
- IOseeBranch branchToMatch = artifact.getBranch();
+ BranchId branchToMatch = artifact.getBranch();
branchArtifactTypeMatches(permissionToMatch, branchToMatch, typeToMatch, permissionStatus);
if (permissionStatus.matched()) {
Collection<AccessDetail<?>> artifactAccessDetails = accessData.getAccess(artifact);
@@ -60,7 +60,7 @@ public class AccessDataQuery {
}
public void artifactMatches(PermissionEnum permissionToMatch, final IBasicArtifact<?> artifact, PermissionStatus permissionStatus) throws OseeCoreException {
- IOseeBranch branchToMatch = artifact.getBranch();
+ BranchId branchToMatch = artifact.getBranch();
branchMatches(permissionToMatch, branchToMatch, permissionStatus);
if (permissionStatus.matched()) {
Collection<AccessDetail<?>> mainList = accessData.getAccess(artifact);
@@ -124,7 +124,7 @@ public class AccessDataQuery {
}
public void relationTypeMatches(PermissionEnum permissionToMatch, IBasicArtifact<?> artifact, IRelationTypeSide relationTypeSide, PermissionStatus permissionStatus) throws OseeCoreException {
- IOseeBranch branchToMatch = artifact.getBranch();
+ BranchId branchToMatch = artifact.getBranch();
branchMatches(permissionToMatch, branchToMatch, permissionStatus);
if (permissionStatus.matched()) {
Collection<AccessDetail<?>> relationAccessDetails = accessData.getAccess(artifact);
@@ -139,8 +139,8 @@ public class AccessDataQuery {
for (Object objectKey : accessData.keySet()) {
if (objectKey instanceof IBasicArtifact<?>) {
artifactMatches(permissionToMatch, (IBasicArtifact<?>) objectKey, permissionStatus);
- } else if (objectKey instanceof IOseeBranch) {
- branchMatches(permissionToMatch, (IOseeBranch) objectKey, permissionStatus);
+ } else if (objectKey instanceof BranchId) {
+ branchMatches(permissionToMatch, (BranchId) objectKey, permissionStatus);
}
if (!permissionStatus.matched()) {
break;
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java
index 531d7ce591d..86f9e538b16 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactAccessFilter.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.model.access.exp;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -46,6 +46,6 @@ public class ArtifactAccessFilter implements IAccessFilter {
@Override
public boolean acceptToObject(Object object) {
//Return false if the object to be checked is a branch.
- return !(object instanceof IOseeBranch);
+ return !(object instanceof BranchId);
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java
index 393a0bbb897..7a101fa24d9 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeAccessFilter.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.model.access.exp;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -35,7 +35,7 @@ public class AttributeTypeAccessFilter implements IAccessFilter {
@Override
public boolean acceptToObject(Object object) {
//Return false if the object to be checked is a branch or artifact.
- return !(object instanceof IOseeBranch) && !(object instanceof IBasicArtifact<?>);
+ return !(object instanceof BranchId) && !(object instanceof IBasicArtifact<?>);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
index 30c64c62bd8..fc179349a9b 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
@@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.OseeCacheEnum;
import org.eclipse.osee.framework.core.enums.TransactionVersion;
import org.eclipse.osee.framework.core.model.Branch;
@@ -36,7 +36,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> {
this.txCache = txCache;
}
- public MergeBranch findMergeBranch(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException {
+ public MergeBranch findMergeBranch(BranchId sourceBranch, BranchId destinationBranch) throws OseeCoreException {
Conditions.checkNotNull(sourceBranch, "source branch");
Conditions.checkNotNull(destinationBranch, "destination branch");
MergeBranch toReturn = null;
@@ -53,7 +53,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> {
return toReturn;
}
- public MergeBranch findFirstMergeBranch(Branch sourceBranch) throws OseeCoreException {
+ public MergeBranch findFirstMergeBranch(BranchId sourceBranch) throws OseeCoreException {
Conditions.checkNotNull(sourceBranch, "source branch");
MergeBranch toReturn = null;
for (Branch branch : getAll()) {
@@ -68,7 +68,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> {
return toReturn;
}
- public List<MergeBranch> findAllMergeBranches(Branch sourceBranch) throws OseeCoreException {
+ public List<MergeBranch> findAllMergeBranches(BranchId sourceBranch) throws OseeCoreException {
Conditions.checkNotNull(sourceBranch, "source branch");
List<MergeBranch> toReturn = new ArrayList<>();
for (Branch branch : getAll()) {
@@ -82,7 +82,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> {
return toReturn;
}
- public synchronized <T extends IOseeBranch> List<T> getBranches(BranchFilter branchFilter) {
+ public synchronized <T extends BranchId> List<T> getBranches(BranchFilter branchFilter) {
Collection<Branch> allBranches = getRawValues();
List<T> branches = new LinkedList<>();
for (Branch branch : allBranches) {
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java
index 2145d9107fe..6de12ef1de2 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/ITransactionDataAccessor.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.model.cache;
import java.util.Collection;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.TransactionVersion;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
@@ -39,7 +39,7 @@ public interface ITransactionDataAccessor {
* @param transactionType transaction type to load, can be {@link TransactionVersion#HEAD} or
* {@link TransactionVersion#BASE}
*/
- public TransactionRecord loadTransactionRecord(TransactionCache cache, IOseeBranch branch, TransactionVersion transactionType) throws OseeCoreException;
+ public TransactionRecord loadTransactionRecord(TransactionCache cache, BranchId branch, TransactionVersion transactionType) throws OseeCoreException;
public void load(TransactionCache transactionCache) throws OseeCoreException;
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java
index a28d1b6b1de..82029cdb135 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java
@@ -15,7 +15,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.AbstractOseeField;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -25,21 +25,21 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions;
/**
* @author Roberto E. Escobar
*/
-public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOseeBranch, Collection<AttributeType>>> {
+public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<BranchId, Collection<AttributeType>>> {
- private final Map<IOseeBranch, Collection<AttributeType>> validityMap;
+ private final Map<BranchId, Collection<AttributeType>> validityMap;
- public ArtifactTypeAttributesField(Map<IOseeBranch, Collection<AttributeType>> validityMap) {
+ public ArtifactTypeAttributesField(Map<BranchId, Collection<AttributeType>> validityMap) {
super();
this.validityMap = validityMap;
}
@Override
- public Map<IOseeBranch, Collection<AttributeType>> get() {
- return new HashMap<IOseeBranch, Collection<AttributeType>>(validityMap);
+ public Map<BranchId, Collection<AttributeType>> get() {
+ return new HashMap<BranchId, Collection<AttributeType>>(validityMap);
}
- public void put(IOseeBranch branch, Collection<AttributeType> attributes) {
+ public void put(BranchId branch, Collection<AttributeType> attributes) {
Collection<AttributeType> current = validityMap.get(branch);
validityMap.put(branch, attributes);
if (Compare.isDifferent(current, attributes)) {
@@ -48,12 +48,12 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOs
}
@Override
- public void set(Map<IOseeBranch, Collection<AttributeType>> attributeTypeMap) throws OseeCoreException {
+ public void set(Map<BranchId, Collection<AttributeType>> attributeTypeMap) throws OseeCoreException {
Conditions.checkNotNull(attributeTypeMap, "attribute type map input");
boolean isDifferent = Compare.isDifferent(get(), attributeTypeMap);
if (isDifferent) {
validityMap.clear();
- for (Entry<IOseeBranch, Collection<AttributeType>> entry : attributeTypeMap.entrySet()) {
+ for (Entry<BranchId, Collection<AttributeType>> entry : attributeTypeMap.entrySet()) {
// Ensure we are using a hash set - don't use putAll
set(entry.getKey(), entry.getValue());
}
@@ -61,7 +61,7 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOs
isDirty |= isDifferent;
}
- private void set(IOseeBranch branch, Collection<AttributeType> attributeTypes) throws OseeCoreException {
+ private void set(BranchId branch, Collection<AttributeType> attributeTypes) throws OseeCoreException {
Conditions.checkNotNull(branch, "branch");
Conditions.checkNotNull(attributeTypes, "attribute types list");
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java
index 638505e1424..88c426b4530 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java
@@ -18,7 +18,7 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.AbstractOseeIdType;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.IOseeField;
@@ -38,8 +38,8 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType {
private final Set<ArtifactType> superTypes = new HashSet<>();
private final Set<ArtifactType> childTypes = new HashSet<>();
- private final Map<IOseeBranch, Collection<AttributeType>> attributes =
- new HashMap<IOseeBranch, Collection<AttributeType>>();
+ private final Map<BranchId, Collection<AttributeType>> attributes =
+ new HashMap<BranchId, Collection<AttributeType>>();
public ArtifactType(Long guid, String name, boolean isAbstract) {
super(guid, name);
@@ -99,12 +99,12 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType {
}
}
- public void setAttributeTypes(Collection<AttributeType> attributeTypes, IOseeBranch branch) throws OseeCoreException {
+ public void setAttributeTypes(Collection<AttributeType> attributeTypes, BranchId branch) throws OseeCoreException {
IOseeField<?> field = getField(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY);
((ArtifactTypeAttributesField) field).put(branch, attributeTypes);
}
- public void setAllAttributeTypes(Map<IOseeBranch, Collection<AttributeType>> attributeTypes) throws OseeCoreException {
+ public void setAllAttributeTypes(Map<BranchId, Collection<AttributeType>> attributeTypes) throws OseeCoreException {
IOseeField<?> field = getField(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY);
((ArtifactTypeAttributesField) field).set(attributeTypes);
}
@@ -114,7 +114,7 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType {
return attributes.contains(attributeType);
}
- public Map<IOseeBranch, Collection<AttributeType>> getLocalAttributeTypes() throws OseeCoreException {
+ public Map<BranchId, Collection<AttributeType>> getLocalAttributeTypes() throws OseeCoreException {
return getFieldValue(ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY);
}
@@ -126,7 +126,7 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType {
}
private static void getAttributeTypes(Set<IAttributeType> attributeTypes, ArtifactType artifactType, Branch branch) throws OseeCoreException {
- Map<IOseeBranch, Collection<AttributeType>> validityMap = artifactType.getLocalAttributeTypes();
+ Map<BranchId, Collection<AttributeType>> validityMap = artifactType.getLocalAttributeTypes();
Branch branchCursor = branch;
do {
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java
index 972df437dc9..75ce035f941 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.services;
import java.util.Collection;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessDataQuery;
@@ -21,7 +21,7 @@ public interface IAccessControlService {
boolean hasPermission(Object object, PermissionEnum permission) throws OseeCoreException;
- void removePermissions(IOseeBranch branch) throws OseeCoreException;
+ void removePermissions(BranchId branch) throws OseeCoreException;
AccessDataQuery getAccessData(IBasicArtifact<?> userArtifact, Collection<?> itemsToCheck) throws OseeCoreException;
}

Back to the top