Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CdoResServerProtocolImpl.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CdoResServerProtocolImpl.java79
1 files changed, 79 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CdoResServerProtocolImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CdoResServerProtocolImpl.java
new file mode 100644
index 0000000000..25431f8696
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CdoResServerProtocolImpl.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Sympedia Methods and Tools.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.cdo.server.protocol;
+
+
+import org.eclipse.net4j.core.Indication;
+import org.eclipse.net4j.spring.ValidationException;
+import org.eclipse.net4j.util.ImplementationError;
+
+import org.eclipse.emf.cdo.core.protocol.AbstractCdoResProtocol;
+import org.eclipse.emf.cdo.server.CdoResServerProtocol;
+import org.eclipse.emf.cdo.server.Mapper;
+
+import org.springframework.transaction.support.TransactionTemplate;
+
+
+public class CdoResServerProtocolImpl extends AbstractCdoResProtocol implements
+ CdoResServerProtocol
+{
+ protected Mapper mapper;
+
+ protected TransactionTemplate transactionTemplate;
+
+ public CdoResServerProtocolImpl()
+ {
+ }
+
+ public int getType()
+ {
+ return SERVER;
+ }
+
+ public Indication createIndication(short signalId)
+ {
+ switch (signalId)
+ {
+ case QUERY_ALL_RESOURCES:
+ return new QueryAllResourcesIndication();
+
+ default:
+ throw new ImplementationError("Invalid " + PROTOCOL_NAME + " signalId: " + signalId);
+ }
+ }
+
+ public Mapper getMapper()
+ {
+ return mapper;
+ }
+
+ public void setMapper(Mapper mapper)
+ {
+ doSet("mapper", mapper);
+ }
+
+ public TransactionTemplate getTransactionTemplate()
+ {
+ return transactionTemplate;
+ }
+
+ public void setTransactionTemplate(TransactionTemplate transactionTemplate)
+ {
+ doSet("transactionTemplate", transactionTemplate);
+ }
+
+ protected void validate() throws ValidationException
+ {
+ super.validate();
+ assertNotNull("mapper");
+ assertNotNull("transactionTemplate");
+ }
+} \ No newline at end of file

Back to the top