Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-02-26 20:40:54 +0000
committerRyan D. Brooks2016-02-26 20:40:54 +0000
commit0cd398c60d102eaf9656915ee0889009f2b2daf8 (patch)
treeb2f29dfdb42c7a10515275b5983b1fbbf79c339c
parentfc1c863126913f8daab25764d0bb7f445f246aef (diff)
downloadorg.eclipse.osee-0cd398c60d102eaf9656915ee0889009f2b2daf8.tar.gz
org.eclipse.osee-0cd398c60d102eaf9656915ee0889009f2b2daf8.tar.xz
org.eclipse.osee-0cd398c60d102eaf9656915ee0889009f2b2daf8.zip
feature[ats_ATS194178]: Remove AccessControlEvent and Type
-rw-r--r--plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsTopicEvent.java (renamed from plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsEvents.java)14
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/Activator.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java6
-rw-r--r--plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/Activator.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java12
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java25
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkItemEventHandler.java6
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicEventHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicLockEventHandler.java2
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessBranchTopicEventHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java14
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessEventListener.java15
-rw-r--r--plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/AbstractTopicEvent.java (renamed from plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AbstractTopicEventType.java)7
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/EventType.java (renamed from plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventType.java)2
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/ObjectFactory.java7
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java108
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java1
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/ResMessages.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlersTest.java31
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistryTest.java31
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/EventUtil.java10
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java30
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java15
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/listener/IAccessControlEventListener.java22
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java89
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEventType.java54
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEvent.java34
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventType.java29
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/RemoteEventServiceEventType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TopicEvent.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEventType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlEventHandler.java40
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlRemoteEventHandler.java31
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/TopicLocalEventHandler.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/OSGI-INF/access.artifact.lock.topic.artifact.explorer.handler.xml8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java33
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java25
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerAccessArtifactEventHandler.java50
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/.project5
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/OSGI/access.user.authenticated.topic.handler.xml8
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/build.properties3
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java29
56 files changed, 268 insertions, 611 deletions
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 acaf5de361..300c9ea004 100644
--- a/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF
@@ -38,6 +38,7 @@ Import-Package: javax.ws.rs,
org.eclipse.osee.activity.api,
org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.event,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.util,
org.eclipse.osee.framework.jdk.core.type,
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsEvents.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsTopicEvent.java
index eb17aae144..40cf608f03 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsEvents.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/AtsTopicEvent.java
@@ -10,16 +10,20 @@
*******************************************************************************/
package org.eclipse.osee.ats.api.util;
+import org.eclipse.osee.framework.core.event.AbstractTopicEvent;
+import org.eclipse.osee.framework.core.event.EventType;
+
/**
* @author Donald G. Dunne
*/
-public class AtsEvents {
+public class AtsTopicEvent extends AbstractTopicEvent {
- public static final String WORK_ITEM_MODIFIED = "ats/workitem/modified";
- public static final String WORK_ITEM_UUDS = "workItemUuids";
+ public static final AtsTopicEvent WORK_ITEM_MODIFIED =
+ new AtsTopicEvent(EventType.LocalAndRemote, "ats/workitem/modified");
+ public static final String WORK_ITEM_UUDS_KEY = "workItemUuids";
- private AtsEvents() {
- // utility class
+ private AtsTopicEvent(EventType eventType, String topic) {
+ super(eventType, topic);
}
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
index c3872f3b96..18300b75cb 100644
--- a/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core.client/META-INF/MANIFEST.MF
@@ -37,6 +37,7 @@ Import-Package: com.google.common.cache,
org.eclipse.osee.framework.core.client,
org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.event,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.model.cache,
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/Activator.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/Activator.java
index 11b94e7dbd..552c6d4761 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/Activator.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/Activator.java
@@ -19,11 +19,12 @@ public class Activator implements BundleActivator {
@Override
public void start(BundleContext bundleContext) throws Exception {
+ // do nothing
}
@Override
public void stop(BundleContext bundleContext) throws Exception {
- //
+ // do nothing
}
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
index 3dc6258acf..53a06c9cf0 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java
@@ -17,7 +17,7 @@ import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.ev.AtsWorkPackageEndpointApi;
import org.eclipse.osee.ats.api.ev.IAtsWorkPackage;
import org.eclipse.osee.ats.api.ev.JaxWorkPackageData;
-import org.eclipse.osee.ats.api.util.AtsEvents;
+import org.eclipse.osee.ats.api.util.AtsTopicEvent;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.util.AtsAbstractEarnedValueImpl;
@@ -26,7 +26,6 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.model.EventType;
import org.eclipse.osee.framework.skynet.core.event.model.TopicEvent;
import org.eclipse.osee.logger.Log;
@@ -75,8 +74,8 @@ public class AtsEarnedValueImpl extends AtsAbstractEarnedValueImpl {
workPackageEp.setWorkPackage(workPackage.getUuid(), data);
}
- TopicEvent event = new TopicEvent(AtsEvents.WORK_ITEM_MODIFIED, AtsEvents.WORK_ITEM_UUDS,
- AtsObjects.toUuidsString(";", workItems), EventType.LocalAndRemote);
+ TopicEvent event = new TopicEvent(AtsTopicEvent.WORK_ITEM_MODIFIED, AtsTopicEvent.WORK_ITEM_UUDS_KEY,
+ AtsObjects.toUuidsString(";", workItems));
OseeEventManager.kickTopicEvent(getClass(), event);
services.getStoreService().reload(workItems);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
index 5b4ce9d3d6..12a241548f 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java
@@ -55,8 +55,8 @@ import org.eclipse.osee.ats.core.util.PercentCompleteTotalUtil;
import org.eclipse.osee.ats.core.workflow.state.StateManagerUtility;
import org.eclipse.osee.ats.core.workflow.transition.TransitionManager;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.services.CmAccessControl;
@@ -661,18 +661,22 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return fromState;
}
+ @Override
public boolean isInWork() {
return getStateDefinition().getStateType().isWorkingState();
}
+ @Override
public boolean isCompleted() {
return getStateDefinition().getStateType().isCompletedState();
}
+ @Override
public boolean isCancelled() {
return getStateDefinition().getStateType().isCancelledState();
}
+ @Override
public boolean isCompletedOrCancelled() {
return isCompleted() || isCancelled();
}
diff --git a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
index 052167e147..5f62e70471 100644
--- a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
@@ -124,6 +124,7 @@ Import-Package: com.google.common.cache,
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.event,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.model.access,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/Activator.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/Activator.java
index 8ea8e7cf3c..8022abe66a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/Activator.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/Activator.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.internal;
-import org.eclipse.osee.ats.api.util.AtsEvents;
+import org.eclipse.osee.ats.api.util.AtsTopicEvent;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.workflow.AtsWorkItemEventHandler;
import org.osgi.framework.BundleActivator;
@@ -27,7 +27,7 @@ public class Activator implements BundleActivator {
@Override
public void start(final BundleContext context) {
context.registerService(EventHandler.class.getName(), new AtsWorkItemEventHandler(),
- AtsUtilCore.hashTable(EventConstants.EVENT_TOPIC, AtsEvents.WORK_ITEM_MODIFIED));
+ AtsUtilCore.hashTable(EventConstants.EVENT_TOPIC, AtsTopicEvent.WORK_ITEM_MODIFIED.getTopic()));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
index a368c5e0f8..33ce7c52b4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java
@@ -42,8 +42,8 @@ import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
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.listener.IBranchEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventPayload;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
@@ -71,7 +71,7 @@ import org.osgi.service.event.EventConstants;
import org.osgi.service.event.EventHandler;
/**
- * TopicHandler for {@link AccessTopicEventType.ACCESS_BRANCH_MODIFIED}
+ * TopicHandler for {@link AccessTopicEvent.ACCESS_BRANCH_MODIFIED}
*
* @author Megumi Telles
* @author Donald G. Dunne
@@ -253,7 +253,7 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I
BundleContext context = AtsClientService.get().getEventService().getBundleContext(Activator.PLUGIN_ID);
context.registerService(EventHandler.class.getName(), this,
- AtsUtilCore.hashTable(EventConstants.EVENT_TOPIC, AccessTopicEventType.ACCESS_BRANCH_MODIFIED.getTopic()));
+ AtsUtilCore.hashTable(EventConstants.EVENT_TOPIC, AccessTopicEvent.ACCESS_BRANCH_MODIFIED.getTopic()));
}
@@ -476,8 +476,8 @@ public class XWorkingBranch extends GenericXWidget implements IArtifactWidget, I
public void handleEvent(org.osgi.service.event.Event event) {
BranchId branch = teamArt.getBranch();
if (branch != null) {
- AccessControlEvent accessEvent = EventUtil.getTopicJson(event, AccessControlEvent.class);
- if (accessEvent.isForBranch(branch)) {
+ AccessTopicEventPayload accessEvent = EventUtil.getTopicJson(event, AccessTopicEventPayload.class);
+ if (branch.getUuid().equals(accessEvent.getBranchUuid())) {
refreshOnBranchEvent();
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
index e302b87b62..6986e3d5ad 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchButtonLock.java
@@ -13,7 +13,9 @@ package org.eclipse.osee.ats.util.widgets;
import java.util.Collection;
import java.util.logging.Level;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.internal.Activator;
+import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.access.AccessControlData;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.data.BranchId;
@@ -22,20 +24,23 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.SystemGroup;
import org.eclipse.osee.framework.skynet.core.event.EventUtil;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+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;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.event.EventConstants;
import org.osgi.service.event.EventHandler;
/**
- * TopicHandler for {@link AccessTopicEventType.ACCESS_BRANCH_MODIFIED}
+ * TopicHandler for {@link AccessTopicEvent.ACCESS_BRANCH_MODIFIED}
*
* @author Shawn F. Cook
*/
@@ -126,11 +131,21 @@ public class XWorkingBranchButtonLock extends XWorkingBranchButtonAbstract imple
public void handleEvent(org.osgi.service.event.Event event) {
BranchId branch = getTeamArt().getWorkingBranch();
if (branch != null) {
- AccessControlEvent accessEvent = EventUtil.getTopicJson(event, AccessControlEvent.class);
- if (accessEvent.isForBranch(branch)) {
+ AccessTopicEventPayload accessEvent = EventUtil.getTopicJson(event, AccessTopicEventPayload.class);
+ if (branch.getUuid().equals(accessEvent.getBranchUuid())) {
refreshWorkingBranchWidget();
}
}
}
+ @Override
+ protected void createControls(Composite parent, int horizontalSpan) {
+ super.createControls(parent, horizontalSpan);
+
+ BundleContext context = AtsClientService.get().getEventService().getBundleContext(Activator.PLUGIN_ID);
+ context.registerService(EventHandler.class.getName(), this,
+ AtsUtilCore.hashTable(EventConstants.EVENT_TOPIC, AccessTopicEvent.ACCESS_BRANCH_MODIFIED.getTopic()));
+
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkItemEventHandler.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkItemEventHandler.java
index 8178697774..b23e9520ee 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkItemEventHandler.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkItemEventHandler.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow;
-import org.eclipse.osee.ats.api.util.AtsEvents;
+import org.eclipse.osee.ats.api.util.AtsTopicEvent;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.ats.editor.SMAEditorArtifactEventManager;
@@ -27,9 +27,9 @@ public class AtsWorkItemEventHandler implements EventHandler {
@Override
public void handleEvent(Event event) {
try {
- if (event.getTopic().equals(AtsEvents.WORK_ITEM_MODIFIED)) {
+ if (event.getTopic().equals(AtsTopicEvent.WORK_ITEM_MODIFIED)) {
for (Long workItemUuid : AtsObjects.uuidsToLong(";",
- (String) event.getProperty(AtsEvents.WORK_ITEM_UUDS))) {
+ (String) event.getProperty(AtsTopicEvent.WORK_ITEM_UUDS_KEY))) {
Artifact artifact = ArtifactCache.getActive(workItemUuid, AtsUtilCore.getAtsBranch().getUuid());
if (artifact != null) {
if (SMAEditorArtifactEventManager.isLoaded(artifact)) {
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicEventHandler.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicEventHandler.java
index 5d5d4db491..5ac0b1db6b 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicEventHandler.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicEventHandler.java
@@ -13,12 +13,12 @@ package org.eclipse.osee.framework.access.internal;
import java.util.logging.Level;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
- * Handler for {@link AccessTopicEventType.ACCESS_ARTIFACT_MODIFIED}
+ * Handler for {@link AccessTopicEvent.ACCESS_ARTIFACT_MODIFIED}
*
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicLockEventHandler.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicLockEventHandler.java
index ad13d5682f..b6d9860024 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicLockEventHandler.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessArtifactTopicLockEventHandler.java
@@ -17,7 +17,7 @@ import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
- * Handler for {@link AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED}
+ * Handler for {@link AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED}
*
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessBranchTopicEventHandler.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessBranchTopicEventHandler.java
index 427c3c55bd..588f3533f8 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessBranchTopicEventHandler.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessBranchTopicEventHandler.java
@@ -13,12 +13,12 @@ package org.eclipse.osee.framework.access.internal;
import java.util.logging.Level;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
- * Handler for {@link AccessTopicEventType.ACCESS_BRANCH_MODIFIED}
+ * Handler for {@link AccessTopicEvent.ACCESS_BRANCH_MODIFIED}
*
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
index b7a885f29c..8cbfddef6f 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
@@ -74,7 +74,7 @@ import org.eclipse.osee.framework.skynet.core.event.listener.EventQosType;
import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener;
import org.eclipse.osee.framework.skynet.core.event.model.AccessArtifactLockTopicEvent;
import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventPayload;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.utility.DbUtil;
@@ -503,7 +503,7 @@ public class AccessControlService implements IAccessControlService {
persistPermissionForArtifact(data, artifactAccessObject, recurse, event);
cacheAccessControlData(data);
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_ARTIFACT_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_MODIFIED);
} else if (data.getObject() instanceof BranchAccessObject) {
@@ -514,7 +514,7 @@ public class AccessControlService implements IAccessControlService {
AccessTopicEventPayload event = new AccessTopicEventPayload();
event.setBranchUuid(branchAccessObject.getBranchId());
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_BRANCH_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_BRANCH_MODIFIED);
}
}
@@ -676,7 +676,7 @@ public class AccessControlService implements IAccessControlService {
event.addArtifact(((ArtifactAccessObject) accessControlledObject).getArtId());
}
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_ARTIFACT_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_MODIFIED);
}
@@ -735,7 +735,7 @@ public class AccessControlService implements IAccessControlService {
}
}
try {
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED);
} catch (Exception ex) {
OseeLog.log(AccessControlHelper.class, Level.SEVERE, ex);
}
@@ -760,7 +760,7 @@ public class AccessControlService implements IAccessControlService {
}
}
try {
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED);
} catch (Exception ex) {
OseeLog.log(AccessControlHelper.class, Level.SEVERE, ex);
}
@@ -775,7 +775,7 @@ public class AccessControlService implements IAccessControlService {
try {
AccessTopicEventPayload event = new AccessTopicEventPayload();
event.setBranchUuid(branch.getUuid());
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_BRANCH_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_BRANCH_MODIFIED);
} catch (Exception ex) {
OseeLog.log(AccessControlHelper.class, Level.SEVERE, ex);
}
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessEventListener.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessEventListener.java
index fa6e55e1b1..f1f72e870a 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessEventListener.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessEventListener.java
@@ -19,10 +19,8 @@ import org.eclipse.osee.framework.logging.OseeLog;
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.event.filter.IEventFilter;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IBranchEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
@@ -33,7 +31,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.Sender;
/**
* @author Donald G. Dunne
*/
-public final class AccessEventListener implements IBranchEventListener, IAccessControlEventListener, IArtifactEventListener {
+public final class AccessEventListener implements IBranchEventListener, IArtifactEventListener {
private final AccessControlService service;
private final AccessControlCacheHandler accessControlCacheHandler;
@@ -84,15 +82,4 @@ public final class AccessEventListener implements IBranchEventListener, IAccessC
}
}
- @Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- try {
- // local is handled by operations against cache
- if (sender.isRemote()) {
- accessControlCacheHandler.reloadCache(service);
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(AccessControlHelper.class, Level.SEVERE, ex);
- }
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
index e9777bdf59..0f7bb59e84 100644
--- a/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.core/META-INF/MANIFEST.MF
@@ -24,9 +24,11 @@ Import-Package: org.apache.commons.httpclient,
org.eclipse.osee.framework.jdk.core.util,
org.eclipse.osee.framework.logging,
org.eclipse.osgi.framework.console,
+ org.osgi.service.event;version="1.3.1",
org.osgi.util.tracker
Export-Package: org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.event,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.operation,
org.eclipse.osee.framework.core.ops,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AbstractTopicEventType.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/AbstractTopicEvent.java
index 4a9693e3f8..7ac084917c 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AbstractTopicEventType.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/AbstractTopicEvent.java
@@ -8,20 +8,19 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.framework.skynet.core.event.model;
+package org.eclipse.osee.framework.core.event;
import org.osgi.service.event.Event;
/**
- *
* @author Donald G. Dunne
*/
-public class AbstractTopicEventType {
+public class AbstractTopicEvent {
private EventType eventType;
private String topic;
- protected AbstractTopicEventType(EventType eventType, String topic) {
+ protected AbstractTopicEvent(EventType eventType, String topic) {
this.eventType = eventType;
this.topic = topic;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventType.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/EventType.java
index 56eb3e7401..84ed05c6f8 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventType.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/event/EventType.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.framework.skynet.core.event.model;
+package org.eclipse.osee.framework.core.event;
/**
* @author Donald G. Dunne
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/ObjectFactory.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/ObjectFactory.java
index fc3ebacb5d..4377730337 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/ObjectFactory.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/ObjectFactory.java
@@ -78,13 +78,6 @@ public class ObjectFactory {
}
/**
- * Create an instance of {@link RemoteAccessControlEvent1 }
- */
- public RemoteAccessControlEvent1 createRemoteAccessControlEvent1() {
- return new RemoteAccessControlEvent1();
- }
-
- /**
* Create an instance of {@link RemoteBasicGuidRelation1 }
*/
public RemoteBasicGuidRelation1 createRemoteBasicGuidRelation1() {
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java
deleted file mode 100644
index 70cca524ce..0000000000
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java
+++ /dev/null
@@ -1,108 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2012.09.14 at 05:06:42 PM MST
-//
-
-package org.eclipse.osee.framework.messaging.event.res.msgs;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
-
-/**
- * <p>
- * Java class for RemoteAccessControlEvent1 complex type.
- * <p>
- * The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="RemoteAccessControlEvent1">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="eventTypeGuid" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * &lt;element name="artifacts" type="{}RemoteBasicGuidArtifact1" maxOccurs="unbounded"/>
- * &lt;element name="networkSender" type="{}RemoteNetworkSender1"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "RemoteAccessControlEvent1", propOrder = {"eventTypeGuid", "artifacts", "networkSender"})
-public class RemoteAccessControlEvent1 extends RemoteEvent {
-
- @XmlElement(required = true)
- protected String eventTypeGuid;
- @XmlElement(required = true)
- protected List<RemoteBasicGuidArtifact1> artifacts;
- @XmlElement(required = true)
- protected RemoteNetworkSender1 networkSender;
-
- /**
- * Gets the value of the eventTypeGuid property.
- *
- * @return possible object is {@link String }
- */
- public String getEventTypeGuid() {
- return eventTypeGuid;
- }
-
- /**
- * Sets the value of the eventTypeGuid property.
- *
- * @param value allowed object is {@link String }
- */
- public void setEventTypeGuid(String value) {
- this.eventTypeGuid = value;
- }
-
- /**
- * Gets the value of the artifacts property.
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to
- * the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for
- * the artifacts property.
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getArtifacts().add(newItem);
- * </pre>
- * <p>
- * Objects of the following type(s) are allowed in the list {@link RemoteBasicGuidArtifact1 }
- */
- public List<RemoteBasicGuidArtifact1> getArtifacts() {
- if (artifacts == null) {
- artifacts = new ArrayList<>();
- }
- return this.artifacts;
- }
-
- /**
- * Gets the value of the networkSender property.
- *
- * @return possible object is {@link RemoteNetworkSender1 }
- */
- @Override
- public RemoteNetworkSender1 getNetworkSender() {
- return networkSender;
- }
-
- /**
- * Sets the value of the networkSender property.
- *
- * @param value allowed object is {@link RemoteNetworkSender1 }
- */
- public void setNetworkSender(RemoteNetworkSender1 value) {
- this.networkSender = value;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java
index cb46573d53..18aa3c749b 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java
@@ -39,7 +39,6 @@ public class OseeCoreModelEventServiceProxy implements IOseeCoreModelEventServic
public void start() {
Map<ResMessages, Boolean> eventMessageConfig = new HashMap<>();
- eventMessageConfig.put(ResMessages.RemoteAccessControlEvent1, Boolean.TRUE);
eventMessageConfig.put(ResMessages.RemoteBranchEvent1, Boolean.TRUE);
eventMessageConfig.put(ResMessages.RemoteBroadcastEvent1, Boolean.TRUE);
eventMessageConfig.put(ResMessages.RemotePersistEvent1, Boolean.FALSE);
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/ResMessages.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/ResMessages.java
index 40d9584b14..03766c3606 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/ResMessages.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/ResMessages.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.messaging.event.res.internal;
import org.eclipse.osee.framework.messaging.MessageID;
import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
import org.eclipse.osee.framework.messaging.event.res.RemoteTopicEvent1;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAccessControlEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBroadcastEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemotePersistEvent1;
@@ -24,8 +23,7 @@ public enum ResMessages implements MessageID {
RemoteBroadcastEvent1(true, "Aylfa1y3ZBSIGbVU3JgA", "topic:org.eclipse.osee.coverage.msgs.RemoteBroadcastEvent1", RemoteBroadcastEvent1.class, false),
RemotePersistEvent1(true, "AISIbRj0KGBv62x2pMAA", "topic:org.eclipse.osee.coverage.msgs.RemotePersistEvent1", RemotePersistEvent1.class, false),
RemoteTopicEvent1(true, "ARqNVjHQVAGmszjGOhwA", "topic:org.eclipse.osee.coverage.msgs.RemoteTopicEvent1", RemoteTopicEvent1.class, false),
- RemoteTransactionEvent1(true, "AAn_QHkqUhz3vJKwp8QA", "topic:org.eclipse.osee.coverage.msgs.RemoteTransactionEvent1", RemoteTransactionEvent1.class, false),
- RemoteAccessControlEvent1(true, "AFRkIhdPkwExx96ioXgA", "topic:org.eclipse.osee.coverage.msgs.RemoteAccessControlEvent1", RemoteAccessControlEvent1.class, false);
+ RemoteTransactionEvent1(true, "AAn_QHkqUhz3vJKwp8QA", "topic:org.eclipse.osee.coverage.msgs.RemoteTransactionEvent1", RemoteTransactionEvent1.class, false);
private String name;
private Class<? extends RemoteEvent> clazz;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlersTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlersTest.java
index 47e5f7937b..8338845d53 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlersTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlersTest.java
@@ -10,23 +10,25 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.internal.event;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreBranches;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAccessControlEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBroadcastEvent1;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
+import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionEvent1;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
+import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
+import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionEvent;
-import org.eclipse.osee.framework.skynet.core.internal.event.handlers.AccessControlEventHandler;
-import org.eclipse.osee.framework.skynet.core.internal.event.handlers.AccessControlRemoteEventHandler;
import org.eclipse.osee.framework.skynet.core.internal.event.handlers.ArtifactEventHandler;
import org.eclipse.osee.framework.skynet.core.internal.event.handlers.BranchRemoteEventHandler;
+import org.eclipse.osee.framework.skynet.core.internal.event.handlers.TransactionEventHandler;
+import org.eclipse.osee.framework.skynet.core.internal.event.handlers.TransactionRemoteEventHandler;
import org.junit.Assert;
import org.junit.Test;
/**
* Test Case for @{link EventHandlers}
- *
+ *
* @author Roberto E. Escobar
*/
public class EventHandlersTest {
@@ -35,13 +37,13 @@ public class EventHandlersTest {
public void test() {
EventHandlers handlers = new EventHandlers();
- EventHandlerLocal<?, ?> local1 = new AccessControlEventHandler();
+ EventHandlerLocal<?, ?> local1 = new TransactionEventHandler();
EventHandlerLocal<?, ?> local2 = new ArtifactEventHandler();
- EventHandlerRemote<?> remote1 = new AccessControlRemoteEventHandler();
+ EventHandlerRemote<?> remote1 = new TransactionRemoteEventHandler();
EventHandlerRemote<?> remote2 = new BranchRemoteEventHandler();
- handlers.addLocalHandler(AccessControlEvent.class, local1);
+ handlers.addLocalHandler(TransactionEvent.class, local1);
Assert.assertEquals(1, handlers.sizeLocal());
Assert.assertEquals(0, handlers.sizeRemote());
@@ -49,7 +51,7 @@ public class EventHandlersTest {
Assert.assertEquals(2, handlers.sizeLocal());
Assert.assertEquals(0, handlers.sizeRemote());
- handlers.addRemoteHandler(RemoteAccessControlEvent1.class, remote1);
+ handlers.addRemoteHandler(RemoteTransactionEvent1.class, remote1);
Assert.assertEquals(2, handlers.sizeLocal());
Assert.assertEquals(1, handlers.sizeRemote());
@@ -57,15 +59,16 @@ public class EventHandlersTest {
Assert.assertEquals(2, handlers.sizeLocal());
Assert.assertEquals(2, handlers.sizeRemote());
- Assert.assertEquals(local1, handlers.getLocalHandler(new AccessControlEvent()));
+ Assert.assertEquals(local1, handlers.getLocalHandler(new TransactionEvent()));
Assert.assertEquals(local2, handlers.getLocalHandler(new ArtifactEvent(CoreBranches.COMMON)));
- Assert.assertNull(handlers.getLocalHandler(new TransactionEvent()));
+ Assert.assertNull(
+ handlers.getLocalHandler(new BranchEvent(BranchEventType.Added, TokenFactory.createBranch(345L))));
- Assert.assertEquals(remote1, handlers.getRemoteHandler(new RemoteAccessControlEvent1()));
+ Assert.assertEquals(remote1, handlers.getRemoteHandler(new RemoteTransactionEvent1()));
Assert.assertEquals(remote2, handlers.getRemoteHandler(new RemoteBranchEvent1()));
Assert.assertNull(handlers.getRemoteHandler(new RemoteBroadcastEvent1()));
- handlers.removeLocalHandler(AccessControlEvent.class);
+ handlers.removeLocalHandler(TransactionEvent.class);
Assert.assertEquals(1, handlers.sizeLocal());
Assert.assertEquals(2, handlers.sizeRemote());
@@ -73,7 +76,7 @@ public class EventHandlersTest {
Assert.assertEquals(0, handlers.sizeLocal());
Assert.assertEquals(2, handlers.sizeRemote());
- handlers.removeRemoteHandler(RemoteAccessControlEvent1.class);
+ handlers.removeRemoteHandler(RemoteTransactionEvent1.class);
Assert.assertEquals(0, handlers.sizeLocal());
Assert.assertEquals(1, handlers.sizeRemote());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistryTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistryTest.java
index 529063cf9a..acd3f6a020 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistryTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistryTest.java
@@ -12,16 +12,15 @@ package org.eclipse.osee.framework.skynet.core.internal.event;
import java.util.Collection;
import java.util.List;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter;
import org.eclipse.osee.framework.skynet.core.event.listener.EventQosType;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IBranchEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.ITransactionEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
@@ -39,6 +38,7 @@ public class EventListenerRegistryTest {
@Test
public void testRegistration() {
+ BranchId branch = TokenFactory.createBranch(345L);
EventListenerRegistry registry = new EventListenerRegistry();
Delegate1 delegate1 = new Delegate1();
Delegate2 delegate2 = new Delegate2();
@@ -47,20 +47,20 @@ public class EventListenerRegistryTest {
registry.addListener(EventQosType.PRIORITY, delegate1);
Assert.assertEquals(1, registry.size());
- Assert.assertEquals(2, registry.size(EventQosType.PRIORITY));
+ Assert.assertEquals(1, registry.size(EventQosType.PRIORITY));
Assert.assertEquals(0, registry.size(EventQosType.NORMAL));
registry.addListener(EventQosType.NORMAL, delegate2);
Assert.assertEquals(2, registry.size());
- Assert.assertEquals(2, registry.size(EventQosType.PRIORITY));
+ Assert.assertEquals(1, registry.size(EventQosType.PRIORITY));
Assert.assertEquals(2, registry.size(EventQosType.NORMAL));
Collection<IEventListener> listener0 = registry.getListeners(EventQosType.PRIORITY, new TransactionEvent());
Assert.assertEquals(0, listener0.size());
- Collection<IEventListener> listener = registry.getListeners(EventQosType.PRIORITY, new AccessControlEvent());
- Assert.assertEquals(1, listener.size());
- Assert.assertEquals(delegate1, listener.iterator().next());
+ Collection<IEventListener> listener =
+ registry.getListeners(EventQosType.PRIORITY, new BranchEvent(BranchEventType.Added, branch));
+ Assert.assertEquals(0, listener.size());
Collection<IEventListener> listener2 =
registry.getListeners(EventQosType.PRIORITY, new ArtifactEvent(CoreBranches.COMMON));
@@ -78,15 +78,15 @@ public class EventListenerRegistryTest {
registry.removeListener(delegate2);
Assert.assertEquals(1, registry.size());
- Assert.assertEquals(2, registry.size(EventQosType.PRIORITY));
+ Assert.assertEquals(1, registry.size(EventQosType.PRIORITY));
Assert.assertEquals(0, registry.size(EventQosType.NORMAL));
Collection<IEventListener> listener5 = registry.getListeners(EventQosType.NORMAL, new TransactionEvent());
Assert.assertEquals(0, listener5.size());
- Collection<IEventListener> listener6 = registry.getListeners(EventQosType.PRIORITY, new AccessControlEvent());
- Assert.assertEquals(1, listener6.size());
- Assert.assertEquals(delegate1, listener6.iterator().next());
+ Collection<IEventListener> listener6 =
+ registry.getListeners(EventQosType.PRIORITY, new BranchEvent(BranchEventType.Added, branch));
+ Assert.assertEquals(0, listener6.size());
registry.removeListener(delegate1);
Assert.assertEquals(0, registry.size());
@@ -113,7 +113,7 @@ public class EventListenerRegistryTest {
}
- private static final class Delegate1 implements IArtifactEventListener, IAccessControlEventListener {
+ private static final class Delegate1 implements IArtifactEventListener {
@Override
public List<? extends IEventFilter> getEventFilters() {
@@ -121,14 +121,9 @@ public class EventListenerRegistryTest {
}
@Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- //
- }
-
- @Override
public void handleArtifactEvent(ArtifactEvent artifactEvent, Sender sender) {
//
}
}
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.skynet.core/META-INF/MANIFEST.MF
index fce757c6a5..375713c7ef 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.skynet.core/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.osee.framework.messaging,
org.eclipse.osee.framework.lifecycle,
org.jsoup,
- org.codehaus.jackson.core
+ org.codehaus.jackson.core,
+ org.eclipse.osee.framework.core
Export-Package: org.eclipse.osee.framework.skynet.core,
org.eclipse.osee.framework.skynet.core.artifact,
org.eclipse.osee.framework.skynet.core.artifact.factory,
@@ -74,6 +75,7 @@ Import-Package: com.google.common.collect;version="15.0.0",
org.eclipse.osee.framework.core.dsl.oseeDsl,
org.eclipse.osee.framework.core.dsl.oseeDsl.util,
org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.event,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.model.access,
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/EventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/EventUtil.java
index eca0009284..5e2d02aa55 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/EventUtil.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/EventUtil.java
@@ -13,11 +13,12 @@ package org.eclipse.osee.framework.skynet.core.event;
import java.util.logging.Level;
import org.codehaus.jackson.map.ObjectMapper;
import org.eclipse.osee.framework.core.enums.CoreBranches;
+import org.eclipse.osee.framework.core.event.AbstractTopicEvent;
+import org.eclipse.osee.framework.core.event.EventType;
import org.eclipse.osee.framework.core.exception.OseeWrappedException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.event.filter.BranchUuidEventFilter;
-import org.eclipse.osee.framework.skynet.core.event.model.EventType;
import org.eclipse.osee.framework.skynet.core.event.model.TopicEvent;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
import org.osgi.service.event.Event;
@@ -110,6 +111,13 @@ public final class EventUtil {
/**
* Create topic event given topic and oject to searialize to json property
*/
+ public static TopicEvent createTopic(AbstractTopicEvent topic, Object event) {
+ return createTopic(topic.getTopic(), event, topic.getEventType());
+ }
+
+ /**
+ * Create topic event given topic and oject to searialize to json property
+ */
public static TopicEvent createTopic(String topic, Object event, EventType eventType) {
try {
return new TopicEvent(topic, "json", EventUtil.getEventJacksonMapper().writeValueAsString(event), eventType);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
index d86f7702cb..4024cd32a8 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
import org.eclipse.osee.framework.messaging.event.res.RemoteTopicEvent1;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAccessControlEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAttributeChange1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBasicGuidArtifact1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBasicGuidRelation1;
@@ -32,8 +31,6 @@ import org.eclipse.osee.framework.messaging.event.res.msgs.RemotePersistEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionChange1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteTransactionEvent1;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.AttributeChange;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
@@ -60,33 +57,6 @@ public final class FrameworkEventUtil {
// Utility Class
}
- public static RemoteAccessControlEvent1 getRemoteAccessControlEvent(AccessControlEvent accessControlEvent) {
- RemoteAccessControlEvent1 event = new RemoteAccessControlEvent1();
- event.setNetworkSender(getRemoteNetworkSender(accessControlEvent.getNetworkSender()));
- event.setEventTypeGuid(accessControlEvent.getEventType().getGuid());
- for (DefaultBasicGuidArtifact guidArt : accessControlEvent.getArtifacts()) {
- event.getArtifacts().add(getRemoteBasicGuidArtifact(guidArt));
- }
- return event;
- }
-
- public static AccessControlEvent getAccessControlEvent(RemoteAccessControlEvent1 remEvent) {
- AccessControlEventType accessControlEventType = AccessControlEventType.getByGuid(remEvent.getEventTypeGuid());
- if (accessControlEventType != null) {
- AccessControlEvent accessControlEvent = new AccessControlEvent();
- accessControlEvent.setNetworkSender(getNetworkSender(remEvent.getNetworkSender()));
- for (RemoteBasicGuidArtifact1 remGuidArt : remEvent.getArtifacts()) {
- accessControlEvent.getArtifacts().add(getBasicGuidArtifact(remGuidArt));
- }
- accessControlEvent.setEventType(AccessControlEventType.getByGuid(remEvent.getEventTypeGuid()));
- return accessControlEvent;
- } else {
- OseeLog.log(Activator.class, Level.WARNING,
- "Unhandled AccessControl event type guid " + remEvent.getEventTypeGuid());
- }
- return null;
- }
-
public static RemoteBranchEvent1 getRemoteBranchEvent(BranchEvent branchEvent) {
RemoteBranchEvent1 event = new RemoteBranchEvent1();
event.setEventTypeGuid(branchEvent.getEventType().getGuid());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
index 6925bc6801..c76ba2321f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java
@@ -25,9 +25,8 @@ import org.eclipse.osee.framework.skynet.core.event.filter.BranchUuidEventFilter
import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter;
import org.eclipse.osee.framework.skynet.core.event.listener.EventQosType;
import org.eclipse.osee.framework.skynet.core.event.listener.IEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
+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.skynet.core.event.model.AccessTopicEventType;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent.ArtifactEventType;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
@@ -122,13 +121,12 @@ public final class OseeEventManager {
}
// Kick LOCAL and REMOTE topic event with payload
- public static void kickAccessTopicEvent(Object source, AccessTopicEventPayload payload, AccessTopicEventType accessEventTopicType) {
+ public static void kickAccessTopicEvent(Object source, AccessTopicEventPayload payload, AccessTopicEvent accesstopicEvent) {
try {
- TopicEvent topicEvent =
- EventUtil.createTopic(accessEventTopicType.getTopic(), payload, accessEventTopicType.getEventType());
+ TopicEvent topicEvent = EventUtil.createTopic(accesstopicEvent, payload);
kickTopicEvent(source, topicEvent);
} catch (Exception ex) {
- OseeLog.logf(OseeEventManager.class, Level.SEVERE, ex, "Error kicking event [%s][%s]", accessEventTopicType,
+ OseeLog.logf(OseeEventManager.class, Level.SEVERE, ex, "Error kicking event [%s][%s]", accesstopicEvent,
payload);
}
}
@@ -147,11 +145,6 @@ public final class OseeEventManager {
getEventService().send(source, branchEvent);
}
- // Kick LOCAL and REMOTE access control events
- public static void kickAccessControlArtifactsEvent(Object source, AccessControlEvent accessControlEvent) throws OseeCoreException {
- getEventService().send(source, accessControlEvent);
- }
-
// Kick LOCAL and REMOTE transaction deleted event
public static void kickTransactionEvent(Object source, final TransactionEvent transactionEvent) throws OseeCoreException {
getEventService().send(source, transactionEvent);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/listener/IAccessControlEventListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/listener/IAccessControlEventListener.java
deleted file mode 100644
index 7ec9e70ecd..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/listener/IAccessControlEventListener.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.framework.skynet.core.event.listener;
-
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
-
-/**
- * @author Donald G. Dunne
- */
-public interface IAccessControlEventListener extends IEventListener {
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent);
-
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java
deleted file mode 100644
index 505d1cd099..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.framework.skynet.core.event.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
-
-public class AccessControlEvent implements FrameworkEvent, HasNetworkSender, HasEventType<AccessControlEventType> {
-
- private AccessControlEventType eventType;
- private List<DefaultBasicGuidArtifact> artifacts;
- private NetworkSender networkSender;
-
- /**
- * Gets the value of the artifacts property.
- * <p>
- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to
- * the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for
- * the artifacts property.
- * <p>
- * For example, to add a new item, do as follows:
- *
- * <pre>
- * getArtifacts().add(newItem);
- * </pre>
- * <p>
- * Objects of the following type(s) are allowed in the list {@link DefaultBasicGuidArtifact }
- */
- public List<DefaultBasicGuidArtifact> getArtifacts() {
- if (artifacts == null) {
- artifacts = new ArrayList<>();
- }
- return this.artifacts;
- }
-
- /**
- * Gets the value of the networkSender property.
- *
- * @return possible object is {@link NetworkSender }
- */
- @Override
- public NetworkSender getNetworkSender() {
- return networkSender;
- }
-
- /**
- * Sets the value of the networkSender property.
- *
- * @param value allowed object is {@link NetworkSender }
- */
- @Override
- public void setNetworkSender(NetworkSender value) {
- this.networkSender = value;
- }
-
- @Override
- public AccessControlEventType getEventType() {
- return eventType;
- }
-
- public void setEventType(AccessControlEventType eventType) {
- this.eventType = eventType;
- }
-
- public boolean isForBranch(BranchId branch) {
- for (DefaultBasicGuidArtifact guidArt : getArtifacts()) {
- if (guidArt.isOnBranch(branch)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public String toString() {
- return "AccessControlEvent [type=" + eventType + ", artifacts=" + artifacts + ", sender=" + networkSender + "]";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEventType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEventType.java
deleted file mode 100644
index 33fff2dc4c..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEventType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.framework.skynet.core.event.model;
-
-/**
- * @author Donald G. Dunne
- */
-public enum AccessControlEventType {
- UserAuthenticated(EventType.LocalOnly, "AFRkIhbm0BbIGKALcKQA", 25);
-
- private final EventType eventType;
- private final String guid;
- private final int id;
-
- public boolean isRemoteEventType() {
- return eventType == EventType.LocalAndRemote || eventType == EventType.RemoteOnly;
- }
-
- public boolean isLocalEventType() {
- return eventType == EventType.LocalAndRemote || eventType == EventType.LocalOnly;
- }
-
- private AccessControlEventType(EventType eventType, String guid, int id) {
- this.eventType = eventType;
- this.guid = guid;
- this.id = id;
- }
-
- public String getGuid() {
- return guid;
- }
-
- public static AccessControlEventType getByGuid(String guid) {
- for (AccessControlEventType type : values()) {
- if (type.guid.equals(guid)) {
- return type;
- }
- }
- return null;
- }
-
- public int getId() {
- return id;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEvent.java
new file mode 100644
index 0000000000..092c0a615f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEvent.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.framework.skynet.core.event.model;
+
+import org.eclipse.osee.framework.core.event.AbstractTopicEvent;
+import org.eclipse.osee.framework.core.event.EventType;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AccessTopicEvent extends AbstractTopicEvent {
+
+ public static final AccessTopicEvent ACCESS_ARTIFACT_MODIFIED =
+ new AccessTopicEvent(EventType.LocalAndRemote, "framework/access/artifact/modified");
+ public static final AccessTopicEvent ACCESS_ARTIFACT_LOCK_MODIFIED =
+ new AccessTopicEvent(EventType.LocalAndRemote, "framework/access/artifact/lock/modified");
+ public static final AccessTopicEvent ACCESS_BRANCH_MODIFIED =
+ new AccessTopicEvent(EventType.LocalAndRemote, "framework/access/branch/modified");
+ public static final AccessTopicEvent USER_AUTHENTICATED =
+ new AccessTopicEvent(EventType.LocalOnly, "framework/access/user/authenticated");
+
+ private AccessTopicEvent(EventType eventType, String topic) {
+ super(eventType, topic);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventType.java
deleted file mode 100644
index 4217e020ca..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessTopicEventType.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 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.framework.skynet.core.event.model;
-
-/**
- * @author Donald G. Dunne
- */
-public class AccessTopicEventType extends AbstractTopicEventType {
-
- public static final AccessTopicEventType ACCESS_ARTIFACT_MODIFIED =
- new AccessTopicEventType(EventType.LocalAndRemote, "framework/access/artifact/modified");
- public static final AccessTopicEventType ACCESS_ARTIFACT_LOCK_MODIFIED =
- new AccessTopicEventType(EventType.LocalAndRemote, "framework/access/artifact/lock/modified");
- public static final AccessTopicEventType ACCESS_BRANCH_MODIFIED =
- new AccessTopicEventType(EventType.LocalAndRemote, "framework/access/branch/modified");
-
- private AccessTopicEventType(EventType eventType, String topic) {
- super(eventType, topic);
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventType.java
index e5048e0afa..299e15d10e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/BranchEventType.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.event.model;
+import org.eclipse.osee.framework.core.event.EventType;
+
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/RemoteEventServiceEventType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/RemoteEventServiceEventType.java
index f1cbdd6d5d..c298dfeffc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/RemoteEventServiceEventType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/RemoteEventServiceEventType.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.event.model;
+import org.eclipse.osee.framework.core.event.EventType;
+
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TopicEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TopicEvent.java
index 9f9097ed3e..8e691c5b66 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TopicEvent.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TopicEvent.java
@@ -12,6 +12,8 @@ package org.eclipse.osee.framework.skynet.core.event.model;
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.osee.framework.core.event.AbstractTopicEvent;
+import org.eclipse.osee.framework.core.event.EventType;
/**
* @author Donald G. Dunne
@@ -28,6 +30,10 @@ public class TopicEvent implements FrameworkEvent, HasNetworkSender {
properties = new HashMap<>();
}
+ public TopicEvent(AbstractTopicEvent topic, String key, String value) {
+ this(topic.getTopic(), key, value, topic.getEventType());
+ }
+
public TopicEvent(String topic, String key, String value, EventType eventType) {
this(topic);
this.eventType = eventType;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEventType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEventType.java
index c35c3a045e..9c1865cf18 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEventType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEventType.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.event.model;
+import org.eclipse.osee.framework.core.event.EventType;
+
/**
* @author Donald G. Dunne
*/
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java
index 9dbd31cadc..15238a3cee 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java
@@ -22,7 +22,6 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.event.res.IOseeCoreModelEventService;
import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
import org.eclipse.osee.framework.messaging.event.res.RemoteTopicEvent1;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAccessControlEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBroadcastEvent1;
import org.eclipse.osee.framework.messaging.event.res.msgs.RemotePersistEvent1;
@@ -32,7 +31,6 @@ import org.eclipse.osee.framework.skynet.core.event.EventUtil;
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.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.FrameworkEvent;
@@ -46,8 +44,6 @@ import org.eclipse.osee.framework.skynet.core.internal.event.EventListenerRegist
import org.eclipse.osee.framework.skynet.core.internal.event.EventTransport;
import org.eclipse.osee.framework.skynet.core.internal.event.OseeEventThreadFactory;
import org.eclipse.osee.framework.skynet.core.internal.event.TopicEventAdmin;
-import org.eclipse.osee.framework.skynet.core.internal.event.handlers.AccessControlEventHandler;
-import org.eclipse.osee.framework.skynet.core.internal.event.handlers.AccessControlRemoteEventHandler;
import org.eclipse.osee.framework.skynet.core.internal.event.handlers.ArtifactEventHandler;
import org.eclipse.osee.framework.skynet.core.internal.event.handlers.ArtifactRemoteEventHandler;
import org.eclipse.osee.framework.skynet.core.internal.event.handlers.BranchEventHandler;
@@ -203,14 +199,12 @@ public class OseeEventServiceImpl implements OseeEventService {
}
private void registerEventHandlers(EventHandlers handlers) {
- handlers.addLocalHandler(AccessControlEvent.class, new AccessControlEventHandler());
handlers.addLocalHandler(ArtifactEvent.class, new ArtifactEventHandler());
handlers.addLocalHandler(BranchEvent.class, new BranchEventHandler());
handlers.addLocalHandler(RemoteEventServiceEventType.class, new RemoteServiceEventHandler());
handlers.addLocalHandler(TransactionEvent.class, new TransactionEventHandler());
handlers.addLocalHandler(TopicEvent.class, new TopicLocalEventHandler());
- handlers.addRemoteHandler(RemoteAccessControlEvent1.class, new AccessControlRemoteEventHandler());
handlers.addRemoteHandler(RemotePersistEvent1.class, new ArtifactRemoteEventHandler());
handlers.addRemoteHandler(RemoteBranchEvent1.class, new BranchRemoteEventHandler());
handlers.addRemoteHandler(RemoteTransactionEvent1.class, new TransactionRemoteEventHandler());
@@ -218,13 +212,11 @@ public class OseeEventServiceImpl implements OseeEventService {
}
private void deregisterEventHandlers(EventHandlers handlers) {
- handlers.removeLocalHandler(AccessControlEvent.class);
handlers.removeLocalHandler(ArtifactEvent.class);
handlers.removeLocalHandler(BranchEvent.class);
handlers.removeLocalHandler(RemoteEventServiceEventType.class);
handlers.removeLocalHandler(TransactionEvent.class);
- handlers.removeRemoteHandler(RemoteAccessControlEvent1.class);
handlers.removeRemoteHandler(RemotePersistEvent1.class);
handlers.removeRemoteHandler(RemoteBranchEvent1.class);
handlers.removeRemoteHandler(RemoteBroadcastEvent1.class);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlEventHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlEventHandler.java
deleted file mode 100644
index 53d4f0e4de..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlEventHandler.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.framework.skynet.core.internal.event.handlers;
-
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.event.FrameworkEventUtil;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
-import org.eclipse.osee.framework.skynet.core.internal.event.EventHandlerLocal;
-import org.eclipse.osee.framework.skynet.core.internal.event.Transport;
-
-/**
- * @author Roberto E. Escobar
- */
-public class AccessControlEventHandler implements EventHandlerLocal<IAccessControlEventListener, AccessControlEvent> {
-
- @Override
- public void handle(IAccessControlEventListener listener, Sender sender, AccessControlEvent event) {
- listener.handleAccessControlArtifactsEvent(sender, event);
- }
-
- @Override
- public void send(Transport transport, Sender sender, AccessControlEvent event) throws OseeCoreException {
- if (transport.isDispatchToLocalAllowed(sender)) {
- transport.sendLocal(sender, event);
- }
- if (sender.isLocal() && event.getEventType().isRemoteEventType()) {
- transport.sendRemote(FrameworkEventUtil.getRemoteAccessControlEvent(event));
- }
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlRemoteEventHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlRemoteEventHandler.java
deleted file mode 100644
index 00557cf922..0000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/AccessControlRemoteEventHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 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.framework.skynet.core.internal.event.handlers;
-
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteAccessControlEvent1;
-import org.eclipse.osee.framework.skynet.core.event.FrameworkEventUtil;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
-import org.eclipse.osee.framework.skynet.core.internal.event.EventHandlerRemote;
-import org.eclipse.osee.framework.skynet.core.internal.event.Transport;
-
-/**
- * @author Roberto E. Escobar
- */
-public class AccessControlRemoteEventHandler implements EventHandlerRemote<RemoteAccessControlEvent1> {
-
- @Override
- public void handle(Transport transport, Sender sender, RemoteAccessControlEvent1 remoteEvent) throws OseeCoreException {
- AccessControlEvent accessEvent = FrameworkEventUtil.getAccessControlEvent(remoteEvent);
- transport.send(sender, accessEvent);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/TopicLocalEventHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/TopicLocalEventHandler.java
index edc5df5832..8c66566193 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/TopicLocalEventHandler.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/TopicLocalEventHandler.java
@@ -10,10 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.internal.event.handlers;
+import org.eclipse.osee.framework.core.event.EventType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.event.EventUtil;
import org.eclipse.osee.framework.skynet.core.event.FrameworkEventUtil;
-import org.eclipse.osee.framework.skynet.core.event.model.EventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.event.model.TopicEvent;
import org.eclipse.osee.framework.skynet.core.internal.event.EventHandlerLocal;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java
index bdd439ee17..391c670c05 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java
@@ -28,8 +28,8 @@ 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.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventPayload;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
import org.eclipse.osee.jaxrs.client.JaxRsClient;
@@ -122,9 +122,9 @@ public class CurrentUserProvider extends LazyObject<User> {
}
}
if (ClientSessionManager.isSessionValid()) {
- AccessControlEvent event = new AccessControlEvent();
- event.setEventType(AccessControlEventType.UserAuthenticated);
- OseeEventManager.kickAccessControlArtifactsEvent(this, event);
+ AccessTopicEventPayload payload = new AccessTopicEventPayload();
+ OseeEventManager.kickAccessTopicEvent(CurrentUserCreationCallable.class, payload,
+ AccessTopicEvent.USER_AUTHENTICATED);
}
return currentUser;
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
index 23d3e3f16b..23e30f9c21 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
@@ -83,6 +83,7 @@ Import-Package: com.google.common.base;version="15.0.0",
org.eclipse.osee.framework.core.client.server,
org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.core.event,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.model,
org.eclipse.osee.framework.core.model.access,
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/OSGI-INF/access.artifact.lock.topic.artifact.explorer.handler.xml b/plugins/org.eclipse.osee.framework.ui.skynet/OSGI-INF/access.artifact.lock.topic.artifact.explorer.handler.xml
new file mode 100644
index 0000000000..56a463ff2a
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/OSGI-INF/access.artifact.lock.topic.artifact.explorer.handler.xml
@@ -0,0 +1,8 @@
+<?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.framework.ui.skynet.explorer.ArtifactExplorerAccessArtifactEventHandler"/>
+<service>
+ <provide interface="org.osgi.service.event.EventHandler"/>
+</service>
+ <property name="event.topics" value="framework/access/user/authenticated/lock/modified" />
+</scr:component>
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
index 8f9aa088a8..d75ba9e886 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
@@ -18,10 +18,8 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventPayload;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.dialogs.AuthenticationDialog;
@@ -35,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
/**
* @author Roberto E. Escobar
*/
-public final class SessionContributionItem extends OseeStatusContributionItem implements IAccessControlEventListener {
+public final class SessionContributionItem extends OseeStatusContributionItem {
private static final String CONTRIBUTION_ITEM_ID = "session.contribution.item";
@@ -49,7 +47,6 @@ public final class SessionContributionItem extends OseeStatusContributionItem im
super(CONTRIBUTION_ITEM_ID);
init();
updateStatus(true);
- OseeEventManager.addListener(this);
}
private void init() {
@@ -77,9 +74,9 @@ public final class SessionContributionItem extends OseeStatusContributionItem im
@Override
public void run() {
try {
- AccessControlEvent event = new AccessControlEvent();
- event.setEventType(AccessControlEventType.UserAuthenticated);
- OseeEventManager.kickAccessControlArtifactsEvent(this, event);
+ AccessTopicEventPayload payload = new AccessTopicEventPayload();
+ OseeEventManager.kickAccessTopicEvent(SessionContributionItem.class, payload,
+ AccessTopicEvent.USER_AUTHENTICATED);
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
}
@@ -96,24 +93,6 @@ public final class SessionContributionItem extends OseeStatusContributionItem im
}
@Override
- public void dispose() {
- OseeEventManager.removeListener(this);
- super.dispose();
- }
-
- @Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- if (accessControlEvent.getEventType() == AccessControlEventType.UserAuthenticated) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- updateStatus(ClientSessionManager.isSessionValid());
- }
- });
- }
- }
-
- @Override
protected Image getDisabledImage() {
return DISABLED_IMAGE;
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
index 0cb8a85d49..19d6cc5118 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java
@@ -33,7 +33,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.model.AccessArtifactLockTopicEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -258,7 +258,7 @@ public class PolicyDialog extends Dialog {
AccessArtifactLockTopicEvent event = new AccessArtifactLockTopicEvent();
event.setBranchUuid(artifact.getBranchId());
event.addArtifact(artifact.getUuid());
- OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED);
+ OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED);
System.err.println("kicked access control event " + event);
}
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java
index 0ae4039e8b..a41ddc8723 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java
@@ -24,7 +24,7 @@ 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.listener.IBranchEventListener;
import org.eclipse.osee.framework.skynet.core.event.model.AccessArtifactLockTopicEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
@@ -152,7 +152,7 @@ public class ArtifactEditorEventManager implements IArtifactEventListener, IBran
@Override
public void handleEvent(Event event) {
try {
- if (AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED.matches(event)) {
+ if (AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED.matches(event)) {
for (final IArtifactEditorEventHandler handler : handlers) {
if (!handler.isDisposed()) {
AccessArtifactLockTopicEvent payload =
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
index fd623270a1..1f7281d039 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
@@ -47,10 +47,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IBranchProvider;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
import org.eclipse.osee.framework.skynet.core.event.listener.IBranchEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEvent;
import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
@@ -97,7 +94,7 @@ import org.eclipse.ui.progress.UIJob;
/**
* @author Ryan D. Brooks
*/
-public class ArtifactExplorer extends GenericViewPart implements IArtifactExplorerEventHandler, IRebuildMenuListener, IAccessControlEventListener, IBranchEventListener, ISelectionProvider, IBranchProvider {
+public class ArtifactExplorer extends GenericViewPart implements IArtifactExplorerEventHandler, IRebuildMenuListener, IBranchEventListener, ISelectionProvider, IBranchProvider {
public static final String VIEW_ID = "org.eclipse.osee.framework.ui.skynet.ArtifactExplorer";
private static final String ROOT_UUID = "artifact.explorer.last.root_uuid";
private static final String ROOT_BRANCH = "artifact.explorer.last.root_branch";
@@ -412,26 +409,6 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor
}
@Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- try {
- if (!accessControlEvent.isForBranch(branch)) {
- return;
- }
- if (accessControlEvent.getEventType() == AccessControlEventType.UserAuthenticated) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- treeViewer.refresh();
- refreshBranchWarning();
- }
- });
- }
- } catch (Exception ex) {
- OseeLog.log(Activator.class, Level.SEVERE, ex);
- }
- }
-
- @Override
public void rebuildMenu() {
artifactExplorerMenu.setupPopupMenu();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerAccessArtifactEventHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerAccessArtifactEventHandler.java
new file mode 100644
index 0000000000..3dc6b24dc7
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerAccessArtifactEventHandler.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.framework.ui.skynet.explorer;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Level;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.swt.Displays;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class ArtifactExplorerAccessArtifactEventHandler implements EventHandler {
+
+ static Set<ArtifactExplorer> artifactExplorers = new HashSet<>();
+
+ public static void registerArtifactExplorer(ArtifactExplorer artifactExplorer) {
+ artifactExplorers.add(artifactExplorer);
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ try {
+ for (ArtifactExplorer artifactExplorer : artifactExplorers) {
+ ArtifactExplorer fArtifactExplorer = artifactExplorer;
+ Displays.ensureInDisplayThread(new Runnable() {
+ @Override
+ public void run() {
+ fArtifactExplorer.getTreeViewer().refresh();
+ fArtifactExplorer.refreshBranchWarning();
+ }
+ });
+ }
+ } catch (Exception ex) {
+ OseeLog.log(ArtifactExplorerAccessArtifactEventHandler.class, Level.SEVERE, ex);
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java
index d43a814d16..1a4fcf0460 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java
@@ -25,7 +25,7 @@ import org.eclipse.osee.framework.skynet.core.event.EventUtil;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
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.AccessTopicEventType;
+import org.eclipse.osee.framework.skynet.core.event.model.AccessTopicEvent;
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.EventModType;
@@ -159,7 +159,7 @@ public class ArtifactExplorerEventManager implements IArtifactEventListener, Eve
@Override
public void handleEvent(Event event) {
try {
- if (AccessTopicEventType.ACCESS_ARTIFACT_LOCK_MODIFIED.matches(event)) {
+ if (AccessTopicEvent.ACCESS_ARTIFACT_LOCK_MODIFIED.matches(event)) {
for (final IArtifactExplorerEventHandler handler : handlers) {
if (!handler.isDisposed()) {
Displays.ensureInDisplayThread(new Runnable() {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/.project b/plugins/org.eclipse.osee.ote.ui.define/.project
index 11018edaaa..71ca7c3dfb 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/.project
+++ b/plugins/org.eclipse.osee.ote.ui.define/.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.ote.ui.define/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF
index 57431e8798..39f2eac3ef 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF
@@ -48,4 +48,5 @@ Import-Package: com.lowagie.text;version="2.1.7",
org.eclipse.osee.framework.jdk.core.util,
org.eclipse.osee.framework.jdk.core.util.io.xml,
org.eclipse.osee.framework.logging,
- org.eclipse.ui.forms.widgets
+ org.eclipse.ui.forms.widgets,
+ org.osgi.service.event;version="1.3.1"
diff --git a/plugins/org.eclipse.osee.ote.ui.define/OSGI/access.user.authenticated.topic.handler.xml b/plugins/org.eclipse.osee.ote.ui.define/OSGI/access.user.authenticated.topic.handler.xml
new file mode 100644
index 0000000000..3ae3bd05a7
--- /dev/null
+++ b/plugins/org.eclipse.osee.ote.ui.define/OSGI/access.user.authenticated.topic.handler.xml
@@ -0,0 +1,8 @@
+<?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.ote.ui.define.panels.GrayableBranchSelectionComposite"/>
+<service>
+ <provide interface="org.osgi.service.event.EventHandler"/>
+</service>
+ <property name="event.topics" value="framework/access/user/authenticated" />
+</scr:component>
diff --git a/plugins/org.eclipse.osee.ote.ui.define/build.properties b/plugins/org.eclipse.osee.ote.ui.define/build.properties
index 36d75b6762..c7c416285e 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/build.properties
+++ b/plugins/org.eclipse.osee.ote.ui.define/build.properties
@@ -4,4 +4,5 @@ bin.includes = META-INF/,\
.,\
plugin.xml,\
images/,\
- templates/
+ templates/,\
+ OSGI/
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
index 62e7bacf25..1091bd17c3 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
@@ -12,12 +12,6 @@ package org.eclipse.osee.ote.ui.define.panels;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.ui.skynet.panels.BranchSelectSimpleComposite;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.SWT;
@@ -33,11 +27,13 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
/**
* @author Roberto E. Escobar
*/
-public class GrayableBranchSelectionComposite extends Composite implements IAccessControlEventListener {
+public class GrayableBranchSelectionComposite extends Composite implements EventHandler {
private static final String GROUP_TEXT = "Upload results into OSEE";
private static final String CHECK_BUTTON_TEXT = "Enable upload";
@@ -61,13 +57,6 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce
createControl(this);
}
- @Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- if (accessControlEvent.getEventType() == AccessControlEventType.UserAuthenticated) {
- handleUserAuthenticated();
- }
- }
-
private void createControl(Composite parent) {
GridLayout gL = new GridLayout();
gL.marginWidth = 0;
@@ -84,7 +73,6 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce
createStatusBar(group);
createSelectableArea(group);
handleBranchSelectEnabled(false);
- OseeEventManager.addListener(this);
}
private void createSelectableArea(Composite parent) {
@@ -196,12 +184,6 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce
});
}
- @Override
- public void dispose() {
- OseeEventManager.removeListener(this);
- super.dispose();
- }
-
private void handleUserAuthenticated() {
Displays.ensureInDisplayThread(new Runnable() {
@Override
@@ -216,4 +198,9 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce
public boolean runOnEventInDisplayThread() {
return true;
}
+
+ @Override
+ public void handleEvent(Event event) {
+ handleUserAuthenticated();
+ }
}

Back to the top