Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/misc/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/SyncRequest.java')
-rwxr-xr-xplugins/infra/misc/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/SyncRequest.java85
1 files changed, 85 insertions, 0 deletions
diff --git a/plugins/infra/misc/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/SyncRequest.java b/plugins/infra/misc/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/SyncRequest.java
new file mode 100755
index 00000000000..b513bea3ad8
--- /dev/null
+++ b/plugins/infra/misc/org.eclipse.papyrus.infra.sync/src/org/eclipse/papyrus/infra/sync/SyncRequest.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.sync;
+
+/**
+ * Represents a synchronization request
+ *
+ * @author Laurent Wouters
+ *
+ * @param <M>
+ * The type of the underlying model element common to all synchronized items in a single bucket
+ * @param <T>
+ * The type of the backend element to synchronize
+ * @param <X>
+ * The type of change message carried by the sync request
+ */
+public class SyncRequest<M, T, X> {
+ /**
+ * The synchronized feature
+ */
+ private SyncFeature<M, T, X> feature;
+ /**
+ * The item originating the change
+ */
+ private SyncItem<M, T> origin;
+ /**
+ * The change message
+ */
+ private X message;
+
+ /**
+ * Gets the synchronized feature
+ *
+ * @return The synchronized feature
+ */
+ public SyncFeature<M, T, X> getFeature() {
+ return feature;
+ }
+
+ /**
+ * Gets the item originating the change
+ *
+ * @return The item originating the change
+ */
+ public SyncItem<M, T> getOrigin() {
+ return origin;
+ }
+
+ /**
+ * Gets the change message
+ *
+ * @return The change message
+ */
+ public X getMessage() {
+ return message;
+ }
+
+ /**
+ * Initializes this request
+ *
+ * @param feature
+ * The synchronized feature
+ * @param origin
+ * The item originating the change
+ * @param message
+ * The change message
+ */
+ public SyncRequest(SyncFeature<M, T, X> feature, SyncItem<M, T> origin, X message) {
+ this.feature = feature;
+ this.origin = origin;
+ this.message = message;
+ }
+}

Back to the top