Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-09-19 12:28:56 -0400
committerdonald.g.dunne2016-09-19 12:28:56 -0400
commitc6da90a51643b4157bb228947e579169a24851e0 (patch)
treea1d883dc7fdfb3475675a4ebf41800948747e1d8
parentac5583aa9b298f705eb3114883387d13c920558c (diff)
downloadorg.eclipse.osee-c6da90a51643b4157bb228947e579169a24851e0.tar.gz
org.eclipse.osee-c6da90a51643b4157bb228947e579169a24851e0.tar.xz
org.eclipse.osee-c6da90a51643b4157bb228947e579169a24851e0.zip
refactor: Use ArtifactToken with CmAccessControl
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControlProxy.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControlProxy.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java8
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockCMWithAccessModel.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagement.java10
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagementProvider.java9
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/IAccessProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java17
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java7
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RoleContextProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java17
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControl.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControlProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/IAccessControlService.java4
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java7
25 files changed, 88 insertions, 73 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java
index a21254f164..7d875b38a1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControl.java
@@ -15,8 +15,8 @@ import java.util.Collections;
import org.eclipse.osee.ats.access.AtsBranchAccessManager;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.core.data.IAccessContextId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -35,7 +35,7 @@ public class AtsCmAccessControl implements CmAccessControl {
}
@Override
- public boolean isApplicable(IBasicArtifact<?> user, Object object) {
+ public boolean isApplicable(ArtifactToken user, Object object) {
boolean result = false;
if (object != null) {
if (object instanceof Artifact && !((Artifact) object).isOnBranch(AtsUtilCore.getAtsBranch())) {
@@ -49,7 +49,7 @@ public class AtsCmAccessControl implements CmAccessControl {
}
@Override
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) {
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user, Object object) {
if (object != null) {
if (object instanceof Artifact && !((Artifact) object).isOnBranch(AtsUtilCore.getAtsBranch())) {
return atsBranchAccessManager.getContextId(((Artifact) object).getBranch());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControlProxy.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControlProxy.java
index 2b2f270dcc..5f2af42b07 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControlProxy.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsCmAccessControlProxy.java
@@ -12,13 +12,13 @@ package org.eclipse.osee.ats.internal;
import java.util.Collection;
import org.eclipse.osee.ats.access.AtsBranchAccessManager;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
import org.eclipse.osee.framework.core.dsl.integration.AccessModelInterpreter;
import org.eclipse.osee.framework.core.dsl.integration.OseeDslAccessModel;
import org.eclipse.osee.framework.core.dsl.integration.OseeDslProvider;
import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider;
import org.eclipse.osee.framework.core.dsl.ui.integration.operations.OseeDslRoleContextProvider;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessModel;
import org.eclipse.osee.framework.core.model.access.HasAccessModel;
import org.eclipse.osee.framework.core.services.CmAccessControl;
@@ -97,12 +97,12 @@ public class AtsCmAccessControlProxy implements CmAccessControl, HasAccessModel
}
@Override
- public boolean isApplicable(IBasicArtifact<?> user, Object object) {
+ public boolean isApplicable(ArtifactToken user, Object object) {
return getProxiedService().isApplicable(user, object);
}
@Override
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) throws OseeCoreException {
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user, Object object) throws OseeCoreException {
return getProxiedService().getContextId(user, object);
}
diff --git a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java
index 185b1fc6f0..dabe3250cd 100644
--- a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java
+++ b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControl.java
@@ -14,9 +14,9 @@ import java.util.Collection;
import java.util.Collections;
import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.IAccessContextId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
@@ -36,12 +36,12 @@ public class FrameworkAccessControl implements CmAccessControl {
}
@Override
- public boolean isApplicable(IBasicArtifact<?> user, Object object) {
+ public boolean isApplicable(ArtifactToken user, Object object) {
return true;
}
@Override
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) {
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user, Object object) {
try {
Conditions.checkExpressionFailOnTrue(!isAssocitedArtifactValid(object), "Associated artifact");
} catch (OseeCoreException ex) {
diff --git a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControlProxy.java b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControlProxy.java
index a3de0f3ff7..16103cc310 100644
--- a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControlProxy.java
+++ b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessControlProxy.java
@@ -14,13 +14,13 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
import org.eclipse.osee.framework.core.dsl.integration.AccessModelInterpreter;
import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider;
import org.eclipse.osee.framework.core.dsl.ui.integration.operations.OseeDslRoleContextProvider;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessModel;
import org.eclipse.osee.framework.core.model.access.HasAccessModel;
import org.eclipse.osee.framework.core.services.CmAccessControl;
@@ -113,12 +113,12 @@ public class FrameworkAccessControlProxy implements CmAccessControl, HasAccessMo
}
@Override
- public boolean isApplicable(IBasicArtifact<?> user, Object object) {
+ public boolean isApplicable(ArtifactToken user, Object object) {
return getAccessControl().isApplicable(user, object);
}
@Override
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) throws OseeCoreException {
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user, Object object) throws OseeCoreException {
checkInitialized();
return getAccessControl().getContextId(user, object);
}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java
index 72482d0e53..0a1ca7effa 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java
@@ -14,7 +14,7 @@ import java.util.Collection;
import java.util.HashSet;
import org.eclipse.osee.framework.access.internal.cm.CmAccessControlProviderImpl;
import org.eclipse.osee.framework.access.test.mocks.MockConfigurationManagement;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.core.services.CmAccessControlProvider;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -25,12 +25,12 @@ import org.junit.Test;
/**
* Test Case for {@link CmAccessControlProvider}{@link CmAccessControlProviderImpl}
- *
+ *
* @author Roberto E. Escobar
*/
public class CmAccessControlProviderTest {
- private IBasicArtifact<?> user;
+ private ArtifactToken user;
private Object objectToCheck;
@Before
@@ -64,7 +64,7 @@ public class CmAccessControlProviderTest {
assertCMProvider(user, objectToCheck, null, cm1, cm2);
}
- private static void assertCMProvider(IBasicArtifact<?> user, Object objectToCheck, MockConfigurationManagement expectedCM, MockConfigurationManagement... extraCms) throws OseeCoreException {
+ private static void assertCMProvider(ArtifactToken user, Object objectToCheck, MockConfigurationManagement expectedCM, MockConfigurationManagement... extraCms) throws OseeCoreException {
Collection<CmAccessControl> cmServices = new HashSet<>();
for (CmAccessControl extraCm : extraCms) {
cmServices.add(extraCm);
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java
index 6257b2dcc3..8b5d7e75d3 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java
@@ -17,8 +17,8 @@ import org.eclipse.osee.framework.access.IAccessProvider;
import org.eclipse.osee.framework.access.internal.cm.CmAccessProvider;
import org.eclipse.osee.framework.access.test.mocks.MockCMWithAccessModel;
import org.eclipse.osee.framework.access.test.mocks.MockConfigurationManagementProvider;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessData;
import org.eclipse.osee.framework.core.model.access.AccessModel;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -30,11 +30,11 @@ import org.junit.Test;
/**
* Test Case for {@link CmAccessProvider}
- *
+ *
* @author Roberto E. Escobar
*/
public class CmAccessProviderTest {
- private static IBasicArtifact<?> expectedUser;
+ private static ArtifactToken expectedUser;
private static Object expectedObject;
private static IAccessContextId contextId1;
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockCMWithAccessModel.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockCMWithAccessModel.java
index 67a17e59ef..065007fd8b 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockCMWithAccessModel.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockCMWithAccessModel.java
@@ -11,8 +11,8 @@
package org.eclipse.osee.framework.access.test.mocks;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessModel;
import org.eclipse.osee.framework.core.model.access.HasAccessModel;
@@ -24,7 +24,7 @@ public final class MockCMWithAccessModel extends MockConfigurationManagement imp
private final AccessModel accessModel;
private boolean wasGetAccessModelCalled;
- public MockCMWithAccessModel(AccessModel accessModel, IBasicArtifact<?> expectedUser, Object expectedObject, boolean isApplicable, Collection<IAccessContextId> contextIds) {
+ public MockCMWithAccessModel(AccessModel accessModel, ArtifactToken expectedUser, Object expectedObject, boolean isApplicable, Collection<IAccessContextId> contextIds) {
super(expectedUser, expectedObject, isApplicable, contextIds);
this.accessModel = accessModel;
}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagement.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagement.java
index 66f37b5326..a5223f9676 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagement.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagement.java
@@ -11,8 +11,8 @@
package org.eclipse.osee.framework.access.test.mocks;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.junit.Assert;
@@ -21,14 +21,14 @@ import org.junit.Assert;
*/
public class MockConfigurationManagement implements CmAccessControl {
- private final IBasicArtifact<?> expectedUser;
+ private final ArtifactToken expectedUser;
private final Object expectedObject;
private final boolean isApplicable;
private final Collection<IAccessContextId> contextIds;
private boolean wasIsApplicableCalled;
private boolean wasGetContextIdCalled;
- public MockConfigurationManagement(IBasicArtifact<?> expectedUser, Object expectedObject, boolean isApplicable, Collection<IAccessContextId> contextIds) {
+ public MockConfigurationManagement(ArtifactToken expectedUser, Object expectedObject, boolean isApplicable, Collection<IAccessContextId> contextIds) {
super();
this.expectedUser = expectedUser;
this.expectedObject = expectedObject;
@@ -37,7 +37,7 @@ public class MockConfigurationManagement implements CmAccessControl {
}
@Override
- public boolean isApplicable(IBasicArtifact<?> user, Object object) {
+ public boolean isApplicable(ArtifactToken user, Object object) {
wasIsApplicableCalled = true;
Assert.assertEquals(expectedUser, user);
Assert.assertEquals(expectedObject, object);
@@ -45,7 +45,7 @@ public class MockConfigurationManagement implements CmAccessControl {
}
@Override
- public Collection<IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) {
+ public Collection<IAccessContextId> getContextId(ArtifactToken user, Object object) {
wasGetContextIdCalled = true;
Assert.assertEquals(expectedUser, user);
Assert.assertEquals(expectedObject, object);
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagementProvider.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagementProvider.java
index 66c3be1381..b02961d048 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagementProvider.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/mocks/MockConfigurationManagementProvider.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.access.test.mocks;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.core.services.CmAccessControlProvider;
import org.junit.Assert;
@@ -19,20 +19,19 @@ import org.junit.Assert;
* @author Roberto E. Escobar
*/
public class MockConfigurationManagementProvider implements CmAccessControlProvider {
- private final IBasicArtifact<?> expectedUser;
+ private final ArtifactToken expectedUser;
private final Object expectedObject;
private final CmAccessControl cmToReturn;
private boolean wasGetCMCalled;
- public MockConfigurationManagementProvider(IBasicArtifact<?> expectedUser, Object expectedObject, CmAccessControl cmToReturn) {
- super();
+ public MockConfigurationManagementProvider(ArtifactToken expectedUser, Object expectedObject, CmAccessControl cmToReturn) {
this.expectedUser = expectedUser;
this.expectedObject = expectedObject;
this.cmToReturn = cmToReturn;
}
@Override
- public CmAccessControl getService(IBasicArtifact<?> user, Object object) {
+ public CmAccessControl getService(ArtifactToken user, Object object) {
wasGetCMCalled = true;
Assert.assertEquals(expectedUser, user);
Assert.assertEquals(expectedObject, object);
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/IAccessProvider.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/IAccessProvider.java
index bf5b8bb11e..a00e18af4d 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/IAccessProvider.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/IAccessProvider.java
@@ -11,13 +11,13 @@
package org.eclipse.osee.framework.access;
import java.util.Collection;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.model.access.AccessData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.lifecycle.LifecycleHandler;
public interface IAccessProvider extends LifecycleHandler {
- void computeAccess(IBasicArtifact<?> userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException;
+ void computeAccess(ArtifactToken userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException;
}
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 1e393318ce..85ae5b8e0b 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
@@ -32,6 +32,7 @@ import org.eclipse.osee.framework.access.AccessObject;
import org.eclipse.osee.framework.access.internal.data.ArtifactAccessObject;
import org.eclipse.osee.framework.access.internal.data.BranchAccessObject;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -308,7 +309,7 @@ public class AccessControlService implements IAccessControlService {
return result;
}
- private void addLockAccessControl(IBasicArtifact<?> userArtifact, Collection<?> objectsToCheck, AccessData accessData) throws OseeCoreException {
+ private void addLockAccessControl(ArtifactToken userArtifact, Collection<?> objectsToCheck, AccessData accessData) throws OseeCoreException {
for (Object obj : objectsToCheck) {
Artifact subject = getSubjectFromLockedObject(obj);
if (subject != null && !subject.equals(userArtifact)) {
@@ -319,7 +320,7 @@ public class AccessControlService implements IAccessControlService {
}
@Override
- public AccessDataQuery getAccessData(final IBasicArtifact<?> userArtifact, final Collection<?> objectsToCheck) throws OseeCoreException {
+ public AccessDataQuery getAccessData(ArtifactToken userArtifact, final Collection<?> objectsToCheck) throws OseeCoreException {
ensurePopulated();
List<String> key = new LinkedList<>();
for (Object o : objectsToCheck) {
@@ -334,7 +335,7 @@ public class AccessControlService implements IAccessControlService {
}
if (listener2 == null) {
- listener2 = new AccessControlUpdateListener((Artifact) userArtifact.getFullArtifact());
+ listener2 = new AccessControlUpdateListener(userArtifact);
if (eventService != null) {
eventService.addListener(EventQosType.NORMAL, listener2);
}
@@ -375,7 +376,7 @@ public class AccessControlService implements IAccessControlService {
return service;
}
- public PermissionEnum getBranchPermission(IBasicArtifact<?> subject, BranchId branch) throws OseeCoreException {
+ public PermissionEnum getBranchPermission(ArtifactToken subject, BranchId branch) throws OseeCoreException {
PermissionEnum userPermission = null;
AccessObject accessObject = BranchAccessObject.getBranchAccessObjectFromCache(branch);
@@ -390,7 +391,7 @@ public class AccessControlService implements IAccessControlService {
return userPermission;
}
- public PermissionEnum getArtifactPermission(IBasicArtifact<?> subject, Artifact artifact) throws OseeCoreException {
+ public PermissionEnum getArtifactPermission(ArtifactToken subject, Artifact artifact) throws OseeCoreException {
ensurePopulated();
PermissionEnum userPermission = PermissionEnum.FULLACCESS;
AccessObject accessObject = null;
@@ -423,7 +424,7 @@ public class AccessControlService implements IAccessControlService {
return userPermission;
}
- private PermissionEnum acquirePermissionRank(IBasicArtifact<?> subject, AccessObject accessObject) {
+ private PermissionEnum acquirePermissionRank(ArtifactToken subject, AccessObject accessObject) {
ensurePopulated();
PermissionEnum userPermission = accessControlListCache.get(subject.getId(), accessObject);
if (subjectToGroupCache.containsKey(subject.getId())) {
@@ -625,7 +626,7 @@ public class AccessControlService implements IAccessControlService {
return datas;
}
- private PermissionEnum getBranchPermission(IBasicArtifact<?> subject, Object object) throws OseeCoreException {
+ private PermissionEnum getBranchPermission(ArtifactToken subject, Object object) throws OseeCoreException {
return getBranchPermission(subject, ((AccessObject) object).getBranch());
}
@@ -814,7 +815,7 @@ public class AccessControlService implements IAccessControlService {
new BranchUuidEventFilter(CoreBranches.COMMON));
}
- public AccessControlUpdateListener(Artifact artifact) {
+ public AccessControlUpdateListener(ArtifactToken artifact) {
eventFilters =
Arrays.asList(new ArtifactEventFilter(artifact), new BranchUuidEventFilter(artifact.getBranch()));
}
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java
index 272a4cf017..df8268b1aa 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java
@@ -15,9 +15,9 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import org.eclipse.osee.framework.access.IAccessProvider;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
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;
import org.eclipse.osee.framework.core.services.IAccessControlService;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
@@ -186,7 +186,7 @@ public final class AccessControlServiceProxy implements IAccessControlService {
}
@Override
- public AccessDataQuery getAccessData(IBasicArtifact<?> userArtifact, Collection<?> itemsToCheck) throws OseeCoreException {
+ public AccessDataQuery getAccessData(ArtifactToken userArtifact, Collection<?> itemsToCheck) throws OseeCoreException {
checkInitialized();
return getProxiedObject().getAccessData(userArtifact, itemsToCheck);
}
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java
index 1ce03a9e7c..792fefc956 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osee.framework.access.IAccessProvider;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.model.access.AccessData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.lifecycle.AbstractLifecycleVisitor;
@@ -27,11 +27,11 @@ public class AccessProviderVisitor extends AbstractLifecycleVisitor<IAccessProvi
public static final Type<IAccessProvider> TYPE = new Type<>();
- private final IBasicArtifact<?> userArtifact;
+ private final ArtifactToken userArtifact;
private final Collection<?> artsToCheck;
private final AccessData mainAccessData;
- public AccessProviderVisitor(IBasicArtifact<?> userArtifact, Collection<?> artsToCheck, AccessData mainAccessData) {
+ public AccessProviderVisitor(ArtifactToken userArtifact, Collection<?> artsToCheck, AccessData mainAccessData) {
super();
this.userArtifact = userArtifact;
this.artsToCheck = artsToCheck;
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java
index c8db09b445..147bc97ccb 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.access.internal;
import java.util.Collection;
import java.util.logging.Level;
import org.eclipse.osee.framework.access.IAccessProvider;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
@@ -56,7 +57,7 @@ public final class ObjectAccessProviderProxy implements IAccessProvider {
}
@Override
- public void computeAccess(IBasicArtifact<?> userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException {
+ public void computeAccess(ArtifactToken userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException {
for (Object object : objToCheck) {
if (object instanceof Artifact) {
setArtifactAccessData(userArtifact, (Artifact) object, accessData);
@@ -72,7 +73,7 @@ public final class ObjectAccessProviderProxy implements IAccessProvider {
}
}
- private void setArtifactAccessData(IBasicArtifact<?> userArtifact, Artifact artifact, AccessData accessData) throws OseeCoreException {
+ private void setArtifactAccessData(ArtifactToken userArtifact, Artifact artifact, AccessData accessData) throws OseeCoreException {
setBranchAccessData(userArtifact, artifact.getBranch(), accessData);
String reason = "Legacy Artifact Permission";
PermissionEnum userPermission = getAccessService().getArtifactPermission(userArtifact, artifact);
@@ -92,7 +93,7 @@ public final class ObjectAccessProviderProxy implements IAccessProvider {
new AccessDetail<IBasicArtifact<Artifact>>(artifact, userPermission, Scope.createLegacyScope(), reason));
}
- private void setBranchAccessData(IBasicArtifact<?> userArtifact, BranchId branch, AccessData accessData) throws OseeCoreException {
+ private void setBranchAccessData(ArtifactToken userArtifact, BranchId branch, AccessData accessData) throws OseeCoreException {
String reason = "Legacy Branch Permission";
PermissionEnum userPermission = getAccessService().getBranchPermission(userArtifact, branch);
accessData.add(branch, new AccessDetail<BranchId>(branch, userPermission, Scope.createLegacyScope(), reason));
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java
index 356c46669c..9f5b0fc39b 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.framework.access.internal.cm;
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.core.services.CmAccessControlProvider;
import org.eclipse.osee.framework.core.services.HasCmAccessControl;
@@ -41,7 +41,7 @@ public class CmAccessControlProviderImpl implements CmAccessControlProvider {
}
@Override
- public CmAccessControl getService(IBasicArtifact<?> userArtifact, Object object) throws OseeCoreException {
+ public CmAccessControl getService(ArtifactToken userArtifact, Object object) throws OseeCoreException {
if (object instanceof HasCmAccessControl) {
HasCmAccessControl cmContainer = (HasCmAccessControl) object;
return cmContainer.getAccessControl();
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java
index 18641c837c..60746a4db4 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java
@@ -15,8 +15,8 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.osee.framework.access.IAccessProvider;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.model.access.AccessData;
import org.eclipse.osee.framework.core.model.access.AccessModel;
import org.eclipse.osee.framework.core.model.access.HasAccessModel;
@@ -37,7 +37,7 @@ public class CmAccessProvider implements IAccessProvider {
}
@Override
- public void computeAccess(IBasicArtifact<?> userArtifact, Collection<?> objToChecks, AccessData accessData) throws OseeCoreException {
+ public void computeAccess(ArtifactToken userArtifact, Collection<?> objToChecks, AccessData accessData) throws OseeCoreException {
DoubleKeyHashMap<CmAccessControl, IAccessContextId, Collection<Object>> cmToCheckObjects =
new DoubleKeyHashMap<CmAccessControl, IAccessContextId, Collection<Object>>();
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java
index 44c23964ca..ddd3669f92 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java
@@ -18,7 +18,7 @@ import java.util.logging.Level;
import org.eclipse.osee.framework.access.IAccessProvider;
import org.eclipse.osee.framework.access.internal.AccessControlHelper;
import org.eclipse.osee.framework.access.internal.AccessControlServiceProxy;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.model.access.AccessData;
import org.eclipse.osee.framework.core.services.CmAccessControl;
import org.eclipse.osee.framework.core.services.CmAccessControlProvider;
@@ -154,7 +154,7 @@ public final class CmAccessProviderProxy implements IAccessProvider {
}
@Override
- public void computeAccess(IBasicArtifact<?> userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException {
+ public void computeAccess(ArtifactToken userArtifact, Collection<?> objToCheck, AccessData accessData) throws OseeCoreException {
checkInitialized();
getAccessProvider().computeAccess(userArtifact, objToCheck, accessData);
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RoleContextProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RoleContextProvider.java
index 353e956e69..ecfce56b44 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RoleContextProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RoleContextProvider.java
@@ -11,14 +11,14 @@
package org.eclipse.osee.framework.core.dsl.integration;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
/**
* @author John R. Misinco
*/
public interface RoleContextProvider {
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user);
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user);
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
index d356c63989..6a81e8658c 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
@@ -21,6 +21,7 @@ import java.util.Queue;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.dsl.integration.OseeDslProvider;
@@ -31,11 +32,11 @@ import org.eclipse.osee.framework.core.dsl.oseeDsl.ReferencedContext;
import org.eclipse.osee.framework.core.dsl.oseeDsl.Role;
import org.eclipse.osee.framework.core.dsl.oseeDsl.UsersAndGroups;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
/**
* @author John R. Misinco
@@ -49,7 +50,7 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
}
@Override
- public Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user) {
+ public Collection<? extends IAccessContextId> getContextId(ArtifactToken user) {
OseeDsl dsl = null;
try {
dsl = dslProvider.getDsl();
@@ -66,7 +67,7 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
//find which roles have the relevant guids
List<String> applicableGuids;
try {
- applicableGuids = getApplicableGuids((Artifact) user.getFullArtifact());
+ applicableGuids = getApplicableGuids(user);
} catch (OseeCoreException ex) {
OseeLog.log(OseeDslRoleContextProvider.class, Level.SEVERE, Lib.exceptionToString(ex));
return Collections.emptyList();
@@ -110,12 +111,18 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
return includesInherited;
}
- private List<String> getApplicableGuids(Artifact user) {
+ private List<String> getApplicableGuids(ArtifactToken user) {
List<String> applicableGuids = new LinkedList<>();
List<Artifact> groups = Collections.emptyList();
try {
- groups = user.getRelatedArtifacts(CoreRelationTypes.Users_Artifact);
+ Artifact artifact;
+ if (user instanceof Artifact) {
+ artifact = (Artifact) user;
+ } else {
+ artifact = ArtifactQuery.getArtifactFromId(user, user.getBranch());
+ }
+ groups = artifact.getRelatedArtifacts(CoreRelationTypes.Users_Artifact);
} catch (OseeCoreException ex) {
OseeLog.log(OseeDslRoleContextProvider.class, Level.SEVERE, Lib.exceptionToString(ex));
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControl.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControl.java
index c2aecf6c17..7f992a0239 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControl.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControl.java
@@ -11,8 +11,8 @@
package org.eclipse.osee.framework.core.services;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.IAccessContextId;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -20,8 +20,8 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
*/
public interface CmAccessControl {
- boolean isApplicable(IBasicArtifact<?> user, Object object);
+ boolean isApplicable(ArtifactToken user, Object object);
- Collection<? extends IAccessContextId> getContextId(IBasicArtifact<?> user, Object object) throws OseeCoreException;
+ Collection<? extends IAccessContextId> getContextId(ArtifactToken user, Object object) throws OseeCoreException;
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControlProvider.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControlProvider.java
index cbfa7c4de5..ebfd4892c4 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControlProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/services/CmAccessControlProvider.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.services;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -18,7 +18,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
*/
public interface CmAccessControlProvider {
- CmAccessControl getService(IBasicArtifact<?> user, Object object) throws OseeCoreException;
+ CmAccessControl getService(ArtifactToken user, Object object) throws OseeCoreException;
void setDefaultAccessControl(CmAccessControl defaultAccessControl);
}
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 75ce035f94..df54eede93 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,9 +11,9 @@
package org.eclipse.osee.framework.core.services;
import java.util.Collection;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
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;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -23,5 +23,5 @@ public interface IAccessControlService {
void removePermissions(BranchId branch) throws OseeCoreException;
- AccessDataQuery getAccessData(IBasicArtifact<?> userArtifact, Collection<?> itemsToCheck) throws OseeCoreException;
+ AccessDataQuery getAccessData(ArtifactToken userArtifact, Collection<?> itemsToCheck) throws OseeCoreException;
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
index 6626fa5a9b..7e9ec10bea 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
@@ -43,6 +43,10 @@ public interface Id {
return getId().equals(id);
}
+ default boolean notEqual(long id) {
+ return !equals(id);
+ }
+
default boolean notEqual(Id id) {
return !equals(id);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index 1e3da4bf2b..c7bd7057eb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -83,6 +83,10 @@ public class ArtifactQuery {
return getArtifactFromId(artifactToken.getUuid(), branch);
}
+ public static Artifact getArtifactFromToken(ArtifactToken artifactToken) {
+ return getArtifactFromId(artifactToken.getId(), artifactToken.getBranch());
+ }
+
public static Artifact getArtifactFromToken(EventBasicGuidArtifact guidArt) throws OseeCoreException {
return getArtifactFromId(guidArt.getGuid(), TokenFactory.createBranch(guidArt.getBranchId()));
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
index 0482bb9734..3a1b03e350 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactEventFilter.java
@@ -12,10 +12,10 @@ package org.eclipse.osee.framework.skynet.core.event.filter;
import java.util.Arrays;
import java.util.List;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.event.IBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author John R. Misinco
@@ -25,7 +25,7 @@ public class ArtifactEventFilter implements IEventFilter {
private final String filterArtifactGuid;
private final BranchId filterBranch;
- public ArtifactEventFilter(Artifact artifact) {
+ public ArtifactEventFilter(ArtifactToken artifact) {
filterArtifactGuid = artifact.getGuid();
filterBranch = artifact.getBranch();
}
@@ -54,5 +54,4 @@ public class ArtifactEventFilter implements IEventFilter {
}
return false;
}
-
-}
+} \ No newline at end of file

Back to the top