summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-05-12 05:29:01 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-05-12 05:29:01 +0000
commit03006fa715a2b2109b0cc7837da6c41f2a56c22f (patch)
tree2a5282effdd122c9bc4ad04002ad7dd4c86540d1 /sca-java-2.x/trunk/modules/binding-rest
parentb194aae6f8c2ed31a40439502d96c48ba1c51182 (diff)
Adding RPC Operation Selector to binding.rest
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@943376 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF1
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java43
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java35
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java36
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java45
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory19
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor5
7 files changed, 183 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
index 293d747f2a..0b41460d10 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
+++ b/sca-java-2.x/trunk/modules/binding-rest/META-INF/MANIFEST.MF
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
Export-Package: org.apache.tuscany.sca.binding.rest;version="2.0.0";uses:="org.apache.tuscany.sca.assembly,javax.xml.namespace,javax.servlet.http",
org.apache.tuscany.sca.binding.rest.operationselector.jaxrs,
+ org.apache.tuscany.sca.binding.rest.operationselector.rpc,
org.apache.tuscany.sca.binding.rest.wireformat.json;version="2.0.0",
org.apache.tuscany.sca.binding.rest.wireformat.xml
Bundle-Name: Apache Tuscany SCA REST Binding Model
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java
new file mode 100644
index 0000000000..7730a1e75e
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelector.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.rest.operationselector.rpc;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.assembly.xml.Constants;
+
+/**
+ * RPC Operation Selector model
+ *
+ * @version $Rev$ $Date$
+ */
+public interface RPCOperationSelector extends OperationSelector {
+ /**
+ * QName representing the RPC Operation Selector extension
+ */
+ public static final QName REST_OPERATION_SELECTOR_RPC_QNAME = new QName(Constants.SCA11_TUSCANY_NS, "operationSelector.rpc");
+
+ /**
+ * Return the QName identifying the operation selector
+ * @return the QName identifying the operation selector
+ */
+ QName getSchemaName();
+}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java
new file mode 100644
index 0000000000..27a56c374d
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/RPCOperationSelectorFactory.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.rest.operationselector.rpc;
+
+
+/**
+ * RPC Operation Selector model factory
+ *
+ * @version $Rev$ $Date$
+ */
+public interface RPCOperationSelectorFactory {
+
+ /**
+ * Create a new RPC Operation Selector
+ * @return
+ */
+ RPCOperationSelector createRPCOperationSelector();
+}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java
new file mode 100644
index 0000000000..9e67f35bc0
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorFactoryImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.rest.operationselector.rpc.impl;
+
+import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelector;
+import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory;
+
+/**
+ * RPC Operation Selector model factory implementation
+ *
+ * @version $Rev$ $Date$
+ */
+public class RPCOperationSelectorFactoryImpl implements RPCOperationSelectorFactory {
+
+ public RPCOperationSelector createRPCOperationSelector() {
+ return new RPCOperationSelectorImpl();
+ }
+
+}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java
new file mode 100644
index 0000000000..bca8218f8d
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/impl/RPCOperationSelectorImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.rest.operationselector.rpc.impl;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelector;
+
+
+/**
+ * RPC Operation Selector model implementation
+ *
+ * @version $Rev$ $Date$
+ */
+public class RPCOperationSelectorImpl implements RPCOperationSelector {
+
+ public QName getSchemaName() {
+ return RPCOperationSelector.REST_OPERATION_SELECTOR_RPC_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+
+ }
+}
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory
new file mode 100644
index 0000000000..7da7b6bf0e
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for model factory
+org.apache.tuscany.sca.binding.rest.operationselector.rpc.impl.RPCOperationSelectorFactoryImpl \ No newline at end of file
diff --git a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index 50415cfafe..d88cba48f6 100644
--- a/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/sca-java-2.x/trunk/modules/binding-rest/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -21,4 +21,7 @@ org.apache.tuscany.sca.binding.rest.xml.RESTBindingProcessor;qname=http://tuscan
# Implementation class for the wireFormat processor extension
org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#wireFormat.json,model=org.apache.tuscany.sca.binding.rest.wireformat.json.JSONWireFormat,factory=org.apache.tuscany.sca.binding.rest.wireformat.json.JSONWireFormatFactory
org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#wireFormat.xml,model=org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormat,factory=org.apache.tuscany.sca.binding.rest.wireformat.xml.XMLWireFormatFactory
-org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#operationSelector.jaxrs,model=org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelector,factory=org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelectorFactory \ No newline at end of file
+
+# Implementation class for operationSelector processor extension
+org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#operationSelector.jaxrs,model=org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelector,factory=org.apache.tuscany.sca.binding.rest.operationselector.jaxrs.JAXRSOperationSelectorFactory
+org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#operationSelector.rpc,model=org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelector,factory=org.apache.tuscany.sca.binding.rest.operationselector.rpc.RPCOperationSelectorFactory \ No newline at end of file