Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-06-08 22:55:48 -0400
committerddunne2010-06-08 22:55:48 -0400
commit6b76d9a1eede9f517cba2c7244f98223def09903 (patch)
treef3ffc34ab4b22dbf690b1bec5fd32ca58af72c3d /plugins/org.eclipse.osee.framework.messaging.event.res
parentda822f5fe9138edc34bfe91d1f70f735a4e357d6 (diff)
downloadorg.eclipse.osee-6b76d9a1eede9f517cba2c7244f98223def09903.tar.gz
org.eclipse.osee-6b76d9a1eede9f517cba2c7244f98223def09903.tar.xz
org.eclipse.osee-6b76d9a1eede9f517cba2c7244f98223def09903.zip
events - access control events
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging.event.res')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/jaxb/resMessages.xsd8
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java135
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java29
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java4
4 files changed, 174 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/jaxb/resMessages.xsd b/plugins/org.eclipse.osee.framework.messaging.event.res/jaxb/resMessages.xsd
index 90b9b26e56..0f8ebca8a3 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/jaxb/resMessages.xsd
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/jaxb/resMessages.xsd
@@ -13,6 +13,14 @@
</xsd:appinfo>
</xsd:annotation>
+<xsd:complexType name="RemoteAccessControlEvent1">
+ <xsd:sequence>
+ <xsd:element name="eventTypeGuid" type="xsd:string"/>
+ <xsd:element name="artifacts" type="RemoteBasicGuidArtifact1" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element name="networkSender" type="RemoteNetworkSender1" maxOccurs="1" minOccurs="1"/>
+ </xsd:sequence>
+</xsd:complexType>
+
<xsd:complexType name="RemotePersistEvent1">
<xsd:sequence>
<xsd:element name="branchGuid" type="xsd:string"/>
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
new file mode 100644
index 0000000000..dfd8a5a119
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java
@@ -0,0 +1,135 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.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: 2010.06.04 at 10:11:33 AM 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<RemoteBasicGuidArtifact1>();
+ }
+ return this.artifacts;
+ }
+
+ /**
+ * Gets the value of the networkSender property.
+ *
+ * @return
+ * possible object is
+ * {@link RemoteNetworkSender1 }
+ *
+ */
+ 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/ResEventManager.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
index 8e08149cc5..aef1f23206 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResEventManager.java
@@ -12,6 +12,7 @@ import org.eclipse.osee.framework.messaging.ConnectionNode;
import org.eclipse.osee.framework.messaging.OseeMessagingListener;
import org.eclipse.osee.framework.messaging.OseeMessagingStatusCallback;
import org.eclipse.osee.framework.messaging.ReplyConnection;
+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;
@@ -70,13 +71,20 @@ public class ResEventManager implements OseeMessagingStatusCallback {
connectionNode.subscribe(ResMessages.RemotePersistEvent1, new RemotePersistEvent1Listener(), instance);
connectionNode.subscribe(ResMessages.RemoteBranchEvent1, new RemoteBranchEvent1Listener(), instance);
connectionNode.subscribe(ResMessages.RemoteBroadcastEvent1, new RemoteBroadcastEvent1Listener(), instance);
+ connectionNode.subscribe(ResMessages.RemoteAccessControlEvent1, new RemoteAccessControlEvent1Listener(), instance);
}
public void kick(RemoteEvent remoteEvent) throws Exception {
- if (remoteEvent instanceof RemoteTransactionEvent1) {
+ if (remoteEvent instanceof RemotePersistEvent1) {
+ sendRemoteEvent(ResMessages.RemotePersistEvent1, remoteEvent);
+ } else if (remoteEvent instanceof RemoteTransactionEvent1) {
sendRemoteEvent(ResMessages.RemoteTransactionEvent1, remoteEvent);
} else if (remoteEvent instanceof RemoteBranchEvent1) {
sendRemoteEvent(ResMessages.RemoteBranchEvent1, remoteEvent);
+ } else if (remoteEvent instanceof RemoteBroadcastEvent1) {
+ sendRemoteEvent(ResMessages.RemoteBroadcastEvent1, remoteEvent);
+ } else if (remoteEvent instanceof RemoteAccessControlEvent1) {
+ sendRemoteEvent(ResMessages.RemoteAccessControlEvent1, remoteEvent);
} else {
System.out.println("ResEventManager: Unhandled remote event " + remoteEvent);
}
@@ -110,6 +118,25 @@ public class ResEventManager implements OseeMessagingStatusCallback {
public void success() {
}
+ public class RemoteAccessControlEvent1Listener extends OseeMessagingListener {
+
+ public RemoteAccessControlEvent1Listener() {
+ super(RemoteAccessControlEvent1.class);
+ }
+
+ @Override
+ public void process(final Object message, Map<String, Object> headers, ReplyConnection replyConnection) {
+ RemoteAccessControlEvent1 remoteTransactionEvent1 = (RemoteAccessControlEvent1) message;
+ System.err.println(String.format(getClass().getSimpleName() + " - received [%s]",
+ message.getClass().getSimpleName()));
+ try {
+ frameworkEventListener.onEvent(remoteTransactionEvent1);
+ } catch (RemoteException ex) {
+ System.err.println(getClass().getSimpleName() + " - process: " + ex.getLocalizedMessage());
+ }
+ }
+ }
+
public class RemoteTransactionEvent1Listener extends OseeMessagingListener {
public RemoteTransactionEvent1Listener() {
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
index e12566d909..8329a0c5e9 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/ResMessages.java
@@ -1,6 +1,7 @@
package org.eclipse.osee.framework.messaging.event.res;
import org.eclipse.osee.framework.messaging.MessageID;
+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;
@@ -10,7 +11,8 @@ public enum ResMessages implements MessageID {
RemoteBranchEvent1(true, "Aylfa1wlKXIbX2gOrVgA", "topic:org.eclipse.osee.coverage.msgs.RemoteBranchEvent1", RemoteBranchEvent1.class, false),
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),
- RemoteTransactionEvent1(true, "AAn_QHkqUhz3vJKwp8QA", "topic:org.eclipse.osee.coverage.msgs.RemoteTransactionEvent1", RemoteTransactionEvent1.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);
private String name;
private Class<?> clazz;

Back to the top