| diff --git a/features/org.eclipse.osee.core.server.external.feature/feature.xml b/features/org.eclipse.osee.core.server.external.feature/feature.xml |
| index 0eb95c6d0c..683b9d4a63 100644 |
| --- a/features/org.eclipse.osee.core.server.external.feature/feature.xml |
| +++ b/features/org.eclipse.osee.core.server.external.feature/feature.xml |
| @@ -1076,20 +1076,6 @@ |
| version="0.0.0" |
| unpack="false"/> |
| |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl.integration" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| <plugin |
| id="org.eclipse.osee.framework.resource.management" |
| download-size="0" |
| diff --git a/features/org.eclipse.osee.core.server.feature/feature.xml b/features/org.eclipse.osee.core.server.feature/feature.xml |
| index 56e23e30f1..f072155677 100644 |
| --- a/features/org.eclipse.osee.core.server.feature/feature.xml |
| +++ b/features/org.eclipse.osee.core.server.feature/feature.xml |
| @@ -552,20 +552,6 @@ |
| version="0.0.0" |
| unpack="false"/> |
| |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl.integration" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| <plugin |
| id="org.eclipse.osee.framework.core.model" |
| download-size="0" |
| diff --git a/features/org.eclipse.osee.framework.feature/feature.xml b/features/org.eclipse.osee.framework.feature/feature.xml |
| index 834bf6f182..2d6a2585bd 100644 |
| --- a/features/org.eclipse.osee.framework.feature/feature.xml |
| +++ b/features/org.eclipse.osee.framework.feature/feature.xml |
| @@ -239,34 +239,6 @@ |
| version="0.0.0" |
| unpack="false"/> |
| |
| - <plugin |
| - id="org.eclipse.osee.framework.access" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.access.provider" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl.integration" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| <plugin |
| id="org.eclipse.osee.framework.branch.gantt" |
| download-size="0" |
| diff --git a/features/org.eclipse.osee.framework.ui.feature/feature.xml b/features/org.eclipse.osee.framework.ui.feature/feature.xml |
| index 3d717212ae..f07e988c3e 100644 |
| --- a/features/org.eclipse.osee.framework.ui.feature/feature.xml |
| +++ b/features/org.eclipse.osee.framework.ui.feature/feature.xml |
| @@ -31,7 +31,6 @@ |
| <import plugin="org.eclipse.osee.framework.jdk.core"/> |
| <import plugin="org.eclipse.osee.framework.logging"/> |
| <import plugin="org.eclipse.osee.framework.plugin.core"/> |
| - <import plugin="org.eclipse.osee.framework.access"/> |
| <import plugin="org.eclipse.osee.framework.ui.plugin"/> |
| <import plugin="org.eclipse.osee.framework.ui.swt"/> |
| <import plugin="org.eclipse.ui.intro"/> |
| @@ -58,7 +57,6 @@ |
| <import plugin="org.eclipse.zest.layouts"/> |
| <import plugin="org.eclipse.gef"/> |
| <import plugin="org.eclipse.osee.ote.define"/> |
| - <import plugin="org.eclipse.osee.framework.core.dsl"/> |
| <import plugin="org.eclipse.xtext.ui"/> |
| <import plugin="org.eclipse.ui.editors" version="3.5.0" match="greaterOrEqual"/> |
| <import plugin="org.eclipse.xtext.ui.shared"/> |
| @@ -70,7 +68,6 @@ |
| <import plugin="org.eclipse.xtext"/> |
| <import plugin="org.eclipse.core.commands"/> |
| <import plugin="org.eclipse.core.jobs"/> |
| - <import plugin="org.eclipse.osee.framework.core.dsl.integration"/> |
| <import plugin="org.eclipse.swt"/> |
| <import plugin="org.eclipse.osgi"/> |
| <import plugin="org.eclipse.jdt.core"/> |
| @@ -140,18 +137,4 @@ |
| version="0.0.0" |
| unpack="false"/> |
| |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl.ui" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| - <plugin |
| - id="org.eclipse.osee.framework.core.dsl.ui.integration" |
| - download-size="0" |
| - install-size="0" |
| - version="0.0.0" |
| - unpack="false"/> |
| - |
| </feature> |
| diff --git a/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF |
| index 1875dc5b13..4a5c885fc2 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF |
| @@ -66,11 +66,14 @@ Import-Package: com.fasterxml.jackson.annotation, |
| org.eclipse.nebula.widgets.xviewer.core.model, |
| org.eclipse.osee.activity.api, |
| org.eclipse.osee.framework.core, |
| + org.eclipse.osee.framework.core.access, |
| + org.eclipse.osee.framework.core.access.context, |
| org.eclipse.osee.framework.core.data, |
| org.eclipse.osee.framework.core.enums, |
| org.eclipse.osee.framework.core.enums.token, |
| org.eclipse.osee.framework.core.event, |
| org.eclipse.osee.framework.core.model, |
| + org.eclipse.osee.framework.core.model.access, |
| org.eclipse.osee.framework.core.model.change, |
| org.eclipse.osee.framework.core.util, |
| org.eclipse.osee.framework.core.util.result, |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/AtsApi.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/AtsApi.java |
| index 5cb4cdfd1b..f1cd52214c 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/AtsApi.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/AtsApi.java |
| @@ -15,6 +15,7 @@ package org.eclipse.osee.ats.api; |
| |
| import java.util.Collection; |
| import java.util.List; |
| +import org.eclipse.osee.ats.api.access.IAtsAccessService; |
| import org.eclipse.osee.ats.api.agile.IAgileService; |
| import org.eclipse.osee.ats.api.agile.IAgileSprintHtmlOperation; |
| import org.eclipse.osee.ats.api.ai.IAtsActionableItemService; |
| @@ -56,6 +57,7 @@ import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory; |
| import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory; |
| import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory; |
| import org.eclipse.osee.framework.core.OseeApi; |
| +import org.eclipse.osee.framework.core.access.IAccessControlService; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| @@ -200,6 +202,11 @@ public interface AtsApi extends OseeApi, IAtsEarnedValueServiceProvider, IAtsWor |
| |
| IAtsServerEndpointProvider getServerEndpoints(); |
| |
| + IAtsAccessService getAtsAccessService(); |
| + |
| + @Override |
| + IAccessControlService getAccessControlService(); |
| + |
| default void reloadServerAndClientCaches() { |
| getServerEndpoints().getConfigEndpoint().getWithPend(); |
| getConfigService().getConfigurationsWithPend(); |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/access/AtsAccessContextTokens.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/access/AtsAccessContextTokens.java |
| index 9ea5544367..598b2b9962 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/access/AtsAccessContextTokens.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/access/AtsAccessContextTokens.java |
| @@ -20,8 +20,8 @@ import org.eclipse.osee.framework.core.data.AccessContextToken; |
| */ |
| public final class AtsAccessContextTokens { |
| |
| - public static final AccessContextToken DENY_CONTEXT = |
| - AccessContextToken.valueOf(4870045005030602805L, "ats.branchobject.deny"); |
| + public static final AccessContextToken ATS_BRANCH_READ = |
| + AccessContextToken.valueOf(4870045005030602805L, "ats.branch.read"); |
| |
| private AtsAccessContextTokens() { |
| // Branch Object Contexts; |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxActionableItem.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxActionableItem.java |
| index 8ed5867c63..94151a1d4c 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxActionableItem.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxActionableItem.java |
| @@ -16,6 +16,7 @@ package org.eclipse.osee.ats.api.config.tx; |
| import org.eclipse.osee.ats.api.ai.IAtsActionableItem; |
| import org.eclipse.osee.ats.api.config.Csci; |
| import org.eclipse.osee.ats.api.config.WorkType; |
| +import org.eclipse.osee.framework.core.data.AccessContextToken; |
| import org.eclipse.osee.framework.core.data.AttributeTypeToken; |
| import org.eclipse.osee.framework.core.data.AccessContextToken; |
| |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxTeamDef.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxTeamDef.java |
| index 7c0430c899..228dd6fe43 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxTeamDef.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/tx/IAtsConfigTxTeamDef.java |
| @@ -20,6 +20,7 @@ import org.eclipse.osee.ats.api.query.NextRelease; |
| import org.eclipse.osee.ats.api.query.ReleasedOption; |
| import org.eclipse.osee.ats.api.team.IAtsTeamDefinition; |
| import org.eclipse.osee.ats.api.version.IAtsVersion; |
| +import org.eclipse.osee.framework.core.data.AccessContextToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.AttributeTypeToken; |
| import org.eclipse.osee.framework.core.data.AccessContextToken; |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsUserGroups.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsUserGroups.java |
| index 477883d8ed..b69ccc26f3 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsUserGroups.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsUserGroups.java |
| @@ -22,8 +22,8 @@ import org.eclipse.osee.framework.core.data.UserGroupArtifactToken; |
| public class AtsUserGroups { |
| |
| public static IUserGroupArtifactToken AtsAddAttrColumns = |
| - UserGroupArtifactToken.valueOf(10847751L, "AtsAddAttrColumns"); |
| - public static IUserGroupArtifactToken AtsAdmin = UserGroupArtifactToken.valueOf(136750L, "AtsAdmin"); |
| - public static IUserGroupArtifactToken AtsTempAdmin = UserGroupArtifactToken.valueOf(5367074L, "AtsTempAdmin"); |
| + UserGroupArtifactToken.valueOf(10847751L, "Ats Add Attr Columns"); |
| + public static IUserGroupArtifactToken AtsAdmin = UserGroupArtifactToken.valueOf(136750L, "Ats Admin"); |
| + public static IUserGroupArtifactToken AtsTempAdmin = UserGroupArtifactToken.valueOf(5367074L, "AtsTemp Admin"); |
| |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/demo/DemoArtifactToken.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/demo/DemoArtifactToken.java |
| index e590012b0a..8b7e88dd22 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/demo/DemoArtifactToken.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/demo/DemoArtifactToken.java |
| @@ -43,6 +43,17 @@ public final class DemoArtifactToken { |
| public static final ArtifactToken SystemReqArtifact = ArtifactToken.valueOf(45454545, "System Req Artifact", DemoBranches.SAW_Bld_1, CoreArtifactTypes.SystemRequirementMsWord); |
| public static final ArtifactToken EventsSwReq = ArtifactToken.valueOf(200090, "Events", DemoBranches.SAW_Bld_1, CoreArtifactTypes.SoftwareRequirementMsWord); |
| |
| + ////////////////////////////////// |
| + // Software Requirements |
| + ////////////////////////////////// |
| + public static final ArtifactToken CollaborativeRobotEvents = ArtifactToken.valueOf(200092, "Collaborative robot events", DemoBranches.SAW_Bld_2); |
| + public static final ArtifactToken VirtualFixes = ArtifactToken.valueOf(200095, "VirtualFixes", DemoBranches.SAW_PL_Access_Baseline_Test); |
| + |
| + ////////////////////////////////// |
| + // System Requirements |
| + ////////////////////////////////// |
| + public static final ArtifactToken PerformanceRequirements = ArtifactToken.valueOf(200112, "Performance Requirements", DemoBranches.SAW_Bld_2); |
| + |
| ////////////////////////////////// |
| // Impl Details Configuration |
| ////////////////////////////////// |
| @@ -154,6 +165,10 @@ public final class DemoArtifactToken { |
| public static final ArtifactToken SAW_NoBranch_Req_TeamWf = ArtifactToken.valueOf(5564873, DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, COMMON, AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| public static final ArtifactToken SAW_NoBranch_Test_TeamWf = ArtifactToken.valueOf(11548766, DemoWorkflowTitles.SAW_NO_BRANCH_REQT_CHANGES_FOR_DIAGRAM_VIEW, COMMON, AtsDemoOseeTypes.DemoTestTeamWorkflow); |
| |
| + public static final ArtifactToken SAW_Access_Control_Req_TeamWf = ArtifactToken.valueOf(32482, "SAW Access Ctrl Test - Req", AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| + public static final ArtifactToken SAW_Access_Control_Code_TeamWf = ArtifactToken.valueOf(32483, "SAW Access Ctrl Test - Code", AtsDemoOseeTypes.DemoCodeTeamWorkflow); |
| + public static final ArtifactToken SAW_Access_Control_Test_TeamWf = ArtifactToken.valueOf(32484, "SAW Access Ctrl Test - Test", AtsDemoOseeTypes.DemoTestTeamWorkflow); |
| + |
| ////////////////////////////////// |
| // RD Agile Configuration |
| ////////////////////////////////// |
| diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java |
| index d8f64f4ff0..0756cd4007 100644 |
| --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java |
| +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java |
| @@ -17,6 +17,7 @@ import java.util.Collection; |
| import org.eclipse.jdt.annotation.Nullable; |
| import org.eclipse.osee.ats.api.IAtsObject; |
| import org.eclipse.osee.ats.api.IAtsWorkItem; |
| +import org.eclipse.osee.framework.core.access.context.IParentProvider; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| @@ -27,7 +28,7 @@ import org.eclipse.osee.framework.core.enums.DeletionFlag; |
| /** |
| * @author Donald G. Dunne |
| */ |
| -public interface IRelationResolver { |
| +public interface IRelationResolver extends IParentProvider { |
| |
| Collection<ArtifactToken> getRelated(ArtifactId artifact, RelationTypeSide relationType); |
| |
| @@ -68,8 +69,6 @@ public interface IRelationResolver { |
| |
| Collection<ArtifactToken> getChildren(ArtifactId artifact); |
| |
| - ArtifactToken getParent(ArtifactId artifact); |
| - |
| int getRelatedCount(ArtifactToken artifact, RelationTypeSide relationTypeSide); |
| |
| Collection<Long> getRelatedIds(ArtifactId artifact, RelationTypeSide relationTypeSide); |
| diff --git a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF |
| index 9c7b174179..88b8532604 100644 |
| --- a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF |
| @@ -39,6 +39,7 @@ Import-Package: com.fasterxml.jackson.annotation, |
| org.osgi.service.event |
| Bundle-Vendor: Eclipse Open System Engineering Environment |
| Export-Package: org.eclipse.osee.ats.core.access, |
| + org.eclipse.osee.ats.core.access.demo, |
| org.eclipse.osee.ats.core.agile, |
| org.eclipse.osee.ats.core.agile.operations, |
| org.eclipse.osee.ats.core.ai, |
| diff --git a/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.task.autogen.xml b/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.task.autogen.xml |
| deleted file mode 100644 |
| index b299df7545..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.task.autogen.xml |
| +++ /dev/null |
| @@ -1,7 +0,0 @@ |
| -<?xml version="1.0" encoding="UTF-8"?> |
| -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true"> |
| - <implementation class="org.eclipse.osee.ats.core.task.TaskAutoGenArtifactChecks"/> |
| - <service> |
| - <provide interface="org.eclipse.osee.framework.core.access.IArtifactCheck"/> |
| - </service> |
| -</scr:component> |
| diff --git a/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.xml b/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.xml |
| deleted file mode 100644 |
| index 726d59dea4..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.core/OSGI-INF/artifact.check.provider.xml |
| +++ /dev/null |
| @@ -1,7 +0,0 @@ |
| -<?xml version="1.0" encoding="UTF-8"?> |
| -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true"> |
| - <implementation class="org.eclipse.osee.ats.core.access.AtsArtifactChecks"/> |
| - <service> |
| - <provide interface="org.eclipse.osee.framework.core.access.IArtifactCheck"/> |
| - </service> |
| -</scr:component> |
| diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/tx/AtsConfigTxTeamDef.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/tx/AtsConfigTxTeamDef.java |
| index 60b66ba11b..0e8a922487 100644 |
| --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/tx/AtsConfigTxTeamDef.java |
| +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/tx/AtsConfigTxTeamDef.java |
| @@ -35,6 +35,7 @@ import org.eclipse.osee.ats.api.query.ReleasedOption; |
| import org.eclipse.osee.ats.api.team.IAtsTeamDefinition; |
| import org.eclipse.osee.ats.api.util.IAtsChangeSet; |
| import org.eclipse.osee.ats.api.version.IAtsVersion; |
| +import org.eclipse.osee.framework.core.data.AccessContextToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.AccessContextToken; |
| import org.eclipse.osee.framework.core.data.BranchToken; |
| diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java |
| index 67af55270a..5fb1a5a78d 100644 |
| --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java |
| +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java |
| @@ -32,6 +32,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; |
| import org.eclipse.osee.ats.core.util.AtsRelationChange.RelationOperation; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| +import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.AttributeTypeGeneric; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.data.RelationTypeSide; |
| @@ -180,6 +181,11 @@ public abstract class AbstractAtsChangeSet implements IAtsChangeSet { |
| |
| @Override |
| public ArtifactToken createArtifact(ArtifactToken token) { |
| + ArtifactTypeToken typeToken = token.getArtifactType(); |
| + if (typeToken.isInvalid()) { |
| + throw new OseeArgumentException("Artifact Type Token %s is invalid for artifact creation", |
| + typeToken.toStringWithId()); |
| + } |
| return createArtifact(token.getArtifactType(), token.getName(), token.getId()); |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsApiImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsApiImpl.java |
| index bfb1b6b0bd..b8435ba257 100644 |
| --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsApiImpl.java |
| +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsApiImpl.java |
| @@ -20,6 +20,7 @@ import java.util.List; |
| import java.util.logging.Level; |
| import org.eclipse.osee.ats.api.AtsApi; |
| import org.eclipse.osee.ats.api.IAtsObject; |
| +import org.eclipse.osee.ats.api.access.IAtsAccessService; |
| import org.eclipse.osee.ats.api.agile.IAgileSprintHtmlOperation; |
| import org.eclipse.osee.ats.api.ai.IAtsActionableItemService; |
| import org.eclipse.osee.ats.api.column.IAtsColumnService; |
| @@ -59,6 +60,7 @@ import org.eclipse.osee.ats.api.workflow.ITeamWorkflowProvidersLazy; |
| import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory; |
| import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory; |
| import org.eclipse.osee.ats.api.workflow.state.IAtsWorkStateFactory; |
| +import org.eclipse.osee.ats.core.access.AtsAccessService; |
| import org.eclipse.osee.ats.core.config.TeamDefinitionServiceImpl; |
| import org.eclipse.osee.ats.core.internal.column.ev.AtsColumnService; |
| import org.eclipse.osee.ats.core.internal.log.AtsLogFactory; |
| @@ -131,6 +133,7 @@ public abstract class AtsApiImpl extends OseeApiBase implements AtsApi { |
| protected IAtsTaskSetDefinitionProviderService taskSetDefinitionProviderService; |
| protected IAtsNotificationService notificationService; |
| protected List<INewActionPageAttributeFactoryProvider> attributeFactoryProviders = new LinkedList<>(); |
| + protected IAtsAccessService atsAccessService; |
| |
| Collection<IAgileSprintHtmlOperation> agileSprintHtmlReportOperations = new LinkedList<>(); |
| |
| @@ -588,4 +591,12 @@ public abstract class AtsApiImpl extends OseeApiBase implements AtsApi { |
| return notificationService; |
| } |
| |
| + @Override |
| + public IAtsAccessService getAtsAccessService() { |
| + if (atsAccessService == null) { |
| + atsAccessService = new AtsAccessService(this); |
| + } |
| + return atsAccessService; |
| + } |
| + |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.demo/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.ide.demo/META-INF/MANIFEST.MF |
| index 9bfbad256c..abaefc8b42 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.demo/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.ide.demo/META-INF/MANIFEST.MF |
| @@ -13,6 +13,8 @@ Require-Bundle: org.eclipse.ui, |
| Import-Package: javax.ws.rs.core, |
| org.eclipse.core.filesystem, |
| org.eclipse.osee.ats.api, |
| + org.eclipse.osee.ats.core.access, |
| + org.eclipse.osee.ats.core.access.demo, |
| org.eclipse.osee.ats.core.config, |
| org.eclipse.osee.ats.core.model, |
| org.eclipse.osee.ats.core.model.impl, |
| @@ -43,13 +45,16 @@ Import-Package: javax.ws.rs.core, |
| org.eclipse.osee.client.demo, |
| org.eclipse.osee.define.ide.traceability, |
| org.eclipse.osee.define.ide.traceability.data, |
| - org.eclipse.osee.framework.access, |
| + org.eclipse.osee.framework.core, |
| + org.eclipse.osee.framework.core.access, |
| + org.eclipse.osee.framework.core.access.context, |
| org.eclipse.osee.framework.core.client, |
| org.eclipse.osee.framework.core.data, |
| org.eclipse.osee.framework.core.enums, |
| org.eclipse.osee.framework.core.enums.token, |
| org.eclipse.osee.framework.core.exception, |
| org.eclipse.osee.framework.core.model, |
| + org.eclipse.osee.framework.core.model.access, |
| org.eclipse.osee.framework.core.model.type, |
| org.eclipse.osee.framework.core.operation, |
| org.eclipse.osee.framework.core.util, |
| diff --git a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/artifact/DemoTeamWorkflows.java b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/artifact/DemoTeamWorkflows.java |
| index da49ec6343..43015ff8ac 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/artifact/DemoTeamWorkflows.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/artifact/DemoTeamWorkflows.java |
| @@ -45,8 +45,8 @@ public class DemoTeamWorkflows implements ITeamWorkflowProvider { |
| @Override |
| public String getBranchName(IAtsTeamWorkflow teamWf, String defaultBranchName) { |
| try { |
| - if (teamWf.getTeamDefinition().getName().contains("SAW Test")) { |
| - return "SAW Test - " + defaultBranchName; |
| + if (teamWf.getTeamDefinition().getName().contains("SAW Code")) { |
| + return "SAW Code - " + defaultBranchName; |
| } |
| } catch (OseeCoreException ex) { |
| OseeLog.log(Activator.class, Level.SEVERE, ex); |
| diff --git a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd10SetupAndImportReqs.java b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd10SetupAndImportReqs.java |
| index 1d3935e452..edf741ed24 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd10SetupAndImportReqs.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd10SetupAndImportReqs.java |
| @@ -21,12 +21,13 @@ import java.util.Collection; |
| import java.util.HashSet; |
| import java.util.Set; |
| import java.util.logging.Level; |
| +import org.eclipse.osee.ats.api.data.AtsArtifactToken; |
| import org.eclipse.osee.ats.api.demo.DemoArtifactToken; |
| import org.eclipse.osee.ats.ide.demo.config.DemoDbUtil; |
| import org.eclipse.osee.ats.ide.demo.internal.Activator; |
| import org.eclipse.osee.ats.ide.demo.internal.AtsApiService; |
| +import org.eclipse.osee.ats.ide.demo.internal.OseeApiService; |
| import org.eclipse.osee.ats.ide.util.AtsUtilClient; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| @@ -37,6 +38,8 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; |
| import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; |
| import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| import org.eclipse.osee.framework.core.enums.CoreRelationTypes; |
| +import org.eclipse.osee.framework.core.enums.CoreUserGroups; |
| +import org.eclipse.osee.framework.core.enums.DemoBranches; |
| import org.eclipse.osee.framework.core.enums.DemoUsers; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| import org.eclipse.osee.framework.core.operation.IOperation; |
| @@ -99,12 +102,35 @@ public class Pdd10SetupAndImportReqs implements IPopulateDemoDatabase { |
| demoDbTraceabilityTx(demoDbTraceability, SAW_Bld_1); |
| demoDbTraceability.execute(); |
| |
| + // Note: SAW_Bld_1 is created during orcs dbinit in CreateDemoBranches |
| + BranchManager.setAssociatedArtifactId(SAW_Bld_1, AtsArtifactToken.AtsCmBranch); |
| + |
| createNewBaselineBranch(SAW_Bld_1, SAW_Bld_2); |
| + BranchManager.setAssociatedArtifactId(SAW_Bld_2, AtsArtifactToken.AtsCmBranch); |
| createNewBaselineBranch(SAW_Bld_2, SAW_Bld_3); |
| + BranchManager.setAssociatedArtifactId(SAW_Bld_3, AtsArtifactToken.AtsCmBranch); |
| + |
| + // Note: CIS_Bld_1 is created during orcs dbinit in CreateDemoBranches |
| + BranchManager.setAssociatedArtifactId(DemoBranches.CIS_Bld_1, AtsArtifactToken.AtsCmBranch); |
| + |
| + // Note: PL branches are created in CreateDemoBranches |
| + BranchManager.setAssociatedArtifactId(DemoBranches.SAW_PL, AtsArtifactToken.AtsCmBranch); |
| + setBaselineAccessControl(DemoBranches.SAW_PL); |
| + |
| + BranchManager.setAssociatedArtifactId(DemoBranches.SAW_PL_Hardening_Branch, AtsArtifactToken.AtsCmBranch); |
| + setBaselineAccessControl(DemoBranches.SAW_PL_Hardening_Branch); |
| |
| configureRequirementsForImplDetails(); |
| } |
| |
| + private void setBaselineAccessControl(BranchToken branch) { |
| + OseeApiService.get().getAccessControlService().removePermissions(branch); |
| + ArtifactToken kayJones = UserManager.getUserByArtId(DemoUsers.Kay_Jones); |
| + OseeApiService.get().getAccessControlService().setPermission(kayJones, branch, PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(CoreUserGroups.Everyone, branch, |
| + PermissionEnum.READ); |
| + } |
| + |
| private void configureRequirementsForImplDetails() { |
| |
| SkynetTransaction transaction = |
| @@ -196,8 +222,8 @@ public class Pdd10SetupAndImportReqs implements IPopulateDemoDatabase { |
| try { |
| childBranch = BranchManager.createBaselineBranch(srcBranch, destBranch); |
| |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), childBranch, |
| - PermissionEnum.FULLACCESS); |
| + AtsApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), |
| + childBranch, PermissionEnum.FULLACCESS); |
| |
| // need to update the branch type; |
| ConnectionHandler.runPreparedUpdate(UPDATE_BRANCH_TYPE, BranchType.BASELINE, childBranch); |
| diff --git a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java |
| index 99403ebb12..d0f8b52b27 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.demo/src/org/eclipse/osee/ats/ide/demo/populate/Pdd95CreateDemoEVConfigAndWorkPackages.java |
| @@ -182,7 +182,7 @@ public class Pdd95CreateDemoEVConfigAndWorkPackages { |
| // create country |
| createCountry(countryEp, country); |
| |
| - // create and relate programs |
| + // create and relate programs; these calls ensure that the static tokens are loaded and thus related to proper parents |
| DemoInsertion.getInsertions(); |
| DemoInsertionActivity.getActivities(); |
| for (DemoProgram program : country.getPrograms()) { |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.ide.integration.tests/META-INF/MANIFEST.MF |
| index 52f3464345..9913462a03 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/META-INF/MANIFEST.MF |
| @@ -29,6 +29,7 @@ Import-Package: com.fasterxml.jackson.core, |
| org.eclipse.nebula.widgets.xviewer.util, |
| org.eclipse.osee.account.rest.model, |
| org.eclipse.osee.ats.core.access, |
| + org.eclipse.osee.ats.core.access.demo, |
| org.eclipse.osee.ats.core.column, |
| org.eclipse.osee.ats.core.config, |
| org.eclipse.osee.ats.core.query, |
| @@ -47,7 +48,6 @@ Import-Package: com.fasterxml.jackson.core, |
| org.eclipse.osee.ats.core.workflow.transition, |
| org.eclipse.osee.ats.core.workflow.util, |
| org.eclipse.osee.ats.ide, |
| - org.eclipse.osee.ats.ide.access, |
| org.eclipse.osee.ats.ide.actions, |
| org.eclipse.osee.ats.ide.actions.wizard, |
| org.eclipse.osee.ats.ide.branch, |
| @@ -91,8 +91,8 @@ Import-Package: com.fasterxml.jackson.core, |
| org.eclipse.osee.ats.ide.world.search, |
| org.eclipse.osee.client.test.framework, |
| org.eclipse.osee.define.api, |
| - org.eclipse.osee.framework.access, |
| org.eclipse.osee.framework.core, |
| + org.eclipse.osee.framework.core.access, |
| org.eclipse.osee.framework.core.client, |
| org.eclipse.osee.framework.core.client.server, |
| org.eclipse.osee.framework.core.data, |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/OSGI-INF/ats.api.ide.ref.xml b/plugins/org.eclipse.osee.ats.ide.integration.tests/OSGI-INF/ats.api.ide.ref.xml |
| deleted file mode 100644 |
| index d55db6c17a..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/OSGI-INF/ats.api.ide.ref.xml |
| +++ /dev/null |
| @@ -1,5 +0,0 @@ |
| -<?xml version="1.0" encoding="UTF-8"?> |
| -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"> |
| - <implementation class="org.eclipse.osee.ats.ide.integration.tests.AtsApiService"/> |
| - <reference bind="setAtsApiIde" cardinality="1..1" interface="org.eclipse.osee.ats.ide.util.AtsApiIde" name="AtsApiIde" policy="static"/> |
| -</scr:component> |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/AtsIdeIntegrationTestSuite.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/AtsIdeIntegrationTestSuite.java |
| index 22d61eb048..239c96015f 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/AtsIdeIntegrationTestSuite.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/AtsIdeIntegrationTestSuite.java |
| @@ -16,6 +16,7 @@ package org.eclipse.osee.ats.ide.integration; |
| import org.eclipse.osee.ats.ide.integration.tests.AtsTest_AllAts_Suite; |
| import org.eclipse.osee.ats.ide.integration.tests.DemoDbPopulateSuite; |
| import org.eclipse.osee.ats.ide.integration.tests.DirtyArtifactCacheTest; |
| +import org.eclipse.osee.ats.ide.integration.tests.framework.access.FrameworkAccess_Suite; |
| import org.eclipse.osee.ats.ide.integration.tests.framework.skynet.core.artifact.SkyentCoreArtifact_Suite; |
| import org.eclipse.osee.ats.ide.integration.tests.framework.ui.skynet.FrameworkUiSkynetTest_Suite; |
| import org.eclipse.osee.ats.ide.integration.tests.framework.ui.skynet.dialog.FrameworkUiSkynetTest_Dialog_Suite; |
| @@ -36,6 +37,7 @@ import org.junit.runners.Suite; |
| @Suite.SuiteClasses({ |
| DbInitTest.class, |
| DemoDbPopulateSuite.class, |
| + FrameworkAccess_Suite.class, |
| SkyentCoreArtifact_Suite.class, |
| AtsTest_AllAts_Suite.class, |
| FrameworkUiSkynetTest_Suite.class, |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/AtsBranchAccessManagerTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/AtsBranchAccessManagerTest.java |
| index 410e18014d..26e64990b6 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/AtsBranchAccessManagerTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/AtsBranchAccessManagerTest.java |
| @@ -14,24 +14,26 @@ |
| package org.eclipse.osee.ats.ide.integration.tests.ats.access; |
| |
| import static org.eclipse.osee.framework.core.enums.DemoBranches.SAW_Bld_1; |
| -import java.util.Arrays; |
| import java.util.Collection; |
| -import org.eclipse.osee.ats.api.data.AtsRelationTypes; |
| -import org.eclipse.osee.ats.api.demo.DemoActionableItems; |
| +import org.eclipse.osee.ats.api.access.AtsAccessContextTokens; |
| +import org.eclipse.osee.ats.api.access.IAtsAccessService; |
| +import org.eclipse.osee.ats.api.ai.IAtsActionableItem; |
| +import org.eclipse.osee.ats.api.demo.DemoArtifactToken; |
| import org.eclipse.osee.ats.api.demo.DemoWorkType; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| +import org.eclipse.osee.ats.api.team.IAtsTeamDefinition; |
| +import org.eclipse.osee.ats.api.util.IAtsChangeSet; |
| +import org.eclipse.osee.ats.api.version.IAtsVersion; |
| +import org.eclipse.osee.ats.core.access.AtsAccessService; |
| +import org.eclipse.osee.ats.core.access.demo.DemoAtsAccessContextTokens; |
| +import org.eclipse.osee.ats.ide.demo.DemoUtil; |
| import org.eclipse.osee.ats.ide.integration.tests.AtsApiService; |
| import org.eclipse.osee.ats.ide.integration.tests.util.DemoTestUtil; |
| import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| -import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.data.AccessContextToken; |
| +import org.eclipse.osee.framework.core.data.ArtifactId; |
| +import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| -import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction; |
| -import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager; |
| -import org.junit.After; |
| import org.junit.Assert; |
| -import org.junit.Before; |
| import org.junit.Test; |
| |
| /** |
| @@ -41,7 +43,7 @@ public class AtsBranchAccessManagerTest { |
| |
| @Test |
| public void testIsApplicable() { |
| - AtsBranchAccessManager mgr = new AtsBranchAccessManager(); |
| + AtsAccessService mgr = new AtsAccessService(AtsApiService.get()); |
| Assert.assertFalse(mgr.isApplicable(AtsApiService.get().getAtsBranch())); |
| Assert.assertFalse(mgr.isApplicable(SAW_Bld_1)); |
| |
| @@ -55,94 +57,63 @@ public class AtsBranchAccessManagerTest { |
| Assert.assertTrue(mgr.isApplicable(branch)); |
| } |
| |
| - @Before |
| - @After |
| - public void cleanup() { |
| - TeamWorkFlowArtifact teamArt = |
| - (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements); |
| - SkynetTransaction transaction = TransactionManager.createTransaction(AtsApiService.get().getAtsBranch(), |
| - "testGetContextIdArtifact cleanup"); |
| - Artifact teamDefArt = AtsApiService.get().getQueryServiceIde().getArtifact(teamArt.getTeamDefinition()); |
| - teamDefArt.deleteAttributes(CoreAttributeTypes.AccessContextId); |
| - teamDefArt.persist(transaction); |
| - for (Artifact art : teamDefArt.getRelatedArtifacts(AtsRelationTypes.TeamActionableItem_ActionableItem)) { |
| - art.deleteAttributes(CoreAttributeTypes.AccessContextId); |
| - art.persist(transaction); |
| - } |
| - teamArt.deleteAttributes(CoreAttributeTypes.AccessContextId); |
| - teamArt.persist(transaction); |
| - transaction.execute(); |
| - } |
| - |
| - /** |
| - * Test method for |
| - * {@link org.eclipse.osee.ats.ide.access.AtsBranchAccessManager#getContextId(org.eclipse.osee.framework.skynet.core.artifact.Artifact)} |
| - * {@link org.eclipse.osee.ats.ide.access.AtsBranchAccessManager#getEventFilters()}. |
| - * {@link org.eclipse.osee.ats.ide.access.AtsBranchAccessManager#handleArtifactEvent(org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent, org.eclipse.osee.framework.skynet.core.event.model.Sender)} |
| - */ |
| @Test |
| - public void testGetContextIdBranch() throws Exception { |
| - AtsBranchAccessManager mgr = new AtsBranchAccessManager(); |
| - TeamWorkFlowArtifact teamArt = |
| - (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements); |
| - |
| - // confirm that no context id returned |
| - Assert.assertEquals(0, mgr.getContextId(teamArt.getWorkingBranch(), false).size()); |
| - |
| - String teamDefContextId1 = "1234"; |
| - String teamDefContextId2 = "2345"; |
| - Artifact teamDefArt = AtsApiService.get().getQueryServiceIde().getArtifact(teamArt.getTeamDefinition()); |
| - teamDefArt.setAttributeValues(CoreAttributeTypes.AccessContextId, |
| - Arrays.asList(teamDefContextId1, teamDefContextId2)); |
| - teamDefArt.persist(getClass().getSimpleName()); |
| - |
| - Assert.assertEquals(2, mgr.getContextId(teamArt.getWorkingBranch(), false).size()); |
| - |
| - String aiContextId = "6789"; |
| - Artifact aiArt = AtsApiService.get().getQueryServiceIde().getArtifact( |
| - AtsApiService.get().getActionableItemService().getActionableItems( |
| - Arrays.asList(DemoActionableItems.SAW_Requirements.getName())).iterator().next()); |
| - aiArt.setAttributeValues(CoreAttributeTypes.AccessContextId, Arrays.asList(aiContextId)); |
| - aiArt.persist(getClass().getSimpleName()); |
| + public void testGetContextIds() throws Exception { |
| + IAtsAccessService accessService = AtsApiService.get().getAtsAccessService(); |
| + TeamWorkFlowArtifact teamArt = DemoUtil.getButtonWDoesntWorkOnSituationPageWf(); |
| + IAtsTeamDefinition teamDef = teamArt.getTeamDefinition(); |
| + IAtsActionableItem ai = teamArt.getActionableItems().iterator().next(); |
| + |
| + // confirm that deny context id is returned cause no branch |
| + Collection<AccessContextToken> contextIds = accessService.getContextIds(teamArt.getWorkingBranch(), false); |
| + Assert.assertEquals(1, contextIds.size()); |
| + Assert.assertTrue(contextIds.contains(AtsAccessContextTokens.ATS_BRANCH_READ)); |
| + |
| + // create branch |
| + IAtsChangeSet changes = AtsApiService.get().createChangeSet(getClass().getSimpleName() + " - set target ver"); |
| + IAtsVersion ver = AtsApiService.get().getVersionService().getVersionById(DemoArtifactToken.CIS_Bld_1); |
| + AtsApiService.get().getVersionService().setTargetedVersion(teamArt, ver, changes); |
| + changes.execute(); |
| + AtsApiService.get().getBranchServiceIde().createWorkingBranch_Create(teamArt, true); |
| + |
| + // confirm 0 contexts |
| + contextIds = accessService.getContextIds(teamArt.getWorkingBranch(), false); |
| + Assert.assertEquals(0, contextIds.size()); |
| + |
| + // set 2 on team def |
| + AtsApiService.get().getAtsAccessService().setContextIds(teamDef, DemoAtsAccessContextTokens.DEMO_CODE_CONTEXT, |
| + DemoAtsAccessContextTokens.DEMO_TEST_CONTEXT); |
| + |
| + // 2 returned |
| + contextIds = accessService.getContextIds(teamArt.getWorkingBranch(), false); |
| + Assert.assertEquals(2, contextIds.size()); |
| + Assert.assertTrue(contextIds.contains(DemoAtsAccessContextTokens.DEMO_CODE_CONTEXT)); |
| + Assert.assertTrue(contextIds.contains(DemoAtsAccessContextTokens.DEMO_TEST_CONTEXT)); |
| + |
| + // set 1 on ai |
| + AtsApiService.get().getAtsAccessService().setContextIds(ai, DemoAtsAccessContextTokens.DEMO_SYSTEMS_CONTEXT); |
| + |
| + // only 1 cause AI overrides Team Def |
| + contextIds = accessService.getContextIds(teamArt.getWorkingBranch(), false); |
| + Assert.assertEquals(1, contextIds.size()); |
| + Assert.assertTrue(contextIds.contains(DemoAtsAccessContextTokens.DEMO_SYSTEMS_CONTEXT)); |
| |
| - Assert.assertEquals(1, mgr.getContextId(teamArt.getWorkingBranch(), false).size()); |
| + // set 1 on workflow |
| + AtsApiService.get().getAtsAccessService().setContextIds(teamArt, |
| + DemoAtsAccessContextTokens.DEMO_REQUIREMENT_CONTEXT); |
| |
| - String teamContextId1 = "1234"; |
| - String teamContextId2 = "2345"; |
| - String teamContextId3 = "3456"; |
| - teamArt.setAttributeValues(CoreAttributeTypes.AccessContextId, |
| - Arrays.asList(teamContextId1, teamContextId2, teamContextId3)); |
| - teamArt.persist(getClass().getSimpleName()); |
| + // only 1 cause workflow overrides AI and Team Def |
| + contextIds = accessService.getContextIds(teamArt.getWorkingBranch(), false); |
| + Assert.assertEquals(1, contextIds.size()); |
| + Assert.assertTrue(contextIds.contains(DemoAtsAccessContextTokens.DEMO_REQUIREMENT_CONTEXT)); |
| |
| - AtsApiService.get().clearCaches(); |
| + // cleanup |
| + changes = AtsApiService.get().createChangeSet(getClass().getSimpleName() + " - cleanup"); |
| + changes.deleteAttributes((ArtifactId) teamArt, CoreAttributeTypes.AccessContextId); |
| + changes.deleteAttributes(teamDef, CoreAttributeTypes.AccessContextId); |
| + changes.deleteAttributes(ai, CoreAttributeTypes.AccessContextId); |
| + changes.execute(); |
| |
| - Assert.assertEquals(3, mgr.getContextId(teamArt.getWorkingBranch(), false).size()); |
| } |
| |
| - /** |
| - * Test method for { |
| - * |
| - * @param useCache TODO@link org.eclipse.osee.ats.ide.access.AtsBranchAccessManager#convertAccessAttributeToGuid |
| - */ |
| - @Test |
| - public void testConvertAccessAttributeToGuid() throws Exception { |
| - AtsBranchAccessManager mgr = new AtsBranchAccessManager(); |
| - TeamWorkFlowArtifact teamArt = |
| - (TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements); |
| - |
| - // confirm that no context id returned |
| - Assert.assertEquals(0, mgr.getContextId(teamArt.getWorkingBranch()).size()); |
| - |
| - String teamDefContextId1 = "16546, this is the name"; |
| - Artifact teamDefArt = AtsApiService.get().getQueryServiceIde().getArtifact(teamArt.getTeamDefinition()); |
| - teamDefArt.setAttributeValues(CoreAttributeTypes.AccessContextId, Arrays.asList(teamDefContextId1)); |
| - teamDefArt.persist(getClass().getSimpleName()); |
| - |
| - mgr.clearCache(); |
| - |
| - Collection<AccessContextToken> contextIds = mgr.getContextId(teamArt.getWorkingBranch()); |
| - Assert.assertEquals(1, contextIds.size()); |
| - AccessContextToken contextId = contextIds.iterator().next(); |
| - Assert.assertEquals(Long.valueOf(16546), contextId.getId()); |
| - } |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/UserGroupImplTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/UserGroupImplTest.java |
| index 3d530e383e..e46a689d96 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/UserGroupImplTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/access/UserGroupImplTest.java |
| @@ -27,7 +27,7 @@ public class UserGroupImplTest { |
| |
| @Test |
| public void test() { |
| - // Joe Smith is no admin by default, but is temp admin |
| + // Joe Smith is not admin by default, but is temp admin |
| Assert.assertFalse(UserGroupService.get(AtsUserGroups.AtsAdmin).isCurrentUserMember()); |
| Assert.assertTrue(UserGroupService.get(AtsUserGroups.AtsTempAdmin).isCurrentUserMember()); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/ActionableItemResourceTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/ActionableItemResourceTest.java |
| index 1f1b041ec4..4dec693a37 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/ActionableItemResourceTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/ActionableItemResourceTest.java |
| @@ -33,12 +33,12 @@ public class ActionableItemResourceTest extends AbstractRestTest { |
| |
| @Test |
| public void testAtsAisRestCall() { |
| - testActionableItemUrl("/ats/ai", 68, false); |
| + testActionableItemUrl("/ats/ai", 70, false); |
| } |
| |
| @Test |
| public void testAtsAisDetailsRestCall() { |
| - testActionableItemUrl("/ats/ai/details", 68, true); |
| + testActionableItemUrl("/ats/ai/details", 70, true); |
| } |
| |
| @Test |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/TeamResourceTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/TeamResourceTest.java |
| index f1b20480f7..53fe7c96fa 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/TeamResourceTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/config/TeamResourceTest.java |
| @@ -33,13 +33,13 @@ public class TeamResourceTest extends AbstractRestTest { |
| |
| @Test |
| public void testAtsTeamsRestCall() { |
| - JsonNode team = testTeamUrl("/ats/team", 25, false); |
| + JsonNode team = testTeamUrl("/ats/team", 27, false); |
| Assert.assertFalse(team.has("version")); |
| } |
| |
| @Test |
| public void testAtsTeamsDetailsRestCall() { |
| - JsonNode team = testTeamUrl("/ats/team/details", 25, true); |
| + JsonNode team = testTeamUrl("/ats/team/details", 27, true); |
| Assert.assertEquals(3, team.get("version").size()); |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsActionEndpointImplTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsActionEndpointImplTest.java |
| index ee827d37aa..b738594cae 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsActionEndpointImplTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsActionEndpointImplTest.java |
| @@ -93,7 +93,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest { |
| "Title", "SAW"// |
| ); |
| |
| - getFirstAndCount(target, 3); |
| + getFirstAndCount(target, 4); |
| } |
| |
| @Test |
| @@ -113,7 +113,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest { |
| "Team", codeWfId, // |
| "StateType", StateType.Working.name()// |
| ); |
| - getAndCountWorkItems(target, 4); |
| + getAndCountWorkItems(target, 5); |
| } |
| |
| @Test |
| @@ -122,7 +122,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest { |
| "Team", codeWfId, // |
| "Assignee", "4444", // |
| "Assignee", "3333"); |
| - getAndCountWorkItems(target, 4); |
| + getAndCountWorkItems(target, 5); |
| } |
| |
| @Test |
| @@ -131,13 +131,13 @@ public class AtsActionEndpointImplTest extends AbstractRestTest { |
| "Team", codeWfId, // |
| "Originator", "3333" // |
| ); |
| - getAndCountWorkItems(target, 4); |
| + getAndCountWorkItems(target, 5); |
| } |
| |
| @Test |
| public void testQueryTeam() { |
| WebTarget target = createWebTarget("Team", codeWfId); |
| - getFirstAndCount(target, 4); |
| + getFirstAndCount(target, 5); |
| } |
| |
| @Test |
| @@ -148,7 +148,7 @@ public class AtsActionEndpointImplTest extends AbstractRestTest { |
| "Priority", "3", // |
| "StateType", StateType.Working.name() // |
| ); |
| - getFirstAndCount(target, 2); |
| + getFirstAndCount(target, 3); |
| } |
| |
| public TeamWorkFlowArtifact getCodeWorkflow() { |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsProductLineEndpointTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsProductLineEndpointTest.java |
| index c5ec9ae52d..edc3a93b5d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsProductLineEndpointTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/resource/AtsProductLineEndpointTest.java |
| @@ -34,7 +34,7 @@ public class AtsProductLineEndpointTest extends AbstractRestTest { |
| String path = "ats/ple/branches/"; |
| WebTarget target = jaxRsApi.newTargetQuery(path + "/baseline"); |
| |
| - testActionRestCall(target, 1); |
| + testActionRestCall(target, 2); |
| } |
| |
| private JsonNode testActionRestCall(WebTarget target, int size) { |
| @@ -43,4 +43,4 @@ public class AtsProductLineEndpointTest extends AbstractRestTest { |
| Assert.assertEquals(size, arrayNode.size()); |
| return arrayNode.get(0); |
| } |
| -} |
| \ No newline at end of file |
| +} |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/AtsProgramServiceTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/AtsProgramServiceTest.java |
| index 735070718c..7570f2896d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/AtsProgramServiceTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/AtsProgramServiceTest.java |
| @@ -138,7 +138,7 @@ public class AtsProgramServiceTest { |
| public void testGetTeamDefinition() { |
| assertEquals("SAW SW", programService.getTeamDefinition(sawProgram).getName()); |
| |
| - assertEquals(6, programService.getTeamDefs(sawProgram).size()); |
| + assertEquals(8, programService.getTeamDefs(sawProgram).size()); |
| |
| assertEquals(1, programService.getTeamDefs(sawProgram, WorkType.Code).size()); |
| |
| @@ -147,7 +147,7 @@ public class AtsProgramServiceTest { |
| |
| @Test |
| public void testGetAIs() { |
| - assertEquals(6, programService.getAis(sawProgram).size()); |
| + assertEquals(8, programService.getAis(sawProgram).size()); |
| |
| assertEquals(1, programService.getAis(sawProgram, WorkType.Code).size()); |
| |
| @@ -157,7 +157,7 @@ public class AtsProgramServiceTest { |
| @Test |
| public void testGetWorkType() { |
| Collection<IAtsTeamWorkflow> workflows = programService.getWorkflows(sawProgram, WorkType.Code); |
| - assertEquals(4, workflows.size()); |
| + assertEquals(5, workflows.size()); |
| IAtsTeamWorkflow codeTeamWf = workflows.iterator().next(); |
| |
| assertEquals(WorkType.Code, programService.getWorkType(codeTeamWf)); |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/CreateActionUsingAllActionableItemsTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/CreateActionUsingAllActionableItemsTest.java |
| index 4088f9a80e..92f9eecfcd 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/CreateActionUsingAllActionableItemsTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/util/CreateActionUsingAllActionableItemsTest.java |
| @@ -50,7 +50,7 @@ public class CreateActionUsingAllActionableItemsTest { |
| SevereLoggingMonitor monitor = TestUtil.severeLoggingStart(); |
| ActionResult action = CreateActionUsingAllActionableItems.createActionWithAllAis(); |
| if (TestUtil.isDemoDb()) { |
| - Assert.assertEquals("Should be 21 workflows created", 21, action.getTeams().size()); |
| + Assert.assertEquals("Should be 23 workflows created", 23, action.getTeams().size()); |
| } else { |
| Assert.assertEquals("Should be 34 workflows created", 34, action.getTeams().size()); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/workflow/transition/TransitionManagerTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/workflow/transition/TransitionManagerTest.java |
| index d485434b92..4eca2998dd 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/workflow/transition/TransitionManagerTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/workflow/transition/TransitionManagerTest.java |
| @@ -97,11 +97,10 @@ public class TransitionManagerTest { |
| @org.junit.Test |
| public void testHandleTransitionValidation__NoAwas() { |
| AtsTestUtil.cleanupAndReset("TransitionManagerTest-A"); |
| - TransitionHelper helper = |
| - new TransitionHelper(getClass().getSimpleName(), EMPTY_AWAS, AtsTestUtil.getImplementStateDef().getName(), |
| - Arrays.asList(AtsApiService.get().getUserService().getCurrentUser()), null, |
| - AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), |
| - TransitionOption.None); |
| + TransitionHelper helper = new TransitionHelper(getClass().getSimpleName(), EMPTY_AWAS, |
| + AtsTestUtil.getImplementStateDef().getName(), |
| + Arrays.asList(AtsApiService.get().getUserService().getCurrentUser()), null, |
| + AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), TransitionOption.None); |
| TransitionManager transMgr = new TransitionManager(helper); |
| TransitionResults results = new TransitionResults(); |
| transMgr.handleTransitionValidation(results); |
| @@ -112,8 +111,7 @@ public class TransitionManagerTest { |
| public void testHandleTransitionValidation__ToStateNotNull() { |
| TransitionHelper helper = new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), |
| null, Arrays.asList(AtsApiService.get().getUserService().getCurrentUser()), null, |
| - AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), |
| - TransitionOption.None); |
| + AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), TransitionOption.None); |
| TransitionManager transMgr = new TransitionManager(helper); |
| TransitionResults results = new TransitionResults(); |
| transMgr.handleTransitionValidation(results); |
| @@ -124,8 +122,7 @@ public class TransitionManagerTest { |
| public void testHandleTransitionValidation__InvalidToState() { |
| TransitionHelper helper = new TransitionHelper(getClass().getSimpleName(), Arrays.asList(AtsTestUtil.getTeamWf()), |
| "InvalidStateName", Arrays.asList(AtsApiService.get().getUserService().getCurrentUser()), null, |
| - AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), |
| - TransitionOption.None); |
| + AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), TransitionOption.None); |
| TransitionManager transMgr = new TransitionManager(helper); |
| TransitionResults results = new TransitionResults(); |
| transMgr.handleTransitionValidation(results); |
| @@ -143,8 +140,7 @@ public class TransitionManagerTest { |
| TransitionHelper helper = new TransitionHelper(getClass().getSimpleName(), Arrays.asList(teamArt), |
| AtsTestUtil.getImplementStateDef().getName(), |
| Arrays.asList(AtsApiService.get().getUserService().getCurrentUser()), null, |
| - AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), |
| - TransitionOption.None); |
| + AtsApiService.get().createChangeSet(getClass().getSimpleName()), AtsApiService.get(), TransitionOption.None); |
| helper.setExecuteChanges(true); |
| TransitionManager transMgr = new TransitionManager(helper); |
| TransitionResults results = new TransitionResults(); |
| @@ -156,8 +152,7 @@ public class TransitionManagerTest { |
| // Un-Assign Joe Smith |
| results.clear(); |
| Assert.assertFalse(helper.isOverrideAssigneeCheck()); |
| - teamArt.getStateMgr().setAssignee( |
| - AtsApiService.get().getUserService().getUserByToken(DemoUsers.Alex_Kay)); |
| + teamArt.getStateMgr().setAssignee(AtsApiService.get().getUserService().getUserByToken(DemoUsers.Alex_Kay)); |
| transMgr.handleTransitionValidation(results); |
| Assert.assertTrue(results.contains(AtsTestUtil.getTeamWf(), TransitionResult.MUST_BE_ASSIGNED)); |
| |
| @@ -165,8 +160,7 @@ public class TransitionManagerTest { |
| results.clear(); |
| helper.addTransitionOption(TransitionOption.OverrideAssigneeCheck); |
| Assert.assertTrue(helper.isOverrideAssigneeCheck()); |
| - teamArt.getStateMgr().setAssignee( |
| - AtsApiService.get().getUserService().getUserByToken(DemoUsers.Alex_Kay)); |
| + teamArt.getStateMgr().setAssignee(AtsApiService.get().getUserService().getUserByToken(DemoUsers.Alex_Kay)); |
| transMgr.handleTransitionValidation(results); |
| Assert.assertTrue(results.isEmpty()); |
| |
| @@ -174,14 +168,12 @@ public class TransitionManagerTest { |
| results.clear(); |
| helper.removeTransitionOption(TransitionOption.OverrideAssigneeCheck); |
| Assert.assertFalse(helper.isOverrideAssigneeCheck()); |
| - teamArt.getStateMgr().setAssignee( |
| - AtsApiService.get().getUserService().getUserByToken(SystemUser.UnAssigned)); |
| + teamArt.getStateMgr().setAssignee(AtsApiService.get().getUserService().getUserByToken(SystemUser.UnAssigned)); |
| transMgr.handleTransitionValidation(results); |
| Assert.assertTrue(getResultsAndDebug(results, teamArt, helper), results.isEmpty()); |
| |
| // cleanup test |
| - teamArt.getStateMgr().setAssignee( |
| - AtsApiService.get().getUserService().getUserByToken(SystemUser.UnAssigned)); |
| + teamArt.getStateMgr().setAssignee(AtsApiService.get().getUserService().getUserByToken(SystemUser.UnAssigned)); |
| } |
| |
| private String getResultsAndDebug(TransitionResults results, TeamWorkFlowArtifact teamArt, TransitionHelper helper) { |
| @@ -365,6 +357,7 @@ public class TransitionManagerTest { |
| |
| TransitionResults results = new TransitionResults(); |
| when(teamWf.isTeamWorkflow()).thenReturn(true); |
| + when(teamWf.getId()).thenReturn(4353454L); |
| |
| // validate that if rule exists and is working, then transition with tasks is ok |
| when(teamWf.getStateDefinition()).thenReturn(toStateDef); |
| @@ -512,8 +505,8 @@ public class TransitionManagerTest { |
| |
| // validate that can transition cause review completed |
| changes = AtsApiService.get().createChangeSet(getClass().getSimpleName()); |
| - Result result = AtsApiService.get().getReviewService().transitionDecisionTo(decArt, |
| - DecisionReviewState.Completed, AtsApiService.get().getUserService().getCurrentUser(), false, changes); |
| + Result result = AtsApiService.get().getReviewService().transitionDecisionTo(decArt, DecisionReviewState.Completed, |
| + AtsApiService.get().getUserService().getCurrentUser(), false, changes); |
| Assert.assertTrue(result.getText(), result.isTrue()); |
| changes.execute(); |
| results.clear(); |
| @@ -674,9 +667,9 @@ public class TransitionManagerTest { |
| |
| // transition workflow to cancelled - peer review not cancelled |
| changes.clear(); |
| - TransitionHelper transHelper = new TransitionHelper("Transition Team Workflow Review", Arrays.asList(teamArt), |
| - "Cancelled", new ArrayList<AtsUser>(), "", changes, AtsApiService.get(), |
| - TransitionOption.OverrideAssigneeCheck); |
| + TransitionHelper transHelper = |
| + new TransitionHelper("Transition Team Workflow Review", Arrays.asList(teamArt), "Cancelled", |
| + new ArrayList<AtsUser>(), "", changes, AtsApiService.get(), TransitionOption.OverrideAssigneeCheck); |
| transHelper.setTransitionUser(AtsApiService.get().getUserService().getCurrentUser()); |
| TransitionManager mgr = new TransitionManager(transHelper); |
| results = mgr.handleAll(); |
| @@ -687,8 +680,7 @@ public class TransitionManagerTest { |
| results.clear(); |
| changes.clear(); |
| transHelper = new TransitionHelper("Transition Team Workflow Review", Arrays.asList(peerReview), "Cancelled", |
| - new ArrayList<AtsUser>(), "", changes, AtsApiService.get(), |
| - TransitionOption.OverrideAssigneeCheck); |
| + new ArrayList<AtsUser>(), "", changes, AtsApiService.get(), TransitionOption.OverrideAssigneeCheck); |
| transHelper.setTransitionUser(AtsApiService.get().getUserService().getCurrentUser()); |
| mgr = new TransitionManager(transHelper); |
| results = mgr.handleAll(); |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsConfigQueryImplTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsConfigQueryImplTest.java |
| index 1007a83cda..f2e88de4aa 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsConfigQueryImplTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsConfigQueryImplTest.java |
| @@ -58,10 +58,10 @@ public class AtsConfigQueryImplTest { |
| public void test() { |
| IAtsConfigQuery query = queryService.createQuery(AtsArtifactTypes.TeamDefinition); |
| ResultSet<IAtsTeamDefinition> teamDefs = query.getConfigObjectResultSet(); |
| - assertEquals(25, teamDefs.size()); |
| + assertEquals(27, teamDefs.size()); |
| |
| Collection<ArtifactToken> resultArtifacts = query.getArtifacts(); |
| - assertEquals(25, resultArtifacts.size()); |
| + assertEquals(27, resultArtifacts.size()); |
| |
| query.andAttr(CoreAttributeTypes.Name, DemoArtifactToken.SAW_Code.getName()); |
| IAtsTeamDefinition teamDef = |
| @@ -73,7 +73,7 @@ public class AtsConfigQueryImplTest { |
| query = queryService.createQuery(AtsArtifactTypes.ActionableItem); |
| ResultSet<IAtsActionableItem> ais = query.getConfigObjectResultSet(); |
| |
| - assertEquals(68, ais.size()); |
| + assertEquals(70, ais.size()); |
| } |
| |
| @Test |
| @@ -105,7 +105,7 @@ public class AtsConfigQueryImplTest { |
| IAtsConfigQuery query = |
| queryService.createQuery(AtsArtifactTypes.TeamDefinition).andProgram(DemoArtifactToken.SAW_Program.getId()); |
| ResultSet<IAtsTeamDefinition> teamDefs = query.getConfigObjectResultSet(); |
| - assertEquals(6, teamDefs.size()); |
| + assertEquals(8, teamDefs.size()); |
| |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsQueryImplTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsQueryImplTest.java |
| index b41602821b..7f912bd98d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsQueryImplTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/AtsQueryImplTest.java |
| @@ -60,7 +60,7 @@ public class AtsQueryImplTest { |
| |
| // test by type |
| IAtsQuery query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| - assertEquals(28, query.getResults().size()); |
| + assertEquals(31, query.getResults().size()); |
| |
| query = queryService.createQuery(WorkItemType.Task); |
| assertEquals(50, query.getResults().size()); |
| @@ -68,18 +68,18 @@ public class AtsQueryImplTest { |
| // assignee |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andAssignee(atsApi.getUserService().getUserByUserId("3333")); |
| - assertEquals(8, query.getResults().size()); |
| + assertEquals(10, query.getResults().size()); |
| |
| // team |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andTeam(Arrays.asList(30013695L)); |
| - assertEquals(4, query.getResults().size()); |
| + assertEquals(5, query.getResults().size()); |
| |
| // ai |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| ArtifactId ai = atsApi.getQueryService().getArtifactByName(AtsArtifactTypes.ActionableItem, "SAW Requirements"); |
| query.andActionableItem(Arrays.asList(ai.getId())); |
| - assertEquals(5, query.getResults().size()); |
| + assertEquals(6, query.getResults().size()); |
| |
| // by ids (hijack two workflows from previous search) |
| List<Long> ids = new LinkedList<>(); |
| @@ -100,11 +100,11 @@ public class AtsQueryImplTest { |
| // by state type |
| query = queryService.createQuery(WorkItemType.WorkItem); |
| query.andStateType(StateType.Working); |
| - assertEquals(92, query.getResults().size()); |
| + assertEquals(95, query.getResults().size()); |
| |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andStateType(StateType.Working); |
| - assertEquals(24, query.getResults().size()); |
| + assertEquals(27, query.getResults().size()); |
| |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andStateType(StateType.Completed); |
| @@ -112,23 +112,23 @@ public class AtsQueryImplTest { |
| |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andStateType(StateType.Completed, StateType.Working); |
| - assertEquals(28, query.getResults().size()); |
| + assertEquals(31, query.getResults().size()); |
| |
| // by version |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| ArtifactId version = atsApi.getQueryService().getArtifactByName(AtsArtifactTypes.Version, "SAW_Bld_2"); |
| query.andVersion(version.getId()); |
| - assertEquals(17, query.getResults().size()); |
| + assertEquals(20, query.getResults().size()); |
| |
| // by assignee |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andAssignee(joeSmith); |
| - assertEquals(8, query.getResults().size()); |
| + assertEquals(10, query.getResults().size()); |
| |
| // by originator |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| query.andOriginator(joeSmith); |
| - assertEquals(28, query.getResults().size()); |
| + assertEquals(31, query.getResults().size()); |
| |
| // by favorite |
| query = queryService.createQuery(WorkItemType.TeamWorkflow); |
| @@ -152,8 +152,8 @@ public class AtsQueryImplTest { |
| IAtsInsertion insertion = programService.getInsertion(activity); // COMM |
| IAtsProgram program = programService.getProgram(insertion); // SAW Program |
| |
| - IAtsTeamWorkflow codeWf = AtsApiService.get().getWorkItemService().getTeamWf( |
| - DemoTestUtil.getCommittedActionWorkflow(DemoWorkType.Code)); |
| + IAtsTeamWorkflow codeWf = |
| + AtsApiService.get().getWorkItemService().getTeamWf(DemoTestUtil.getCommittedActionWorkflow(DemoWorkType.Code)); |
| IAtsTask codeTask = (IAtsTask) AtsApiService.get().getQueryService().createQuery(WorkItemType.Task).andAttr( |
| CoreAttributeTypes.Name, "Create test plan").getItems().iterator().next(); |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/MyWorldSearchItemTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/MyWorldSearchItemTest.java |
| index 9ba6ff0de2..bc64ea7fa0 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/MyWorldSearchItemTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/MyWorldSearchItemTest.java |
| @@ -38,15 +38,15 @@ public class MyWorldSearchItemTest { |
| AtsUser currentUser = AtsApiService.get().getUserService().getCurrentUser(); |
| MyWorldSearchItem search = new MyWorldSearchItem("Search", currentUser); |
| Collection<Artifact> results = search.performSearchGetResults(); |
| - DemoTestUtil.assertTypes(results, 12, IAtsWorkItem.class); |
| - DemoTestUtil.assertTypes(results, 8, IAtsTeamWorkflow.class); |
| + DemoTestUtil.assertTypes(results, 14, IAtsWorkItem.class); |
| + DemoTestUtil.assertTypes(results, 10, IAtsTeamWorkflow.class); |
| DemoTestUtil.assertTypes(results, 2, IAtsDecisionReview.class); |
| DemoTestUtil.assertTypes(results, 2, IAtsPeerToPeerReview.class); |
| |
| search = new MyWorldSearchItem("Search", |
| AtsApiService.get().getUserService().getUserByUserId(DemoUsers.Kay_Jones.getUserId())); |
| results = search.performSearchGetResults(); |
| - DemoTestUtil.assertTypes(results, 13, IAtsWorkItem.class); |
| + DemoTestUtil.assertTypes(results, 14, IAtsWorkItem.class); |
| DemoTestUtil.assertTypes(results, 1, IAtsPeerToPeerReview.class); |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/NextVersionSearchItemTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/NextVersionSearchItemTest.java |
| index b6e49d4255..3b5fd8ba0a 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/NextVersionSearchItemTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/NextVersionSearchItemTest.java |
| @@ -33,11 +33,11 @@ public class NextVersionSearchItemTest { |
| |
| @Test |
| public void testByTeam() { |
| - IAtsTeamDefinition teamDef = AtsApiService.get().getTeamDefinitionService().getTeamDefinitions( |
| - Arrays.asList("SAW SW")).iterator().next(); |
| + IAtsTeamDefinition teamDef = |
| + AtsApiService.get().getTeamDefinitionService().getTeamDefinitions(Arrays.asList("SAW SW")).iterator().next(); |
| NextVersionSearchItem search = new NextVersionSearchItem(teamDef, LoadView.WorldEditor); |
| Collection<Artifact> results = search.performSearchGetResults(); |
| - DemoTestUtil.assertTypes(results, 17, IAtsTeamWorkflow.class); |
| + DemoTestUtil.assertTypes(results, 20, IAtsTeamWorkflow.class); |
| } |
| |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/VersionTargetedForTeamSearchItemTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/VersionTargetedForTeamSearchItemTest.java |
| index 680899bdb4..ee55467f8c 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/VersionTargetedForTeamSearchItemTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/VersionTargetedForTeamSearchItemTest.java |
| @@ -37,7 +37,7 @@ public class VersionTargetedForTeamSearchItemTest { |
| VersionTargetedForTeamSearchItem search = |
| new VersionTargetedForTeamSearchItem(null, version, false, LoadView.WorldEditor); |
| Collection<Artifact> results = search.performSearchGetResults(); |
| - DemoTestUtil.assertTypes(results, 17, IAtsTeamWorkflow.class); |
| + DemoTestUtil.assertTypes(results, 20, IAtsTeamWorkflow.class); |
| } |
| |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/WorldSearchItemTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/WorldSearchItemTest.java |
| index 7409eeef00..824d9f5959 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/WorldSearchItemTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/ats/world/search/WorldSearchItemTest.java |
| @@ -66,7 +66,7 @@ public class WorldSearchItemTest { |
| data.setTeamDefIds(Arrays.asList(DemoArtifactToken.SAW_Code.getId())); |
| WorldSearchItem search = new WorldSearchItem(data); |
| Collection<Artifact> results = search.performSearch(SearchType.Search); |
| - Assert.assertEquals(4, results.size()); |
| + Assert.assertEquals(5, results.size()); |
| } |
| |
| @Test |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java |
| index 20eaf228b8..4295d8585b 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/framework/ui/skynet/FrameworkUiSkynetTest_Suite.java |
| @@ -23,8 +23,8 @@ import org.junit.runners.Suite; |
| */ |
| @RunWith(Suite.class) |
| @Suite.SuiteClasses({ // |
| - OpenBlamsTest.class, // |
| LinkUtilTest.class, // |
| + OpenBlamsTest.class, // |
| WordTemplateProcessorTest.class // |
| }) |
| public class FrameworkUiSkynetTest_Suite { |
| diff --git a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/util/DbInitTest.java b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/util/DbInitTest.java |
| index 66aac55362..b96379bd9d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/util/DbInitTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide.integration.tests/src/org/eclipse/osee/ats/ide/integration/tests/util/DbInitTest.java |
| @@ -81,7 +81,7 @@ public class DbInitTest { |
| UserManager.setSetting(UserManager.DOUBLE_CLICK_SETTING_KEY_EDIT, "false"); |
| UserManager.getUser().saveSettings(); |
| |
| - UserGroupService.get(CoreUserGroups.DefaultArtifactEditor).addMember(UserManager.getUser()); |
| + UserGroupService.get(CoreUserGroups.DefaultArtifactEditor).addMember(UserManager.getUser(), true); |
| |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.ide/META-INF/MANIFEST.MF |
| index e52095a4c0..a5f56ffeb2 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.ide/META-INF/MANIFEST.MF |
| @@ -23,7 +23,6 @@ Require-Bundle: org.eclipse.gef, |
| org.junit, |
| org.apache.commons.httpclient |
| Export-Package: org.eclipse.osee.ats.ide, |
| - org.eclipse.osee.ats.ide.access, |
| org.eclipse.osee.ats.ide.actions, |
| org.eclipse.osee.ats.ide.actions.wizard, |
| org.eclipse.osee.ats.ide.branch, |
| @@ -136,16 +135,12 @@ Import-Package: com.fasterxml.jackson.annotation, |
| org.eclipse.osee.ats.ide.search, |
| org.eclipse.osee.define.ide.traceability, |
| org.eclipse.osee.define.ide.traceability.report, |
| - org.eclipse.osee.framework.access, |
| org.eclipse.osee.framework.core, |
| org.eclipse.osee.framework.core.access, |
| + org.eclipse.osee.framework.core.access.event, |
| org.eclipse.osee.framework.core.client, |
| org.eclipse.osee.framework.core.client.server, |
| org.eclipse.osee.framework.core.data, |
| - org.eclipse.osee.framework.core.dsl.integration, |
| - org.eclipse.osee.framework.core.dsl.integration.util, |
| - org.eclipse.osee.framework.core.dsl.oseeDsl, |
| - org.eclipse.osee.framework.core.dsl.ui.integration.operations, |
| org.eclipse.osee.framework.core.enums, |
| org.eclipse.osee.framework.core.enums.token, |
| org.eclipse.osee.framework.core.event, |
| diff --git a/plugins/org.eclipse.osee.ats.ide/OSGI-INF/ats.cm.access.xml b/plugins/org.eclipse.osee.ats.ide/OSGI-INF/ats.cm.access.xml |
| deleted file mode 100644 |
| index 25c93e9bb1..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/OSGI-INF/ats.cm.access.xml |
| +++ /dev/null |
| @@ -1,11 +0,0 @@ |
| -<?xml version="1.0" encoding="UTF-8"?> |
| -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="start" deactivate="stop"> |
| - <implementation class="org.eclipse.osee.ats.ide.access.internal.AtsCmAccessControlProxy"/> |
| - <service> |
| - <provide interface="org.eclipse.osee.framework.core.services.CmAccessControl"/> |
| - <provide interface="org.eclipse.osee.framework.core.model.access.HasAccessModel"/> |
| - </service> |
| - <reference bind="setAccessModelInterpreter" cardinality="1..1" interface="org.eclipse.osee.framework.core.dsl.integration.AccessModelInterpreter" name="AccessModelInterpreter" policy="static"/> |
| - <reference bind="setEventService" cardinality="1..1" interface="org.eclipse.osee.framework.skynet.core.event.OseeEventService" name="OseeEventService" policy="static"/> |
| - <reference cardinality="1..1" interface="org.eclipse.core.resources.IWorkspace" name="IWorkspace" policy="static"/> |
| -</scr:component> |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/AtsBranchAccessManager.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/AtsBranchAccessManager.java |
| deleted file mode 100644 |
| index 9461ecc8cd..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/AtsBranchAccessManager.java |
| +++ /dev/null |
| @@ -1,281 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2004, 2007 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.ats.ide.access; |
| - |
| -import java.util.ArrayList; |
| -import java.util.Arrays; |
| -import java.util.Collection; |
| -import java.util.Date; |
| -import java.util.HashMap; |
| -import java.util.HashSet; |
| -import java.util.List; |
| -import java.util.Map; |
| -import java.util.Set; |
| -import java.util.logging.Level; |
| -import org.eclipse.osee.ats.api.access.AtsAccessContextTokens; |
| -import org.eclipse.osee.ats.api.ai.IAtsActionableItem; |
| -import org.eclipse.osee.ats.api.data.AtsArtifactTypes; |
| -import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; |
| -import org.eclipse.osee.ats.ide.internal.Activator; |
| -import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| -import org.eclipse.osee.ats.ide.util.AtsUtilClient; |
| -import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| -import org.eclipse.osee.framework.core.data.BranchId; |
| -import org.eclipse.osee.framework.core.data.AccessContextToken; |
| -import org.eclipse.osee.framework.core.dsl.integration.RoleContextProvider; |
| -import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| -import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; |
| -import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| -import org.eclipse.osee.framework.jdk.core.util.GUID; |
| -import org.eclipse.osee.framework.jdk.core.util.Strings; |
| -import org.eclipse.osee.framework.logging.OseeLog; |
| -import org.eclipse.osee.framework.skynet.core.UserManager; |
| -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| -import org.eclipse.osee.framework.skynet.core.artifact.ArtifactCache; |
| -import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; |
| -import org.eclipse.osee.framework.skynet.core.event.filter.ArtifactTypeEventFilter; |
| -import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter; |
| -import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener; |
| -import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent; |
| -import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidArtifact; |
| -import org.eclipse.osee.framework.skynet.core.event.model.Sender; |
| -import org.osgi.service.event.Event; |
| -import org.osgi.service.event.EventHandler; |
| - |
| -/** |
| - * This class will return access context ids related to editing artifacts stored on a team workflow's working branch. |
| - * <br> |
| - * <br> |
| - * Access control can be called frequently, thus a cache is used. Events will clear cache as necessary.<br> |
| - * <br> |
| - * Access is determined from "Access Context Id" value stored on Team Workflow, if not there, then Actionable Items, if |
| - * not there, then Team Defs. |
| - * |
| - * @author Donald G. Dunne |
| - */ |
| -public class AtsBranchAccessManager implements IArtifactEventListener, EventHandler { |
| - |
| - // Cache to store branch id to context id list so don't have to re-compute |
| - private static final Map<BranchId, Collection<AccessContextToken>> branchIdToContextIdCache = new HashMap<>(50); |
| - |
| - private final RoleContextProvider roleContextProvider; |
| - private volatile long cacheUpdated = 0; |
| - |
| - public AtsBranchAccessManager() { |
| - // Available for osgi instantiation |
| - this(null); |
| - } |
| - |
| - public AtsBranchAccessManager(RoleContextProvider roleContextProvider) { |
| - this.roleContextProvider = roleContextProvider; |
| - } |
| - |
| - /** |
| - * True if not common branch and branch's associated artifact is a Team Workflow artifact |
| - */ |
| - public boolean isApplicable(BranchId objectBranch) { |
| - boolean result = false; |
| - try { |
| - if (AtsApiService.get().getAtsBranch().notEqual(objectBranch)) { |
| - Artifact associatedArtifact = BranchManager.getAssociatedArtifact(objectBranch); |
| - if (associatedArtifact.isValid()) { |
| - result = associatedArtifact.isOfType(AtsArtifactTypes.AtsArtifact); |
| - } |
| - } |
| - } catch (OseeCoreException ex) { |
| - OseeLog.log(Activator.class, Level.INFO, "Error determining access applicibility", ex); |
| - } |
| - return result; |
| - } |
| - |
| - public Collection<AccessContextToken> getContextId(BranchId branch) { |
| - return getContextId(branch, true); |
| - } |
| - |
| - public Collection<AccessContextToken> getContextId(BranchId branch, boolean useCache) { |
| - if (useCache && branchIdToContextIdCache.containsKey(branch)) { |
| - return branchIdToContextIdCache.get(branch); |
| - } |
| - Collection<AccessContextToken> contextIds = new ArrayList<>(); |
| - |
| - if (branch.isInvalid()) { |
| - contextIds.add(AtsAccessContextTokens.DENY_CONTEXT); |
| - |
| - return contextIds; |
| - } |
| - |
| - branchIdToContextIdCache.put(branch, contextIds); |
| - try { |
| - // don't access control common branch artifacts...yet |
| - if (AtsApiService.get().getAtsBranch().notEqual(branch)) { |
| - // do this check first since role will supersede others |
| - if (roleContextProvider != null) { |
| - contextIds.addAll(roleContextProvider.getContextId(UserManager.getUser())); |
| - } |
| - |
| - if (contextIds.isEmpty()) { |
| - // Else, get from associated artifact |
| - Artifact assocArtifact = BranchManager.getAssociatedArtifact(branch); |
| - if (assocArtifact.isOfType(AtsArtifactTypes.TeamWorkflow)) { |
| - contextIds.addAll(internalGetFromWorkflow((TeamWorkFlowArtifact) assocArtifact)); |
| - } else { |
| - contextIds.add(AtsAccessContextTokens.DENY_CONTEXT); |
| - } |
| - } |
| - } |
| - } catch (OseeCoreException ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, "Exception obtaining Branch Access Context Id; Deny returned", ex); |
| - contextIds.add(AtsAccessContextTokens.DENY_CONTEXT); |
| - } |
| - return contextIds; |
| - } |
| - |
| - /** |
| - * Provided for testing purposes only. |
| - */ |
| - public Collection<AccessContextToken> internalGetFromWorkflow(IAtsTeamWorkflow teamWf) { |
| - Set<AccessContextToken> contextIds = new HashSet<>(); |
| - try { |
| - contextIds.addAll(getFromArtifact(AtsApiService.get().getQueryServiceIde().getArtifact(teamWf))); |
| - if (contextIds.isEmpty()) { |
| - for (IAtsActionableItem aia : AtsApiService.get().getActionableItemService().getActionableItems( |
| - teamWf)) { |
| - Artifact artifact = AtsApiService.get().getQueryServiceIde().getArtifact(aia); |
| - if (artifact != null) { |
| - contextIds.addAll(getFromArtifact(artifact)); |
| - } |
| - if (!contextIds.isEmpty()) { |
| - return contextIds; |
| - } |
| - } |
| - if (contextIds.isEmpty()) { |
| - Artifact artifact = |
| - AtsApiService.get().getQueryServiceIde().getArtifact(teamWf.getTeamDefinition()); |
| - if (artifact != null) { |
| - contextIds.addAll(getFromArtifact(artifact)); |
| - } |
| - } |
| - } |
| - } catch (Exception ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, "Exception obtaining Branch Access Context Id; Deny returned", ex); |
| - return Arrays.asList(AtsAccessContextTokens.DENY_CONTEXT); |
| - } |
| - return contextIds; |
| - } |
| - |
| - /** |
| - * Recursively check artifact and all default hierarchy parents |
| - */ |
| - private Collection<AccessContextToken> getFromArtifact(Artifact artifact) { |
| - Set<AccessContextToken> contextIds = new HashSet<>(); |
| - try { |
| - for (String id : artifact.getAttributesToStringList(CoreAttributeTypes.AccessContextId)) { |
| - // Do not use getOrCreateId here cause name represents where context ids came from |
| - // Cache above will take care of this not being created on each access request call. |
| - contextIds.add(AccessContextToken.valueOf(convertAccessAttributeToContextId(id, artifact), |
| - "From [" + artifact.getArtifactTypeName() + "]" + artifact.toStringWithId() + " as [" + id + "]")); |
| - } |
| - if (contextIds.isEmpty() && artifact.getParent() != null) { |
| - contextIds.addAll(getFromArtifact(artifact.getParent())); |
| - } |
| - } catch (OseeCoreException ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - } |
| - return contextIds; |
| - } |
| - |
| - /** |
| - * ATS "Access Context Id" attribute value can be stored as "id" or "id,name" for easy reading. This method strips |
| - * ,name out so only id is returned. |
| - */ |
| - private Long convertAccessAttributeToContextId(String value, Artifact art) { |
| - String idStr = value.split(",")[0]; |
| - if (Strings.isNumeric(idStr)) { |
| - return Long.valueOf(idStr); |
| - } else if (GUID.isValid(idStr)) { |
| - return roleContextProvider.getContextGuidToIdMap().get(idStr); |
| - } |
| - throw new OseeArgumentException("Invalid access value [%s] on artifact %s", value, art.toStringWithId()); |
| - } |
| - |
| - /** |
| - * Need to process artifact events for Common branch Team Workflows, Actionable Items and Team Definitions in case |
| - * Access Context Id attribute is edited. |
| - */ |
| - @Override |
| - public List<? extends IEventFilter> getEventFilters() { |
| - return getAtsObjectEventFilters(); |
| - } |
| - |
| - private static final List<IEventFilter> atsObjectEventFilter = new ArrayList<>(2); |
| - private static final ArtifactTypeEventFilter atsArtifactTypesFilter = new ArtifactTypeEventFilter( |
| - AtsArtifactTypes.TeamWorkflow, AtsArtifactTypes.TeamDefinition, AtsArtifactTypes.ActionableItem); |
| - |
| - private synchronized static List<IEventFilter> getAtsObjectEventFilters() { |
| - try { |
| - if (atsObjectEventFilter.isEmpty()) { |
| - atsObjectEventFilter.add(AtsUtilClient.getAtsBranchFilter()); |
| - atsObjectEventFilter.add(atsArtifactTypesFilter); |
| - } |
| - } catch (Exception ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - } |
| - return atsObjectEventFilter; |
| - } |
| - |
| - /** |
| - * Since multiple events of same artifact type can come through, only clear cache every one second |
| - */ |
| - public synchronized void clearCache() { |
| - long now = new Date().getTime(); |
| - if (now - cacheUpdated > 1000) { |
| - branchIdToContextIdCache.clear(); |
| - } |
| - } |
| - |
| - @Override |
| - public void handleArtifactEvent(ArtifactEvent artifactEvent, Sender sender) { |
| - for (EventBasicGuidArtifact guidArt : artifactEvent.getArtifacts()) { |
| - if (guidArt.getArtifactType().matches(AtsArtifactTypes.ActionableItem, AtsArtifactTypes.TeamDefinition)) { |
| - clearCache(); |
| - return; |
| - } |
| - try { |
| - if (guidArt.getArtifactType().inheritsFrom(AtsArtifactTypes.TeamWorkflow)) { |
| - TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) ArtifactCache.getActive(guidArt); |
| - if (teamArt != null && teamArt.getWorkingBranch().isValid()) { |
| - branchIdToContextIdCache.remove(teamArt.getWorkingBranch()); |
| - } |
| - } |
| - } catch (OseeCoreException ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - } |
| - } |
| - } |
| - |
| - @Override |
| - public void handleEvent(Event event) { |
| - try { |
| - clearCache(); |
| - } catch (Exception ex) { |
| - OseeLog.log(AccessControlManager.class, Level.SEVERE, ex); |
| - } |
| - } |
| - |
| - public static void clearCaches() { |
| - branchIdToContextIdCache.clear(); |
| - } |
| - |
| -} |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsAccessOseeDslProvider.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsAccessOseeDslProvider.java |
| deleted file mode 100644 |
| index e34d5b0f1c..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsAccessOseeDslProvider.java |
| +++ /dev/null |
| @@ -1,60 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2004, 2007 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.ats.ide.access.internal; |
| - |
| -import org.eclipse.osee.ats.api.data.AtsArtifactToken; |
| -import org.eclipse.osee.framework.core.dsl.ui.integration.operations.AbstractOseeDslProvider; |
| -import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| -import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| -import org.eclipse.osee.framework.jdk.core.util.Strings; |
| -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| -import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; |
| - |
| -/** |
| - * @author Roberto E. Escobar |
| - */ |
| -public class AtsAccessOseeDslProvider extends AbstractOseeDslProvider { |
| - |
| - public AtsAccessOseeDslProvider(String locationUri) { |
| - super(locationUri); |
| - } |
| - |
| - private Artifact getStorageArtifact() { |
| - try { |
| - return ArtifactQuery.getArtifactFromToken(AtsArtifactToken.AtsCmAccessControl); |
| - } catch (OseeCoreException ex) { |
| - return null; |
| - } |
| - } |
| - |
| - @Override |
| - protected String getModelFromStorage() { |
| - Artifact storageArtifact = getStorageArtifact(); |
| - if (storageArtifact != null) { |
| - return storageArtifact.getSoleAttributeValue(CoreAttributeTypes.GeneralStringData); |
| - } else { |
| - return Strings.EMPTY_STRING; |
| - } |
| - } |
| - |
| - @Override |
| - protected void saveModelToStorage(String model) { |
| - Artifact artifact = getStorageArtifact(); |
| - if (artifact != null) { |
| - artifact.setSoleAttributeFromString(CoreAttributeTypes.GeneralStringData, model); |
| - artifact.persist(getClass().getSimpleName()); |
| - } |
| - } |
| - |
| -} |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControl.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControl.java |
| deleted file mode 100644 |
| index b03d7c097e..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControl.java |
| +++ /dev/null |
| @@ -1,70 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2004, 2007 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.ats.ide.access.internal; |
| - |
| -import java.util.Collection; |
| -import java.util.Collections; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| -import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| -import org.eclipse.osee.framework.core.data.ArtifactToken; |
| -import org.eclipse.osee.framework.core.data.BranchId; |
| -import org.eclipse.osee.framework.core.data.AccessContextToken; |
| -import org.eclipse.osee.framework.core.services.CmAccessControl; |
| -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| - |
| -/** |
| - * ATS currently only provides access control for artifacts on a Team Workflow's working branch. |
| - * |
| - * @author Roberto E. Escobar |
| - * @author Donald G. Dunne |
| - */ |
| -public class AtsCmAccessControl implements CmAccessControl { |
| - |
| - private final AtsBranchAccessManager atsBranchAccessManager; |
| - |
| - public AtsCmAccessControl(AtsBranchAccessManager atsBranchObjectManager) { |
| - this.atsBranchAccessManager = atsBranchObjectManager; |
| - } |
| - |
| - @Override |
| - public boolean isApplicable(ArtifactToken user, Object object) { |
| - boolean result = false; |
| - if (object != null) { |
| - if (object instanceof Artifact && !AtsApiService.get().getQueryServiceIde().getArtifact( |
| - object).isOnBranch(AtsApiService.get().getAtsBranch())) { |
| - result = atsBranchAccessManager.isApplicable( |
| - AtsApiService.get().getQueryServiceIde().getArtifact(object).getBranch()); |
| - } |
| - if (object instanceof BranchId) { |
| - result = atsBranchAccessManager.isApplicable((BranchId) object); |
| - } |
| - } |
| - return result; |
| - } |
| - |
| - @Override |
| - public Collection<? extends AccessContextToken> getContextId(ArtifactToken user, Object object) { |
| - if (object != null) { |
| - if (object instanceof Artifact && !AtsApiService.get().getQueryServiceIde().getArtifact( |
| - object).isOnBranch(AtsApiService.get().getAtsBranch())) { |
| - return atsBranchAccessManager.getContextId( |
| - AtsApiService.get().getQueryServiceIde().getArtifact(object).getBranch()); |
| - } |
| - if (object instanceof BranchId) { |
| - return atsBranchAccessManager.getContextId((BranchId) object); |
| - } |
| - } |
| - return Collections.emptyList(); |
| - } |
| -} |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControlProxy.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControlProxy.java |
| deleted file mode 100644 |
| index e8e1150a1b..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsCmAccessControlProxy.java |
| +++ /dev/null |
| @@ -1,117 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2004, 2007 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.ats.ide.access.internal; |
| - |
| -import java.util.Collection; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| -import org.eclipse.osee.framework.core.data.ArtifactToken; |
| -import org.eclipse.osee.framework.core.data.AccessContextToken; |
| -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.access.AccessModel; |
| -import org.eclipse.osee.framework.core.model.access.HasAccessModel; |
| -import org.eclipse.osee.framework.core.services.CmAccessControl; |
| -import org.eclipse.osee.framework.skynet.core.event.OseeEventService; |
| -import org.eclipse.osee.framework.skynet.core.event.listener.EventQosType; |
| -import org.eclipse.osee.framework.skynet.core.event.listener.IEventListener; |
| -import org.osgi.framework.BundleContext; |
| -import org.osgi.framework.ServiceReference; |
| - |
| -/** |
| - * @author Roberto E. Escobar |
| - */ |
| -public class AtsCmAccessControlProxy implements CmAccessControl, HasAccessModel { |
| - |
| - private IEventListener listener; |
| - private AtsBranchAccessManager atsBranchObjectManager; |
| - private ServiceReference<AccessModelInterpreter> reference; |
| - private CmAccessControl cmService; |
| - private AccessModel accessModel; |
| - private OseeEventService eventService; |
| - private BundleContext bundleContext; |
| - |
| - private volatile boolean isInitialized = false; |
| - |
| - public void setAccessModelInterpreter(ServiceReference<AccessModelInterpreter> reference) { |
| - this.reference = reference; |
| - } |
| - |
| - public void setEventService(OseeEventService eventService) { |
| - this.eventService = eventService; |
| - } |
| - |
| - public void start(BundleContext bundleContext) { |
| - this.bundleContext = bundleContext; |
| - } |
| - |
| - public void stop() { |
| - if (listener != null) { |
| - eventService.removeListener(EventQosType.NORMAL, listener); |
| - listener = null; |
| - } |
| - |
| - if (atsBranchObjectManager != null) { |
| - atsBranchObjectManager = null; |
| - } |
| - cmService = null; |
| - accessModel = null; |
| - bundleContext = null; |
| - isInitialized = false; |
| - } |
| - |
| - private boolean isReady() { |
| - return reference != null && eventService != null && bundleContext != null; |
| - } |
| - |
| - private synchronized void ensureInitialized() { |
| - if (isReady() && !isInitialized) { |
| - AccessModelInterpreter interpreter = bundleContext.getService(reference); |
| - OseeDslProvider dslProvider = new AtsAccessOseeDslProvider("ats:/xtext/cm.access.osee"); |
| - accessModel = new OseeDslAccessModel(interpreter, dslProvider); |
| - RoleContextProvider roleAccessProvider = new OseeDslRoleContextProvider(dslProvider); |
| - |
| - atsBranchObjectManager = new AtsBranchAccessManager(roleAccessProvider); |
| - cmService = new AtsCmAccessControl(atsBranchObjectManager); |
| - |
| - listener = new AtsDslProviderUpdateListener(dslProvider); |
| - eventService.addListener(EventQosType.NORMAL, listener); |
| - isInitialized = true; |
| - } |
| - } |
| - |
| - private CmAccessControl getProxiedService() { |
| - ensureInitialized(); |
| - return cmService; |
| - } |
| - |
| - @Override |
| - public boolean isApplicable(ArtifactToken user, Object object) { |
| - return getProxiedService().isApplicable(user, object); |
| - } |
| - |
| - @Override |
| - public Collection<? extends AccessContextToken> getContextId(ArtifactToken user, Object object) { |
| - return getProxiedService().getContextId(user, object); |
| - } |
| - |
| - @Override |
| - public AccessModel getAccessModel() { |
| - ensureInitialized(); |
| - return accessModel; |
| - } |
| - |
| -} |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsDslProviderUpdateListener.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsDslProviderUpdateListener.java |
| deleted file mode 100644 |
| index d20c7d8762..0000000000 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/access/internal/AtsDslProviderUpdateListener.java |
| +++ /dev/null |
| @@ -1,64 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2010 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.ats.ide.access.internal; |
| - |
| -import java.util.Arrays; |
| -import java.util.List; |
| -import java.util.logging.Level; |
| -import org.eclipse.osee.ats.ide.internal.Activator; |
| -import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| -import org.eclipse.osee.framework.core.dsl.integration.OseeDslProvider; |
| -import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; |
| -import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| -import org.eclipse.osee.framework.logging.OseeLog; |
| -import org.eclipse.osee.framework.skynet.core.event.filter.ArtifactTypeEventFilter; |
| -import org.eclipse.osee.framework.skynet.core.event.filter.BranchIdEventFilter; |
| -import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter; |
| -import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener; |
| -import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent; |
| -import org.eclipse.osee.framework.skynet.core.event.model.Sender; |
| - |
| -/** |
| - * @author Roberto E. Escobar |
| - */ |
| -public final class AtsDslProviderUpdateListener implements IArtifactEventListener { |
| - |
| - //@formatter:off |
| - private final List<? extends IEventFilter> eventFilters = |
| - Arrays.asList( |
| - new ArtifactTypeEventFilter(CoreArtifactTypes.AccessControlModel), |
| - new BranchIdEventFilter(AtsApiService.get().getAtsBranch()) |
| - ); |
| - //@formatter:on |
| - |
| - private final OseeDslProvider dslProvider; |
| - |
| - public AtsDslProviderUpdateListener(OseeDslProvider dslProvider) { |
| - this.dslProvider = dslProvider; |
| - } |
| - |
| - @Override |
| - public List<? extends IEventFilter> getEventFilters() { |
| - return eventFilters; |
| - } |
| - |
| - @Override |
| - public void handleArtifactEvent(ArtifactEvent artifactEvent, Sender sender) { |
| - try { |
| - dslProvider.loadDsl(); |
| - } catch (OseeCoreException ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - } |
| - } |
| -} |
| \ No newline at end of file |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/actions/AccessControlAction.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/actions/AccessControlAction.java |
| index 56adb1f038..b5fe83828f 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/actions/AccessControlAction.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/actions/AccessControlAction.java |
| @@ -37,7 +37,7 @@ public class AccessControlAction extends Action { |
| |
| public PolicyDialog getDialog() { |
| if (dialog == null) { |
| - dialog = new PolicyDialog(Displays.getActiveShell(), sma); |
| + dialog = PolicyDialog.createPolicyDialog(Displays.getActiveShell(), sma); |
| } |
| return dialog; |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/branch/BranchRegressionTest.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/branch/BranchRegressionTest.java |
| index 11baba2208..12da179d53 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/branch/BranchRegressionTest.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/branch/BranchRegressionTest.java |
| @@ -41,7 +41,6 @@ import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| import org.eclipse.osee.ats.ide.util.AtsUtilClient; |
| import org.eclipse.osee.ats.ide.util.widgets.XWorkingBranchEnablement; |
| import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.AttributeId; |
| @@ -294,7 +293,8 @@ public abstract class BranchRegressionTest { |
| ArtifactQuery.getArtifactFromAttribute(CoreAttributeTypes.Name, SOFTWARE_REQUIREMENTS, getProgramBranch()); |
| Assert.assertNotNull("Can't get softReqArt", softReqArt); |
| |
| - AccessControlManager.setPermission(UserManager.getUser(), getProgramBranch(), PermissionEnum.FULLACCESS); |
| + AtsApiService.get().getAccessControlService().setPermission(UserManager.getUser(), getProgramBranch(), |
| + PermissionEnum.FULLACCESS); |
| |
| createSoftwareArtifact(CoreArtifactTypes.SoftwareRequirementMsWord, softReqArt, PRE_BRANCH_ARTIFACT_NAME, |
| getPreBranchCscis(), getProgramBranch()); |
| @@ -773,12 +773,18 @@ public abstract class BranchRegressionTest { |
| } |
| |
| protected Artifact createSoftwareArtifact(ArtifactTypeToken artifactType, Artifact parent, String title, String[] partitions, BranchToken branch) { |
| - SkynetTransaction tx = TransactionManager.createTransaction(branch, "Create " + title); |
| - Artifact newArt = ArtifactTypeManager.addArtifact(artifactType, branch, title); |
| - Artifact parentArt = setParent(parent, partitions, newArt, tx); |
| - tx.addArtifact(newArt); |
| - tx.addArtifact(parent); |
| - tx.execute(); |
| + Artifact parentArt = null; |
| + try { |
| + SkynetTransaction.setOverrideAccess(true); |
| + SkynetTransaction tx = TransactionManager.createTransaction(branch, "Create " + title); |
| + Artifact newArt = ArtifactTypeManager.addArtifact(artifactType, branch, title); |
| + parentArt = setParent(parent, partitions, newArt, tx); |
| + tx.addArtifact(newArt); |
| + tx.addArtifact(parent); |
| + tx.execute(); |
| + } finally { |
| + SkynetTransaction.setOverrideAccess(false); |
| + } |
| return parentArt; |
| } |
| |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/WorkflowEditor.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/WorkflowEditor.java |
| index cfdac92e29..69c0e8ceb7 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/WorkflowEditor.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/WorkflowEditor.java |
| @@ -48,6 +48,7 @@ import org.eclipse.osee.ats.ide.editor.tab.workflow.WfeWorkFlowTab; |
| import org.eclipse.osee.ats.ide.editor.tab.workflow.util.WfeOutlinePage; |
| import org.eclipse.osee.ats.ide.internal.Activator; |
| import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| +import org.eclipse.osee.ats.ide.internal.OseeApiService; |
| import org.eclipse.osee.ats.ide.navigate.RecentlyVisitedNavigateItems; |
| import org.eclipse.osee.ats.ide.workflow.AbstractWorkflowArtifact; |
| import org.eclipse.osee.ats.ide.workflow.goal.GoalArtifact; |
| @@ -57,7 +58,6 @@ import org.eclipse.osee.ats.ide.workflow.task.TaskArtifact; |
| import org.eclipse.osee.ats.ide.workflow.task.TaskComposite; |
| import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| import org.eclipse.osee.ats.ide.world.IAtsMetricsProvider; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| import org.eclipse.osee.framework.core.enums.PresentationType; |
| @@ -585,7 +585,8 @@ public class WorkflowEditor extends AbstractArtifactEditor implements IDirtyRepo |
| } |
| |
| public boolean isAccessControlWrite() { |
| - return AccessControlManager.hasPermission(workItem, PermissionEnum.WRITE); |
| + return OseeApiService.get().getAccessControlService().hasArtifactPermission(workItem, PermissionEnum.WRITE, |
| + null).isSuccess(); |
| } |
| |
| @Override |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeDragAndDrop.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeDragAndDrop.java |
| index 90ffa9cd5c..484d9044f6 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeDragAndDrop.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeDragAndDrop.java |
| @@ -16,21 +16,24 @@ package org.eclipse.osee.ats.ide.editor.tab.workflow.header; |
| import java.io.File; |
| import java.util.LinkedList; |
| import java.util.List; |
| -import java.util.logging.Level; |
| +import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| import org.eclipse.osee.ats.ide.workflow.AbstractWorkflowArtifact; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.enums.CoreRelationTypes; |
| +import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| +import org.eclipse.osee.framework.jdk.core.result.XResultData; |
| import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| import org.eclipse.osee.framework.logging.OseeLevel; |
| import org.eclipse.osee.framework.logging.OseeLog; |
| import org.eclipse.osee.framework.plugin.core.util.Jobs; |
| -import org.eclipse.osee.framework.skynet.core.AccessPolicy; |
| +import org.eclipse.osee.framework.skynet.core.access.AccessControlArtifactUtil; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| import org.eclipse.osee.framework.skynet.core.artifact.ArtifactData; |
| +import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; |
| import org.eclipse.osee.framework.ui.skynet.artifact.ArtifactTransfer; |
| import org.eclipse.osee.framework.ui.skynet.internal.Activator; |
| -import org.eclipse.osee.framework.ui.skynet.internal.ServiceUtil; |
| import org.eclipse.osee.framework.ui.skynet.util.SkynetDragAndDrop; |
| +import org.eclipse.osee.framework.ui.skynet.widgets.dialog.XResultDataDialog; |
| import org.eclipse.swt.dnd.DND; |
| import org.eclipse.swt.dnd.DropTargetEvent; |
| import org.eclipse.swt.dnd.FileTransfer; |
| @@ -72,18 +75,38 @@ public class WfeDragAndDrop extends SkynetDragAndDrop { |
| ArtifactData toBeDropped = ArtifactTransfer.getInstance().nativeToJava(event.currentDataType); |
| if (dropTarget != null) { |
| try { |
| - AccessPolicy policy = ServiceUtil.getAccessPolicy(); |
| Artifact[] artifactsBeingDropped = toBeDropped.getArtifacts(); |
| List<Artifact> artsOnSameBranchAsDestination = new LinkedList<>(); |
| BranchId destinationBranch = dropTarget.getBranch(); |
| + boolean onSameBranch = true; |
| for (Artifact art : artifactsBeingDropped) { |
| if (art.isOnBranch(destinationBranch)) { |
| artsOnSameBranchAsDestination.add(art); |
| + } else { |
| + onSameBranch = false; |
| + break; |
| } |
| } |
| - valid = policy.canRelationBeModified(dropTarget, artsOnSameBranchAsDestination, |
| - CoreRelationTypes.SupportingInfo_SupportingInfo, Level.FINE).matched(); |
| + if (!onSameBranch) { |
| + AWorkbench.popup("Related Artifact(s) must be on the same branch.\n\nAborting Drop."); |
| + return false; |
| + } |
| + if (artsOnSameBranchAsDestination.isEmpty()) { |
| + AWorkbench.popup("No Artifact(s) to relate.\n\nAborting Drop."); |
| + return false; |
| + } |
| |
| + XResultData rd = AtsApiService.get().getAccessControlService().hasRelationTypePermission(dropTarget, |
| + CoreRelationTypes.SupportingInfo_SupportingInfo, artsOnSameBranchAsDestination, PermissionEnum.WRITE, |
| + AccessControlArtifactUtil.getXResultAccessHeader("Relating Artifacts to Workflow", |
| + artsOnSameBranchAsDestination)); |
| + if (rd.isErrors()) { |
| + XResultDataDialog.open(rd, "Relate Artifact(s) to Workflow", |
| + "Invalid Access for Relation.\n\nAborting Drop."); |
| + valid = false; |
| + } else { |
| + valid = true; |
| + } |
| } catch (OseeCoreException ex) { |
| OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeRelationsHyperlinkComposite.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeRelationsHyperlinkComposite.java |
| index 56823c98ce..9532cd97ae 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeRelationsHyperlinkComposite.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/header/WfeRelationsHyperlinkComposite.java |
| @@ -58,11 +58,9 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| import org.eclipse.osee.framework.jdk.core.util.Collections; |
| import org.eclipse.osee.framework.logging.OseeLevel; |
| import org.eclipse.osee.framework.logging.OseeLog; |
| -import org.eclipse.osee.framework.skynet.core.AccessPolicy; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| import org.eclipse.osee.framework.skynet.core.relation.RelationLink; |
| import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; |
| -import org.eclipse.osee.framework.ui.skynet.internal.ServiceUtil; |
| import org.eclipse.osee.framework.ui.skynet.render.RendererManager; |
| import org.eclipse.osee.framework.ui.swt.ALayout; |
| import org.eclipse.osee.framework.ui.swt.Displays; |
| @@ -322,7 +320,6 @@ public class WfeRelationsHyperlinkComposite extends Composite { |
| delArt = thisArt; |
| } |
| |
| - AccessPolicy policy = ServiceUtil.getAccessPolicy(); |
| Collection<ArtifactToken> related = Arrays.asList(thatArt); |
| if (thatArt instanceof IAtsObject) { |
| if (MessageDialog.openConfirm(Displays.getActiveShell(), "Delete Related", |
| @@ -333,7 +330,8 @@ public class WfeRelationsHyperlinkComposite extends Composite { |
| } |
| return; |
| } |
| - XResultData results = policy.isDeleteable(related, new XResultData()); |
| + XResultData results = |
| + AtsApiService.get().getAccessControlService().isDeleteable(related, new XResultData()); |
| if (results.isErrors()) { |
| AWorkbench.popup(results.toString()); |
| return; |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/section/WfeDetailsSection.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/section/WfeDetailsSection.java |
| index 38044223d9..f78c505c7d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/section/WfeDetailsSection.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/editor/tab/workflow/section/WfeDetailsSection.java |
| @@ -17,20 +17,17 @@ import java.util.Collection; |
| import java.util.Map; |
| import java.util.logging.Level; |
| import org.eclipse.osee.ats.api.IAtsWorkItem; |
| +import org.eclipse.osee.ats.api.access.IAtsAccessService; |
| import org.eclipse.osee.ats.api.data.AtsArtifactTypes; |
| import org.eclipse.osee.ats.api.workflow.IAtsAction; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| import org.eclipse.osee.ats.ide.editor.WorkflowEditor; |
| import org.eclipse.osee.ats.ide.internal.Activator; |
| import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| -import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.data.AccessContextToken; |
| -import org.eclipse.osee.framework.core.services.CmAccessControl; |
| +import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.jdk.core.util.Lib; |
| import org.eclipse.osee.framework.logging.OseeLog; |
| -import org.eclipse.osee.framework.skynet.core.User; |
| -import org.eclipse.osee.framework.skynet.core.UserManager; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| import org.eclipse.osee.framework.skynet.core.utility.Artifacts; |
| import org.eclipse.osee.framework.ui.swt.ALayout; |
| @@ -71,6 +68,7 @@ public class WfeDetailsSection extends SectionPart { |
| Section section = getSection(); |
| section.setText("Details"); |
| section.setLayout(new GridLayout()); |
| + section.setExpanded(false); |
| section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); |
| |
| // Only load when users selects section |
| @@ -151,36 +149,30 @@ public class WfeDetailsSection extends SectionPart { |
| |
| private String getAccessContextId(TeamWorkFlowArtifact workflow) { |
| String message; |
| - CmAccessControl accessControl = workflow.getAccessControl(); |
| - if (accessControl == null) { |
| - message = "AtsCmAccessControlService not found."; |
| - } else { |
| - BranchId workingBranch = null; |
| + IAtsAccessService accessService = AtsApiService.get().getAtsAccessService(); |
| + BranchId workingBranch = null; |
| + try { |
| + workingBranch = workflow.getWorkingBranch(); |
| + } catch (Exception ex) { |
| + OseeLog.log(Activator.class, Level.SEVERE, ex); |
| + } |
| + Collection<? extends AccessContextToken> ids = null; |
| + if (workingBranch == null) { |
| try { |
| - workingBranch = workflow.getWorkingBranch(); |
| + // get what would be if branch created |
| + ids = accessService.getFromWorkflow(workflow); |
| + message = ids.toString(); |
| } catch (Exception ex) { |
| OseeLog.log(Activator.class, Level.SEVERE, ex); |
| + message = String.format("Error getting context id [%s]", ex.getMessage()); |
| } |
| - Collection<? extends AccessContextToken> ids = null; |
| - if (workingBranch == null) { |
| - try { |
| - // get what would be if branch created |
| - AtsBranchAccessManager accessMgr = new AtsBranchAccessManager(); |
| - ids = accessMgr.internalGetFromWorkflow(workflow); |
| - message = ids.toString(); |
| - } catch (Exception ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - message = String.format("Error getting context id [%s]", ex.getMessage()); |
| - } |
| - } else { |
| - try { |
| - User user = UserManager.getUserByArtId(AtsApiService.get().getUserService().getCurrentUser()); |
| - ids = accessControl.getContextId(user, workingBranch); |
| - message = ids.toString(); |
| - } catch (Exception ex) { |
| - OseeLog.log(Activator.class, Level.SEVERE, ex); |
| - message = String.format("Error getting context id [%s]", ex.getMessage()); |
| - } |
| + } else { |
| + try { |
| + ids = accessService.getContextIds(workingBranch); |
| + message = ids.toString(); |
| + } catch (Exception ex) { |
| + OseeLog.log(Activator.class, Level.SEVERE, ex); |
| + message = String.format("Error getting context id [%s]", ex.getMessage()); |
| } |
| } |
| return message; |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/internal/Activator.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/internal/Activator.java |
| index 2965390194..7738321fa7 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/internal/Activator.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/internal/Activator.java |
| @@ -15,11 +15,10 @@ package org.eclipse.osee.ats.ide.internal; |
| |
| import org.eclipse.osee.ats.api.util.AtsTopicEvent; |
| import org.eclipse.osee.ats.api.util.AtsUtil; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| +import org.eclipse.osee.ats.core.access.AtsBranchAccessManager; |
| import org.eclipse.osee.ats.ide.workflow.AtsWorkItemRemoteTopicEventHandler; |
| +import org.eclipse.osee.framework.core.access.event.AccessTopicEvent; |
| import org.eclipse.osee.framework.plugin.core.OseeActivator; |
| -import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent; |
| -import org.eclipse.osee.framework.ui.skynet.internal.ServiceUtil; |
| import org.osgi.framework.BundleContext; |
| import org.osgi.service.event.EventConstants; |
| import org.osgi.service.event.EventHandler; |
| @@ -38,19 +37,6 @@ public class Activator extends OseeActivator { |
| context.registerService(EventHandler.class.getName(), new AtsBranchAccessManager(), |
| AtsUtil.hashTable(EventConstants.EVENT_TOPIC, AccessTopicEvent.ACCESS_BRANCH_MODIFIED.getTopic())); |
| |
| - // Start loading access control |
| - Thread loadAccessControl = new Thread(new Runnable() { |
| - |
| - @Override |
| - public void run() { |
| - try { |
| - ServiceUtil.getAccessPolicy().ensurePopulated(); |
| - } catch (Exception ex) { |
| - // do nothing |
| - } |
| - } |
| - }, "Load Access Control"); |
| - loadAccessControl.start(); |
| } |
| |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/NavigateViewItems.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/NavigateViewItems.java |
| index 7125e5b11d..8854df971a 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/NavigateViewItems.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/NavigateViewItems.java |
| @@ -155,6 +155,7 @@ public final class NavigateViewItems implements XNavigateViewItems, IXNavigateCo |
| new ClearAtsConfigCache(utilItems); |
| new XNavigateItemBlam(utilItems, new MoveTeamWorkflowsBlam(), AtsImage.TEAM_WORKFLOW); |
| new AtsConfigResultsEditorNavigateItem(utilItems); |
| + new ToggleAccessControlDebug(utilItems); |
| } catch (Exception ex) { |
| OseeLog.log(Activator.class, Level.SEVERE, ex); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/ToggleAtsAdmin.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/ToggleAtsAdmin.java |
| index 584444fd55..f9ad11882a 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/ToggleAtsAdmin.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/navigate/ToggleAtsAdmin.java |
| @@ -61,7 +61,7 @@ public class ToggleAtsAdmin extends XNavigateItemAction { |
| if (!isAdmin) { |
| IUserGroup atsAdminGroup = UserGroupService.get(AtsUserGroups.AtsAdmin); |
| if (!atsAdminGroup.isCurrentUserMember()) { |
| - atsAdminGroup.addMember(UserManager.getUser()); |
| + atsAdminGroup.addMember(UserManager.getUser(), true); |
| Conditions.assertTrue(atsAdminGroup.getArtifact() instanceof Artifact, "Must be artifact."); |
| ((Artifact) atsAdminGroup.getArtifact()).persist("Toggle Admin"); |
| } |
| @@ -69,21 +69,21 @@ public class ToggleAtsAdmin extends XNavigateItemAction { |
| IUserGroup oseeAdminGroup = |
| org.eclipse.osee.framework.skynet.core.access.UserGroupService.getOseeAdmin(); |
| if (!oseeAdminGroup.isCurrentUserMember()) { |
| - oseeAdminGroup.addMember(UserManager.getUser()); |
| + oseeAdminGroup.addMember(UserManager.getUser(), true); |
| Conditions.assertTrue(oseeAdminGroup.getArtifact() instanceof Artifact, "Must be artifact."); |
| ((Artifact) oseeAdminGroup.getArtifact()).persist("Toggle Admin"); |
| } |
| } else { |
| IUserGroup atsAdminGroup = UserGroupService.get(AtsUserGroups.AtsAdmin); |
| if (atsAdminGroup.isCurrentUserMember()) { |
| - atsAdminGroup.removeMember(UserManager.getUser()); |
| + atsAdminGroup.removeMember(UserManager.getUser(), true); |
| Conditions.assertTrue(atsAdminGroup.getArtifact() instanceof Artifact, "Must be artifact."); |
| ((Artifact) atsAdminGroup.getArtifact()).persist("Toggle Admin"); |
| } |
| |
| IUserGroup oseeAdminGroup = UserGroupService.get(CoreUserGroups.OseeAdmin); |
| if (oseeAdminGroup.isCurrentUserMember()) { |
| - oseeAdminGroup.removeMember(UserManager.getUser()); |
| + oseeAdminGroup.removeMember(UserManager.getUser(), true); |
| Conditions.assertTrue(oseeAdminGroup.getArtifact() instanceof Artifact, "Must be artifact."); |
| ((Artifact) oseeAdminGroup.getArtifact()).persist("Toggle Admin"); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/operation/ExportChangeReportOperation.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/operation/ExportChangeReportOperation.java |
| index 434c71b4a7..b59fd42e5f 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/operation/ExportChangeReportOperation.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/operation/ExportChangeReportOperation.java |
| @@ -111,7 +111,7 @@ public final class ExportChangeReportOperation extends AbstractOperation { |
| |
| Collection<ArtifactDelta> artifactDeltas = ChangeManager.getCompareArtifacts(changes); |
| |
| - // only allow SoftwareRequirements for HLR |
| + // only allow SoftwareRequirementsFolder for HLR |
| Iterator<ArtifactDelta> it = artifactDeltas.iterator(); |
| while (it.hasNext()) { |
| ArtifactDelta next = it.next(); |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/query/AtsQueryServiceIde.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/query/AtsQueryServiceIde.java |
| index 0215b76661..6517058743 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/query/AtsQueryServiceIde.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/query/AtsQueryServiceIde.java |
| @@ -185,6 +185,9 @@ public class AtsQueryServiceIde { |
| Artifact result = null; |
| if (obj instanceof Artifact) { |
| result = (Artifact) obj; |
| + if (obj instanceof IAtsObject) { |
| + result.setArtifactType(((IAtsObject) obj).getArtifactType()); |
| + } |
| } else if (obj instanceof IAtsObject) { |
| result = getArtifact(((IAtsObject) obj).getStoreObject(), atsApi.getAtsBranch()); |
| } else if (obj instanceof ArtifactId) { |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/Import/ExcelAtsActionArtifactExtractor.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/Import/ExcelAtsActionArtifactExtractor.java |
| index 509e35381a..dbea453a6e 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/Import/ExcelAtsActionArtifactExtractor.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/Import/ExcelAtsActionArtifactExtractor.java |
| @@ -485,7 +485,7 @@ public class ExcelAtsActionArtifactExtractor { |
| Assignees("ActionableItems"), |
| Originator("Originator"), |
| Priority("Priority"), |
| - ChangeType("ChangeType"), |
| + ChangeType("AllowDeny"), |
| Version("Version"), |
| EstimatedHours("EstimatedHours"), |
| Goal("Goal"), |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/OpenInAtsLoopbackCmd.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/OpenInAtsLoopbackCmd.java |
| index 438657126e..119a9c9173 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/OpenInAtsLoopbackCmd.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/OpenInAtsLoopbackCmd.java |
| @@ -18,7 +18,7 @@ import java.util.Map; |
| import java.util.logging.Level; |
| import org.eclipse.osee.ats.ide.AtsOpenOption; |
| import org.eclipse.osee.ats.ide.internal.Activator; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| +import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| import org.eclipse.osee.framework.core.client.server.HttpResponse; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| import org.eclipse.osee.framework.jdk.core.type.MutableBoolean; |
| @@ -44,7 +44,8 @@ public class OpenInAtsLoopbackCmd extends BaseArtifactLoopbackCmd { |
| try { |
| boolean hasPermissionToRead = false; |
| try { |
| - hasPermissionToRead = AccessControlManager.hasPermission(artifact, PermissionEnum.READ); |
| + hasPermissionToRead = AtsApiService.get().getAccessControlService().hasArtifactPermission(artifact, |
| + PermissionEnum.READ, null).isSuccess(); |
| } catch (Exception ex) { |
| OseeLog.log(Activator.class, Level.SEVERE, ex); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/internal/AtsApiIdeImpl.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/internal/AtsApiIdeImpl.java |
| index eba17935f3..e8a6edab2d 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/internal/AtsApiIdeImpl.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/internal/AtsApiIdeImpl.java |
| @@ -36,12 +36,12 @@ import org.eclipse.osee.ats.api.workflow.IAtsWorkItemService; |
| import org.eclipse.osee.ats.core.agile.AgileService; |
| import org.eclipse.osee.ats.core.ai.ActionableItemServiceImpl; |
| import org.eclipse.osee.ats.core.util.AtsApiImpl; |
| -import org.eclipse.osee.ats.ide.access.AtsBranchAccessManager; |
| import org.eclipse.osee.ats.ide.branch.AtsBranchServiceIde; |
| import org.eclipse.osee.ats.ide.branch.internal.AtsBranchServiceIdeImpl; |
| import org.eclipse.osee.ats.ide.branch.internal.AtsBranchServiceImpl; |
| import org.eclipse.osee.ats.ide.ev.internal.AtsEarnedValueImpl; |
| import org.eclipse.osee.ats.ide.health.AtsHealthServiceImpl; |
| +import org.eclipse.osee.ats.ide.internal.OseeApiService; |
| import org.eclipse.osee.ats.ide.notify.AtsNotificationServiceImpl; |
| import org.eclipse.osee.ats.ide.query.AtsQueryServiceIde; |
| import org.eclipse.osee.ats.ide.search.internal.query.AtsQueryServiceImpl; |
| @@ -58,6 +58,7 @@ import org.eclipse.osee.ats.ide.workflow.sprint.SprintArtifact; |
| import org.eclipse.osee.ats.ide.workflow.task.IAtsTaskServiceIde; |
| import org.eclipse.osee.ats.ide.workflow.task.internal.AtsTaskService; |
| import org.eclipse.osee.ats.ide.workflow.task.related.AtsTaskRelatedService; |
| +import org.eclipse.osee.framework.core.access.IAccessControlService; |
| import org.eclipse.osee.framework.core.client.OseeClientProperties; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.IUserGroupService; |
| @@ -131,6 +132,24 @@ public class AtsApiIdeImpl extends AtsApiImpl implements AtsApiIde { |
| agileService = new AgileService(logger, this); |
| notificationService = new AtsNotificationServiceImpl(); |
| |
| + startAccessControlLoading(); |
| + |
| + } |
| + |
| + private void startAccessControlLoading() { |
| + // Start loading access control |
| + Thread loadAccessControl = new Thread(new Runnable() { |
| + |
| + @Override |
| + public void run() { |
| + try { |
| + OseeApiService.get().getAccessControlService().ensurePopulated(); |
| + } catch (Exception ex) { |
| + // do nothing |
| + } |
| + } |
| + }, "Load Access Control"); |
| + loadAccessControl.start(); |
| } |
| |
| public void setAttributeResolverService(IAttributeResolver attributeResolverService) { |
| @@ -152,7 +171,8 @@ public class AtsApiIdeImpl extends AtsApiImpl implements AtsApiIde { |
| sprintItemsCache.invalidate(); |
| } |
| |
| - AtsBranchAccessManager.clearCaches(); |
| + getAccessControlService().clearCaches(); |
| + getAtsAccessService().clearCaches(); |
| } |
| |
| @Override |
| @@ -288,4 +308,8 @@ public class AtsApiIdeImpl extends AtsApiImpl implements AtsApiIde { |
| return branchServiceIde; |
| } |
| |
| + @Override |
| + public IAccessControlService getAccessControlService() { |
| + return OseeApiService.get().getAccessControlService(); |
| + } |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/widgets/XWorkingBranchButtonLock.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/widgets/XWorkingBranchButtonLock.java |
| index 2a8ecfbd7c..524f86daba 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/widgets/XWorkingBranchButtonLock.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/util/widgets/XWorkingBranchButtonLock.java |
| @@ -19,8 +19,10 @@ import org.eclipse.jface.dialogs.MessageDialog; |
| import org.eclipse.osee.ats.api.util.AtsUtil; |
| import org.eclipse.osee.ats.ide.internal.Activator; |
| import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| -import org.eclipse.osee.framework.access.AccessControlData; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| +import org.eclipse.osee.ats.ide.internal.OseeApiService; |
| +import org.eclipse.osee.framework.core.access.AccessControlData; |
| +import org.eclipse.osee.framework.core.access.event.AccessTopicEvent; |
| +import org.eclipse.osee.framework.core.access.event.AccessTopicEventPayload; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.data.IUserGroup; |
| import org.eclipse.osee.framework.core.enums.CoreUserGroups; |
| @@ -31,8 +33,6 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; |
| import org.eclipse.osee.framework.logging.OseeLog; |
| import org.eclipse.osee.framework.skynet.core.access.UserGroupService; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| -import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent; |
| -import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventPayload; |
| import org.eclipse.osee.framework.ui.plugin.util.AWorkbench; |
| import org.eclipse.osee.framework.ui.skynet.FrameworkImage; |
| import org.eclipse.osee.framework.ui.swt.ImageManager; |
| @@ -85,7 +85,7 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple |
| if (branch.isInvalid()) { |
| noBranch = true; |
| } else { |
| - someAccessControlSet = !AccessControlManager.getAccessControlList(branch).isEmpty(); |
| + someAccessControlSet = !OseeApiService.get().getAccessControlService().getAccessControlList(branch).isEmpty(); |
| } |
| button.setImage(ImageManager.getImage( |
| noBranch || someAccessControlSet ? FrameworkImage.LOCK_LOCKED : FrameworkImage.LOCK_UNLOCKED)); |
| @@ -93,7 +93,6 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple |
| button.getParent().redraw(); |
| } |
| |
| - @SuppressWarnings("unlikely-arg-type") |
| private void toggleWorkingBranchLock(Button button) { |
| try { |
| BranchId branch = getTeamArt().getWorkingBranch(); |
| @@ -102,7 +101,8 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple |
| return; |
| } |
| boolean isLocked = false, manuallyLocked = false; |
| - Collection<AccessControlData> datas = AccessControlManager.getAccessControlList(branch); |
| + Collection<AccessControlData> datas = |
| + AtsApiService.get().getAccessControlService().getAccessControlList(branch); |
| if (datas.size() > 1) { |
| manuallyLocked = true; |
| } else if (datas.isEmpty()) { |
| @@ -125,11 +125,12 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple |
| isLocked ? "Locked" : "NOT Locked", isLocked ? "UnLock" : "Lock"); |
| if (MessageDialog.openConfirm(Display.getCurrent().getActiveShell(), "Toggle Branch Lock", message)) { |
| if (isLocked) { |
| - AccessControlManager.removeAccessControlDataIf(true, datas.iterator().next()); |
| + AtsApiService.get().getAccessControlService().removeAccessControlDataIf(true, datas.iterator().next()); |
| } else { |
| IUserGroup everyoneGroup = UserGroupService.get(CoreUserGroups.Everyone); |
| Conditions.assertTrue(everyoneGroup.getArtifact() instanceof Artifact, "Must be Artifact"); |
| - AccessControlManager.setPermission((Artifact) everyoneGroup.getArtifact(), branch, PermissionEnum.READ); |
| + AtsApiService.get().getAccessControlService().setPermission(everyoneGroup.getArtifact(), branch, |
| + PermissionEnum.READ); |
| } |
| AWorkbench.popup(String.format("Branch set to [%s]", !isLocked ? "Locked" : "NOT Locked")); |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AbstractWorkflowArtifact.java |
| index 826345798b..bb07feb17a 100644 |
| --- a/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AbstractWorkflowArtifact.java |
| +++ b/plugins/org.eclipse.osee.ats.ide/src/org/eclipse/osee/ats/ide/workflow/AbstractWorkflowArtifact.java |
| @@ -43,15 +43,11 @@ import org.eclipse.osee.ats.ide.internal.Activator; |
| import org.eclipse.osee.ats.ide.internal.AtsApiService; |
| import org.eclipse.osee.ats.ide.workflow.review.AbstractReviewArtifact; |
| import org.eclipse.osee.ats.ide.workflow.teamwf.TeamWorkFlowArtifact; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.BranchToken; |
| import org.eclipse.osee.framework.core.data.TransactionId; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| -import org.eclipse.osee.framework.core.services.CmAccessControl; |
| -import org.eclipse.osee.framework.core.services.HasCmAccessControl; |
| import org.eclipse.osee.framework.core.util.IGroupExplorerProvider; |
| -import org.eclipse.osee.framework.core.util.OsgiUtil; |
| import org.eclipse.osee.framework.core.util.Result; |
| import org.eclipse.osee.framework.jdk.core.result.XResultData; |
| import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; |
| @@ -68,7 +64,7 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationManager; |
| /** |
| * @author Donald G. Dunne |
| */ |
| -public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact implements IAtsWorkItem, HasCmAccessControl, IGroupExplorerProvider { |
| +public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact implements IAtsWorkItem, IGroupExplorerProvider { |
| |
| private Collection<AtsUser> transitionAssignees; |
| protected AbstractWorkflowArtifact parentAwa; |
| @@ -265,7 +261,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple |
| } |
| |
| public boolean isAccessControlWrite() { |
| - return AccessControlManager.hasPermission(this, PermissionEnum.WRITE); |
| + return AtsApiService.get().getAccessControlService().hasArtifactPermission(this, PermissionEnum.WRITE, null).isSuccess(); |
| } |
| |
| /** |
| @@ -419,11 +415,6 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple |
| return AtsApiService.get().getStateFactory().getStateManager(this); |
| } |
| |
| - @Override |
| - public CmAccessControl getAccessControl() { |
| - return OsgiUtil.getService(getClass(), CmAccessControl.class); |
| - } |
| - |
| public List<IAtsStateDefinition> getToStatesWithCompleteCancelReturnStates() { |
| List<IAtsStateDefinition> allPages = new ArrayList<>(); |
| IAtsStateDefinition currState = getStateDefinition(); |
| diff --git a/plugins/org.eclipse.osee.ats.rest/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.rest/META-INF/MANIFEST.MF |
| index a7282b210b..e1b9367f2d 100644 |
| --- a/plugins/org.eclipse.osee.ats.rest/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.ats.rest/META-INF/MANIFEST.MF |
| @@ -19,6 +19,7 @@ Import-Package: com.fasterxml.jackson.core, |
| org.eclipse.core.runtime, |
| org.eclipse.define.api.importing, |
| org.eclipse.nebula.widgets.xviewer.core.model, |
| + org.eclipse.osee.ats.core.access.demo, |
| org.eclipse.osee.ats.core.agile, |
| org.eclipse.osee.ats.core.agile.operations, |
| org.eclipse.osee.ats.core.ai, |
| @@ -42,6 +43,7 @@ Import-Package: com.fasterxml.jackson.core, |
| org.eclipse.osee.define.rest.importing.resolvers, |
| org.eclipse.osee.framework.core, |
| org.eclipse.osee.framework.core.access, |
| + org.eclipse.osee.framework.core.access.context, |
| org.eclipse.osee.framework.core.data, |
| org.eclipse.osee.framework.core.enums, |
| org.eclipse.osee.framework.core.enums.token, |
| diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApiServerImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApiServerImpl.java |
| index 195e8916d5..74c3f156a5 100644 |
| --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApiServerImpl.java |
| +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApiServerImpl.java |
| @@ -47,6 +47,7 @@ import org.eclipse.osee.ats.rest.internal.util.AtsRelationResolverServiceImpl; |
| import org.eclipse.osee.ats.rest.internal.util.AtsStoreServiceImpl; |
| import org.eclipse.osee.ats.rest.internal.workitem.AtsActionEndpointImpl; |
| import org.eclipse.osee.ats.rest.internal.workitem.AtsTaskService; |
| +import org.eclipse.osee.framework.core.access.IAccessControlService; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| @@ -288,4 +289,9 @@ public class AtsApiServerImpl extends AtsApiImpl implements AtsApiServer { |
| return orcsApi.getUserGroupService(); |
| } |
| |
| + @Override |
| + public IAccessControlService getAccessControlService() { |
| + return orcsApi.getAccessControlService(); |
| + } |
| + |
| } |
| diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigurationsService.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigurationsService.java |
| index a7cae9b953..694377ff43 100644 |
| --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigurationsService.java |
| +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigurationsService.java |
| @@ -45,6 +45,7 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; |
| import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| import org.eclipse.osee.framework.core.enums.CoreBranches; |
| import org.eclipse.osee.framework.core.enums.SystemUser; |
| +import org.eclipse.osee.framework.jdk.core.result.XConsoleLogger; |
| import org.eclipse.osee.framework.jdk.core.result.XResultData; |
| import org.eclipse.osee.framework.jdk.core.type.ResultSet; |
| import org.eclipse.osee.framework.jdk.core.util.ElapsedTime; |
| @@ -159,7 +160,7 @@ public class AtsConfigurationsService extends AbstractAtsConfigurationService { |
| } |
| idToArtifact.put(art.getId(), art); |
| } catch (Exception ex) { |
| - System.err.println("Exception " + ex.getLocalizedMessage()); |
| + XConsoleLogger.err("Exception " + ex.getLocalizedMessage()); |
| } |
| } |
| time2.end(); |
| diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/demo/AtsDbConfigDemoOp.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/demo/AtsDbConfigDemoOp.java |
| index 6f109ec7ff..924f034698 100644 |
| --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/demo/AtsDbConfigDemoOp.java |
| +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/demo/AtsDbConfigDemoOp.java |
| @@ -14,34 +14,16 @@ |
| package org.eclipse.osee.ats.rest.internal.demo; |
| |
| import org.eclipse.osee.ats.api.AtsApi; |
| -import org.eclipse.osee.ats.api.config.Csci; |
| -import org.eclipse.osee.ats.api.config.WorkType; |
| -import org.eclipse.osee.ats.api.config.tx.IAtsConfigTx; |
| -import org.eclipse.osee.ats.api.config.tx.IAtsConfigTxActionableItem; |
| -import org.eclipse.osee.ats.api.config.tx.IAtsConfigTxTeamDef; |
| import org.eclipse.osee.ats.api.data.AtsArtifactToken; |
| -import org.eclipse.osee.ats.api.data.AtsArtifactTypes; |
| -import org.eclipse.osee.ats.api.data.AtsAttributeTypes; |
| import org.eclipse.osee.ats.api.data.AtsRelationTypes; |
| import org.eclipse.osee.ats.api.data.AtsUserGroups; |
| -import org.eclipse.osee.ats.api.demo.AtsDemoOseeTypes; |
| -import org.eclipse.osee.ats.api.demo.DemoAis; |
| import org.eclipse.osee.ats.api.demo.DemoArtifactToken; |
| -import org.eclipse.osee.ats.api.demo.DemoWorkDefinitions; |
| -import org.eclipse.osee.ats.api.query.NextRelease; |
| -import org.eclipse.osee.ats.api.query.ReleasedOption; |
| -import org.eclipse.osee.ats.api.team.IAtsTeamDefinition; |
| -import org.eclipse.osee.ats.api.user.AtsCoreUsers; |
| import org.eclipse.osee.ats.api.util.AtsUtil; |
| import org.eclipse.osee.ats.api.util.IAtsChangeSet; |
| import org.eclipse.osee.ats.api.version.IAtsVersion; |
| -import org.eclipse.osee.ats.api.workdef.AtsWorkDefinitionTokens; |
| import org.eclipse.osee.ats.core.config.OrganizePrograms; |
| -import org.eclipse.osee.ats.core.task.TaskSetDefinitionTokensDemo; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| -import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| import org.eclipse.osee.framework.core.enums.CoreRelationTypes; |
| -import org.eclipse.osee.framework.core.enums.DemoBranches; |
| import org.eclipse.osee.framework.core.enums.DemoUsers; |
| import org.eclipse.osee.framework.jdk.core.result.XResultData; |
| |
| @@ -53,7 +35,6 @@ import org.eclipse.osee.framework.jdk.core.result.XResultData; |
| public class AtsDbConfigDemoOp { |
| |
| private final AtsApi atsApi; |
| - private IAtsConfigTx cfgTx; |
| |
| public AtsDbConfigDemoOp(AtsApi atsApi) { |
| this.atsApi = atsApi; |
| @@ -61,7 +42,7 @@ public class AtsDbConfigDemoOp { |
| |
| public XResultData run() { |
| |
| - configTxDemoAisAndTeams(); |
| + (new AtsDbConfigAIsAndTeamsDemoOp(atsApi)).run(); |
| configureForParallelCommit(); |
| |
| IAtsChangeSet changes = atsApi.createChangeSet("Set ATS Admin"); |
| @@ -88,454 +69,6 @@ public class AtsDbConfigDemoOp { |
| changes.execute(); |
| } |
| |
| - private void configTxDemoAisAndTeams() { |
| - |
| - cfgTx = atsApi.getConfigService().createConfigTx("Create Demo Config", AtsCoreUsers.SYSTEM_USER); |
| - IAtsConfigTxTeamDef topTeamDef = |
| - cfgTx.createTeamDef((IAtsTeamDefinition) null, AtsArtifactToken.TopTeamDefinition).andWorkDef( |
| - AtsWorkDefinitionTokens.WorkDef_Team_Default); |
| - IAtsConfigTxActionableItem topAi = |
| - cfgTx.createActionableItem(AtsArtifactToken.TopActionableItem).andActionable(false); |
| - |
| - createSawPlTeamConfig(cfgTx, topTeamDef, topAi); |
| - createSawTeamConfig(cfgTx, topTeamDef, topAi); |
| - createCisTeamConfig(cfgTx, topTeamDef, topAi); |
| - createFacilitiesTeamConfig(cfgTx, topTeamDef, topAi); |
| - createProcessTeamConfig(cfgTx, topTeamDef, topAi); |
| - createToolsTeamConfig(cfgTx, topTeamDef, topAi); |
| - createSystemSafetyTeamConfig(cfgTx, topTeamDef, topAi); |
| - |
| - cfgTx.execute(); |
| - |
| - } |
| - |
| - private void createFacilitiesTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeam, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // Facilities Team |
| - IAtsConfigTxTeamDef facilitiesTeamDef = |
| - topTeam.createChildTeamDef(topTeam.getTeamDef(), DemoArtifactToken.Facilities_Team) // |
| - .andLeads(DemoUsers.John_Stevens) // |
| - .andMembers(DemoUsers.John_Stevens, DemoUsers.Steven_Michael, DemoUsers.Michael_John, |
| - DemoUsers.Jason_Stevens) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Simple); |
| - |
| - // IT Team |
| - facilitiesTeamDef.createChildTeamDef(facilitiesTeamDef.getTeamDef(), DemoArtifactToken.Facilities_IT_Team) // |
| - .andLeads(DemoUsers.Kay_Wheeler) // |
| - .andMembers(DemoUsers.Kay_Wheeler, DemoUsers.Jason_Stevens, DemoUsers.Michael_John, DemoUsers.Jason_Stevens) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Simple); |
| - |
| - // Facilities Actionable Items |
| - IAtsConfigTxActionableItem facilitiesAi = |
| - topActionableItem.createChildActionableItem(DemoArtifactToken.Facilities_Ai) // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Facilities_Team); |
| - |
| - facilitiesAi.createChildActionableItem("Backups") // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Facilities_IT_Team); |
| - |
| - facilitiesAi.createChildActionableItem("Break Room") // |
| - .andActionable(true); |
| - |
| - facilitiesAi.createChildActionableItem("Computers") // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Facilities_IT_Team); |
| - |
| - facilitiesAi.createChildActionableItem("Network") // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Facilities_IT_Team); |
| - |
| - facilitiesAi.createChildActionableItem("Vending Machines") // |
| - .andActionable(true); |
| - |
| - } |
| - |
| - private void createToolsTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeam, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // Tools Team |
| - IAtsConfigTxTeamDef toolsTeamDef = topTeam.createChildTeamDef(topTeam.getTeamDef(), DemoArtifactToken.Tools_Team) // |
| - .andLeads(DemoUsers.Jeffery_Kay) // |
| - .andMembers(DemoUsers.Jeffery_Kay, DemoUsers.Roland_Stevens) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default); |
| - |
| - // Web Team |
| - toolsTeamDef.createChildTeamDef(toolsTeamDef.getTeamDef(), DemoArtifactToken.Website_Team) // |
| - .andLeads(DemoUsers.Karmen_John) // |
| - .andMembers(DemoUsers.Karmen_John, DemoUsers.Jeffery_Kay, DemoUsers.Roland_Stevens) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Simple); |
| - |
| - // Tools Actionable Items |
| - IAtsConfigTxActionableItem toolsAi = topActionableItem.createChildActionableItem(DemoArtifactToken.Tools_Ai) // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Tools_Team); |
| - |
| - toolsAi.createChildActionableItem(DemoArtifactToken.Reader_AI) // |
| - .andActionable(true); |
| - |
| - toolsAi.createChildActionableItem("Results Reporter") // |
| - .andActionable(true); |
| - |
| - toolsAi.createChildActionableItem(DemoArtifactToken.Timesheet_AI) // |
| - .andActionable(true); |
| - |
| - toolsAi.createChildActionableItem("Website") // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.Website_Team); |
| - |
| - } |
| - |
| - private void createSystemSafetyTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeamDef, IAtsConfigTxActionableItem topAi) { |
| - |
| - // System Safety Team |
| - topTeamDef.createChildTeamDef(topTeamDef.getTeamDef(), DemoArtifactToken.System_Safety_Team) // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Jeffery_Kay) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default); |
| - |
| - // System Safety Actionable Items |
| - topAi.createChildActionableItem(DemoArtifactToken.System_Safety_Ai) // |
| - .andTeamDef(DemoArtifactToken.System_Safety_Team) // |
| - .andActionable(true); |
| - |
| - } |
| - |
| - private void createProcessTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeamDef, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // Process Team |
| - topTeamDef.createChildTeamDef(topTeamDef.getTeamDef(), DemoArtifactToken.Process_Team) // |
| - .andLeads(DemoUsers.Alex_Kay) // |
| - .andMembers(DemoUsers.Keith_Johnson, DemoUsers.Michael_Alex, DemoUsers.Janice_Michael, DemoUsers.Alex_Kay) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default); |
| - |
| - // Process Actionable Items |
| - IAtsConfigTxActionableItem processesAi = topActionableItem.createChildActionableItem("Processes") // |
| - .andActionable(false) // |
| - .andTeamDef(DemoArtifactToken.Process_Team); |
| - |
| - processesAi.createChildActionableItem("Coding Standards") // |
| - .andActionable(true); |
| - |
| - processesAi.createChildActionableItem("Config Mgmt") // |
| - .andActionable(true); |
| - |
| - processesAi.createChildActionableItem("New Employee Manual") // |
| - .andActionable(true); |
| - |
| - processesAi.createChildActionableItem("Reviews") // |
| - .andActionable(true); |
| - } |
| - |
| - private void createSawPlTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeam, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // SAW PL |
| - IAtsConfigTxTeamDef sawPlTeamDef = topTeam.createChildTeamDef(topTeam.getTeamDef(), DemoArtifactToken.SAW_PL_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andLeads(DemoUsers.Kay_Jason) // |
| - .andMembers(DemoUsers.Kay_Jason, DemoUsers.Michael_John, DemoUsers.Steven_Kohn) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default) // |
| - .andVersion(DemoArtifactToken.SAW_Product_Line, ReleasedOption.UnReleased, DemoBranches.SAW_PL, |
| - NextRelease.Next) // |
| - .andVersion(DemoArtifactToken.SAW_Hardening_Branch, ReleasedOption.UnReleased, |
| - DemoBranches.SAW_PL_Hardening_Branch, NextRelease.Next) // |
| - .andRelatedPeerWorkflowDefinition(AtsWorkDefinitionTokens.WorkDef_Review_PeerToPeer_Demo); |
| - |
| - // SAW PL Team Defs |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_Code_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Code) // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Code) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoCodeTeamWorkflow); |
| - |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_HW_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Hardware) // |
| - .andLeads(DemoUsers.Jason_Michael) // |
| - .andMembers(DemoUsers.Jason_Michael) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| - |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_Requirements_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Requirements) // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Req) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| - |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_SW_Design_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.SW_Design) // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_SwDesign); |
| - |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_Test_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Test) // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Test) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoTestTeamWorkflow); |
| - |
| - sawPlTeamDef.createChildTeamDef(sawPlTeamDef.getTeamDef(), DemoArtifactToken.SAW_PL_ARB_TeamDef) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.ARB) // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_ProductLine) // |
| - .andTeamWorkflowArtifactType(AtsArtifactTypes.TeamWorkflow); |
| - |
| - // SAW SW Actionable Items |
| - IAtsConfigTxActionableItem sawPlSwAi = |
| - topActionableItem.createChildActionableItem(DemoArtifactToken.SAW_PL_CSCI_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andActionable(false); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_Code_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Code) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_Code_TeamDef) // |
| - .andActionable(true) // |
| - .andChildAis("COMM", "MSM", "NAV", "Test Page"); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_Requirements_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Requirements) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_Requirements_TeamDef) // |
| - .andActionable(true) // |
| - .andChildAis("COMM", "MSM", "NAV") // |
| - .and(CoreAttributeTypes.StaticId, DemoAis.TEST_AI); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_Test_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Test) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_Test_TeamDef) // |
| - .andActionable(true) // |
| - .andChildAis("ADT", "COMM", "MSM", "NAV", "RulLists"); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_SW_Design_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.SW_Design) // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_SW_Design_TeamDef); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_HW_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.Hardware) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_HW_TeamDef) // |
| - .andActionable(true) // |
| - .andChildAis("Adapter", "Case", "Manual", "Screen"); |
| - |
| - sawPlSwAi.createChildActionableItem(DemoArtifactToken.SAW_PL_ARB_AI) // |
| - .andProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andWorkType(WorkType.ARB) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_ARB_TeamDef) // |
| - .andActionable(true); |
| - |
| - // SAW PL Program |
| - cfgTx.createProgram(DemoArtifactToken.SAW_PL_Program) // |
| - .andTeamDef(DemoArtifactToken.SAW_PL_TeamDef) // |
| - .and(AtsAttributeTypes.Description, "Program object for SAW PL Program") // |
| - .and(AtsAttributeTypes.Namespace, "org.demo.saw.pl"); |
| - |
| - } |
| - |
| - private void createSawTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeam, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // SAW SW |
| - IAtsConfigTxTeamDef sawSwTeamDef = topTeam.createChildTeamDef(topTeam.getTeamDef(), DemoArtifactToken.SAW_SW) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .and(CoreAttributeTypes.StaticId, "saw.teamDefHoldingVersions") // |
| - .andLeads(DemoUsers.Kay_Jason) // |
| - .andMembers(DemoUsers.Steven_Kohn, DemoUsers.Michael_John, DemoUsers.Kay_Jason) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default) // |
| - .andVersion(DemoArtifactToken.SAW_Bld_1, ReleasedOption.Released, DemoBranches.SAW_Bld_1, NextRelease.None) // |
| - .andVersion(DemoArtifactToken.SAW_Bld_2, ReleasedOption.UnReleased, DemoBranches.SAW_Bld_2, NextRelease.Next) // |
| - .andVersion(DemoArtifactToken.SAW_Bld_3, ReleasedOption.UnReleased, DemoBranches.SAW_Bld_3, NextRelease.None) // |
| - .andRelatedPeerWorkflowDefinition(AtsWorkDefinitionTokens.WorkDef_Review_PeerToPeer_Demo); |
| - |
| - /** |
| - * Artifact types used can be declared through Team Definition or Workflow Definition. This will get its artifact |
| - * type through the Workflow Definition. |
| - */ |
| - // SAW SW Team Defs |
| - sawSwTeamDef.createChildTeamDef(sawSwTeamDef.getTeamDef(), DemoArtifactToken.SAW_Code) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Code) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .and(CoreAttributeTypes.StaticId, "saw.code") // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Code); |
| - |
| - /** |
| - * Artifact types used can be declared through Team Definition or Workflow Definition. This is an example of the |
| - * config through Team Definition. |
| - */ |
| - sawSwTeamDef.createChildTeamDef(sawSwTeamDef.getTeamDef(), DemoArtifactToken.SAW_HW) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Hardware) // |
| - .andLeads(DemoUsers.Jason_Michael) // |
| - .andMembers(DemoUsers.Jason_Michael) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| - |
| - sawSwTeamDef.createChildTeamDef(sawSwTeamDef.getTeamDef(), DemoArtifactToken.SAW_Test) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Test) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .and(CoreAttributeTypes.StaticId, "saw.test") // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Test) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoTestTeamWorkflow); |
| - |
| - sawSwTeamDef.createChildTeamDef(sawSwTeamDef.getTeamDef(), DemoArtifactToken.SAW_SW_Design) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.SW_Design) // |
| - .and(CoreAttributeTypes.StaticId, "saw.sw.design") // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_SwDesign) // |
| - .andRelatedPeerWorkflowDefinition(DemoWorkDefinitions.WorkDef_Review_Demo_Peer_SwDesign) // |
| - .andRelatedTaskWorkflowDefinition(DemoWorkDefinitions.WorkDef_Task_Demo_SwDesign, |
| - AtsWorkDefinitionTokens.WorkDef_Task_Default) // |
| - .andTaskSet(TaskSetDefinitionTokensDemo.SawSwDesignTestingChecklist, |
| - TaskSetDefinitionTokensDemo.SawSwDesignProcessChecklist); |
| - |
| - sawSwTeamDef.createChildTeamDef(sawSwTeamDef.getTeamDef(), DemoArtifactToken.SAW_Requirements) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Requirements) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .and(CoreAttributeTypes.StaticId, "saw.reqirements") // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Req) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| - |
| - // SAW SW Actionable Items |
| - IAtsConfigTxActionableItem sawSwAi = topActionableItem.createChildActionableItem(DemoArtifactToken.SAW_CSCI_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .andActionable(false); |
| - |
| - sawSwAi.createChildActionableItem(DemoArtifactToken.SAW_Code_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Code) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .andTeamDef(DemoArtifactToken.SAW_Code) // |
| - .andActionable(true) // |
| - .andChildAis("COMM", "MSM", "NAV", "Test Page"); |
| - |
| - sawSwAi.createChildActionableItem(DemoArtifactToken.SAW_HW_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Hardware) // |
| - .andTeamDef(DemoArtifactToken.SAW_HW) // |
| - .andChildAis(DemoArtifactToken.Adapter_AI) // |
| - .andActionable(true) // |
| - .andChildAis("Case", "Manual", "Screen"); |
| - |
| - sawSwAi.createChildActionableItem(DemoArtifactToken.SAW_Requirements_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Requirements) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .andTeamDef(DemoArtifactToken.SAW_Requirements) // |
| - .andActionable(true) // |
| - .andChildAis("COMM", "MSM", "NAV"); |
| - |
| - sawSwAi.createChildActionableItem(DemoArtifactToken.SAW_Test_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.Test) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .andTeamDef(DemoArtifactToken.SAW_Test) // |
| - .andActionable(true) // |
| - .andChildAis("ADT", "COMM", "MSM", "NAV", "RunLists"); |
| - |
| - sawSwAi.createChildActionableItem(DemoArtifactToken.SAW_SW_Design_AI) // |
| - .andProgram(DemoArtifactToken.SAW_Program) // |
| - .andWorkType(WorkType.SW_Design) // |
| - .andTeamDef(DemoArtifactToken.SAW_SW_Design) // |
| - .andActionable(true); |
| - |
| - // SAW Program |
| - cfgTx.createProgram(DemoArtifactToken.SAW_Program) // |
| - .andTeamDef(DemoArtifactToken.SAW_SW) // |
| - .andCsci(Csci.DP, Csci.SP, Csci.WP) // |
| - .and(AtsAttributeTypes.Description, "Program object for SAW Program") // |
| - .and(AtsAttributeTypes.Namespace, "org.demo.saw"); |
| - |
| - } |
| - |
| - private void createCisTeamConfig(IAtsConfigTx cfgTx, IAtsConfigTxTeamDef topTeam, IAtsConfigTxActionableItem topActionableItem) { |
| - |
| - // CIS SW |
| - IAtsConfigTxTeamDef cisSwTeamDef = topTeam.createChildTeamDef(topTeam.getTeamDef(), DemoArtifactToken.CIS_SW) // |
| - .and(CoreAttributeTypes.StaticId, "cis.teamDefHoldingVersions") // |
| - .andLeads(DemoUsers.Kay_Jason) // |
| - .andMembers(DemoUsers.Steven_Kohn, DemoUsers.Michael_John, DemoUsers.Kay_Jason) // |
| - .andWorkDef(AtsWorkDefinitionTokens.WorkDef_Team_Default) // |
| - .andVersion("CIS Bld 1", ReleasedOption.Released, DemoBranches.CIS_Bld_1, NextRelease.None) // |
| - .andVersion("CIS Bld 2", ReleasedOption.UnReleased, null, NextRelease.Next) // |
| - .andVersion("CIS Bld 3", ReleasedOption.UnReleased, null, NextRelease.None); |
| - |
| - // CIS SW Team Defs |
| - cisSwTeamDef.createChildTeamDef(cisSwTeamDef.getTeamDef(), DemoArtifactToken.CIS_Code) // |
| - .and(CoreAttributeTypes.StaticId, "cis.code") // |
| - .andLeads(DemoUsers.Jason_Michael) // |
| - .andMembers(DemoUsers.Jason_Michael) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Code); |
| - |
| - cisSwTeamDef.createChildTeamDef(cisSwTeamDef.getTeamDef(), DemoArtifactToken.CIS_Test) // |
| - .and(CoreAttributeTypes.StaticId, "cis.test") // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Test) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoTestTeamWorkflow); |
| - |
| - cisSwTeamDef.createChildTeamDef("CIS SW Design") // |
| - .and(CoreAttributeTypes.StaticId, "cis.sw.design") // |
| - .andLeads(DemoUsers.Kay_Jones) // |
| - .andMembers(DemoUsers.Kay_Jones) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_SwDesign); |
| - |
| - cisSwTeamDef.createChildTeamDef("CIS Requirements") // |
| - .and(CoreAttributeTypes.StaticId, "cis.reqirements") // |
| - .andLeads(DemoUsers.Joe_Smith) // |
| - .andMembers(DemoUsers.Joe_Smith) // |
| - .andWorkDef(DemoWorkDefinitions.WorkDef_Team_Demo_Req) // |
| - .andTeamWorkflowArtifactType(AtsDemoOseeTypes.DemoReqTeamWorkflow); |
| - |
| - // CIS SW Actionable Items |
| - IAtsConfigTxActionableItem cisSwAi = topActionableItem.createChildActionableItem(DemoArtifactToken.CIS_CSCI) // |
| - .andActionable(false); |
| - |
| - cisSwAi.createChildActionableItem("CIS Code") // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.CIS_Code); |
| - |
| - cisSwAi.createChildActionableItem("CIS Requirements") // |
| - .andActionable(true) // |
| - .andTeamDef("CIS Requirements"); |
| - |
| - cisSwAi.createChildActionableItem(DemoArtifactToken.CIS_Test_AI) // |
| - .andActionable(true) // |
| - .andTeamDef(DemoArtifactToken.CIS_Test); |
| - |
| - cisSwAi.createChildActionableItem("CIS SW Design") // |
| - .andActionable(true) // |
| - .andTeamDef("CIS SW Design"); |
| - |
| - // CIS Program |
| - cfgTx.createProgram(DemoArtifactToken.CIS_Program) // |
| - .andTeamDef(DemoArtifactToken.CIS_SW) // |
| - .and(AtsAttributeTypes.Description, "Program object for CIS Program") // |
| - .and(AtsAttributeTypes.Namespace, "org.demo.cis"); |
| - |
| - } |
| - |
| /** |
| * Configure SAW_Bld_1 and SAW_Bld_2 for parallel commit, including recursive setup where SAW_Bld_1 needs to be |
| * committed to SAW_Bld_1 and SAW_Bld_2 and SAW_Bld_2 needs to be committed to SAW_Bld_2 and SAW_Bld_1 |
| @@ -553,4 +86,5 @@ public class AtsDbConfigDemoOp { |
| |
| changes.execute(); |
| } |
| + |
| } |
| diff --git a/plugins/org.eclipse.osee.client.demo/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.client.demo/META-INF/MANIFEST.MF |
| index a85fc0fea1..acfe5e3a7a 100644 |
| --- a/plugins/org.eclipse.osee.client.demo/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.client.demo/META-INF/MANIFEST.MF |
| @@ -12,8 +12,8 @@ Import-Package: javax.ws.rs.core, |
| org.eclipse.jdt.annotation, |
| org.eclipse.osee.define.ide.traceability, |
| org.eclipse.osee.define.ide.traceability.data, |
| - org.eclipse.osee.framework.access, |
| org.eclipse.osee.framework.core, |
| + org.eclipse.osee.framework.core.access, |
| org.eclipse.osee.framework.core.data, |
| org.eclipse.osee.framework.core.data.computed, |
| org.eclipse.osee.framework.core.enums, |
| diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java |
| index 1a33bd5d27..37ab2ad0fb 100644 |
| --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java |
| +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java |
| @@ -20,7 +20,6 @@ import java.util.Collection; |
| import java.util.HashSet; |
| import java.util.Set; |
| import java.util.logging.Level; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactToken; |
| import org.eclipse.osee.framework.core.data.ArtifactTypeToken; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| @@ -67,11 +66,15 @@ public class AddRequirementData implements IDbInitializationTask { |
| try { |
| BranchId branch = SAW_Bld_1; |
| |
| - //@formatter:off |
| - importRequirements(branch, CoreArtifactTypes.SoftwareRequirementMsWord, CoreArtifactTokens.SoftwareRequirementsFolder, OseeInf.getResourceAsFile("requirements/SAW-SoftwareRequirements.xml", getClass())); |
| - importRequirements(branch, CoreArtifactTypes.SystemRequirementMsWord, CoreArtifactTokens.SystemRequirementsFolder, OseeInf.getResourceAsFile("requirements/SAW-SystemRequirements.xml", getClass())); |
| - importRequirements(branch, CoreArtifactTypes.SubsystemRequirementMsWord, CoreArtifactTokens.SubSystemRequirementsFolder, OseeInf.getResourceAsFile("requirements/SAW-SubsystemRequirements.xml", getClass())); |
| - //@formatter:on |
| + importRequirements(branch, CoreArtifactTypes.SoftwareRequirementMsWord, |
| + CoreArtifactTokens.SoftwareRequirementsFolder, |
| + OseeInf.getResourceAsFile("requirements/SAW-SoftwareRequirements.xml", getClass())); |
| + importRequirements(branch, CoreArtifactTypes.SystemRequirementMsWord, |
| + CoreArtifactTokens.SystemRequirementsFolder, |
| + OseeInf.getResourceAsFile("requirements/SAW-SystemRequirements.xml", getClass())); |
| + importRequirements(branch, CoreArtifactTypes.SubsystemRequirementMsWord, |
| + CoreArtifactTokens.SubSystemRequirementsFolder, |
| + OseeInf.getResourceAsFile("requirements/SAW-SubsystemRequirements.xml", getClass())); |
| |
| SkynetTransaction demoDbTraceability = |
| TransactionManager.createTransaction(branch, "Populate Demo DB - Create Traceability"); |
| @@ -80,8 +83,8 @@ public class AddRequirementData implements IDbInitializationTask { |
| |
| // Create SAW_Bld_2 Child Main Working Branch off SAW_Bld_1 |
| BranchId childBranch = BranchManager.createBaselineBranch(SAW_Bld_1, SAW_Bld_2); |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), SAW_Bld_2, |
| - PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), |
| + SAW_Bld_2, PermissionEnum.FULLACCESS); |
| |
| // need to update the branch type; |
| ConnectionHandler.runPreparedUpdate(UPDATE_BRANCH_TYPE, BranchType.BASELINE, childBranch); |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/.project b/plugins/org.eclipse.osee.client.integration.tests/.project |
| index 28184747a1..dc10962dea 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/.project |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/.project |
| @@ -20,6 +20,11 @@ |
| <arguments> |
| </arguments> |
| </buildCommand> |
| + <buildCommand> |
| + <name>org.eclipse.pde.ds.core.builder</name> |
| + <arguments> |
| + </arguments> |
| + </buildCommand> |
| </buildSpec> |
| <natures> |
| <nature>org.eclipse.pde.PluginNature</nature> |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.client.integration.tests/META-INF/MANIFEST.MF |
| index 07873b6f65..fc7acb1e78 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/META-INF/MANIFEST.MF |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/META-INF/MANIFEST.MF |
| @@ -6,6 +6,7 @@ Bundle-ActivationPolicy: lazy |
| Bundle-Version: 1.0.0.qualifier |
| Bundle-Vendor: Eclipse Open System Engineering Environment |
| Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
| +Service-Component: OSGI-INF/*.xml |
| Import-Package: javax.ws.rs.client, |
| javax.ws.rs.core, |
| org.eclipse.core.runtime, |
| @@ -14,7 +15,6 @@ Import-Package: javax.ws.rs.client, |
| org.eclipse.osee.client.demo, |
| org.eclipse.osee.client.test.framework, |
| org.eclipse.osee.define.api, |
| - org.eclipse.osee.framework.access, |
| org.eclipse.osee.framework.core, |
| org.eclipse.osee.framework.core.access, |
| org.eclipse.osee.framework.core.applicability, |
| @@ -22,9 +22,6 @@ Import-Package: javax.ws.rs.client, |
| org.eclipse.osee.framework.core.client.server, |
| org.eclipse.osee.framework.core.data, |
| org.eclipse.osee.framework.core.data.computed, |
| - org.eclipse.osee.framework.core.dsl, |
| - org.eclipse.osee.framework.core.dsl.integration, |
| - org.eclipse.osee.framework.core.dsl.oseeDsl, |
| org.eclipse.osee.framework.core.enums, |
| org.eclipse.osee.framework.core.enums.token, |
| org.eclipse.osee.framework.core.exception, |
| @@ -64,6 +61,4 @@ Require-Bundle: org.junit, |
| org.eclipse.osee.framework.skynet.core, |
| org.eclipse.osee.framework.ui.skynet, |
| org.eclipse.osee.define.ide, |
| - org.eclipse.osee.framework.core.dsl.ui.integration, |
| - org.eclipse.osee.framework.core.dsl.integration, |
| javax.mail.glassfish;bundle-version="1.4.1" |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/OSGI-INF/osee.api.service.ref.xml b/plugins/org.eclipse.osee.client.integration.tests/OSGI-INF/osee.api.service.ref.xml |
| index 10cc8fa2a4..4b8d770146 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/OSGI-INF/osee.api.service.ref.xml |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/OSGI-INF/osee.api.service.ref.xml |
| @@ -1,5 +1,5 @@ |
| <?xml version="1.0" encoding="UTF-8"?> |
| <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true"> |
| - <implementation class="org.eclipse.osee.client.integration.tests.integration.OseeApiService"/> |
| + <implementation class="org.eclipse.osee.client.integration.tests.internal.OseeApiService"/> |
| <reference bind="setOseeApi" cardinality="1..1" interface="org.eclipse.osee.framework.core.OseeApi" name="OseeApi" policy="static"/> |
| </scr:component> |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/build.properties b/plugins/org.eclipse.osee.client.integration.tests/build.properties |
| index 17908691f5..f58f8375b8 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/build.properties |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/build.properties |
| @@ -3,4 +3,5 @@ output.. = bin/ |
| bin.includes = META-INF/,\ |
| .,\ |
| logback-test.xml,\ |
| - support/ |
| + support/,\ |
| + OSGI-INF/ |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/OseeClientIntegrationTestSuite.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/OseeClientIntegrationTestSuite.java |
| index 916214e54c..fb2967e215 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/OseeClientIntegrationTestSuite.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/OseeClientIntegrationTestSuite.java |
| @@ -16,7 +16,6 @@ package org.eclipse.osee.client.integration.tests; |
| import org.eclipse.osee.client.integration.tests.integration.DirtyArtifactCacheTest; |
| import org.eclipse.osee.client.integration.tests.integration.LongRunningTestSuite; |
| import org.eclipse.osee.client.integration.tests.integration.define.XDefineIntegrationTestSuite; |
| -import org.eclipse.osee.client.integration.tests.integration.dsl.ui.integration.XDslUiIntegrationTestSuite; |
| import org.eclipse.osee.client.integration.tests.integration.endpoint.EndpointIntegrationTestSuite; |
| import org.eclipse.osee.client.integration.tests.integration.orcs.rest.OrcsRestTestSuite; |
| import org.eclipse.osee.client.integration.tests.integration.skynet.core.XSkynetCoreIntegrationTestSuite; |
| @@ -32,7 +31,6 @@ import org.junit.runners.Suite; |
| @Suite.SuiteClasses({ |
| OrcsRestTestSuite.class, |
| EndpointIntegrationTestSuite.class, |
| - XDslUiIntegrationTestSuite.class, |
| XDefineIntegrationTestSuite.class, |
| XSkynetCoreIntegrationTestSuite.class, |
| XUiSkynetCoreIntegrationTestSuite.class, |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/OseeApiService.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/OseeApiService.java |
| deleted file mode 100644 |
| index 291f98eb05..0000000000 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/OseeApiService.java |
| +++ /dev/null |
| @@ -1,38 +0,0 @@ |
| -/******************************************************************************* |
| - * Copyright (c) 2021 Boeing. |
| - * All rights reserved. This program and the accompanying materials |
| - * are made available under the terms of the Eclipse Public License v1.0 |
| - * which accompanies this distribution, and is available at |
| - * http://www.eclipse.org/legal/epl-v10.html |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - *******************************************************************************/ |
| -package org.eclipse.osee.client.integration.tests.integration; |
| - |
| -import org.eclipse.osee.framework.core.OseeApi; |
| - |
| -/** |
| - * @author Donald G. Dunne |
| - */ |
| -public class OseeApiService { |
| - |
| - public static OseeApi oseeApi; |
| - |
| - public OseeApiService() { |
| - // for jax-rs |
| - } |
| - |
| - public OseeApi getOseeApi() { |
| - return oseeApi; |
| - } |
| - |
| - public void setOseeApi(OseeApi oseeApi) { |
| - OseeApiService.oseeApi = oseeApi; |
| - } |
| - |
| - public static OseeApi get() { |
| - return oseeApi; |
| - } |
| - |
| -} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/MockDslProvider.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/MockDslProvider.java |
| deleted file mode 100644 |
| index 7846b084e6..0000000000 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/MockDslProvider.java |
| +++ /dev/null |
| @@ -1,69 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2004, 2007 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.client.integration.tests.integration.dsl.ui.integration; |
| - |
| -import java.util.Map; |
| -import java.util.concurrent.ConcurrentHashMap; |
| -import org.eclipse.osee.framework.core.dsl.integration.OseeDslProvider; |
| -import org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDsl; |
| - |
| -/** |
| - * @author Roberto E. Escobar |
| - */ |
| -public class MockDslProvider implements OseeDslProvider { |
| - |
| - private final OseeDsl dslToReturn; |
| - |
| - private boolean wasLoadDslCalled; |
| - private boolean wasGetDslCalled; |
| - private OseeDsl dslToStore; |
| - |
| - public MockDslProvider(OseeDsl dslToReturn) { |
| - this.dslToReturn = dslToReturn; |
| - } |
| - |
| - @Override |
| - public void loadDsl() { |
| - wasLoadDslCalled = true; |
| - } |
| - |
| - @Override |
| - public OseeDsl getDsl() { |
| - wasGetDslCalled = true; |
| - return dslToReturn; |
| - } |
| - |
| - @Override |
| - public void storeDsl(OseeDsl dsl) { |
| - dslToStore = dsl; |
| - } |
| - |
| - public OseeDsl getDslToStore() { |
| - return dslToStore; |
| - } |
| - |
| - public boolean wasLoadDslCalled() { |
| - return wasLoadDslCalled; |
| - } |
| - |
| - public boolean wasGetDslCalled() { |
| - return wasGetDslCalled; |
| - } |
| - |
| - @Override |
| - public Map<String, Long> getContextGuidToIdMap() { |
| - return new ConcurrentHashMap<>(); |
| - } |
| - |
| -} |
| \ No newline at end of file |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java |
| deleted file mode 100644 |
| index a51f2ebab5..0000000000 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java |
| +++ /dev/null |
| @@ -1,139 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2012 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.client.integration.tests.integration.dsl.ui.integration; |
| - |
| -import static org.eclipse.osee.client.demo.DemoChoice.OSEE_CLIENT_DEMO; |
| -import static org.eclipse.osee.framework.core.enums.CoreArtifactTypes.Artifact; |
| -import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON; |
| -import java.util.Collection; |
| -import java.util.Iterator; |
| -import java.util.LinkedList; |
| -import java.util.List; |
| -import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; |
| -import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; |
| -import org.eclipse.osee.framework.core.data.AccessContextToken; |
| -import org.eclipse.osee.framework.core.dsl.OseeDslResourceUtil; |
| -import org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDsl; |
| -import org.eclipse.osee.framework.core.dsl.ui.integration.operations.OseeDslRoleContextProvider; |
| -import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; |
| -import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| -import org.eclipse.osee.framework.core.enums.SystemUser; |
| -import org.eclipse.osee.framework.jdk.core.util.Lib; |
| -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| -import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; |
| -import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; |
| -import org.junit.Assert; |
| -import org.junit.Rule; |
| -import org.junit.Test; |
| - |
| -/** |
| - * Test Case for {@link OseeDslRoleContextProvider} |
| - * |
| - * @author John R. Misinco |
| - */ |
| -public class OseeDslRoleContextProviderTest { |
| - |
| - @Rule |
| - public OseeClientIntegrationRule integration = new OseeClientIntegrationRule(OSEE_CLIENT_DEMO); |
| - |
| - @Rule |
| - public OseeLogMonitorRule monitorRule = new OseeLogMonitorRule(); |
| - |
| - @Test |
| - public void testGetContextId() throws Exception { |
| - Long contextId = Lib.generateArtifactIdAsInt(); |
| - Artifact user = ArtifactQuery.getArtifactFromToken(SystemUser.Anonymous); |
| - String testSheet = getTestSheet1(contextId, user.getId()); |
| - OseeDsl model = OseeDslResourceUtil.loadModel("osee:/text.osee", testSheet).getModel(); |
| - MockDslProvider dslProvider = new MockDslProvider(model); |
| - OseeDslRoleContextProvider contextProvider = new OseeDslRoleContextProvider(dslProvider); |
| - Collection<? extends AccessContextToken> contextIds = contextProvider.getContextId(user); |
| - |
| - Assert.assertEquals(1, contextIds.size()); |
| - Assert.assertEquals(contextId, contextIds.iterator().next().getId()); |
| - } |
| - |
| - @Test |
| - public void testGetContextIdExtended() throws Exception { |
| - Long contextId1 = Lib.generateArtifactIdAsInt(); |
| - Long contextId2 = Lib.generateArtifactIdAsInt(); |
| - Artifact user = ArtifactQuery.getArtifactFromToken(SystemUser.Anonymous); |
| - Artifact role2User = ArtifactTypeManager.addArtifact(Artifact, COMMON, "Role 2 user"); |
| - |
| - String testSheet = getTestSheet2(contextId1, user.getId(), contextId2, role2User); |
| - OseeDsl model = OseeDslResourceUtil.loadModel("osee:/text.osee", testSheet).getModel(); |
| - MockDslProvider dslProvider = new MockDslProvider(model); |
| - OseeDslRoleContextProvider contextProvider = new OseeDslRoleContextProvider(dslProvider); |
| - Collection<? extends AccessContextToken> contextIds = contextProvider.getContextId(user); |
| - |
| - Assert.assertEquals(1, contextIds.size()); |
| - Assert.assertEquals(contextId1, contextIds.iterator().next().getId()); |
| - |
| - role2User.persist("Test User"); |
| - contextIds = contextProvider.getContextId(role2User); |
| - |
| - Assert.assertEquals(2, contextIds.size()); |
| - Iterator<? extends AccessContextToken> iterator = contextIds.iterator(); |
| - List<Long> contextList = new LinkedList<>(); |
| - contextList.add(contextId1); |
| - contextList.add(contextId2); |
| - Assert.assertTrue(contextList.remove(iterator.next().getId())); |
| - Assert.assertTrue(contextList.remove(iterator.next().getId())); |
| - |
| - role2User.deleteAndPersist(getClass().getSimpleName()); |
| - } |
| - |
| - @Test |
| - public void testDbInitCreationOfAccessModel() throws Exception { |
| - Artifact model = ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.FrameworkAccessModel); |
| - String xtext = model.getSoleAttributeValue(CoreAttributeTypes.GeneralStringData); |
| - Assert.assertTrue(xtext.contains("anonymous.context")); |
| - } |
| - |
| - private String getTestSheet1(Long contextId, Long role1Id) { |
| - StringBuilder sb = new StringBuilder(); |
| - sb.append("role \"role1\" {\n"); |
| - sb.append(" id "); |
| - sb.append(role1Id); |
| - sb.append(";\n"); |
| - sb.append(" accessContext \"role1.context\";\n"); |
| - sb.append("}\n\n"); |
| - |
| - sb.append("accessContext \"role1.context\" {\n"); |
| - sb.append(" id "); |
| - sb.append(contextId); |
| - sb.append(";\n"); |
| - sb.append(" DENY edit relationType ALL BOTH;\n"); |
| - sb.append("}\n"); |
| - return sb.toString(); |
| - } |
| - |
| - private String getTestSheet2(Long context1, Long role1Id, Long context2, Artifact role2) { |
| - StringBuilder sb = new StringBuilder(getTestSheet1(context1, role1Id)); |
| - sb.append("\nrole \"role2\" extends \"role1\" {\n"); |
| - sb.append(" id "); |
| - sb.append(role2.getIdString()); |
| - sb.append(";\n"); |
| - sb.append(" accessContext \"role2.context\";\n"); |
| - sb.append("}\n\n"); |
| - |
| - sb.append("accessContext \"role2.context\" {\n"); |
| - sb.append(" id "); |
| - sb.append(context2); |
| - sb.append(";\n"); |
| - sb.append(" DENY edit relationType ALL BOTH;\n"); |
| - sb.append("}\n"); |
| - return sb.toString(); |
| - } |
| -} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/XDslUiIntegrationTestSuite.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/XDslUiIntegrationTestSuite.java |
| deleted file mode 100644 |
| index 4ddbed430d..0000000000 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/XDslUiIntegrationTestSuite.java |
| +++ /dev/null |
| @@ -1,26 +0,0 @@ |
| -/********************************************************************* |
| - * Copyright (c) 2012 Boeing |
| - * |
| - * This program and the accompanying materials are made |
| - * available under the terms of the Eclipse Public License 2.0 |
| - * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| - * |
| - * SPDX-License-Identifier: EPL-2.0 |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - **********************************************************************/ |
| - |
| -package org.eclipse.osee.client.integration.tests.integration.dsl.ui.integration; |
| - |
| -import org.junit.runner.RunWith; |
| -import org.junit.runners.Suite; |
| - |
| -@RunWith(Suite.class) |
| -@Suite.SuiteClasses({OseeDslRoleContextProviderTest.class}) |
| -/** |
| - * @author Ryan D. Brooks |
| - */ |
| -public class XDslUiIntegrationTestSuite { |
| - // Test Suite |
| -} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AccessControlTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AccessControlTest.java |
| index f1c17bbfe2..cbbf311718 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AccessControlTest.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AccessControlTest.java |
| @@ -14,13 +14,13 @@ |
| package org.eclipse.osee.client.integration.tests.integration.skynet.core; |
| |
| import static org.eclipse.osee.client.demo.DemoChoice.OSEE_CLIENT_DEMO; |
| +import org.eclipse.osee.client.integration.tests.internal.OseeApiService; |
| import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; |
| import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; |
| import org.eclipse.osee.client.test.framework.TestInfo; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.BranchToken; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| -import org.eclipse.osee.framework.jdk.core.type.OseeStateException; |
| +import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; |
| import org.eclipse.osee.framework.skynet.core.UserManager; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; |
| @@ -51,38 +51,39 @@ public class AccessControlTest { |
| |
| private static BranchToken branch; |
| |
| - @Test(expected = OseeStateException.class) |
| + @Test(expected = OseeCoreException.class) |
| public void testNoWriteOnReadAccessOnBranch() { |
| - AccessControlManager.setPermission(UserManager.getUser(), branch, PermissionEnum.READ); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(), branch, PermissionEnum.READ); |
| artifact1 = new Artifact(branch, "New Name"); |
| artifact1.persist(testInfo.getTestName()); |
| } |
| |
| - @Test(expected = OseeStateException.class) |
| + @Test(expected = OseeCoreException.class) |
| public void testNoWriteOnNoneAccessOnBranch() { |
| - AccessControlManager.setPermission(UserManager.getUser(), branch, PermissionEnum.NONE); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(), branch, PermissionEnum.NONE); |
| artifact2 = new Artifact(branch, "New Name"); |
| artifact2.persist(testInfo.getTestName()); |
| } |
| |
| @Test |
| public void testWriteAccessOnBranch() { |
| - AccessControlManager.setPermission(UserManager.getUser(), branch, PermissionEnum.WRITE); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(), branch, PermissionEnum.WRITE); |
| artifact3 = new Artifact(branch, "New Name"); |
| artifact3.persist(testInfo.getTestName()); |
| } |
| |
| @Test |
| public void testWriteOnFullAccessOnBranch() { |
| - AccessControlManager.setPermission(UserManager.getUser(), branch, PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(), branch, |
| + PermissionEnum.FULLACCESS); |
| artifact4 = new Artifact(branch, "New Name"); |
| artifact4.persist(testInfo.getTestName()); |
| } |
| |
| - @Test(expected = OseeStateException.class) |
| + @Test(expected = OseeCoreException.class) |
| public void testNoWriteOnDenyAccessOnBranch() { |
| BranchToken branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); |
| - AccessControlManager.setPermission(UserManager.getUser(), branch, PermissionEnum.DENY); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(), branch, PermissionEnum.DENY); |
| artifact5 = new Artifact(branch, "New Name"); |
| artifact5.persist(testInfo.getTestName()); |
| } |
| @@ -118,4 +119,4 @@ public class AccessControlTest { |
| BranchManager.purgeBranch(branch); |
| } |
| } |
| -} |
| \ No newline at end of file |
| +} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java |
| index 8465df1ed9..5376259ec6 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java |
| @@ -23,11 +23,11 @@ import java.util.LinkedList; |
| import java.util.List; |
| import java.util.Set; |
| import org.eclipse.core.runtime.jobs.Job; |
| +import org.eclipse.osee.client.integration.tests.internal.OseeApiService; |
| import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; |
| import org.eclipse.osee.client.test.framework.OseeHousekeepingRule; |
| import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; |
| import org.eclipse.osee.client.test.framework.TestInfo; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.ArtifactId; |
| import org.eclipse.osee.framework.core.data.AttributeId; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| @@ -38,6 +38,7 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTokens; |
| import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; |
| import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| import org.eclipse.osee.framework.core.enums.CoreBranches; |
| +import org.eclipse.osee.framework.core.enums.CoreUserGroups; |
| import org.eclipse.osee.framework.core.enums.DeletionFlag; |
| import org.eclipse.osee.framework.core.enums.DemoUsers; |
| import org.eclipse.osee.framework.core.enums.PermissionEnum; |
| @@ -192,7 +193,8 @@ public class ArtifactQueryTest { |
| public void testGetOrCreate() throws Exception { |
| String guid = GUID.create(); |
| BranchToken branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, |
| + PermissionEnum.FULLACCESS); |
| |
| Artifact artifact1 = ArtifactQuery.getOrCreate(guid, CoreArtifactTypes.GeneralData, branch); |
| Assert.assertNotNull(artifact1); |
| @@ -206,7 +208,8 @@ public class ArtifactQueryTest { |
| public void testLargeAttributeIndexing() throws Exception { |
| String guid = GUID.create(); |
| BranchToken branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, |
| + PermissionEnum.FULLACCESS); |
| |
| Artifact artifact1 = ArtifactQuery.getOrCreate(guid, CoreArtifactTypes.GeneralData, branch); |
| artifact1.setSoleAttributeFromString(CoreAttributeTypes.Name, longStr()); |
| @@ -231,7 +234,8 @@ public class ArtifactQueryTest { |
| @Test |
| public void testQueryById() { |
| BranchToken branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, PermissionEnum.FULLACCESS); |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), branch, |
| + PermissionEnum.FULLACCESS); |
| |
| List<ArtifactId> newIdsInOrder = new LinkedList<>(); |
| createArtifactFortestQueryById(newIdsInOrder, branch); |
| @@ -280,7 +284,8 @@ public class ArtifactQueryTest { |
| @Test |
| public void testMultipleValues() { |
| QueryBuilderArtifact builder = ArtifactQuery.createQueryBuilder(CoreBranches.COMMON); |
| - builder.and(CoreAttributeTypes.Name, Arrays.asList("Everyone", "OseeAdmin")); |
| + builder.and(CoreAttributeTypes.Name, |
| + Arrays.asList(CoreUserGroups.Everyone.getName(), CoreUserGroups.OseeAdmin.getName())); |
| int count = builder.getCount(); |
| Assert.assertEquals(2, count); |
| } |
| @@ -288,9 +293,11 @@ public class ArtifactQueryTest { |
| @Test |
| public void testMultipleValuesIgnoreCase() { |
| QueryBuilderArtifact builder = ArtifactQuery.createQueryBuilder(CoreBranches.COMMON); |
| - builder.and(CoreAttributeTypes.Name, Arrays.asList("everyone", "oseeadmin"), QueryOption.CASE__IGNORE); |
| - int count = builder.getCount(); |
| - Assert.assertEquals(2, count); |
| + builder.and(CoreAttributeTypes.Name, Arrays.asList(CoreUserGroups.Everyone.getName().toLowerCase(), |
| + CoreUserGroups.OseeAdmin.getName().toLowerCase()), QueryOption.CASE__IGNORE); |
| + List<Artifact> arts = builder.getResults().getList(); |
| + int count = arts.size(); |
| + Assert.assertEquals(3, count); |
| } |
| |
| @Test |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java |
| index 347df61c6c..ef45795096 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java |
| @@ -40,7 +40,6 @@ import org.eclipse.osee.framework.jdk.core.util.Lib; |
| import org.eclipse.osee.framework.skynet.core.artifact.Artifact; |
| import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; |
| import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact; |
| -import org.eclipse.osee.framework.skynet.core.importing.RoughArtifactKind; |
| import org.eclipse.osee.framework.skynet.core.importing.RoughAttributeSet; |
| import org.eclipse.osee.framework.skynet.core.importing.operations.RoughArtifactCollector; |
| import org.eclipse.osee.framework.skynet.core.importing.parsers.DoorsArtifactExtractor; |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeApiService.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeApiService.java |
| deleted file mode 100644 |
| index 356e139fcd..0000000000 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeApiService.java |
| +++ /dev/null |
| @@ -1,38 +0,0 @@ |
| -/******************************************************************************* |
| - * Copyright (c) 2021 Boeing. |
| - * All rights reserved. This program and the accompanying materials |
| - * are made available under the terms of the Eclipse Public License v1.0 |
| - * which accompanies this distribution, and is available at |
| - * http://www.eclipse.org/legal/epl-v10.html |
| - * |
| - * Contributors: |
| - * Boeing - initial API and implementation |
| - *******************************************************************************/ |
| -package org.eclipse.osee.client.integration.tests.integration.skynet.core; |
| - |
| -import org.eclipse.osee.framework.core.OseeApi; |
| - |
| -/** |
| - * @author Donald G. Dunne |
| - */ |
| -public class OseeApiService { |
| - |
| - public static OseeApi oseeApi; |
| - |
| - public OseeApiService() { |
| - // for jax-rs |
| - } |
| - |
| - public OseeApi getOseeApi() { |
| - return oseeApi; |
| - } |
| - |
| - public void setOseeApi(OseeApi oseeApi) { |
| - OseeApiService.oseeApi = oseeApi; |
| - } |
| - |
| - public static OseeApi get() { |
| - return oseeApi; |
| - } |
| - |
| -} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java |
| index 149fc888e4..2f3bc5eddb 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java |
| @@ -19,10 +19,10 @@ import java.io.InputStream; |
| import java.util.ArrayList; |
| import java.util.HashMap; |
| import java.util.List; |
| +import org.eclipse.osee.client.integration.tests.internal.OseeApiService; |
| import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; |
| import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; |
| import org.eclipse.osee.client.test.framework.TestInfo; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.BranchToken; |
| import org.eclipse.osee.framework.core.enums.CoreArtifactTypes; |
| import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; |
| @@ -87,7 +87,7 @@ public class HtmlRendererTest { |
| |
| String branchName = method.getQualifiedTestName(); |
| rootBranch = BranchManager.createTopLevelBranch(branchName); |
| - AccessControlManager.setPermission(UserManager.getUser(DemoUsers.Joe_Smith), rootBranch, |
| + OseeApiService.get().getAccessControlService().setPermission(UserManager.getUser(DemoUsers.Joe_Smith), rootBranch, |
| PermissionEnum.FULLACCESS); |
| |
| Artifact programRoot = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(rootBranch); |
| @@ -150,4 +150,4 @@ public class HtmlRendererTest { |
| return value; |
| } |
| |
| -} |
| \ No newline at end of file |
| +} |
| diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java |
| index 5de9cca438..786215c81b 100644 |
| --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java |
| +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java |
| @@ -16,9 +16,9 @@ package org.eclipse.osee.client.integration.tests.integration.ui.skynet; |
| import static org.eclipse.osee.client.demo.DemoChoice.OSEE_CLIENT_DEMO; |
| import java.util.LinkedList; |
| import java.util.List; |
| +import org.eclipse.osee.client.integration.tests.internal.OseeApiService; |
| import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; |
| import org.eclipse.osee.client.test.framework.OseeLogMonitorRule; |
| -import org.eclipse.osee.framework.access.AccessControlManager; |
| import org.eclipse.osee.framework.core.data.BranchId; |
| import org.eclipse.osee.framework.core.data.BranchToken; |
| import org.eclipse.osee.framework.core.data.GammaId; |
| @@ -71,8 +71,8 @@ public class RelationIntegrityCheckTest { |
| @Before |
| public void setUp() throws Exception { |
| parentBranch = BranchManager.createTopLevelBranch("1"); |
| |